]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20200725
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.711 .
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   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
764 Fine-Tuning Your Configuration:
765   --with-extra-suffix=X   append extra suffix to header/library paths
766   --disable-overwrite     put headers in subdir, omit link to -lcurses
767   --disable-database      do not use terminfo, only fallbacks/termcap
768   --with-database=XXX     specify terminfo source to install
769   --with-hashed-db        specify hashed-database library
770   --with-fallbacks=XXX    specify list of fallback terminal descriptions
771   --with-tic-path=XXX     specify path of tic for fallbacks
772   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
773   --without-xterm-new     specify if xterm terminfo should be old version
774   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
775   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
776   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
777   --disable-big-core      assume machine has little memory
778   --disable-big-strings   assume compiler has only standard-size strings
779   --enable-termcap        compile in termcap fallback support
780   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
781   --enable-getcap         fast termcap load, no xrefs to terminfo
782   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
783   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
784   --disable-root-environ  restrict environment when running as root
785   --enable-symlinks       make tic use symbolic links not hard links
786   --enable-broken_linker  compile with broken-linker support code
787   --enable-bsdpad         recognize BSD-style prefix padding
788   --enable-widec          compile with wide-char/UTF-8 code
789   --disable-lp64          allow chtype to be long (ignore _LP64)
790   --disable-largefile     omit support for large files
791   --disable-tparm-varargs compile tparm() without varargs interface
792   --disable-tic-depends   link tic library without explicit dependency on ncurses library
793   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
794   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
795   --with-bool=TYPE        override fallback type of bool variable
796   --with-caps=alt         compile with alternate Caps file
797   --with-chtype=TYPE      override type of chtype
798   --with-ospeed=TYPE      override type of ospeed variable
799   --with-mmask-t=TYPE     override type of mmask_t
800   --with-ccharw-max=XXX   override size CCHARW_MAX
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --with-tparm-arg=TYPE   override parameter type of tparm
803   --with-rcs-ids          compile-in RCS identifiers
804 Options to Specify How Manpages are Installed:
805   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
806                           optionally formatted/catonly, e.g., gzip,formatted
807   --with-manpage-renames  specify manpage-renaming
808   --with-manpage-aliases  specify manpage-aliases using .so
809   --with-manpage-symlinks specify manpage-aliases using symlinks
810   --with-manpage-tbl      specify manpage processing with tbl
811 Extensions:
812   --disable-ext-funcs     disable function-extensions
813   --enable-sp-funcs       enable SCREEN-extensions
814   --enable-term-driver    enable terminal-driver
815   --enable-const          compile with extra/non-standard const
816   --enable-ext-colors     compile for 256-color support
817   --enable-ext-mouse      compile for extended mouse-encoding
818   --enable-ext-putwin     compile with extended putwin/screendump
819   --enable-no-padding     compile with $NCURSES_NO_PADDING code
820   --enable-sigwinch       compile with SIGWINCH handler
821   --enable-tcap-names     compile with user-definable terminal capabilities
822 Reentrant Code:
823   --with-pthread          use POSIX thread library
824   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
825   --enable-weak-symbols   enable weak-symbols for pthreads
826   --enable-reentrant      compile with reentrant code
827   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
828   --enable-opaque-form    make form-library structures "opaque"
829   --enable-opaque-menu    make menu-library structures "opaque"
830   --enable-opaque-panel   make panel-library structures "opaque"
831   --with-wrap-prefix=XXX  override prefix used for public variables
832 Development Code:
833   --without-develop       disable development options
834   --enable-hard-tabs      compile with hard-tabs code
835   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
836 Experimental Code:
837   --disable-assumed-color do not assume anything about default-colors
838   --disable-hashmap       compile without hashmap scrolling-optimization
839   --enable-colorfgbg      compile-in experimental $COLORFGBG code
840   --enable-fvisibility    compile with -fvisibility=hidden
841   --enable-interop        compile-in interop bindings
842   --enable-safe-sprintf   compile with experimental safe-sprintf code
843   --disable-scroll-hints  compile without scroll-hints code
844   --enable-wgetch-events  compile with wgetch-events code
845 Testing/development Options:
846   --disable-echo          do not display "compiling" commands
847   --disable-stripping     do not strip (debug info) installed executables
848   --enable-warnings       build: turn on GCC compiler warnings
849   --enable-string-hacks   work around bogus compiler/loader warnings
850   --enable-assertions     test: turn on generation of assertion code
851   --with-dmalloc          test: use Gray Watson's dmalloc library
852   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
853   --with-valgrind         test: use valgrind
854   --disable-leaks         test: free permanent memory, analyze leaks
855   --enable-expanded       test: generate functions for certain macros
856   --disable-macros        test: use functions rather than macros
857   --with-trace            test: add trace() function to all models of ncurses
858   --disable-gnat-projects test: disable GNAT projects even if usable
859 Ada Binding Options:
860   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
861   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
862   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
863   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
864   --with-ada-libname=XXX  override default Ada library-name
865   --with-form-libname=XXX override form basename of library
866   --with-menu-libname=XXX override menu basename of library
867   --with-panel-libname=XXX override panel basename of library
868   --with-cxx-libname=XXX override ncurses++ basename of library
869
870 Some influential environment variables:
871   CC          C compiler command
872   CFLAGS      C compiler flags
873   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
874               nonstandard directory <lib dir>
875   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
876               headers in a nonstandard directory <include dir>
877   CPP         C preprocessor
878   CXX         C++ compiler command
879   CXXFLAGS    C++ compiler flags
880   CXXCPP      C++ preprocessor
881
882 Use these variables to override the choices made by `configure' or to help
883 it to find libraries and programs with nonstandard names/locations.
884
885 EOF
886 fi
887
888 if test "$ac_init_help" = "recursive"; then
889   # If there are subdirs, report their specific --help.
890   ac_popdir=`pwd`
891   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
892     cd $ac_subdir
893     # A "../" for each directory in /$ac_subdir.
894     ac_dots=`echo $ac_subdir |
895              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
896
897     case $srcdir in
898     .) # No --srcdir option.  We are building in place.
899       ac_sub_srcdir=$srcdir ;;
900     [\\/]* | ?:[\\/]* ) # Absolute path.
901       ac_sub_srcdir=$srcdir/$ac_subdir ;;
902     *) # Relative path.
903       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
904     esac
905
906     # Check for guested configure; otherwise get Cygnus style configure.
907     if test -f $ac_sub_srcdir/configure.gnu; then
908       echo
909       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
910     elif test -f $ac_sub_srcdir/configure; then
911       echo
912       $SHELL $ac_sub_srcdir/configure  --help=recursive
913     elif test -f $ac_sub_srcdir/configure.ac ||
914            test -f $ac_sub_srcdir/configure.in; then
915       echo
916       $ac_configure --help
917     else
918       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
919     fi
920     cd $ac_popdir
921   done
922 fi
923
924 test -n "$ac_init_help" && exit 0
925 if $ac_init_version; then
926   cat <<\EOF
927
928 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
929 Free Software Foundation, Inc.
930 This configure script is free software; the Free Software Foundation
931 gives unlimited permission to copy, distribute and modify it.
932 EOF
933   exit 0
934 fi
935 exec 5>config.log
936 cat >&5 <<EOF
937 This file contains any messages produced by compilers while
938 running configure, to aid debugging if configure makes a mistake.
939
940 It was created by $as_me, which was
941 generated by GNU Autoconf 2.52.20200111.  Invocation command line was
942
943   $ $0 $@
944
945 EOF
946 {
947 cat <<_ASUNAME
948 ## ---------- ##
949 ## Platform.  ##
950 ## ---------- ##
951
952 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
953 uname -m = `(uname -m) 2>/dev/null || echo unknown`
954 uname -r = `(uname -r) 2>/dev/null || echo unknown`
955 uname -s = `(uname -s) 2>/dev/null || echo unknown`
956 uname -v = `(uname -v) 2>/dev/null || echo unknown`
957
958 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
959 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
960
961 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
962 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
963 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
964 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
965 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
966 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
967 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
968
969 PATH = $PATH
970
971 _ASUNAME
972 } >&5
973
974 cat >&5 <<EOF
975 ## ------------ ##
976 ## Core tests.  ##
977 ## ------------ ##
978
979 EOF
980
981 # Keep a trace of the command line.
982 # Strip out --no-create and --no-recursion so they do not pile up.
983 # Also quote any args containing shell meta-characters.
984 ac_configure_args=
985 ac_sep=
986 for ac_arg
987 do
988   case $ac_arg in
989   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
990   | --no-cr | --no-c) ;;
991   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
993   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
994     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
995     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
996     ac_sep=" " ;;
997   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
998      ac_sep=" " ;;
999   esac
1000   # Get rid of the leading space.
1001 done
1002
1003 # When interrupted or exit'd, cleanup temporary files, and complete
1004 # config.log.  We remove comments because anyway the quotes in there
1005 # would cause problems or look ugly.
1006 trap 'exit_status=$?
1007   # Save into config.log some information that might help in debugging.
1008   echo >&5
1009   echo "## ----------------- ##" >&5
1010   echo "## Cache variables.  ##" >&5
1011   echo "## ----------------- ##" >&5
1012   echo >&5
1013   # The following way of writing the cache mishandles newlines in values,
1014 {
1015   (set) 2>&1 |
1016     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1017     *ac_space=\ *)
1018       sed -n \
1019         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1020           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1021       ;;
1022     *)
1023       sed -n \
1024         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1025       ;;
1026     esac;
1027 } >&5
1028   sed "/^$/d" confdefs.h >conftest.log
1029   if test -s conftest.log; then
1030     echo >&5
1031     echo "## ------------ ##" >&5
1032     echo "## confdefs.h.  ##" >&5
1033     echo "## ------------ ##" >&5
1034     echo >&5
1035     cat conftest.log >&5
1036   fi
1037   (echo; echo) >&5
1038   test "$ac_signal" != 0 &&
1039     echo "$as_me: caught signal $ac_signal" >&5
1040   echo "$as_me: exit $exit_status" >&5
1041   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1042     exit $exit_status
1043      ' 0
1044 for ac_signal in 1 2 13 15; do
1045   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1046 done
1047 ac_signal=0
1048
1049 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1050 rm -rf conftest* confdefs.h
1051 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1052 echo >confdefs.h
1053
1054 # Let the site file select an alternate cache file if it wants to.
1055 # Prefer explicitly selected file to automatically selected ones.
1056 if test -z "$CONFIG_SITE"; then
1057   if test "x$prefix" != xNONE; then
1058     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1059   else
1060     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1061   fi
1062 fi
1063 for ac_site_file in $CONFIG_SITE; do
1064   if test -r "$ac_site_file"; then
1065     { echo "$as_me:1065: loading site script $ac_site_file" >&5
1066 echo "$as_me: loading site script $ac_site_file" >&6;}
1067     cat "$ac_site_file" >&5
1068     . "$ac_site_file"
1069   fi
1070 done
1071
1072 if test -r "$cache_file"; then
1073   # Some versions of bash will fail to source /dev/null (special
1074   # files actually), so we avoid doing that.
1075   if test -f "$cache_file"; then
1076     { echo "$as_me:1076: loading cache $cache_file" >&5
1077 echo "$as_me: loading cache $cache_file" >&6;}
1078     case $cache_file in
1079       [\\/]* | ?:[\\/]* ) . $cache_file;;
1080       *)                      . ./$cache_file;;
1081     esac
1082   fi
1083 else
1084   { echo "$as_me:1084: creating cache $cache_file" >&5
1085 echo "$as_me: creating cache $cache_file" >&6;}
1086   >$cache_file
1087 fi
1088
1089 # Check that the precious variables saved in the cache have kept the same
1090 # value.
1091 ac_cache_corrupted=false
1092 for ac_var in `(set) 2>&1 |
1093                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1094   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1095   eval ac_new_set=\$ac_env_${ac_var}_set
1096   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1097   eval ac_new_val="\$ac_env_${ac_var}_value"
1098   case $ac_old_set,$ac_new_set in
1099     set,)
1100       { echo "$as_me:1100: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1101 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1102       ac_cache_corrupted=: ;;
1103     ,set)
1104       { echo "$as_me:1104: error: \`$ac_var' was not set in the previous run" >&5
1105 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1106       ac_cache_corrupted=: ;;
1107     ,);;
1108     *)
1109       if test "x$ac_old_val" != "x$ac_new_val"; then
1110         { echo "$as_me:1110: error: \`$ac_var' has changed since the previous run:" >&5
1111 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1112         { echo "$as_me:1112:   former value:  $ac_old_val" >&5
1113 echo "$as_me:   former value:  $ac_old_val" >&2;}
1114         { echo "$as_me:1114:   current value: $ac_new_val" >&5
1115 echo "$as_me:   current value: $ac_new_val" >&2;}
1116         ac_cache_corrupted=:
1117       fi;;
1118   esac
1119   # Pass precious variables to config.status.  It doesn't matter if
1120   # we pass some twice (in addition to the command line arguments).
1121   if test "$ac_new_set" = set; then
1122     case $ac_new_val in
1123     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1124       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1125       ac_configure_args="$ac_configure_args '$ac_arg'"
1126       ;;
1127     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1128        ;;
1129     esac
1130   fi
1131 done
1132 if $ac_cache_corrupted; then
1133   { echo "$as_me:1133: error: changes in the environment can compromise the build" >&5
1134 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1135   { { echo "$as_me:1135: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1136 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1137    { (exit 1); exit 1; }; }
1138 fi
1139
1140 ac_ext=c
1141 ac_cpp='$CPP $CPPFLAGS'
1142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1145 ac_main_return=return
1146
1147 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1148   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1149                    ECHO_T='     ' ;;
1150   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1151   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1152 esac
1153 echo "#! $SHELL" >conftest.sh
1154 echo  "exit 0"   >>conftest.sh
1155 chmod +x conftest.sh
1156 if { (echo "$as_me:1156: PATH=\".;.\"; conftest.sh") >&5
1157   (PATH=".;."; conftest.sh) 2>&5
1158   ac_status=$?
1159   echo "$as_me:1159: \$? = $ac_status" >&5
1160   (exit $ac_status); }; then
1161   ac_path_separator=';'
1162 else
1163   ac_path_separator=:
1164 fi
1165 PATH_SEPARATOR="$ac_path_separator"
1166 rm -f conftest.sh
1167
1168 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1169
1170 top_builddir=`pwd`
1171
1172 echo "$as_me:1172: checking for egrep" >&5
1173 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1174 if test "${ac_cv_prog_egrep+set}" = set; then
1175   echo $ECHO_N "(cached) $ECHO_C" >&6
1176 else
1177   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1178                 then ac_cv_prog_egrep='grep -E'
1179                 else ac_cv_prog_egrep='egrep'
1180         fi
1181 fi
1182 echo "$as_me:1182: result: $ac_cv_prog_egrep" >&5
1183 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1184         EGREP=$ac_cv_prog_egrep
1185
1186         test -z "$EGREP" && { { echo "$as_me:1186: error: No egrep program found" >&5
1187 echo "$as_me: error: No egrep program found" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1191 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1192 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1193 cf_cv_abi_version=${NCURSES_MAJOR}
1194 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1195 cf_cv_timestamp=`date`
1196 echo "$as_me:1196: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1197 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1198
1199 if test -f $srcdir/VERSION ; then
1200         echo "$as_me:1200: checking for package version" >&5
1201 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1202
1203         # if there are not enough fields, cut returns the last one...
1204         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1205         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1206         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1207
1208         # this is how CF_BUNDLED_INTL uses $VERSION:
1209         VERSION="$cf_field1"
1210
1211         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1212         test -z "$VERSION_MAJOR" && { { echo "$as_me:1212: error: missing major-version" >&5
1213 echo "$as_me: error: missing major-version" >&2;}
1214    { (exit 1); exit 1; }; }
1215
1216         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1217         test -z "$VERSION_MINOR" && { { echo "$as_me:1217: error: missing minor-version" >&5
1218 echo "$as_me: error: missing minor-version" >&2;}
1219    { (exit 1); exit 1; }; }
1220
1221         echo "$as_me:1221: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1222 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1223
1224         echo "$as_me:1224: checking for package patch date" >&5
1225 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1226         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1227         case .$VERSION_PATCH in
1228         (.)
1229                 { { echo "$as_me:1229: error: missing patch-date $VERSION_PATCH" >&5
1230 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1231    { (exit 1); exit 1; }; }
1232                 ;;
1233         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1234                 ;;
1235         (*)
1236                 { { echo "$as_me:1236: error: illegal patch-date $VERSION_PATCH" >&5
1237 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1238    { (exit 1); exit 1; }; }
1239                 ;;
1240         esac
1241         echo "$as_me:1241: result: $VERSION_PATCH" >&5
1242 echo "${ECHO_T}$VERSION_PATCH" >&6
1243 else
1244         { { echo "$as_me:1244: error: did not find $srcdir/VERSION" >&5
1245 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1246    { (exit 1); exit 1; }; }
1247 fi
1248
1249 # show the actual data that we have for versions:
1250 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1251
1252 echo "${as_me:-configure}:1252: testing ABI VERSION $VERSION ..." 1>&5
1253
1254 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1255
1256 echo "${as_me:-configure}:1256: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1257
1258 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1259
1260 echo "${as_me:-configure}:1260: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1261
1262 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1263
1264 echo "${as_me:-configure}:1264: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1265
1266         cf_PACKAGE=NCURSES
1267         PACKAGE=ncurses
1268
1269 cat >>confdefs.h <<EOF
1270 #define PACKAGE "$PACKAGE"
1271 EOF
1272
1273 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1274
1275         cat >>confdefs.h <<EOF
1276 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1277 EOF
1278
1279         cat >>confdefs.h <<EOF
1280 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1281 EOF
1282
1283 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1284
1285 # Check whether --with-rel-version or --without-rel-version was given.
1286 if test "${with_rel_version+set}" = set; then
1287   withval="$with_rel_version"
1288   { echo "$as_me:1288: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1289 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1290  cf_cv_rel_version=$withval
1291 fi;
1292
1293  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1294  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1295
1296 if test -n "$NCURSES_MAJOR" ; then
1297   case $NCURSES_MAJOR in
1298   ([0-9]*)
1299         ;;
1300   (*)
1301         { { echo "$as_me:1301: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1302 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1303    { (exit 1); exit 1; }; }
1304         ;;
1305   esac
1306 else
1307   { { echo "$as_me:1307: error: Release major-version value is empty" >&5
1308 echo "$as_me: error: Release major-version value is empty" >&2;}
1309    { (exit 1); exit 1; }; }
1310 fi
1311
1312 if test -n "$NCURSES_MINOR" ; then
1313   case $NCURSES_MINOR in
1314   ([0-9]*)
1315         ;;
1316   (*)
1317         { { echo "$as_me:1317: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1318 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1319    { (exit 1); exit 1; }; }
1320         ;;
1321   esac
1322 else
1323   { { echo "$as_me:1323: error: Release minor-version value is empty" >&5
1324 echo "$as_me: error: Release minor-version value is empty" >&2;}
1325    { (exit 1); exit 1; }; }
1326 fi
1327
1328 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1329
1330 # Check whether --with-abi-version or --without-abi-version was given.
1331 if test "${with_abi_version+set}" = set; then
1332   withval="$with_abi_version"
1333
1334         if test "x$cf_cv_abi_version" != "x$withval"
1335         then
1336                 { echo "$as_me:1336: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1337 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1338                 case $cf_cv_rel_version in
1339                 (5.*)
1340                         cf_cv_rel_version=$withval.0
1341                         ;;
1342                 (6.*)
1343                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1344                         ;;
1345                 esac
1346         fi
1347         cf_cv_abi_version=$withval
1348 fi;
1349
1350 if test -n "$cf_cv_abi_version" ; then
1351   case $cf_cv_abi_version in
1352   ([0-9]*)
1353         ;;
1354   (*)
1355         { { echo "$as_me:1355: error: ABI version is not a number: $cf_cv_abi_version" >&5
1356 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1357    { (exit 1); exit 1; }; }
1358         ;;
1359   esac
1360 else
1361   { { echo "$as_me:1361: error: ABI version value is empty" >&5
1362 echo "$as_me: error: ABI version value is empty" >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365
1366 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1367 then
1368         case $cf_cv_rel_version in
1369         (5.*)
1370                 cf_cv_rel_version=$with_abi_version.0
1371                 ;;
1372         esac
1373 fi
1374
1375 ac_aux_dir=
1376 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1377   if test -f $ac_dir/install-sh; then
1378     ac_aux_dir=$ac_dir
1379     ac_install_sh="$ac_aux_dir/install-sh -c"
1380     break
1381   elif test -f $ac_dir/install.sh; then
1382     ac_aux_dir=$ac_dir
1383     ac_install_sh="$ac_aux_dir/install.sh -c"
1384     break
1385   elif test -f $ac_dir/shtool; then
1386     ac_aux_dir=$ac_dir
1387     ac_install_sh="$ac_aux_dir/shtool install -c"
1388     break
1389   fi
1390 done
1391 if test -z "$ac_aux_dir"; then
1392   { { echo "$as_me:1392: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1393 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1394    { (exit 1); exit 1; }; }
1395 fi
1396 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1397 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1398 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1399
1400 # Make sure we can run config.sub.
1401 $ac_config_sub sun4 >/dev/null 2>&1 ||
1402   { { echo "$as_me:1402: error: cannot run $ac_config_sub" >&5
1403 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1404    { (exit 1); exit 1; }; }
1405
1406 echo "$as_me:1406: checking build system type" >&5
1407 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1408 if test "${ac_cv_build+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_build_alias=$build_alias
1412 test -z "$ac_cv_build_alias" &&
1413   ac_cv_build_alias=`$ac_config_guess`
1414 test -z "$ac_cv_build_alias" &&
1415   { { echo "$as_me:1415: error: cannot guess build type; you must specify one" >&5
1416 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1417    { (exit 1); exit 1; }; }
1418 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1419   { { echo "$as_me:1419: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:1424: result: $ac_cv_build" >&5
1425 echo "${ECHO_T}$ac_cv_build" >&6
1426 build=$ac_cv_build
1427 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431 echo "$as_me:1431: checking host system type" >&5
1432 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1433 if test "${ac_cv_host+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   ac_cv_host_alias=$host_alias
1437 test -z "$ac_cv_host_alias" &&
1438   ac_cv_host_alias=$ac_cv_build_alias
1439 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1440   { { echo "$as_me:1440: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1441 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1442    { (exit 1); exit 1; }; }
1443
1444 fi
1445 echo "$as_me:1445: result: $ac_cv_host" >&5
1446 echo "${ECHO_T}$ac_cv_host" >&6
1447 host=$ac_cv_host
1448 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1449 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1450 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1451
1452 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1453         echo "$as_me:1453: checking target system type" >&5
1454 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1455 if test "${ac_cv_target+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   ac_cv_target_alias=$target_alias
1459 test "x$ac_cv_target_alias" = "x" &&
1460   ac_cv_target_alias=$ac_cv_host_alias
1461 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1462   { { echo "$as_me:1462: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1463 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1464    { (exit 1); exit 1; }; }
1465
1466 fi
1467 echo "$as_me:1467: result: $ac_cv_target" >&5
1468 echo "${ECHO_T}$ac_cv_target" >&6
1469 target=$ac_cv_target
1470 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1471 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1472 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1473
1474 # The aliases save the names the user supplied, while $host etc.
1475 # will get canonicalized.
1476 test -n "$target_alias" &&
1477   test "$program_prefix$program_suffix$program_transform_name" = \
1478     NONENONEs,x,x, &&
1479   program_prefix=${target_alias}-
1480         system_name="$host_os"
1481 else
1482         system_name="`(uname -s -r) 2>/dev/null`"
1483         if test -z "$system_name" ; then
1484                 system_name="`(hostname) 2>/dev/null`"
1485         fi
1486 fi
1487 test -n "$system_name" &&
1488 cat >>confdefs.h <<EOF
1489 #define SYSTEM_NAME "$system_name"
1490 EOF
1491
1492 if test "${cf_cv_system_name+set}" = set; then
1493   echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495   cf_cv_system_name="$system_name"
1496 fi
1497
1498 test -z "$system_name" && system_name="$cf_cv_system_name"
1499 test -n "$cf_cv_system_name" && echo "$as_me:1499: result: Configuring for $cf_cv_system_name" >&5
1500 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1501
1502 if test ".$system_name" != ".$cf_cv_system_name" ; then
1503         echo "$as_me:1503: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1504 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1505         { { echo "$as_me:1505: error: \"Please remove config.cache and try again.\"" >&5
1506 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1507    { (exit 1); exit 1; }; }
1508 fi
1509
1510 # Check whether --with-system-type or --without-system-type was given.
1511 if test "${with_system_type+set}" = set; then
1512   withval="$with_system_type"
1513   { echo "$as_me:1513: WARNING: overriding system type to $withval" >&5
1514 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1515         cf_cv_system_name=$withval
1516         host_os=$withval
1517
1518 fi;
1519
1520 ###     Save the given $CFLAGS to allow user-override.
1521 cf_user_CFLAGS="$CFLAGS"
1522
1523 ###     Default install-location
1524
1525 echo "$as_me:1525: checking for prefix" >&5
1526 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1527 if test "x$prefix" = "xNONE" ; then
1528         case "$cf_cv_system_name" in
1529                 # non-vendor systems don't have a conflict
1530         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1531                 prefix=/usr
1532                 ;;
1533         (*)     prefix=$ac_default_prefix
1534                 ;;
1535         esac
1536 fi
1537 echo "$as_me:1537: result: $prefix" >&5
1538 echo "${ECHO_T}$prefix" >&6
1539
1540 if test "x$prefix" = "xNONE" ; then
1541 echo "$as_me:1541: checking for default include-directory" >&5
1542 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1543 test -n "$verbose" && echo 1>&6
1544 for cf_symbol in \
1545         $includedir \
1546         $includedir/ncurses \
1547         $prefix/include \
1548         $prefix/include/ncurses \
1549         /usr/local/include \
1550         /usr/local/include/ncurses \
1551         /usr/include \
1552         /usr/include/ncurses
1553 do
1554         cf_dir=`eval echo $cf_symbol`
1555         if test -f $cf_dir/curses.h ; then
1556         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1557                 includedir="$cf_symbol"
1558                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1559                 break
1560         fi
1561         fi
1562         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1563 done
1564 echo "$as_me:1564: result: $includedir" >&5
1565 echo "${ECHO_T}$includedir" >&6
1566 fi
1567
1568 ### Defaults for ncurses ABI
1569
1570 case x$cf_cv_abi_version in
1571 (x[6789])
1572         cf_dft_ext_colors=yes
1573         cf_dft_ext_const=yes
1574         cf_dft_ext_mouse=yes
1575         cf_dft_ext_putwin=yes
1576         cf_dft_ext_spfuncs=yes
1577         cf_dft_filter_syms=yes
1578         cf_dft_chtype=uint32_t
1579         cf_dft_mmask_t=uint32_t
1580         cf_dft_interop=yes
1581         cf_dft_tparm_arg=intptr_t
1582         cf_dft_with_lp64=yes
1583         ;;
1584 (*)
1585         cf_dft_ext_colors=no
1586         cf_dft_ext_const=no
1587         cf_dft_ext_mouse=no
1588         cf_dft_ext_putwin=no
1589         cf_dft_ext_spfuncs=no
1590         cf_dft_filter_syms=no
1591         cf_dft_chtype=auto
1592         cf_dft_mmask_t=auto
1593         cf_dft_interop=no
1594         cf_dft_tparm_arg=long
1595         cf_dft_with_lp64=no
1596         ;;
1597 esac
1598
1599 ###     Checks for programs.
1600
1601 # Check whether --with-ada or --without-ada was given.
1602 if test "${with_ada+set}" = set; then
1603   withval="$with_ada"
1604   cf_with_ada=$withval
1605 else
1606   cf_with_ada=yes
1607 fi;
1608
1609 if test "x$cf_with_ada" = xyes
1610 then
1611         cf_prog_cc="gnatgcc gcc cc"
1612 else
1613         cf_prog_cc="gcc cc"
1614 fi
1615
1616 ac_ext=c
1617 ac_cpp='$CPP $CPPFLAGS'
1618 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1619 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1621 ac_main_return=return
1622 if test -n "$ac_tool_prefix"; then
1623   for ac_prog in $cf_prog_cc
1624   do
1625     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1626 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1627 echo "$as_me:1627: checking for $ac_word" >&5
1628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1629 if test "${ac_cv_prog_CC+set}" = set; then
1630   echo $ECHO_N "(cached) $ECHO_C" >&6
1631 else
1632   if test -n "$CC"; then
1633   ac_cv_prog_CC="$CC" # Let the user override the test.
1634 else
1635   ac_save_IFS=$IFS; IFS=$ac_path_separator
1636 ac_dummy="$PATH"
1637 for ac_dir in $ac_dummy; do
1638   IFS=$ac_save_IFS
1639   test -z "$ac_dir" && ac_dir=.
1640   $as_executable_p "$ac_dir/$ac_word" || continue
1641 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1642 echo "$as_me:1642: found $ac_dir/$ac_word" >&5
1643 break
1644 done
1645
1646 fi
1647 fi
1648 CC=$ac_cv_prog_CC
1649 if test -n "$CC"; then
1650   echo "$as_me:1650: result: $CC" >&5
1651 echo "${ECHO_T}$CC" >&6
1652 else
1653   echo "$as_me:1653: result: no" >&5
1654 echo "${ECHO_T}no" >&6
1655 fi
1656
1657     test -n "$CC" && break
1658   done
1659 fi
1660 if test -z "$CC"; then
1661   ac_ct_CC=$CC
1662   for ac_prog in $cf_prog_cc
1663 do
1664   # Extract the first word of "$ac_prog", so it can be a program name with args.
1665 set dummy $ac_prog; ac_word=$2
1666 echo "$as_me:1666: checking for $ac_word" >&5
1667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1668 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   if test -n "$ac_ct_CC"; then
1672   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1673 else
1674   ac_save_IFS=$IFS; IFS=$ac_path_separator
1675 ac_dummy="$PATH"
1676 for ac_dir in $ac_dummy; do
1677   IFS=$ac_save_IFS
1678   test -z "$ac_dir" && ac_dir=.
1679   $as_executable_p "$ac_dir/$ac_word" || continue
1680 ac_cv_prog_ac_ct_CC="$ac_prog"
1681 echo "$as_me:1681: found $ac_dir/$ac_word" >&5
1682 break
1683 done
1684
1685 fi
1686 fi
1687 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1688 if test -n "$ac_ct_CC"; then
1689   echo "$as_me:1689: result: $ac_ct_CC" >&5
1690 echo "${ECHO_T}$ac_ct_CC" >&6
1691 else
1692   echo "$as_me:1692: result: no" >&5
1693 echo "${ECHO_T}no" >&6
1694 fi
1695
1696   test -n "$ac_ct_CC" && break
1697 done
1698
1699   CC=$ac_ct_CC
1700 fi
1701
1702 test -z "$CC" && { { echo "$as_me:1702: error: no acceptable cc found in \$PATH" >&5
1703 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1704    { (exit 1); exit 1; }; }
1705
1706 # Provide some information about the compiler.
1707 echo "$as_me:1707:" \
1708      "checking for C compiler version" >&5
1709 ac_compiler=`set X $ac_compile; echo $2`
1710 { (eval echo "$as_me:1710: \"$ac_compiler --version </dev/null >&5\"") >&5
1711   (eval $ac_compiler --version </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715 { (eval echo "$as_me:1715: \"$ac_compiler -v </dev/null >&5\"") >&5
1716   (eval $ac_compiler -v </dev/null >&5) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); }
1720 { (eval echo "$as_me:1720: \"$ac_compiler -V </dev/null >&5\"") >&5
1721   (eval $ac_compiler -V </dev/null >&5) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }
1725
1726 cat >conftest.$ac_ext <<_ACEOF
1727 #line 1727 "configure"
1728 #include "confdefs.h"
1729
1730 int
1731 main (void)
1732 {
1733
1734   ;
1735   return 0;
1736 }
1737 _ACEOF
1738 ac_clean_files_save=$ac_clean_files
1739 ac_clean_files="$ac_clean_files a.out a.exe"
1740 # Try to create an executable without -o first, disregard a.out.
1741 # It will help us diagnose broken compilers, and finding out an intuition
1742 # of exeext.
1743 echo "$as_me:1743: checking for C compiler default output" >&5
1744 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1745 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1746 if { (eval echo "$as_me:1746: \"$ac_link_default\"") >&5
1747   (eval $ac_link_default) 2>&5
1748   ac_status=$?
1749   echo "$as_me:1749: \$? = $ac_status" >&5
1750   (exit $ac_status); }; then
1751   # Find the output, starting from the most likely.  This scheme is
1752 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1753 # resort.
1754 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1755                 ls a.out conftest 2>/dev/null;
1756                 ls a.* conftest.* 2>/dev/null`; do
1757   case $ac_file in
1758     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1759     a.out ) # We found the default executable, but exeext='' is most
1760             # certainly right.
1761             break;;
1762     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1763           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1764           export ac_cv_exeext
1765           break;;
1766     * ) break;;
1767   esac
1768 done
1769 else
1770   echo "$as_me: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1772 { { echo "$as_me:1772: error: C compiler cannot create executables" >&5
1773 echo "$as_me: error: C compiler cannot create executables" >&2;}
1774    { (exit 77); exit 77; }; }
1775 fi
1776
1777 ac_exeext=$ac_cv_exeext
1778 echo "$as_me:1778: result: $ac_file" >&5
1779 echo "${ECHO_T}$ac_file" >&6
1780
1781 # Check the compiler produces executables we can run.  If not, either
1782 # the compiler is broken, or we cross compile.
1783 echo "$as_me:1783: checking whether the C compiler works" >&5
1784 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1785 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1786 # If not cross compiling, check that we can run a simple program.
1787 if test "$cross_compiling" != yes; then
1788   if { ac_try='./$ac_file'
1789   { (eval echo "$as_me:1789: \"$ac_try\"") >&5
1790   (eval $ac_try) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; }; then
1794     cross_compiling=no
1795   else
1796     if test "$cross_compiling" = maybe; then
1797         cross_compiling=yes
1798     else
1799         { { echo "$as_me:1799: error: cannot run C compiled programs.
1800 If you meant to cross compile, use \`--host'." >&5
1801 echo "$as_me: error: cannot run C compiled programs.
1802 If you meant to cross compile, use \`--host'." >&2;}
1803    { (exit 1); exit 1; }; }
1804     fi
1805   fi
1806 fi
1807 echo "$as_me:1807: result: yes" >&5
1808 echo "${ECHO_T}yes" >&6
1809
1810 rm -f a.out a.exe conftest$ac_cv_exeext
1811 ac_clean_files=$ac_clean_files_save
1812 # Check the compiler produces executables we can run.  If not, either
1813 # the compiler is broken, or we cross compile.
1814 echo "$as_me:1814: checking whether we are cross compiling" >&5
1815 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1816 echo "$as_me:1816: result: $cross_compiling" >&5
1817 echo "${ECHO_T}$cross_compiling" >&6
1818
1819 echo "$as_me:1819: checking for executable suffix" >&5
1820 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1821 if { (eval echo "$as_me:1821: \"$ac_link\"") >&5
1822   (eval $ac_link) 2>&5
1823   ac_status=$?
1824   echo "$as_me:1824: \$? = $ac_status" >&5
1825   (exit $ac_status); }; then
1826   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1827 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1828 # work properly (i.e., refer to `conftest.exe'), while it won't with
1829 # `rm'.
1830 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1831   case $ac_file in
1832     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1833     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1834           export ac_cv_exeext
1835           break;;
1836     * ) break;;
1837   esac
1838 done
1839 else
1840   { { echo "$as_me:1840: error: cannot compute EXEEXT: cannot compile and link" >&5
1841 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1842    { (exit 1); exit 1; }; }
1843 fi
1844
1845 rm -f conftest$ac_cv_exeext
1846 echo "$as_me:1846: result: $ac_cv_exeext" >&5
1847 echo "${ECHO_T}$ac_cv_exeext" >&6
1848
1849 rm -f conftest.$ac_ext
1850 EXEEXT=$ac_cv_exeext
1851 ac_exeext=$EXEEXT
1852 echo "$as_me:1852: checking for object suffix" >&5
1853 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1854 if test "${ac_cv_objext+set}" = set; then
1855   echo $ECHO_N "(cached) $ECHO_C" >&6
1856 else
1857   cat >conftest.$ac_ext <<_ACEOF
1858 #line 1858 "configure"
1859 #include "confdefs.h"
1860
1861 int
1862 main (void)
1863 {
1864
1865   ;
1866   return 0;
1867 }
1868 _ACEOF
1869 rm -f conftest.o conftest.obj
1870 if { (eval echo "$as_me:1870: \"$ac_compile\"") >&5
1871   (eval $ac_compile) 2>&5
1872   ac_status=$?
1873   echo "$as_me:1873: \$? = $ac_status" >&5
1874   (exit $ac_status); }; then
1875   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1876   case $ac_file in
1877     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1878     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1879        break;;
1880   esac
1881 done
1882 else
1883   echo "$as_me: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 { { echo "$as_me:1885: error: cannot compute OBJEXT: cannot compile" >&5
1886 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1887    { (exit 1); exit 1; }; }
1888 fi
1889
1890 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1891 fi
1892 echo "$as_me:1892: result: $ac_cv_objext" >&5
1893 echo "${ECHO_T}$ac_cv_objext" >&6
1894 OBJEXT=$ac_cv_objext
1895 ac_objext=$OBJEXT
1896 echo "$as_me:1896: checking whether we are using the GNU C compiler" >&5
1897 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1898 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1899   echo $ECHO_N "(cached) $ECHO_C" >&6
1900 else
1901   cat >conftest.$ac_ext <<_ACEOF
1902 #line 1902 "configure"
1903 #include "confdefs.h"
1904
1905 int
1906 main (void)
1907 {
1908 #ifndef __GNUC__
1909        choke me
1910 #endif
1911
1912   ;
1913   return 0;
1914 }
1915 _ACEOF
1916 rm -f conftest.$ac_objext
1917 if { (eval echo "$as_me:1917: \"$ac_compile\"") >&5
1918   (eval $ac_compile) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); } &&
1922          { ac_try='test -s conftest.$ac_objext'
1923   { (eval echo "$as_me:1923: \"$ac_try\"") >&5
1924   (eval $ac_try) 2>&5
1925   ac_status=$?
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit $ac_status); }; }; then
1928   ac_compiler_gnu=yes
1929 else
1930   echo "$as_me: failed program was:" >&5
1931 cat conftest.$ac_ext >&5
1932 ac_compiler_gnu=no
1933 fi
1934 rm -f conftest.$ac_objext conftest.$ac_ext
1935 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1936
1937 fi
1938 echo "$as_me:1938: result: $ac_cv_c_compiler_gnu" >&5
1939 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1940 GCC=`test $ac_compiler_gnu = yes && echo yes`
1941 ac_test_CFLAGS=${CFLAGS+set}
1942 ac_save_CFLAGS=$CFLAGS
1943 CFLAGS="-g"
1944 echo "$as_me:1944: checking whether $CC accepts -g" >&5
1945 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1946 if test "${ac_cv_prog_cc_g+set}" = set; then
1947   echo $ECHO_N "(cached) $ECHO_C" >&6
1948 else
1949   cat >conftest.$ac_ext <<_ACEOF
1950 #line 1950 "configure"
1951 #include "confdefs.h"
1952
1953 int
1954 main (void)
1955 {
1956
1957   ;
1958   return 0;
1959 }
1960 _ACEOF
1961 rm -f conftest.$ac_objext
1962 if { (eval echo "$as_me:1962: \"$ac_compile\"") >&5
1963   (eval $ac_compile) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); } &&
1967          { ac_try='test -s conftest.$ac_objext'
1968   { (eval echo "$as_me:1968: \"$ac_try\"") >&5
1969   (eval $ac_try) 2>&5
1970   ac_status=$?
1971   echo "$as_me:1971: \$? = $ac_status" >&5
1972   (exit $ac_status); }; }; then
1973   ac_cv_prog_cc_g=yes
1974 else
1975   echo "$as_me: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
1977 ac_cv_prog_cc_g=no
1978 fi
1979 rm -f conftest.$ac_objext conftest.$ac_ext
1980 fi
1981 echo "$as_me:1981: result: $ac_cv_prog_cc_g" >&5
1982 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1983 if test "$ac_test_CFLAGS" = set; then
1984   CFLAGS=$ac_save_CFLAGS
1985 elif test $ac_cv_prog_cc_g = yes; then
1986   if test "$GCC" = yes; then
1987     CFLAGS="-g -O2"
1988   else
1989     CFLAGS="-g"
1990   fi
1991 else
1992   if test "$GCC" = yes; then
1993     CFLAGS="-O2"
1994   else
1995     CFLAGS=
1996   fi
1997 fi
1998 # Some people use a C++ compiler to compile C.  Since we use `exit',
1999 # in C++ we need to declare it.  In case someone uses the same compiler
2000 # for both compiling C and C++ we need to have the C++ compiler decide
2001 # the declaration of exit, since it's the most demanding environment.
2002 cat >conftest.$ac_ext <<_ACEOF
2003 #ifndef __cplusplus
2004   choke me
2005 #endif
2006 _ACEOF
2007 rm -f conftest.$ac_objext
2008 if { (eval echo "$as_me:2008: \"$ac_compile\"") >&5
2009   (eval $ac_compile) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); } &&
2013          { ac_try='test -s conftest.$ac_objext'
2014   { (eval echo "$as_me:2014: \"$ac_try\"") >&5
2015   (eval $ac_try) 2>&5
2016   ac_status=$?
2017   echo "$as_me:2017: \$? = $ac_status" >&5
2018   (exit $ac_status); }; }; then
2019   for ac_declaration in \
2020    ''\
2021    '#include <stdlib.h>' \
2022    'extern "C" void std::exit (int) throw (); using std::exit;' \
2023    'extern "C" void std::exit (int); using std::exit;' \
2024    'extern "C" void exit (int) throw ();' \
2025    'extern "C" void exit (int);' \
2026    'void exit (int);'
2027 do
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 #include <stdlib.h>
2032 $ac_declaration
2033 int
2034 main (void)
2035 {
2036 exit (42);
2037   ;
2038   return 0;
2039 }
2040 _ACEOF
2041 rm -f conftest.$ac_objext
2042 if { (eval echo "$as_me:2042: \"$ac_compile\"") >&5
2043   (eval $ac_compile) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); } &&
2047          { ac_try='test -s conftest.$ac_objext'
2048   { (eval echo "$as_me:2048: \"$ac_try\"") >&5
2049   (eval $ac_try) 2>&5
2050   ac_status=$?
2051   echo "$as_me:2051: \$? = $ac_status" >&5
2052   (exit $ac_status); }; }; then
2053   :
2054 else
2055   echo "$as_me: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 continue
2058 fi
2059 rm -f conftest.$ac_objext conftest.$ac_ext
2060   cat >conftest.$ac_ext <<_ACEOF
2061 #line 2061 "configure"
2062 #include "confdefs.h"
2063 $ac_declaration
2064 int
2065 main (void)
2066 {
2067 exit (42);
2068   ;
2069   return 0;
2070 }
2071 _ACEOF
2072 rm -f conftest.$ac_objext
2073 if { (eval echo "$as_me:2073: \"$ac_compile\"") >&5
2074   (eval $ac_compile) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); } &&
2078          { ac_try='test -s conftest.$ac_objext'
2079   { (eval echo "$as_me:2079: \"$ac_try\"") >&5
2080   (eval $ac_try) 2>&5
2081   ac_status=$?
2082   echo "$as_me:2082: \$? = $ac_status" >&5
2083   (exit $ac_status); }; }; then
2084   break
2085 else
2086   echo "$as_me: failed program was:" >&5
2087 cat conftest.$ac_ext >&5
2088 fi
2089 rm -f conftest.$ac_objext conftest.$ac_ext
2090 done
2091 rm -rf conftest*
2092 if test -n "$ac_declaration"; then
2093   echo '#ifdef __cplusplus' >>confdefs.h
2094   echo $ac_declaration      >>confdefs.h
2095   echo '#endif'             >>confdefs.h
2096 fi
2097
2098 else
2099   echo "$as_me: failed program was:" >&5
2100 cat conftest.$ac_ext >&5
2101 fi
2102 rm -f conftest.$ac_objext conftest.$ac_ext
2103 ac_ext=c
2104 ac_cpp='$CPP $CPPFLAGS'
2105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2108 ac_main_return=return
2109
2110 GCC_VERSION=none
2111 if test "$GCC" = yes ; then
2112         echo "$as_me:2112: checking version of $CC" >&5
2113 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2114         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.].*//'`"
2115         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2116         echo "$as_me:2116: result: $GCC_VERSION" >&5
2117 echo "${ECHO_T}$GCC_VERSION" >&6
2118 fi
2119
2120 INTEL_COMPILER=no
2121
2122 if test "$GCC" = yes ; then
2123         case $host_os in
2124         (linux*|gnu*)
2125                 echo "$as_me:2125: checking if this is really Intel C compiler" >&5
2126 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2127                 cf_save_CFLAGS="$CFLAGS"
2128                 CFLAGS="$CFLAGS -no-gcc"
2129                 cat >conftest.$ac_ext <<_ACEOF
2130 #line 2130 "configure"
2131 #include "confdefs.h"
2132
2133 int
2134 main (void)
2135 {
2136
2137 #ifdef __INTEL_COMPILER
2138 #else
2139 make an error
2140 #endif
2141
2142   ;
2143   return 0;
2144 }
2145 _ACEOF
2146 rm -f conftest.$ac_objext
2147 if { (eval echo "$as_me:2147: \"$ac_compile\"") >&5
2148   (eval $ac_compile) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } &&
2152          { ac_try='test -s conftest.$ac_objext'
2153   { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2154   (eval $ac_try) 2>&5
2155   ac_status=$?
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); }; }; then
2158   INTEL_COMPILER=yes
2159 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2160
2161 else
2162   echo "$as_me: failed program was:" >&5
2163 cat conftest.$ac_ext >&5
2164 fi
2165 rm -f conftest.$ac_objext conftest.$ac_ext
2166                 CFLAGS="$cf_save_CFLAGS"
2167                 echo "$as_me:2167: result: $INTEL_COMPILER" >&5
2168 echo "${ECHO_T}$INTEL_COMPILER" >&6
2169                 ;;
2170         esac
2171 fi
2172
2173 CLANG_COMPILER=no
2174
2175 if test "$GCC" = yes ; then
2176         echo "$as_me:2176: checking if this is really Clang C compiler" >&5
2177 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2178         cf_save_CFLAGS="$CFLAGS"
2179         CFLAGS="$CFLAGS -Qunused-arguments"
2180         cat >conftest.$ac_ext <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183
2184 int
2185 main (void)
2186 {
2187
2188 #ifdef __clang__
2189 #else
2190 make an error
2191 #endif
2192
2193   ;
2194   return 0;
2195 }
2196 _ACEOF
2197 rm -f conftest.$ac_objext
2198 if { (eval echo "$as_me:2198: \"$ac_compile\"") >&5
2199   (eval $ac_compile) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); } &&
2203          { ac_try='test -s conftest.$ac_objext'
2204   { (eval echo "$as_me:2204: \"$ac_try\"") >&5
2205   (eval $ac_try) 2>&5
2206   ac_status=$?
2207   echo "$as_me:2207: \$? = $ac_status" >&5
2208   (exit $ac_status); }; }; then
2209   CLANG_COMPILER=yes
2210 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2211
2212 else
2213   echo "$as_me: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
2215 fi
2216 rm -f conftest.$ac_objext conftest.$ac_ext
2217         CFLAGS="$cf_save_CFLAGS"
2218         echo "$as_me:2218: result: $CLANG_COMPILER" >&5
2219 echo "${ECHO_T}$CLANG_COMPILER" >&6
2220 fi
2221
2222 echo "$as_me:2222: checking for $CC option to accept ANSI C" >&5
2223 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2224 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2225   echo $ECHO_N "(cached) $ECHO_C" >&6
2226 else
2227   ac_cv_prog_cc_stdc=no
2228 ac_save_CC=$CC
2229 cat >conftest.$ac_ext <<_ACEOF
2230 #line 2230 "configure"
2231 #include "confdefs.h"
2232 #include <stdarg.h>
2233 #include <stdio.h>
2234 #include <sys/types.h>
2235 #include <sys/stat.h>
2236 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2237 struct buf { int x; };
2238 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2239 static char *e (p, i)
2240      char **p;
2241      int i;
2242 {
2243   return p[i];
2244 }
2245 static char *f (char * (*g) (char **, int), char **p, ...)
2246 {
2247   char *s;
2248   va_list v;
2249   va_start (v,p);
2250   s = g (p, va_arg (v,int));
2251   va_end (v);
2252   return s;
2253 }
2254 int test (int i, double x);
2255 struct s1 {int (*f) (int a);};
2256 struct s2 {int (*f) (double a);};
2257 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2258 int argc;
2259 char **argv;
2260 int
2261 main (void)
2262 {
2263 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2264   ;
2265   return 0;
2266 }
2267 _ACEOF
2268 # Don't try gcc -ansi; that turns off useful extensions and
2269 # breaks some systems' header files.
2270 # AIX                   -qlanglvl=ansi
2271 # Ultrix and OSF/1      -std1
2272 # HP-UX 10.20 and later -Ae
2273 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2274 # SVR4                  -Xc -D__EXTENSIONS__
2275 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2276 do
2277   CC="$ac_save_CC $ac_arg"
2278   rm -f conftest.$ac_objext
2279 if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit $ac_status); } &&
2284          { ac_try='test -s conftest.$ac_objext'
2285   { (eval echo "$as_me:2285: \"$ac_try\"") >&5
2286   (eval $ac_try) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit $ac_status); }; }; then
2290   ac_cv_prog_cc_stdc=$ac_arg
2291 break
2292 else
2293   echo "$as_me: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 fi
2296 rm -f conftest.$ac_objext
2297 done
2298 rm -f conftest.$ac_ext conftest.$ac_objext
2299 CC=$ac_save_CC
2300
2301 fi
2302
2303 case "x$ac_cv_prog_cc_stdc" in
2304   x|xno)
2305     echo "$as_me:2305: result: none needed" >&5
2306 echo "${ECHO_T}none needed" >&6 ;;
2307   *)
2308     echo "$as_me:2308: result: $ac_cv_prog_cc_stdc" >&5
2309 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2310     CC="$CC $ac_cv_prog_cc_stdc" ;;
2311 esac
2312
2313 # This should have been defined by AC_PROG_CC
2314 : ${CC:=cc}
2315
2316 echo "$as_me:2316: checking \$CFLAGS variable" >&5
2317 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2318 case "x$CFLAGS" in
2319 (*-[IUD]*)
2320         echo "$as_me:2320: result: broken" >&5
2321 echo "${ECHO_T}broken" >&6
2322         { echo "$as_me:2322: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2323 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2324         cf_flags="$CFLAGS"
2325         CFLAGS=
2326         for cf_arg in $cf_flags
2327         do
2328
2329 cf_fix_cppflags=no
2330 cf_new_cflags=
2331 cf_new_cppflags=
2332 cf_new_extra_cppflags=
2333
2334 for cf_add_cflags in $cf_arg
2335 do
2336 case $cf_fix_cppflags in
2337 (no)
2338         case $cf_add_cflags in
2339         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2340                 case $cf_add_cflags in
2341                 (-D*)
2342                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2343
2344                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2345                                 && test -z "${cf_tst_cflags}" \
2346                                 && cf_fix_cppflags=yes
2347
2348                         if test $cf_fix_cppflags = yes ; then
2349
2350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353                                 continue
2354                         elif test "${cf_tst_cflags}" = "\"'" ; then
2355
2356         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2357         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2358
2359                                 continue
2360                         fi
2361                         ;;
2362                 esac
2363                 case "$CPPFLAGS" in
2364                 (*$cf_add_cflags)
2365                         ;;
2366                 (*)
2367                         case $cf_add_cflags in
2368                         (-D*)
2369                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2370
2371 CPPFLAGS=`echo "$CPPFLAGS" | \
2372         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2373                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2374
2375                                 ;;
2376                         esac
2377
2378         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2379         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2380
2381                         ;;
2382                 esac
2383                 ;;
2384         (*)
2385
2386         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2387         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2388
2389                 ;;
2390         esac
2391         ;;
2392 (yes)
2393
2394         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2395         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2396
2397         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2398
2399         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2400                 && test -z "${cf_tst_cflags}" \
2401                 && cf_fix_cppflags=no
2402         ;;
2403 esac
2404 done
2405
2406 if test -n "$cf_new_cflags" ; then
2407
2408         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2409         CFLAGS="${CFLAGS}$cf_new_cflags"
2410
2411 fi
2412
2413 if test -n "$cf_new_cppflags" ; then
2414
2415         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2416         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2417
2418 fi
2419
2420 if test -n "$cf_new_extra_cppflags" ; then
2421
2422         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2423         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2424
2425 fi
2426
2427         done
2428         ;;
2429 (*)
2430         echo "$as_me:2430: result: ok" >&5
2431 echo "${ECHO_T}ok" >&6
2432         ;;
2433 esac
2434
2435 echo "$as_me:2435: checking \$CC variable" >&5
2436 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2437 case "$CC" in
2438 (*[\ \  ]-*)
2439         echo "$as_me:2439: result: broken" >&5
2440 echo "${ECHO_T}broken" >&6
2441         { echo "$as_me:2441: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2442 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2443         # humor him...
2444         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2445         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2446         CC="$cf_prog"
2447         for cf_arg in $cf_flags
2448         do
2449                 case "x$cf_arg" in
2450                 (x-[IUDfgOW]*)
2451
2452 cf_fix_cppflags=no
2453 cf_new_cflags=
2454 cf_new_cppflags=
2455 cf_new_extra_cppflags=
2456
2457 for cf_add_cflags in $cf_arg
2458 do
2459 case $cf_fix_cppflags in
2460 (no)
2461         case $cf_add_cflags in
2462         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2463                 case $cf_add_cflags in
2464                 (-D*)
2465                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2466
2467                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2468                                 && test -z "${cf_tst_cflags}" \
2469                                 && cf_fix_cppflags=yes
2470
2471                         if test $cf_fix_cppflags = yes ; then
2472
2473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2475
2476                                 continue
2477                         elif test "${cf_tst_cflags}" = "\"'" ; then
2478
2479         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2480         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2481
2482                                 continue
2483                         fi
2484                         ;;
2485                 esac
2486                 case "$CPPFLAGS" in
2487                 (*$cf_add_cflags)
2488                         ;;
2489                 (*)
2490                         case $cf_add_cflags in
2491                         (-D*)
2492                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2493
2494 CPPFLAGS=`echo "$CPPFLAGS" | \
2495         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2496                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2497
2498                                 ;;
2499                         esac
2500
2501         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2502         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2503
2504                         ;;
2505                 esac
2506                 ;;
2507         (*)
2508
2509         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2510         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2511
2512                 ;;
2513         esac
2514         ;;
2515 (yes)
2516
2517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2519
2520         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2521
2522         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2523                 && test -z "${cf_tst_cflags}" \
2524                 && cf_fix_cppflags=no
2525         ;;
2526 esac
2527 done
2528
2529 if test -n "$cf_new_cflags" ; then
2530
2531         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2532         CFLAGS="${CFLAGS}$cf_new_cflags"
2533
2534 fi
2535
2536 if test -n "$cf_new_cppflags" ; then
2537
2538         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2539         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2540
2541 fi
2542
2543 if test -n "$cf_new_extra_cppflags" ; then
2544
2545         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2546         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2547
2548 fi
2549
2550                         ;;
2551                 (*)
2552                         CC="$CC $cf_arg"
2553                         ;;
2554                 esac
2555         done
2556         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2557
2558 echo "${as_me:-configure}:2558: testing resulting CC: '$CC' ..." 1>&5
2559
2560         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2561
2562 echo "${as_me:-configure}:2562: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2563
2564         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2565
2566 echo "${as_me:-configure}:2566: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2567
2568         ;;
2569 (*)
2570         echo "$as_me:2570: result: ok" >&5
2571 echo "${ECHO_T}ok" >&6
2572         ;;
2573 esac
2574
2575 ac_ext=c
2576 ac_cpp='$CPP $CPPFLAGS'
2577 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580 ac_main_return=return
2581 echo "$as_me:2581: checking how to run the C preprocessor" >&5
2582 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2583 # On Suns, sometimes $CPP names a directory.
2584 if test -n "$CPP" && test -d "$CPP"; then
2585   CPP=
2586 fi
2587 if test -z "$CPP"; then
2588   if test "${ac_cv_prog_CPP+set}" = set; then
2589   echo $ECHO_N "(cached) $ECHO_C" >&6
2590 else
2591       # Double quotes because CPP needs to be expanded
2592     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2593     do
2594       ac_preproc_ok=false
2595 for ac_c_preproc_warn_flag in '' yes
2596 do
2597   # Use a header file that comes with gcc, so configuring glibc
2598   # with a fresh cross-compiler works.
2599   # On the NeXT, cc -E runs the code through the compiler's parser,
2600   # not just through cpp. "Syntax error" is here to catch this case.
2601   cat >conftest.$ac_ext <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <assert.h>
2605                      Syntax error
2606 _ACEOF
2607 if { (eval echo "$as_me:2607: \"$ac_cpp conftest.$ac_ext\"") >&5
2608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2609   ac_status=$?
2610   egrep -v '^ *\+' conftest.er1 >conftest.err
2611   rm -f conftest.er1
2612   cat conftest.err >&5
2613   echo "$as_me:2613: \$? = $ac_status" >&5
2614   (exit $ac_status); } >/dev/null; then
2615   if test -s conftest.err; then
2616     ac_cpp_err=$ac_c_preproc_warn_flag
2617   else
2618     ac_cpp_err=
2619   fi
2620 else
2621   ac_cpp_err=yes
2622 fi
2623 if test -z "$ac_cpp_err"; then
2624   :
2625 else
2626   echo "$as_me: failed program was:" >&5
2627   cat conftest.$ac_ext >&5
2628   # Broken: fails on valid input.
2629 continue
2630 fi
2631 rm -f conftest.err conftest.$ac_ext
2632
2633   # OK, works on sane cases.  Now check whether non-existent headers
2634   # can be detected and how.
2635   cat >conftest.$ac_ext <<_ACEOF
2636 #line 2636 "configure"
2637 #include "confdefs.h"
2638 #include <ac_nonexistent.h>
2639 _ACEOF
2640 if { (eval echo "$as_me:2640: \"$ac_cpp conftest.$ac_ext\"") >&5
2641   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2642   ac_status=$?
2643   egrep -v '^ *\+' conftest.er1 >conftest.err
2644   rm -f conftest.er1
2645   cat conftest.err >&5
2646   echo "$as_me:2646: \$? = $ac_status" >&5
2647   (exit $ac_status); } >/dev/null; then
2648   if test -s conftest.err; then
2649     ac_cpp_err=$ac_c_preproc_warn_flag
2650   else
2651     ac_cpp_err=
2652   fi
2653 else
2654   ac_cpp_err=yes
2655 fi
2656 if test -z "$ac_cpp_err"; then
2657   # Broken: success on invalid input.
2658 continue
2659 else
2660   echo "$as_me: failed program was:" >&5
2661   cat conftest.$ac_ext >&5
2662   # Passes both tests.
2663 ac_preproc_ok=:
2664 break
2665 fi
2666 rm -f conftest.err conftest.$ac_ext
2667
2668 done
2669 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2670 rm -f conftest.err conftest.$ac_ext
2671 if $ac_preproc_ok; then
2672   break
2673 fi
2674
2675     done
2676     ac_cv_prog_CPP=$CPP
2677
2678 fi
2679   CPP=$ac_cv_prog_CPP
2680 else
2681   ac_cv_prog_CPP=$CPP
2682 fi
2683 echo "$as_me:2683: result: $CPP" >&5
2684 echo "${ECHO_T}$CPP" >&6
2685 ac_preproc_ok=false
2686 for ac_c_preproc_warn_flag in '' yes
2687 do
2688   # Use a header file that comes with gcc, so configuring glibc
2689   # with a fresh cross-compiler works.
2690   # On the NeXT, cc -E runs the code through the compiler's parser,
2691   # not just through cpp. "Syntax error" is here to catch this case.
2692   cat >conftest.$ac_ext <<_ACEOF
2693 #line 2693 "configure"
2694 #include "confdefs.h"
2695 #include <assert.h>
2696                      Syntax error
2697 _ACEOF
2698 if { (eval echo "$as_me:2698: \"$ac_cpp conftest.$ac_ext\"") >&5
2699   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2700   ac_status=$?
2701   egrep -v '^ *\+' conftest.er1 >conftest.err
2702   rm -f conftest.er1
2703   cat conftest.err >&5
2704   echo "$as_me:2704: \$? = $ac_status" >&5
2705   (exit $ac_status); } >/dev/null; then
2706   if test -s conftest.err; then
2707     ac_cpp_err=$ac_c_preproc_warn_flag
2708   else
2709     ac_cpp_err=
2710   fi
2711 else
2712   ac_cpp_err=yes
2713 fi
2714 if test -z "$ac_cpp_err"; then
2715   :
2716 else
2717   echo "$as_me: failed program was:" >&5
2718   cat conftest.$ac_ext >&5
2719   # Broken: fails on valid input.
2720 continue
2721 fi
2722 rm -f conftest.err conftest.$ac_ext
2723
2724   # OK, works on sane cases.  Now check whether non-existent headers
2725   # can be detected and how.
2726   cat >conftest.$ac_ext <<_ACEOF
2727 #line 2727 "configure"
2728 #include "confdefs.h"
2729 #include <ac_nonexistent.h>
2730 _ACEOF
2731 if { (eval echo "$as_me:2731: \"$ac_cpp conftest.$ac_ext\"") >&5
2732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2733   ac_status=$?
2734   egrep -v '^ *\+' conftest.er1 >conftest.err
2735   rm -f conftest.er1
2736   cat conftest.err >&5
2737   echo "$as_me:2737: \$? = $ac_status" >&5
2738   (exit $ac_status); } >/dev/null; then
2739   if test -s conftest.err; then
2740     ac_cpp_err=$ac_c_preproc_warn_flag
2741   else
2742     ac_cpp_err=
2743   fi
2744 else
2745   ac_cpp_err=yes
2746 fi
2747 if test -z "$ac_cpp_err"; then
2748   # Broken: success on invalid input.
2749 continue
2750 else
2751   echo "$as_me: failed program was:" >&5
2752   cat conftest.$ac_ext >&5
2753   # Passes both tests.
2754 ac_preproc_ok=:
2755 break
2756 fi
2757 rm -f conftest.err conftest.$ac_ext
2758
2759 done
2760 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2761 rm -f conftest.err conftest.$ac_ext
2762 if $ac_preproc_ok; then
2763   :
2764 else
2765   { { echo "$as_me:2765: error: C preprocessor \"$CPP\" fails sanity check" >&5
2766 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2767    { (exit 1); exit 1; }; }
2768 fi
2769
2770 ac_ext=c
2771 ac_cpp='$CPP $CPPFLAGS'
2772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2775 ac_main_return=return
2776
2777 if test $ac_cv_c_compiler_gnu = yes; then
2778     echo "$as_me:2778: checking whether $CC needs -traditional" >&5
2779 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2780 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2781   echo $ECHO_N "(cached) $ECHO_C" >&6
2782 else
2783     ac_pattern="Autoconf.*'x'"
2784   cat >conftest.$ac_ext <<_ACEOF
2785 #line 2785 "configure"
2786 #include "confdefs.h"
2787 #include <sgtty.h>
2788 int Autoconf = TIOCGETP;
2789 _ACEOF
2790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2791   egrep "$ac_pattern" >/dev/null 2>&1; then
2792   ac_cv_prog_gcc_traditional=yes
2793 else
2794   ac_cv_prog_gcc_traditional=no
2795 fi
2796 rm -rf conftest*
2797
2798   if test $ac_cv_prog_gcc_traditional = no; then
2799     cat >conftest.$ac_ext <<_ACEOF
2800 #line 2800 "configure"
2801 #include "confdefs.h"
2802 #include <termio.h>
2803 int Autoconf = TCGETA;
2804 _ACEOF
2805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2806   egrep "$ac_pattern" >/dev/null 2>&1; then
2807   ac_cv_prog_gcc_traditional=yes
2808 fi
2809 rm -rf conftest*
2810
2811   fi
2812 fi
2813 echo "$as_me:2813: result: $ac_cv_prog_gcc_traditional" >&5
2814 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2815   if test $ac_cv_prog_gcc_traditional = yes; then
2816     CC="$CC -traditional"
2817   fi
2818 fi
2819
2820 echo "$as_me:2820: checking whether $CC understands -c and -o together" >&5
2821 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2822 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2823   echo $ECHO_N "(cached) $ECHO_C" >&6
2824 else
2825
2826 cat > conftest.$ac_ext <<CF_EOF
2827 int main(void)
2828 {
2829         ${cf_cv_main_return:-return}(0);
2830 }
2831 CF_EOF
2832 # We do the test twice because some compilers refuse to overwrite an
2833 # existing .o file with -o, though they will create one.
2834 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2835 if { (eval echo "$as_me:2835: \"$ac_try\"") >&5
2836   (eval $ac_try) 2>&5
2837   ac_status=$?
2838   echo "$as_me:2838: \$? = $ac_status" >&5
2839   (exit $ac_status); } &&
2840   test -f conftest2.$ac_objext && { (eval echo "$as_me:2840: \"$ac_try\"") >&5
2841   (eval $ac_try) 2>&5
2842   ac_status=$?
2843   echo "$as_me:2843: \$? = $ac_status" >&5
2844   (exit $ac_status); };
2845 then
2846   eval cf_cv_prog_CC_c_o=yes
2847 else
2848   eval cf_cv_prog_CC_c_o=no
2849 fi
2850 rm -rf conftest*
2851
2852 fi
2853 if test $cf_cv_prog_CC_c_o = yes; then
2854   echo "$as_me:2854: result: yes" >&5
2855 echo "${ECHO_T}yes" >&6
2856 else
2857   echo "$as_me:2857: result: no" >&5
2858 echo "${ECHO_T}no" >&6
2859 fi
2860
2861 if test "$cross_compiling" = yes ; then
2862         LDCONFIG=:
2863 else
2864         case "$cf_cv_system_name" in
2865         (dragonfly*|mirbsd*|freebsd*)
2866                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2867                 ;;
2868         (*) LDPATH=$PATH:/sbin:/usr/sbin
2869                 # Extract the first word of "ldconfig", so it can be a program name with args.
2870 set dummy ldconfig; ac_word=$2
2871 echo "$as_me:2871: checking for $ac_word" >&5
2872 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2873 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2874   echo $ECHO_N "(cached) $ECHO_C" >&6
2875 else
2876   case $LDCONFIG in
2877   [\\/]* | ?:[\\/]*)
2878   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2879   ;;
2880   *)
2881   ac_save_IFS=$IFS; IFS=$ac_path_separator
2882 ac_dummy="$LDPATH"
2883 for ac_dir in $ac_dummy; do
2884   IFS=$ac_save_IFS
2885   test -z "$ac_dir" && ac_dir=.
2886   if $as_executable_p "$ac_dir/$ac_word"; then
2887    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2888    echo "$as_me:2888: found $ac_dir/$ac_word" >&5
2889    break
2890 fi
2891 done
2892
2893   ;;
2894 esac
2895 fi
2896 LDCONFIG=$ac_cv_path_LDCONFIG
2897
2898 if test -n "$LDCONFIG"; then
2899   echo "$as_me:2899: result: $LDCONFIG" >&5
2900 echo "${ECHO_T}$LDCONFIG" >&6
2901 else
2902   echo "$as_me:2902: result: no" >&5
2903 echo "${ECHO_T}no" >&6
2904 fi
2905
2906                 ;;
2907         esac
2908 fi
2909
2910 echo "$as_me:2910: checking if you want to ensure bool is consistent with C++" >&5
2911 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2912
2913 # Check whether --with-cxx or --without-cxx was given.
2914 if test "${with_cxx+set}" = set; then
2915   withval="$with_cxx"
2916   cf_with_cxx=$withval
2917 else
2918   cf_with_cxx=yes
2919 fi;
2920 echo "$as_me:2920: result: $cf_with_cxx" >&5
2921 echo "${ECHO_T}$cf_with_cxx" >&6
2922 if test "X$cf_with_cxx" = Xno ; then
2923         CXX=""
2924         GXX=""
2925 else
2926         # with autoconf 2.13, we can change the error to a warning:
2927                 ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2933 if test -n "$ac_tool_prefix"; then
2934   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2935   do
2936     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2937 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2938 echo "$as_me:2938: checking for $ac_word" >&5
2939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2940 if test "${ac_cv_prog_CXX+set}" = set; then
2941   echo $ECHO_N "(cached) $ECHO_C" >&6
2942 else
2943   if test -n "$CXX"; then
2944   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2945 else
2946   ac_save_IFS=$IFS; IFS=$ac_path_separator
2947 ac_dummy="$PATH"
2948 for ac_dir in $ac_dummy; do
2949   IFS=$ac_save_IFS
2950   test -z "$ac_dir" && ac_dir=.
2951   $as_executable_p "$ac_dir/$ac_word" || continue
2952 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2953 echo "$as_me:2953: found $ac_dir/$ac_word" >&5
2954 break
2955 done
2956
2957 fi
2958 fi
2959 CXX=$ac_cv_prog_CXX
2960 if test -n "$CXX"; then
2961   echo "$as_me:2961: result: $CXX" >&5
2962 echo "${ECHO_T}$CXX" >&6
2963 else
2964   echo "$as_me:2964: result: no" >&5
2965 echo "${ECHO_T}no" >&6
2966 fi
2967
2968     test -n "$CXX" && break
2969   done
2970 fi
2971 if test -z "$CXX"; then
2972   ac_ct_CXX=$CXX
2973   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2974 do
2975   # Extract the first word of "$ac_prog", so it can be a program name with args.
2976 set dummy $ac_prog; ac_word=$2
2977 echo "$as_me:2977: checking for $ac_word" >&5
2978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2979 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   if test -n "$ac_ct_CXX"; then
2983   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2984 else
2985   ac_save_IFS=$IFS; IFS=$ac_path_separator
2986 ac_dummy="$PATH"
2987 for ac_dir in $ac_dummy; do
2988   IFS=$ac_save_IFS
2989   test -z "$ac_dir" && ac_dir=.
2990   $as_executable_p "$ac_dir/$ac_word" || continue
2991 ac_cv_prog_ac_ct_CXX="$ac_prog"
2992 echo "$as_me:2992: found $ac_dir/$ac_word" >&5
2993 break
2994 done
2995
2996 fi
2997 fi
2998 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2999 if test -n "$ac_ct_CXX"; then
3000   echo "$as_me:3000: result: $ac_ct_CXX" >&5
3001 echo "${ECHO_T}$ac_ct_CXX" >&6
3002 else
3003   echo "$as_me:3003: result: no" >&5
3004 echo "${ECHO_T}no" >&6
3005 fi
3006
3007   test -n "$ac_ct_CXX" && break
3008 done
3009 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3010
3011   CXX=$ac_ct_CXX
3012 fi
3013
3014 # Provide some information about the compiler.
3015 echo "$as_me:3015:" \
3016      "checking for C++ compiler version" >&5
3017 ac_compiler=`set X $ac_compile; echo $2`
3018 { (eval echo "$as_me:3018: \"$ac_compiler --version </dev/null >&5\"") >&5
3019   (eval $ac_compiler --version </dev/null >&5) 2>&5
3020   ac_status=$?
3021   echo "$as_me:3021: \$? = $ac_status" >&5
3022   (exit $ac_status); }
3023 { (eval echo "$as_me:3023: \"$ac_compiler -v </dev/null >&5\"") >&5
3024   (eval $ac_compiler -v </dev/null >&5) 2>&5
3025   ac_status=$?
3026   echo "$as_me:3026: \$? = $ac_status" >&5
3027   (exit $ac_status); }
3028 { (eval echo "$as_me:3028: \"$ac_compiler -V </dev/null >&5\"") >&5
3029   (eval $ac_compiler -V </dev/null >&5) 2>&5
3030   ac_status=$?
3031   echo "$as_me:3031: \$? = $ac_status" >&5
3032   (exit $ac_status); }
3033
3034 echo "$as_me:3034: checking whether we are using the GNU C++ compiler" >&5
3035 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3036 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3037   echo $ECHO_N "(cached) $ECHO_C" >&6
3038 else
3039   cat >conftest.$ac_ext <<_ACEOF
3040 #line 3040 "configure"
3041 #include "confdefs.h"
3042
3043 int
3044 main (void)
3045 {
3046 #ifndef __GNUC__
3047        choke me
3048 #endif
3049
3050   ;
3051   return 0;
3052 }
3053 _ACEOF
3054 rm -f conftest.$ac_objext
3055 if { (eval echo "$as_me:3055: \"$ac_compile\"") >&5
3056   (eval $ac_compile) 2>&5
3057   ac_status=$?
3058   echo "$as_me:3058: \$? = $ac_status" >&5
3059   (exit $ac_status); } &&
3060          { ac_try='test -s conftest.$ac_objext'
3061   { (eval echo "$as_me:3061: \"$ac_try\"") >&5
3062   (eval $ac_try) 2>&5
3063   ac_status=$?
3064   echo "$as_me:3064: \$? = $ac_status" >&5
3065   (exit $ac_status); }; }; then
3066   ac_compiler_gnu=yes
3067 else
3068   echo "$as_me: failed program was:" >&5
3069 cat conftest.$ac_ext >&5
3070 ac_compiler_gnu=no
3071 fi
3072 rm -f conftest.$ac_objext conftest.$ac_ext
3073 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3074
3075 fi
3076 echo "$as_me:3076: result: $ac_cv_cxx_compiler_gnu" >&5
3077 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3078 GXX=`test $ac_compiler_gnu = yes && echo yes`
3079 ac_test_CXXFLAGS=${CXXFLAGS+set}
3080 ac_save_CXXFLAGS=$CXXFLAGS
3081 CXXFLAGS="-g"
3082 echo "$as_me:3082: checking whether $CXX accepts -g" >&5
3083 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3084 if test "${ac_cv_prog_cxx_g+set}" = set; then
3085   echo $ECHO_N "(cached) $ECHO_C" >&6
3086 else
3087   cat >conftest.$ac_ext <<_ACEOF
3088 #line 3088 "configure"
3089 #include "confdefs.h"
3090
3091 int
3092 main (void)
3093 {
3094
3095   ;
3096   return 0;
3097 }
3098 _ACEOF
3099 rm -f conftest.$ac_objext
3100 if { (eval echo "$as_me:3100: \"$ac_compile\"") >&5
3101   (eval $ac_compile) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); } &&
3105          { ac_try='test -s conftest.$ac_objext'
3106   { (eval echo "$as_me:3106: \"$ac_try\"") >&5
3107   (eval $ac_try) 2>&5
3108   ac_status=$?
3109   echo "$as_me:3109: \$? = $ac_status" >&5
3110   (exit $ac_status); }; }; then
3111   ac_cv_prog_cxx_g=yes
3112 else
3113   echo "$as_me: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3115 ac_cv_prog_cxx_g=no
3116 fi
3117 rm -f conftest.$ac_objext conftest.$ac_ext
3118 fi
3119 echo "$as_me:3119: result: $ac_cv_prog_cxx_g" >&5
3120 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3121 if test "$ac_test_CXXFLAGS" = set; then
3122   CXXFLAGS=$ac_save_CXXFLAGS
3123 elif test $ac_cv_prog_cxx_g = yes; then
3124   if test "$GXX" = yes; then
3125     CXXFLAGS="-g -O2"
3126   else
3127     CXXFLAGS="-g"
3128   fi
3129 else
3130   if test "$GXX" = yes; then
3131     CXXFLAGS="-O2"
3132   else
3133     CXXFLAGS=
3134   fi
3135 fi
3136 for ac_declaration in \
3137    ''\
3138    '#include <stdlib.h>' \
3139    'extern "C" void std::exit (int) throw (); using std::exit;' \
3140    'extern "C" void std::exit (int); using std::exit;' \
3141    'extern "C" void exit (int) throw ();' \
3142    'extern "C" void exit (int);' \
3143    'void exit (int);'
3144 do
3145   cat >conftest.$ac_ext <<_ACEOF
3146 #line 3146 "configure"
3147 #include "confdefs.h"
3148 #include <stdlib.h>
3149 $ac_declaration
3150 int
3151 main (void)
3152 {
3153 exit (42);
3154   ;
3155   return 0;
3156 }
3157 _ACEOF
3158 rm -f conftest.$ac_objext
3159 if { (eval echo "$as_me:3159: \"$ac_compile\"") >&5
3160   (eval $ac_compile) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); } &&
3164          { ac_try='test -s conftest.$ac_objext'
3165   { (eval echo "$as_me:3165: \"$ac_try\"") >&5
3166   (eval $ac_try) 2>&5
3167   ac_status=$?
3168   echo "$as_me:3168: \$? = $ac_status" >&5
3169   (exit $ac_status); }; }; then
3170   :
3171 else
3172   echo "$as_me: failed program was:" >&5
3173 cat conftest.$ac_ext >&5
3174 continue
3175 fi
3176 rm -f conftest.$ac_objext conftest.$ac_ext
3177   cat >conftest.$ac_ext <<_ACEOF
3178 #line 3178 "configure"
3179 #include "confdefs.h"
3180 $ac_declaration
3181 int
3182 main (void)
3183 {
3184 exit (42);
3185   ;
3186   return 0;
3187 }
3188 _ACEOF
3189 rm -f conftest.$ac_objext
3190 if { (eval echo "$as_me:3190: \"$ac_compile\"") >&5
3191   (eval $ac_compile) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); } &&
3195          { ac_try='test -s conftest.$ac_objext'
3196   { (eval echo "$as_me:3196: \"$ac_try\"") >&5
3197   (eval $ac_try) 2>&5
3198   ac_status=$?
3199   echo "$as_me:3199: \$? = $ac_status" >&5
3200   (exit $ac_status); }; }; then
3201   break
3202 else
3203   echo "$as_me: failed program was:" >&5
3204 cat conftest.$ac_ext >&5
3205 fi
3206 rm -f conftest.$ac_objext conftest.$ac_ext
3207 done
3208 rm -rf conftest*
3209 if test -n "$ac_declaration"; then
3210   echo '#ifdef __cplusplus' >>confdefs.h
3211   echo $ac_declaration      >>confdefs.h
3212   echo '#endif'             >>confdefs.h
3213 fi
3214
3215 ac_ext=c
3216 ac_cpp='$CPP $CPPFLAGS'
3217 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3218 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3219 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3220 ac_main_return=return
3221
3222         ac_ext=cc
3223 ac_cpp='$CXXCPP $CPPFLAGS'
3224 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3227 ac_main_return=return
3228
3229         if test "x$cf_with_cxx" != xno
3230         then
3231                 # Several of the C++ configurations do not work, particularly when
3232                 # cross-compiling (20140913 -TD)
3233                 echo "$as_me:3233: checking if $CXX works" >&5
3234 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3235
3236                 save_CPPFLAGS="$CPPFLAGS"
3237                 eval cf_includedir=${includedir}
3238                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3239
3240 cat >conftest.$ac_ext <<_ACEOF
3241 #line 3241 "configure"
3242 #include "confdefs.h"
3243
3244 #include <stdlib.h>
3245 #include <stdio.h>
3246
3247 int
3248 main (void)
3249 {
3250
3251                 printf("Hello world!\n")
3252
3253   ;
3254   return 0;
3255 }
3256 _ACEOF
3257 rm -f conftest.$ac_objext
3258 if { (eval echo "$as_me:3258: \"$ac_compile\"") >&5
3259   (eval $ac_compile) 2>&5
3260   ac_status=$?
3261   echo "$as_me:3261: \$? = $ac_status" >&5
3262   (exit $ac_status); } &&
3263          { ac_try='test -s conftest.$ac_objext'
3264   { (eval echo "$as_me:3264: \"$ac_try\"") >&5
3265   (eval $ac_try) 2>&5
3266   ac_status=$?
3267   echo "$as_me:3267: \$? = $ac_status" >&5
3268   (exit $ac_status); }; }; then
3269   cf_cxx_works=yes
3270 else
3271   echo "$as_me: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
3273 cf_cxx_works=no
3274 fi
3275 rm -f conftest.$ac_objext conftest.$ac_ext
3276                 CPPFLAGS="$save_CPPFLAGS"
3277
3278                 echo "$as_me:3278: result: $cf_cxx_works" >&5
3279 echo "${ECHO_T}$cf_cxx_works" >&6
3280                 if test "x$cf_cxx_works" = xno
3281                 then
3282                         { echo "$as_me:3282: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3283 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3284                         cf_with_cxx=no; CXX=""; GXX="";
3285                 fi
3286         fi
3287         ac_ext=c
3288 ac_cpp='$CPP $CPPFLAGS'
3289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3292 ac_main_return=return
3293
3294         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3295         if test "$CXX" = "g++" ; then
3296                 # Extract the first word of "g++", so it can be a program name with args.
3297 set dummy g++; ac_word=$2
3298 echo "$as_me:3298: checking for $ac_word" >&5
3299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3300 if test "${ac_cv_path_CXX+set}" = set; then
3301   echo $ECHO_N "(cached) $ECHO_C" >&6
3302 else
3303   case $CXX in
3304   [\\/]* | ?:[\\/]*)
3305   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3306   ;;
3307   *)
3308   ac_save_IFS=$IFS; IFS=$ac_path_separator
3309 ac_dummy="$PATH"
3310 for ac_dir in $ac_dummy; do
3311   IFS=$ac_save_IFS
3312   test -z "$ac_dir" && ac_dir=.
3313   if $as_executable_p "$ac_dir/$ac_word"; then
3314    ac_cv_path_CXX="$ac_dir/$ac_word"
3315    echo "$as_me:3315: found $ac_dir/$ac_word" >&5
3316    break
3317 fi
3318 done
3319
3320   ;;
3321 esac
3322 fi
3323 CXX=$ac_cv_path_CXX
3324
3325 if test -n "$CXX"; then
3326   echo "$as_me:3326: result: $CXX" >&5
3327 echo "${ECHO_T}$CXX" >&6
3328 else
3329   echo "$as_me:3329: result: no" >&5
3330 echo "${ECHO_T}no" >&6
3331 fi
3332
3333         fi
3334         case "x$CXX" in
3335         (x|xg++)
3336                 { echo "$as_me:3336: WARNING: You don't have any C++ compiler, too bad" >&5
3337 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3338                 cf_with_cxx=no; CXX=""; GXX="";
3339                 ;;
3340         esac
3341 fi
3342
3343 GXX_VERSION=none
3344 if test "$GXX" = yes; then
3345         echo "$as_me:3345: checking version of ${CXX:-g++}" >&5
3346 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3347         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3348         if test -z "$GXX_VERSION"
3349         then
3350                 GXX_VERSION=unknown
3351                 GXX=no
3352         fi
3353         echo "$as_me:3353: result: $GXX_VERSION" >&5
3354 echo "${ECHO_T}$GXX_VERSION" >&6
3355 fi
3356
3357 case $GXX_VERSION in
3358 ([1-9][0-9].*)
3359         ;;
3360 (1.*|2.[0-6]*)
3361         { echo "$as_me:3361: WARNING: templates do not work" >&5
3362 echo "$as_me: WARNING: templates do not work" >&2;}
3363         ;;
3364 esac
3365
3366 echo "$as_me:3366: checking if you want to build C++ binding and demo" >&5
3367 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3368
3369 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3370 if test "${with_cxx_binding+set}" = set; then
3371   withval="$with_cxx_binding"
3372   cf_with_cxx_binding=$withval
3373 else
3374   cf_with_cxx_binding=$cf_with_cxx
3375 fi;
3376 echo "$as_me:3376: result: $cf_with_cxx_binding" >&5
3377 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3378
3379 echo "$as_me:3379: checking if you want to build with Ada" >&5
3380 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3381 echo "$as_me:3381: result: $cf_with_ada" >&5
3382 echo "${ECHO_T}$cf_with_ada" >&6
3383
3384 echo "$as_me:3384: checking if you want to install terminal database" >&5
3385 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3386
3387 # Check whether --enable-db-install or --disable-db-install was given.
3388 if test "${enable_db_install+set}" = set; then
3389   enableval="$enable_db_install"
3390   cf_with_db_install=$enableval
3391 else
3392   cf_with_db_install=yes
3393 fi;
3394 echo "$as_me:3394: result: $cf_with_db_install" >&5
3395 echo "${ECHO_T}$cf_with_db_install" >&6
3396
3397 echo "$as_me:3397: checking if you want to install manpages" >&5
3398 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3399
3400 # Check whether --with-manpages or --without-manpages was given.
3401 if test "${with_manpages+set}" = set; then
3402   withval="$with_manpages"
3403   cf_with_manpages=$withval
3404 else
3405   cf_with_manpages=yes
3406 fi;
3407 echo "$as_me:3407: result: $cf_with_manpages" >&5
3408 echo "${ECHO_T}$cf_with_manpages" >&6
3409
3410 echo "$as_me:3410: checking if you want to build programs such as tic" >&5
3411 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3412
3413 # Check whether --with-progs or --without-progs was given.
3414 if test "${with_progs+set}" = set; then
3415   withval="$with_progs"
3416   cf_with_progs=$withval
3417 else
3418   cf_with_progs=yes
3419 fi;
3420 echo "$as_me:3420: result: $cf_with_progs" >&5
3421 echo "${ECHO_T}$cf_with_progs" >&6
3422
3423 if test -f $srcdir/tack/tack.h; then
3424         if test "x$cross_compiling" = xyes ; then
3425                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3426
3427 echo "${as_me:-configure}:3427: testing ignoring tack because we are cross-compiling ..." 1>&5
3428
3429                 cf_with_tack=no
3430         else
3431                 echo "$as_me:3431: checking if you want to build the tack program" >&5
3432 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3433
3434 # Check whether --with-tack or --without-tack was given.
3435 if test "${with_tack+set}" = set; then
3436   withval="$with_tack"
3437   cf_with_tack=$withval
3438 else
3439   cf_with_tack=$cf_with_progs
3440 fi;
3441                 echo "$as_me:3441: result: $cf_with_tack" >&5
3442 echo "${ECHO_T}$cf_with_tack" >&6
3443         fi
3444 else
3445         cf_with_tack=no
3446 fi
3447
3448 echo "$as_me:3448: checking if you want to build test-programs" >&5
3449 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3450
3451 # Check whether --with-tests or --without-tests was given.
3452 if test "${with_tests+set}" = set; then
3453   withval="$with_tests"
3454   cf_with_tests=$withval
3455 else
3456   cf_with_tests=yes
3457 fi;
3458 echo "$as_me:3458: result: $cf_with_tests" >&5
3459 echo "${ECHO_T}$cf_with_tests" >&6
3460
3461 echo "$as_me:3461: checking if you wish to install curses.h" >&5
3462 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3463
3464 # Check whether --with-curses-h or --without-curses-h was given.
3465 if test "${with_curses_h+set}" = set; then
3466   withval="$with_curses_h"
3467   with_curses_h=$withval
3468 else
3469   with_curses_h=yes
3470 fi;
3471 echo "$as_me:3471: result: $with_curses_h" >&5
3472 echo "${ECHO_T}$with_curses_h" >&6
3473
3474 modules_to_build="ncurses"
3475 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3476 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3477 modules_to_build="$modules_to_build panel menu form"
3478
3479 test "$program_prefix" != NONE &&
3480   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3481 # Use a double $ so make ignores it.
3482 test "$program_suffix" != NONE &&
3483   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3484 # Double any \ or $.  echo might interpret backslashes.
3485 # By default was `s,x,x', remove it if useless.
3486 cat <<\_ACEOF >conftest.sed
3487 s/[\\$]/&&/g;s/;s,x,x,$//
3488 _ACEOF
3489 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3490 rm conftest.sed
3491
3492 for ac_prog in mawk gawk nawk awk
3493 do
3494   # Extract the first word of "$ac_prog", so it can be a program name with args.
3495 set dummy $ac_prog; ac_word=$2
3496 echo "$as_me:3496: checking for $ac_word" >&5
3497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498 if test "${ac_cv_prog_AWK+set}" = set; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   if test -n "$AWK"; then
3502   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3503 else
3504   ac_save_IFS=$IFS; IFS=$ac_path_separator
3505 ac_dummy="$PATH"
3506 for ac_dir in $ac_dummy; do
3507   IFS=$ac_save_IFS
3508   test -z "$ac_dir" && ac_dir=.
3509   $as_executable_p "$ac_dir/$ac_word" || continue
3510 ac_cv_prog_AWK="$ac_prog"
3511 echo "$as_me:3511: found $ac_dir/$ac_word" >&5
3512 break
3513 done
3514
3515 fi
3516 fi
3517 AWK=$ac_cv_prog_AWK
3518 if test -n "$AWK"; then
3519   echo "$as_me:3519: result: $AWK" >&5
3520 echo "${ECHO_T}$AWK" >&6
3521 else
3522   echo "$as_me:3522: result: no" >&5
3523 echo "${ECHO_T}no" >&6
3524 fi
3525
3526   test -n "$AWK" && break
3527 done
3528
3529 test -z "$AWK" && { { echo "$as_me:3529: error: No awk program found" >&5
3530 echo "$as_me: error: No awk program found" >&2;}
3531    { (exit 1); exit 1; }; }
3532
3533 echo "$as_me:3533: checking for egrep" >&5
3534 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3535 if test "${ac_cv_prog_egrep+set}" = set; then
3536   echo $ECHO_N "(cached) $ECHO_C" >&6
3537 else
3538   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3539                 then ac_cv_prog_egrep='grep -E'
3540                 else ac_cv_prog_egrep='egrep'
3541         fi
3542 fi
3543 echo "$as_me:3543: result: $ac_cv_prog_egrep" >&5
3544 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3545         EGREP=$ac_cv_prog_egrep
3546
3547         test -z "$EGREP" && { { echo "$as_me:3547: error: No egrep program found" >&5
3548 echo "$as_me: error: No egrep program found" >&2;}
3549    { (exit 1); exit 1; }; }
3550
3551 # Find a good install program.  We prefer a C program (faster),
3552 # so one script is as good as another.  But avoid the broken or
3553 # incompatible versions:
3554 # SysV /etc/install, /usr/sbin/install
3555 # SunOS /usr/etc/install
3556 # IRIX /sbin/install
3557 # AIX /bin/install
3558 # AmigaOS /C/install, which installs bootblocks on floppy discs
3559 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3560 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3561 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3562 # ./install, which can be erroneously created by make from ./install.sh.
3563 echo "$as_me:3563: checking for a BSD compatible install" >&5
3564 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3565 if test -z "$INSTALL"; then
3566 if test "${ac_cv_path_install+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569     ac_save_IFS=$IFS; IFS=$ac_path_separator
3570   for ac_dir in $PATH; do
3571     IFS=$ac_save_IFS
3572     # Account for people who put trailing slashes in PATH elements.
3573     case $ac_dir/ in
3574     / | ./ | .// | /cC/* \
3575     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3576     | /usr/ucb/* ) ;;
3577     *)
3578       # OSF1 and SCO ODT 3.0 have their own names for install.
3579       # Don't use installbsd from OSF since it installs stuff as root
3580       # by default.
3581       for ac_prog in ginstall scoinst install; do
3582         if $as_executable_p "$ac_dir/$ac_prog"; then
3583           if test $ac_prog = install &&
3584             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3585             # AIX install.  It has an incompatible calling convention.
3586             :
3587           elif test $ac_prog = install &&
3588             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3589             # program-specific install script used by HP pwplus--don't use.
3590             :
3591           else
3592             ac_cv_path_install="$ac_dir/$ac_prog -c"
3593             break 2
3594           fi
3595         fi
3596       done
3597       ;;
3598     esac
3599   done
3600
3601 fi
3602   if test "${ac_cv_path_install+set}" = set; then
3603     INSTALL=$ac_cv_path_install
3604   else
3605     # As a last resort, use the slow shell script.  We don't cache a
3606     # path for INSTALL within a source directory, because that will
3607     # break other packages using the cache if that directory is
3608     # removed, or if the path is relative.
3609     INSTALL=$ac_install_sh
3610   fi
3611 fi
3612 echo "$as_me:3612: result: $INSTALL" >&5
3613 echo "${ECHO_T}$INSTALL" >&6
3614
3615 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3616 # It thinks the first close brace ends the variable substitution.
3617 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3618
3619 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3620
3621 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3622
3623 case $INSTALL in
3624 (/*)
3625         ;;
3626 (*)
3627         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3628         test -z "$cf_dir" && cf_dir=.
3629         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3630         ;;
3631 esac
3632
3633 for ac_prog in lint cppcheck splint
3634 do
3635   # Extract the first word of "$ac_prog", so it can be a program name with args.
3636 set dummy $ac_prog; ac_word=$2
3637 echo "$as_me:3637: checking for $ac_word" >&5
3638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3639 if test "${ac_cv_prog_LINT+set}" = set; then
3640   echo $ECHO_N "(cached) $ECHO_C" >&6
3641 else
3642   if test -n "$LINT"; then
3643   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3644 else
3645   ac_save_IFS=$IFS; IFS=$ac_path_separator
3646 ac_dummy="$PATH"
3647 for ac_dir in $ac_dummy; do
3648   IFS=$ac_save_IFS
3649   test -z "$ac_dir" && ac_dir=.
3650   $as_executable_p "$ac_dir/$ac_word" || continue
3651 ac_cv_prog_LINT="$ac_prog"
3652 echo "$as_me:3652: found $ac_dir/$ac_word" >&5
3653 break
3654 done
3655
3656 fi
3657 fi
3658 LINT=$ac_cv_prog_LINT
3659 if test -n "$LINT"; then
3660   echo "$as_me:3660: result: $LINT" >&5
3661 echo "${ECHO_T}$LINT" >&6
3662 else
3663   echo "$as_me:3663: result: no" >&5
3664 echo "${ECHO_T}no" >&6
3665 fi
3666
3667   test -n "$LINT" && break
3668 done
3669
3670 case "x$LINT" in
3671 (xcppcheck|x*/cppcheck)
3672         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3673         ;;
3674 esac
3675
3676 echo "$as_me:3676: checking whether ln -s works" >&5
3677 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3678 LN_S=$as_ln_s
3679 if test "$LN_S" = "ln -s"; then
3680   echo "$as_me:3680: result: yes" >&5
3681 echo "${ECHO_T}yes" >&6
3682 else
3683   echo "$as_me:3683: result: no, using $LN_S" >&5
3684 echo "${ECHO_T}no, using $LN_S" >&6
3685 fi
3686
3687 echo "$as_me:3687: checking if $LN_S -f options work" >&5
3688 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3689
3690 rm -f conf$$.src conf$$dst
3691 echo >conf$$.dst
3692 echo first >conf$$.src
3693 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3694         cf_prog_ln_sf=yes
3695 else
3696         cf_prog_ln_sf=no
3697 fi
3698 rm -f conf$$.dst conf$$src
3699 echo "$as_me:3699: result: $cf_prog_ln_sf" >&5
3700 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3701
3702 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3703
3704 echo "$as_me:3704: checking for long file names" >&5
3705 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3706 if test "${ac_cv_sys_long_file_names+set}" = set; then
3707   echo $ECHO_N "(cached) $ECHO_C" >&6
3708 else
3709   ac_cv_sys_long_file_names=yes
3710 # Test for long file names in all the places we know might matter:
3711 #      .                the current directory, where building will happen
3712 #      $prefix/lib      where we will be installing things
3713 #      $exec_prefix/lib likewise
3714 # eval it to expand exec_prefix.
3715 #      $TMPDIR          if set, where it might want to write temporary files
3716 # if $TMPDIR is not set:
3717 #      /tmp             where it might want to write temporary files
3718 #      /var/tmp         likewise
3719 #      /usr/tmp         likewise
3720 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3721   ac_tmpdirs=$TMPDIR
3722 else
3723   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3724 fi
3725 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3726   test -d $ac_dir || continue
3727   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3728   ac_xdir=$ac_dir/cf$$
3729   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3730   ac_tf1=$ac_xdir/conftest9012345
3731   ac_tf2=$ac_xdir/conftest9012346
3732   (echo 1 >$ac_tf1) 2>/dev/null
3733   (echo 2 >$ac_tf2) 2>/dev/null
3734   ac_val=`cat $ac_tf1 2>/dev/null`
3735   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3736     ac_cv_sys_long_file_names=no
3737     rm -rf $ac_xdir 2>/dev/null
3738     break
3739   fi
3740   rm -rf $ac_xdir 2>/dev/null
3741 done
3742 fi
3743 echo "$as_me:3743: result: $ac_cv_sys_long_file_names" >&5
3744 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3745 if test $ac_cv_sys_long_file_names = yes; then
3746
3747 cat >>confdefs.h <<\EOF
3748 #define HAVE_LONG_FILE_NAMES 1
3749 EOF
3750
3751 fi
3752
3753 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3754 # of package conflict.
3755 cf_config_suffix=
3756
3757 # Check whether --with-config-suffix or --without-config-suffix was given.
3758 if test "${with_config_suffix+set}" = set; then
3759   withval="$with_config_suffix"
3760   case "x$withval" in
3761         (xyes|xno)
3762                 { echo "$as_me:3762: WARNING: expected a value for config-suffix option" >&5
3763 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3764                 ;;
3765         (*)     cf_config_suffix="$withval"
3766                 ;;
3767         esac
3768 fi;
3769
3770 # If we find pkg-config, check if we should install the ".pc" files.
3771
3772 echo "$as_me:3772: checking if you want to use pkg-config" >&5
3773 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3774
3775 # Check whether --with-pkg-config or --without-pkg-config was given.
3776 if test "${with_pkg_config+set}" = set; then
3777   withval="$with_pkg_config"
3778   cf_pkg_config=$withval
3779 else
3780   cf_pkg_config=yes
3781 fi;
3782 echo "$as_me:3782: result: $cf_pkg_config" >&5
3783 echo "${ECHO_T}$cf_pkg_config" >&6
3784
3785 case $cf_pkg_config in
3786 (no)
3787         PKG_CONFIG=none
3788         ;;
3789 (yes)
3790
3791 if test -n "$ac_tool_prefix"; then
3792   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3793 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   case $PKG_CONFIG in
3800   [\\/]* | ?:[\\/]*)
3801   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3802   ;;
3803   *)
3804   ac_save_IFS=$IFS; IFS=$ac_path_separator
3805 ac_dummy="$PATH"
3806 for ac_dir in $ac_dummy; do
3807   IFS=$ac_save_IFS
3808   test -z "$ac_dir" && ac_dir=.
3809   if $as_executable_p "$ac_dir/$ac_word"; then
3810    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3811    echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3812    break
3813 fi
3814 done
3815
3816   ;;
3817 esac
3818 fi
3819 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3820
3821 if test -n "$PKG_CONFIG"; then
3822   echo "$as_me:3822: result: $PKG_CONFIG" >&5
3823 echo "${ECHO_T}$PKG_CONFIG" >&6
3824 else
3825   echo "$as_me:3825: result: no" >&5
3826 echo "${ECHO_T}no" >&6
3827 fi
3828
3829 fi
3830 if test -z "$ac_cv_path_PKG_CONFIG"; then
3831   ac_pt_PKG_CONFIG=$PKG_CONFIG
3832   # Extract the first word of "pkg-config", so it can be a program name with args.
3833 set dummy pkg-config; ac_word=$2
3834 echo "$as_me:3834: checking for $ac_word" >&5
3835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3836 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3837   echo $ECHO_N "(cached) $ECHO_C" >&6
3838 else
3839   case $ac_pt_PKG_CONFIG in
3840   [\\/]* | ?:[\\/]*)
3841   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3842   ;;
3843   *)
3844   ac_save_IFS=$IFS; IFS=$ac_path_separator
3845 ac_dummy="$PATH"
3846 for ac_dir in $ac_dummy; do
3847   IFS=$ac_save_IFS
3848   test -z "$ac_dir" && ac_dir=.
3849   if $as_executable_p "$ac_dir/$ac_word"; then
3850    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3851    echo "$as_me:3851: found $ac_dir/$ac_word" >&5
3852    break
3853 fi
3854 done
3855
3856   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3857   ;;
3858 esac
3859 fi
3860 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3861
3862 if test -n "$ac_pt_PKG_CONFIG"; then
3863   echo "$as_me:3863: result: $ac_pt_PKG_CONFIG" >&5
3864 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3865 else
3866   echo "$as_me:3866: result: no" >&5
3867 echo "${ECHO_T}no" >&6
3868 fi
3869
3870   PKG_CONFIG=$ac_pt_PKG_CONFIG
3871 else
3872   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3873 fi
3874
3875         ;;
3876 (*)
3877         PKG_CONFIG=$withval
3878         ;;
3879 esac
3880
3881 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3882 if test "$PKG_CONFIG" != none ; then
3883
3884 if test "x$prefix" != xNONE; then
3885         cf_path_syntax="$prefix"
3886 else
3887         cf_path_syntax="$ac_default_prefix"
3888 fi
3889
3890 case ".$PKG_CONFIG" in
3891 (.\$\(*\)*|.\'*\'*)
3892         ;;
3893 (..|./*|.\\*)
3894         ;;
3895 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3896         ;;
3897 (.\${*prefix}*|.\${*dir}*)
3898         eval PKG_CONFIG="$PKG_CONFIG"
3899         case ".$PKG_CONFIG" in
3900         (.NONE/*)
3901                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3902                 ;;
3903         esac
3904         ;;
3905 (.no|.NONE/*)
3906         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3907         ;;
3908 (*)
3909         { { echo "$as_me:3909: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3910 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3911    { (exit 1); exit 1; }; }
3912         ;;
3913 esac
3914
3915 elif test "x$cf_pkg_config" != xno ; then
3916         { echo "$as_me:3916: WARNING: pkg-config is not installed" >&5
3917 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3918 fi
3919
3920 case $PKG_CONFIG in
3921 (no|none|yes)
3922         echo "$as_me:3922: checking for pkg-config library directory" >&5
3923 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3924         ;;
3925 (*)
3926         echo "$as_me:3926: checking for $PKG_CONFIG library directory" >&5
3927 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3928         ;;
3929 esac
3930
3931 PKG_CONFIG_LIBDIR=no
3932
3933 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3934 if test "${with_pkg_config_libdir+set}" = set; then
3935   withval="$with_pkg_config_libdir"
3936   PKG_CONFIG_LIBDIR=$withval
3937 else
3938   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3939 fi;
3940
3941 case x$PKG_CONFIG_LIBDIR in
3942 (x/*)
3943         ;;
3944 (xyes)
3945         # Look for the library directory using the same prefix as the executable
3946         if test "x$PKG_CONFIG" = xnone
3947         then
3948                 cf_path=$prefix
3949         else
3950                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3951         fi
3952
3953         # If you don't like using the default architecture, you have to specify the
3954         # intended library directory and corresponding compiler/linker options.
3955         #
3956         # This case allows for Debian's 2014-flavor of multiarch, along with the
3957         # most common variations before that point.  Some other variants spell the
3958         # directory differently, e.g., "pkg-config", and put it in unusual places.
3959         # pkg-config has always been poorly standardized, which is ironic...
3960         case x`(arch) 2>/dev/null` in
3961         (*64)
3962                 cf_search_path="\
3963                         $cf_path/lib/*64-linux-gnu \
3964                         $cf_path/share \
3965                         $cf_path/lib64 \
3966                         $cf_path/lib32 \
3967                         $cf_path/lib"
3968                 ;;
3969         (*)
3970                 cf_search_path="\
3971                         $cf_path/lib/*-linux-gnu \
3972                         $cf_path/share \
3973                         $cf_path/lib32 \
3974                         $cf_path/lib \
3975                         $cf_path/libdata"
3976                 ;;
3977         esac
3978
3979         test -n "$verbose" && echo "    list..." 1>&6
3980
3981 echo "${as_me:-configure}:3981: testing list... ..." 1>&5
3982
3983         for cf_config in $cf_search_path
3984         do
3985                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3986
3987 echo "${as_me:-configure}:3987: testing checking $cf_config/pkgconfig ..." 1>&5
3988
3989                 if test -d $cf_config/pkgconfig
3990                 then
3991                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3992                         echo "$as_me:3992: checking done" >&5
3993 echo $ECHO_N "checking done... $ECHO_C" >&6
3994                         break
3995                 fi
3996         done
3997         ;;
3998 (*)
3999         ;;
4000 esac
4001
4002 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4003         echo "$as_me:4003: result: $PKG_CONFIG_LIBDIR" >&5
4004 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4005 fi
4006
4007 if test "x$PKG_CONFIG" != xnone
4008 then
4009         echo "$as_me:4009: checking if we should install .pc files for $PKG_CONFIG" >&5
4010 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4011 else
4012         echo "$as_me:4012: checking if we should install .pc files" >&5
4013 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4014 fi
4015
4016 # Check whether --enable-pc-files or --disable-pc-files was given.
4017 if test "${enable_pc_files+set}" = set; then
4018   enableval="$enable_pc_files"
4019   enable_pc_files=$enableval
4020 else
4021   enable_pc_files=no
4022 fi;
4023 echo "$as_me:4023: result: $enable_pc_files" >&5
4024 echo "${ECHO_T}$enable_pc_files" >&6
4025
4026 if test "x$enable_pc_files" != xno
4027 then
4028         MAKE_PC_FILES=
4029         case "x$PKG_CONFIG_LIBDIR" in
4030         (xno|xyes)
4031                 { echo "$as_me:4031: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4032 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4033                 ;;
4034         (*)
4035
4036 if test "x$prefix" != xNONE; then
4037         cf_path_syntax="$prefix"
4038 else
4039         cf_path_syntax="$ac_default_prefix"
4040 fi
4041
4042 case ".$PKG_CONFIG_LIBDIR" in
4043 (.\$\(*\)*|.\'*\'*)
4044         ;;
4045 (..|./*|.\\*)
4046         ;;
4047 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4048         ;;
4049 (.\${*prefix}*|.\${*dir}*)
4050         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4051         case ".$PKG_CONFIG_LIBDIR" in
4052         (.NONE/*)
4053                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4054                 ;;
4055         esac
4056         ;;
4057 (.no|.NONE/*)
4058         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4059         ;;
4060 (*)
4061         { { echo "$as_me:4061: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4062 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4063    { (exit 1); exit 1; }; }
4064         ;;
4065 esac
4066
4067                 ;;
4068         esac
4069 else
4070         MAKE_PC_FILES="#"
4071 fi
4072
4073 if test -z "$MAKE_PC_FILES"
4074 then
4075         echo "$as_me:4075: checking for suffix to add to pc-files" >&5
4076 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4077
4078 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4079 if test "${with_pc_suffix+set}" = set; then
4080   withval="$with_pc_suffix"
4081   case "x$withval" in
4082         (xyes|xno)
4083                 PC_MODULE_SUFFIX=
4084                 ;;
4085         (*)     PC_MODULE_SUFFIX="$withval"
4086                 ;;
4087         esac
4088 fi;
4089         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4090         echo "$as_me:4090: result: $PC_MODULE_SUFFIX" >&5
4091 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4092         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4093
4094 fi
4095
4096 echo "$as_me:4096: checking if we should assume mixed-case filenames" >&5
4097 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4098
4099 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4100 if test "${enable_mixed_case+set}" = set; then
4101   enableval="$enable_mixed_case"
4102   enable_mixedcase=$enableval
4103 else
4104   enable_mixedcase=auto
4105 fi;
4106 echo "$as_me:4106: result: $enable_mixedcase" >&5
4107 echo "${ECHO_T}$enable_mixedcase" >&6
4108 if test "$enable_mixedcase" = "auto" ; then
4109
4110 echo "$as_me:4110: checking if filesystem supports mixed-case filenames" >&5
4111 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4112 if test "${cf_cv_mixedcase+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115
4116 if test "$cross_compiling" = yes ; then
4117         case $target_alias in
4118         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4119                 cf_cv_mixedcase=no
4120                 ;;
4121         (*)
4122                 cf_cv_mixedcase=yes
4123                 ;;
4124         esac
4125 else
4126         rm -f conftest CONFTEST
4127         echo test >conftest
4128         if test -f CONFTEST ; then
4129                 cf_cv_mixedcase=no
4130         else
4131                 cf_cv_mixedcase=yes
4132         fi
4133         rm -f conftest CONFTEST
4134 fi
4135
4136 fi
4137 echo "$as_me:4137: result: $cf_cv_mixedcase" >&5
4138 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4139 test "$cf_cv_mixedcase" = yes &&
4140 cat >>confdefs.h <<\EOF
4141 #define MIXEDCASE_FILENAMES 1
4142 EOF
4143
4144 else
4145         cf_cv_mixedcase=$enable_mixedcase
4146         if test "x$enable_mixedcase" = "xyes" ; then
4147
4148 cat >>confdefs.h <<\EOF
4149 #define MIXEDCASE_FILENAMES 1
4150 EOF
4151
4152         fi
4153 fi
4154
4155 # do this after mixed-case option (tags/TAGS is not as important as tic).
4156 echo "$as_me:4156: checking whether ${MAKE-make} sets \${MAKE}" >&5
4157 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4158 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4159 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4160   echo $ECHO_N "(cached) $ECHO_C" >&6
4161 else
4162   cat >conftest.make <<\EOF
4163 all:
4164         @echo 'ac_maketemp="${MAKE}"'
4165 EOF
4166 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4167 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4168 if test -n "$ac_maketemp"; then
4169   eval ac_cv_prog_make_${ac_make}_set=yes
4170 else
4171   eval ac_cv_prog_make_${ac_make}_set=no
4172 fi
4173 rm -f conftest.make
4174 fi
4175 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4176   echo "$as_me:4176: result: yes" >&5
4177 echo "${ECHO_T}yes" >&6
4178   SET_MAKE=
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182   SET_MAKE="MAKE=${MAKE-make}"
4183 fi
4184
4185 for ac_prog in exctags ctags
4186 do
4187   # Extract the first word of "$ac_prog", so it can be a program name with args.
4188 set dummy $ac_prog; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_CTAGS+set}" = set; then
4192   echo $ECHO_N "(cached) $ECHO_C" >&6
4193 else
4194   if test -n "$CTAGS"; then
4195   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4196 else
4197   ac_save_IFS=$IFS; IFS=$ac_path_separator
4198 ac_dummy="$PATH"
4199 for ac_dir in $ac_dummy; do
4200   IFS=$ac_save_IFS
4201   test -z "$ac_dir" && ac_dir=.
4202   $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_CTAGS="$ac_prog"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4205 break
4206 done
4207
4208 fi
4209 fi
4210 CTAGS=$ac_cv_prog_CTAGS
4211 if test -n "$CTAGS"; then
4212   echo "$as_me:4212: result: $CTAGS" >&5
4213 echo "${ECHO_T}$CTAGS" >&6
4214 else
4215   echo "$as_me:4215: result: no" >&5
4216 echo "${ECHO_T}no" >&6
4217 fi
4218
4219   test -n "$CTAGS" && break
4220 done
4221
4222 for ac_prog in exetags etags
4223 do
4224   # Extract the first word of "$ac_prog", so it can be a program name with args.
4225 set dummy $ac_prog; ac_word=$2
4226 echo "$as_me:4226: checking for $ac_word" >&5
4227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4228 if test "${ac_cv_prog_ETAGS+set}" = set; then
4229   echo $ECHO_N "(cached) $ECHO_C" >&6
4230 else
4231   if test -n "$ETAGS"; then
4232   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4233 else
4234   ac_save_IFS=$IFS; IFS=$ac_path_separator
4235 ac_dummy="$PATH"
4236 for ac_dir in $ac_dummy; do
4237   IFS=$ac_save_IFS
4238   test -z "$ac_dir" && ac_dir=.
4239   $as_executable_p "$ac_dir/$ac_word" || continue
4240 ac_cv_prog_ETAGS="$ac_prog"
4241 echo "$as_me:4241: found $ac_dir/$ac_word" >&5
4242 break
4243 done
4244
4245 fi
4246 fi
4247 ETAGS=$ac_cv_prog_ETAGS
4248 if test -n "$ETAGS"; then
4249   echo "$as_me:4249: result: $ETAGS" >&5
4250 echo "${ECHO_T}$ETAGS" >&6
4251 else
4252   echo "$as_me:4252: result: no" >&5
4253 echo "${ECHO_T}no" >&6
4254 fi
4255
4256   test -n "$ETAGS" && break
4257 done
4258
4259 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4260 set dummy ${CTAGS:-ctags}; ac_word=$2
4261 echo "$as_me:4261: checking for $ac_word" >&5
4262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4263 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4264   echo $ECHO_N "(cached) $ECHO_C" >&6
4265 else
4266   if test -n "$MAKE_LOWER_TAGS"; then
4267   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4268 else
4269   ac_save_IFS=$IFS; IFS=$ac_path_separator
4270 ac_dummy="$PATH"
4271 for ac_dir in $ac_dummy; do
4272   IFS=$ac_save_IFS
4273   test -z "$ac_dir" && ac_dir=.
4274   $as_executable_p "$ac_dir/$ac_word" || continue
4275 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4276 echo "$as_me:4276: found $ac_dir/$ac_word" >&5
4277 break
4278 done
4279
4280   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4281 fi
4282 fi
4283 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4284 if test -n "$MAKE_LOWER_TAGS"; then
4285   echo "$as_me:4285: result: $MAKE_LOWER_TAGS" >&5
4286 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4287 else
4288   echo "$as_me:4288: result: no" >&5
4289 echo "${ECHO_T}no" >&6
4290 fi
4291
4292 if test "$cf_cv_mixedcase" = yes ; then
4293         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4294 set dummy ${ETAGS:-etags}; ac_word=$2
4295 echo "$as_me:4295: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4298   echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300   if test -n "$MAKE_UPPER_TAGS"; then
4301   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4302 else
4303   ac_save_IFS=$IFS; IFS=$ac_path_separator
4304 ac_dummy="$PATH"
4305 for ac_dir in $ac_dummy; do
4306   IFS=$ac_save_IFS
4307   test -z "$ac_dir" && ac_dir=.
4308   $as_executable_p "$ac_dir/$ac_word" || continue
4309 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4310 echo "$as_me:4310: found $ac_dir/$ac_word" >&5
4311 break
4312 done
4313
4314   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4315 fi
4316 fi
4317 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4318 if test -n "$MAKE_UPPER_TAGS"; then
4319   echo "$as_me:4319: result: $MAKE_UPPER_TAGS" >&5
4320 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 else
4327         MAKE_UPPER_TAGS=no
4328 fi
4329
4330 if test "$MAKE_UPPER_TAGS" = yes ; then
4331         MAKE_UPPER_TAGS=
4332 else
4333         MAKE_UPPER_TAGS="#"
4334 fi
4335
4336 if test "$MAKE_LOWER_TAGS" = yes ; then
4337         MAKE_LOWER_TAGS=
4338 else
4339         MAKE_LOWER_TAGS="#"
4340 fi
4341
4342 echo "$as_me:4342: checking for makeflags variable" >&5
4343 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4344 if test "${cf_cv_makeflags+set}" = set; then
4345   echo $ECHO_N "(cached) $ECHO_C" >&6
4346 else
4347
4348         cf_cv_makeflags=''
4349         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4350         do
4351                 cat >cf_makeflags.tmp <<CF_EOF
4352 SHELL = $SHELL
4353 all :
4354         @ echo '.$cf_option'
4355 CF_EOF
4356                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4357                 case "$cf_result" in
4358                 (.*k|.*kw)
4359                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4360                         case "$cf_result" in
4361                         (.*CC=*)        cf_cv_makeflags=
4362                                 ;;
4363                         (*)     cf_cv_makeflags=$cf_option
4364                                 ;;
4365                         esac
4366                         break
4367                         ;;
4368                 (.-)
4369                         ;;
4370                 (*)
4371
4372 echo "${as_me:-configure}:4372: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4373
4374                         ;;
4375                 esac
4376         done
4377         rm -f cf_makeflags.tmp
4378
4379 fi
4380 echo "$as_me:4380: result: $cf_cv_makeflags" >&5
4381 echo "${ECHO_T}$cf_cv_makeflags" >&6
4382
4383 if test -n "$ac_tool_prefix"; then
4384   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4385 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4386 echo "$as_me:4386: checking for $ac_word" >&5
4387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4388 if test "${ac_cv_prog_RANLIB+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391   if test -n "$RANLIB"; then
4392   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4393 else
4394   ac_save_IFS=$IFS; IFS=$ac_path_separator
4395 ac_dummy="$PATH"
4396 for ac_dir in $ac_dummy; do
4397   IFS=$ac_save_IFS
4398   test -z "$ac_dir" && ac_dir=.
4399   $as_executable_p "$ac_dir/$ac_word" || continue
4400 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4401 echo "$as_me:4401: found $ac_dir/$ac_word" >&5
4402 break
4403 done
4404
4405 fi
4406 fi
4407 RANLIB=$ac_cv_prog_RANLIB
4408 if test -n "$RANLIB"; then
4409   echo "$as_me:4409: result: $RANLIB" >&5
4410 echo "${ECHO_T}$RANLIB" >&6
4411 else
4412   echo "$as_me:4412: result: no" >&5
4413 echo "${ECHO_T}no" >&6
4414 fi
4415
4416 fi
4417 if test -z "$ac_cv_prog_RANLIB"; then
4418   ac_ct_RANLIB=$RANLIB
4419   # Extract the first word of "ranlib", so it can be a program name with args.
4420 set dummy ranlib; ac_word=$2
4421 echo "$as_me:4421: checking for $ac_word" >&5
4422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4423 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4424   echo $ECHO_N "(cached) $ECHO_C" >&6
4425 else
4426   if test -n "$ac_ct_RANLIB"; then
4427   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4428 else
4429   ac_save_IFS=$IFS; IFS=$ac_path_separator
4430 ac_dummy="$PATH"
4431 for ac_dir in $ac_dummy; do
4432   IFS=$ac_save_IFS
4433   test -z "$ac_dir" && ac_dir=.
4434   $as_executable_p "$ac_dir/$ac_word" || continue
4435 ac_cv_prog_ac_ct_RANLIB="ranlib"
4436 echo "$as_me:4436: found $ac_dir/$ac_word" >&5
4437 break
4438 done
4439
4440   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4441 fi
4442 fi
4443 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4444 if test -n "$ac_ct_RANLIB"; then
4445   echo "$as_me:4445: result: $ac_ct_RANLIB" >&5
4446 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4447 else
4448   echo "$as_me:4448: result: no" >&5
4449 echo "${ECHO_T}no" >&6
4450 fi
4451
4452   RANLIB=$ac_ct_RANLIB
4453 else
4454   RANLIB="$ac_cv_prog_RANLIB"
4455 fi
4456
4457 if test -n "$ac_tool_prefix"; then
4458   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4459 set dummy ${ac_tool_prefix}ld; ac_word=$2
4460 echo "$as_me:4460: checking for $ac_word" >&5
4461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4462 if test "${ac_cv_prog_LD+set}" = set; then
4463   echo $ECHO_N "(cached) $ECHO_C" >&6
4464 else
4465   if test -n "$LD"; then
4466   ac_cv_prog_LD="$LD" # Let the user override the test.
4467 else
4468   ac_save_IFS=$IFS; IFS=$ac_path_separator
4469 ac_dummy="$PATH"
4470 for ac_dir in $ac_dummy; do
4471   IFS=$ac_save_IFS
4472   test -z "$ac_dir" && ac_dir=.
4473   $as_executable_p "$ac_dir/$ac_word" || continue
4474 ac_cv_prog_LD="${ac_tool_prefix}ld"
4475 echo "$as_me:4475: found $ac_dir/$ac_word" >&5
4476 break
4477 done
4478
4479 fi
4480 fi
4481 LD=$ac_cv_prog_LD
4482 if test -n "$LD"; then
4483   echo "$as_me:4483: result: $LD" >&5
4484 echo "${ECHO_T}$LD" >&6
4485 else
4486   echo "$as_me:4486: result: no" >&5
4487 echo "${ECHO_T}no" >&6
4488 fi
4489
4490 fi
4491 if test -z "$ac_cv_prog_LD"; then
4492   ac_ct_LD=$LD
4493   # Extract the first word of "ld", so it can be a program name with args.
4494 set dummy ld; ac_word=$2
4495 echo "$as_me:4495: checking for $ac_word" >&5
4496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4497 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4498   echo $ECHO_N "(cached) $ECHO_C" >&6
4499 else
4500   if test -n "$ac_ct_LD"; then
4501   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4502 else
4503   ac_save_IFS=$IFS; IFS=$ac_path_separator
4504 ac_dummy="$PATH"
4505 for ac_dir in $ac_dummy; do
4506   IFS=$ac_save_IFS
4507   test -z "$ac_dir" && ac_dir=.
4508   $as_executable_p "$ac_dir/$ac_word" || continue
4509 ac_cv_prog_ac_ct_LD="ld"
4510 echo "$as_me:4510: found $ac_dir/$ac_word" >&5
4511 break
4512 done
4513
4514   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4515 fi
4516 fi
4517 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4518 if test -n "$ac_ct_LD"; then
4519   echo "$as_me:4519: result: $ac_ct_LD" >&5
4520 echo "${ECHO_T}$ac_ct_LD" >&6
4521 else
4522   echo "$as_me:4522: result: no" >&5
4523 echo "${ECHO_T}no" >&6
4524 fi
4525
4526   LD=$ac_ct_LD
4527 else
4528   LD="$ac_cv_prog_LD"
4529 fi
4530
4531 if test -n "$ac_tool_prefix"; then
4532   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4533 set dummy ${ac_tool_prefix}ar; ac_word=$2
4534 echo "$as_me:4534: checking for $ac_word" >&5
4535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4536 if test "${ac_cv_prog_AR+set}" = set; then
4537   echo $ECHO_N "(cached) $ECHO_C" >&6
4538 else
4539   if test -n "$AR"; then
4540   ac_cv_prog_AR="$AR" # Let the user override the test.
4541 else
4542   ac_save_IFS=$IFS; IFS=$ac_path_separator
4543 ac_dummy="$PATH"
4544 for ac_dir in $ac_dummy; do
4545   IFS=$ac_save_IFS
4546   test -z "$ac_dir" && ac_dir=.
4547   $as_executable_p "$ac_dir/$ac_word" || continue
4548 ac_cv_prog_AR="${ac_tool_prefix}ar"
4549 echo "$as_me:4549: found $ac_dir/$ac_word" >&5
4550 break
4551 done
4552
4553 fi
4554 fi
4555 AR=$ac_cv_prog_AR
4556 if test -n "$AR"; then
4557   echo "$as_me:4557: result: $AR" >&5
4558 echo "${ECHO_T}$AR" >&6
4559 else
4560   echo "$as_me:4560: result: no" >&5
4561 echo "${ECHO_T}no" >&6
4562 fi
4563
4564 fi
4565 if test -z "$ac_cv_prog_AR"; then
4566   ac_ct_AR=$AR
4567   # Extract the first word of "ar", so it can be a program name with args.
4568 set dummy ar; ac_word=$2
4569 echo "$as_me:4569: checking for $ac_word" >&5
4570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4571 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4572   echo $ECHO_N "(cached) $ECHO_C" >&6
4573 else
4574   if test -n "$ac_ct_AR"; then
4575   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4576 else
4577   ac_save_IFS=$IFS; IFS=$ac_path_separator
4578 ac_dummy="$PATH"
4579 for ac_dir in $ac_dummy; do
4580   IFS=$ac_save_IFS
4581   test -z "$ac_dir" && ac_dir=.
4582   $as_executable_p "$ac_dir/$ac_word" || continue
4583 ac_cv_prog_ac_ct_AR="ar"
4584 echo "$as_me:4584: found $ac_dir/$ac_word" >&5
4585 break
4586 done
4587
4588   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4589 fi
4590 fi
4591 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4592 if test -n "$ac_ct_AR"; then
4593   echo "$as_me:4593: result: $ac_ct_AR" >&5
4594 echo "${ECHO_T}$ac_ct_AR" >&6
4595 else
4596   echo "$as_me:4596: result: no" >&5
4597 echo "${ECHO_T}no" >&6
4598 fi
4599
4600   AR=$ac_ct_AR
4601 else
4602   AR="$ac_cv_prog_AR"
4603 fi
4604
4605 if test -n "$ac_tool_prefix"; then
4606   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4607 set dummy ${ac_tool_prefix}nm; ac_word=$2
4608 echo "$as_me:4608: checking for $ac_word" >&5
4609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4610 if test "${ac_cv_prog_NM+set}" = set; then
4611   echo $ECHO_N "(cached) $ECHO_C" >&6
4612 else
4613   if test -n "$NM"; then
4614   ac_cv_prog_NM="$NM" # Let the user override the test.
4615 else
4616   ac_save_IFS=$IFS; IFS=$ac_path_separator
4617 ac_dummy="$PATH"
4618 for ac_dir in $ac_dummy; do
4619   IFS=$ac_save_IFS
4620   test -z "$ac_dir" && ac_dir=.
4621   $as_executable_p "$ac_dir/$ac_word" || continue
4622 ac_cv_prog_NM="${ac_tool_prefix}nm"
4623 echo "$as_me:4623: found $ac_dir/$ac_word" >&5
4624 break
4625 done
4626
4627 fi
4628 fi
4629 NM=$ac_cv_prog_NM
4630 if test -n "$NM"; then
4631   echo "$as_me:4631: result: $NM" >&5
4632 echo "${ECHO_T}$NM" >&6
4633 else
4634   echo "$as_me:4634: result: no" >&5
4635 echo "${ECHO_T}no" >&6
4636 fi
4637
4638 fi
4639 if test -z "$ac_cv_prog_NM"; then
4640   ac_ct_NM=$NM
4641   # Extract the first word of "nm", so it can be a program name with args.
4642 set dummy nm; ac_word=$2
4643 echo "$as_me:4643: checking for $ac_word" >&5
4644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4645 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4646   echo $ECHO_N "(cached) $ECHO_C" >&6
4647 else
4648   if test -n "$ac_ct_NM"; then
4649   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4650 else
4651   ac_save_IFS=$IFS; IFS=$ac_path_separator
4652 ac_dummy="$PATH"
4653 for ac_dir in $ac_dummy; do
4654   IFS=$ac_save_IFS
4655   test -z "$ac_dir" && ac_dir=.
4656   $as_executable_p "$ac_dir/$ac_word" || continue
4657 ac_cv_prog_ac_ct_NM="nm"
4658 echo "$as_me:4658: found $ac_dir/$ac_word" >&5
4659 break
4660 done
4661
4662   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4663 fi
4664 fi
4665 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4666 if test -n "$ac_ct_NM"; then
4667   echo "$as_me:4667: result: $ac_ct_NM" >&5
4668 echo "${ECHO_T}$ac_ct_NM" >&6
4669 else
4670   echo "$as_me:4670: result: no" >&5
4671 echo "${ECHO_T}no" >&6
4672 fi
4673
4674   NM=$ac_ct_NM
4675 else
4676   NM="$ac_cv_prog_NM"
4677 fi
4678
4679 if test -n "$ac_tool_prefix"; then
4680   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4681 set dummy ${ac_tool_prefix}ar; ac_word=$2
4682 echo "$as_me:4682: checking for $ac_word" >&5
4683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4684 if test "${ac_cv_prog_AR+set}" = set; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   if test -n "$AR"; then
4688   ac_cv_prog_AR="$AR" # Let the user override the test.
4689 else
4690   ac_save_IFS=$IFS; IFS=$ac_path_separator
4691 ac_dummy="$PATH"
4692 for ac_dir in $ac_dummy; do
4693   IFS=$ac_save_IFS
4694   test -z "$ac_dir" && ac_dir=.
4695   $as_executable_p "$ac_dir/$ac_word" || continue
4696 ac_cv_prog_AR="${ac_tool_prefix}ar"
4697 echo "$as_me:4697: found $ac_dir/$ac_word" >&5
4698 break
4699 done
4700
4701 fi
4702 fi
4703 AR=$ac_cv_prog_AR
4704 if test -n "$AR"; then
4705   echo "$as_me:4705: result: $AR" >&5
4706 echo "${ECHO_T}$AR" >&6
4707 else
4708   echo "$as_me:4708: result: no" >&5
4709 echo "${ECHO_T}no" >&6
4710 fi
4711
4712 fi
4713 if test -z "$ac_cv_prog_AR"; then
4714   ac_ct_AR=$AR
4715   # Extract the first word of "ar", so it can be a program name with args.
4716 set dummy ar; ac_word=$2
4717 echo "$as_me:4717: checking for $ac_word" >&5
4718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4719 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4720   echo $ECHO_N "(cached) $ECHO_C" >&6
4721 else
4722   if test -n "$ac_ct_AR"; then
4723   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4724 else
4725   ac_save_IFS=$IFS; IFS=$ac_path_separator
4726 ac_dummy="$PATH"
4727 for ac_dir in $ac_dummy; do
4728   IFS=$ac_save_IFS
4729   test -z "$ac_dir" && ac_dir=.
4730   $as_executable_p "$ac_dir/$ac_word" || continue
4731 ac_cv_prog_ac_ct_AR="ar"
4732 echo "$as_me:4732: found $ac_dir/$ac_word" >&5
4733 break
4734 done
4735
4736   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4737 fi
4738 fi
4739 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4740 if test -n "$ac_ct_AR"; then
4741   echo "$as_me:4741: result: $ac_ct_AR" >&5
4742 echo "${ECHO_T}$ac_ct_AR" >&6
4743 else
4744   echo "$as_me:4744: result: no" >&5
4745 echo "${ECHO_T}no" >&6
4746 fi
4747
4748   AR=$ac_ct_AR
4749 else
4750   AR="$ac_cv_prog_AR"
4751 fi
4752
4753 echo "$as_me:4753: checking for options to update archives" >&5
4754 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4755 if test "${cf_cv_ar_flags+set}" = set; then
4756   echo $ECHO_N "(cached) $ECHO_C" >&6
4757 else
4758
4759         case $cf_cv_system_name in
4760         (*-msvc*)
4761                 cf_cv_ar_flags=''
4762                 cat >mk_static_lib.sh <<-EOF
4763                 #!$SHELL
4764                 MSVC_BIN="$AR"
4765                 out="\$1"
4766                 shift
4767                 exec \$MSVC_BIN -out:"\$out" \$@
4768                 EOF
4769                 chmod +x mk_static_lib.sh
4770                 AR=`pwd`/mk_static_lib.sh
4771                 ;;
4772         (*)
4773                 cf_cv_ar_flags=unknown
4774                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4775                 do
4776
4777                         # check if $ARFLAGS already contains this choice
4778                         if test "x$ARFLAGS" != "x" ; then
4779                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4780                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4781                                         cf_cv_ar_flags=
4782                                         break
4783                                 fi
4784                         fi
4785
4786                         rm -f conftest.$ac_cv_objext
4787                         rm -f conftest.a
4788
4789                         cat >conftest.$ac_ext <<EOF
4790 #line 4790 "configure"
4791 int     testdata[3] = { 123, 456, 789 };
4792 EOF
4793                         if { (eval echo "$as_me:4793: \"$ac_compile\"") >&5
4794   (eval $ac_compile) 2>&5
4795   ac_status=$?
4796   echo "$as_me:4796: \$? = $ac_status" >&5
4797   (exit $ac_status); } ; then
4798                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4799                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4800                                 if test -f conftest.a ; then
4801                                         cf_cv_ar_flags=$cf_ar_flags
4802                                         break
4803                                 fi
4804                         else
4805                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4806
4807 echo "${as_me:-configure}:4807: testing cannot compile test-program ..." 1>&5
4808
4809                                 break
4810                         fi
4811                 done
4812                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4813                 ;;
4814         esac
4815
4816 fi
4817 echo "$as_me:4817: result: $cf_cv_ar_flags" >&5
4818 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4819
4820 if test -n "$ARFLAGS" ; then
4821         if test -n "$cf_cv_ar_flags" ; then
4822                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4823         fi
4824 else
4825         ARFLAGS=$cf_cv_ar_flags
4826 fi
4827
4828 echo "$as_me:4828: checking if you have specified an install-prefix" >&5
4829 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4830
4831 # Check whether --with-install-prefix or --without-install-prefix was given.
4832 if test "${with_install_prefix+set}" = set; then
4833   withval="$with_install_prefix"
4834   case "x$withval" in
4835         (xyes|xno)
4836                 ;;
4837         (*)     DESTDIR="$withval"
4838                 ;;
4839         esac
4840 fi;
4841 echo "$as_me:4841: result: $DESTDIR" >&5
4842 echo "${ECHO_T}$DESTDIR" >&6
4843
4844 ###############################################################################
4845
4846 # If we're cross-compiling, allow the user to override the tools and their
4847 # options.  The configure script is oriented toward identifying the host
4848 # compiler, etc., but we need a build compiler to generate parts of the source.
4849
4850 if test "$cross_compiling" = yes ; then
4851
4852         # defaults that we might want to override
4853         : ${BUILD_CFLAGS:=''}
4854         : ${BUILD_CPPFLAGS:=''}
4855         : ${BUILD_LDFLAGS:=''}
4856         : ${BUILD_LIBS:=''}
4857         : ${BUILD_EXEEXT:='$x'}
4858         : ${BUILD_OBJEXT:='o'}
4859
4860 # Check whether --with-build-cc or --without-build-cc was given.
4861 if test "${with_build_cc+set}" = set; then
4862   withval="$with_build_cc"
4863   BUILD_CC="$withval"
4864 else
4865   for ac_prog in gcc clang c99 c89 cc cl
4866 do
4867   # Extract the first word of "$ac_prog", so it can be a program name with args.
4868 set dummy $ac_prog; ac_word=$2
4869 echo "$as_me:4869: checking for $ac_word" >&5
4870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4871 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   if test -n "$BUILD_CC"; then
4875   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4876 else
4877   ac_save_IFS=$IFS; IFS=$ac_path_separator
4878 ac_dummy="$PATH"
4879 for ac_dir in $ac_dummy; do
4880   IFS=$ac_save_IFS
4881   test -z "$ac_dir" && ac_dir=.
4882   $as_executable_p "$ac_dir/$ac_word" || continue
4883 ac_cv_prog_BUILD_CC="$ac_prog"
4884 echo "$as_me:4884: found $ac_dir/$ac_word" >&5
4885 break
4886 done
4887
4888 fi
4889 fi
4890 BUILD_CC=$ac_cv_prog_BUILD_CC
4891 if test -n "$BUILD_CC"; then
4892   echo "$as_me:4892: result: $BUILD_CC" >&5
4893 echo "${ECHO_T}$BUILD_CC" >&6
4894 else
4895   echo "$as_me:4895: result: no" >&5
4896 echo "${ECHO_T}no" >&6
4897 fi
4898
4899   test -n "$BUILD_CC" && break
4900 done
4901 test -n "$BUILD_CC" || BUILD_CC="none"
4902
4903 fi;
4904         echo "$as_me:4904: checking for native build C compiler" >&5
4905 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4906         echo "$as_me:4906: result: $BUILD_CC" >&5
4907 echo "${ECHO_T}$BUILD_CC" >&6
4908
4909         echo "$as_me:4909: checking for native build C preprocessor" >&5
4910 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4911
4912 # Check whether --with-build-cpp or --without-build-cpp was given.
4913 if test "${with_build_cpp+set}" = set; then
4914   withval="$with_build_cpp"
4915   BUILD_CPP="$withval"
4916 else
4917   BUILD_CPP='${BUILD_CC} -E'
4918 fi;
4919         echo "$as_me:4919: result: $BUILD_CPP" >&5
4920 echo "${ECHO_T}$BUILD_CPP" >&6
4921
4922         echo "$as_me:4922: checking for native build C flags" >&5
4923 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4924
4925 # Check whether --with-build-cflags or --without-build-cflags was given.
4926 if test "${with_build_cflags+set}" = set; then
4927   withval="$with_build_cflags"
4928   BUILD_CFLAGS="$withval"
4929 fi;
4930         echo "$as_me:4930: result: $BUILD_CFLAGS" >&5
4931 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4932
4933         echo "$as_me:4933: checking for native build C preprocessor-flags" >&5
4934 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4935
4936 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4937 if test "${with_build_cppflags+set}" = set; then
4938   withval="$with_build_cppflags"
4939   BUILD_CPPFLAGS="$withval"
4940 fi;
4941         echo "$as_me:4941: result: $BUILD_CPPFLAGS" >&5
4942 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4943
4944         echo "$as_me:4944: checking for native build linker-flags" >&5
4945 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4946
4947 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4948 if test "${with_build_ldflags+set}" = set; then
4949   withval="$with_build_ldflags"
4950   BUILD_LDFLAGS="$withval"
4951 fi;
4952         echo "$as_me:4952: result: $BUILD_LDFLAGS" >&5
4953 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4954
4955         echo "$as_me:4955: checking for native build linker-libraries" >&5
4956 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4957
4958 # Check whether --with-build-libs or --without-build-libs was given.
4959 if test "${with_build_libs+set}" = set; then
4960   withval="$with_build_libs"
4961   BUILD_LIBS="$withval"
4962 fi;
4963         echo "$as_me:4963: result: $BUILD_LIBS" >&5
4964 echo "${ECHO_T}$BUILD_LIBS" >&6
4965
4966         # this assumes we're on Unix.
4967         BUILD_EXEEXT=
4968         BUILD_OBJEXT=o
4969
4970         : ${BUILD_CC:='${CC}'}
4971
4972         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4973                 { { echo "$as_me:4973: error: Cross-build requires two compilers.
4974 Use --with-build-cc to specify the native compiler." >&5
4975 echo "$as_me: error: Cross-build requires two compilers.
4976 Use --with-build-cc to specify the native compiler." >&2;}
4977    { (exit 1); exit 1; }; }
4978         fi
4979
4980 else
4981         : ${BUILD_CC:='${CC}'}
4982         : ${BUILD_CPP:='${CPP}'}
4983         : ${BUILD_CFLAGS:='${CFLAGS}'}
4984         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4985         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4986         : ${BUILD_LIBS:='${LIBS}'}
4987         : ${BUILD_EXEEXT:='$x'}
4988         : ${BUILD_OBJEXT:='o'}
4989 fi
4990
4991 ###############################################################################
4992
4993 ### Options to allow the user to specify the set of libraries which are used.
4994 ### Use "--without-normal --with-shared" to allow the default model to be
4995 ### shared, for example.
4996 cf_list_models=""
4997
4998 echo "$as_me:4998: checking if libtool -version-number should be used" >&5
4999 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5000
5001 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5002 if test "${enable_libtool_version+set}" = set; then
5003   enableval="$enable_libtool_version"
5004   test "$enableval" != no && enableval=yes
5005         if test "$enableval" != "yes" ; then
5006     cf_libtool_version=no
5007         else
5008                 cf_libtool_version=yes
5009         fi
5010 else
5011   enableval=yes
5012         cf_libtool_version=yes
5013
5014 fi;
5015 echo "$as_me:5015: result: $cf_libtool_version" >&5
5016 echo "${ECHO_T}$cf_libtool_version" >&6
5017
5018 if test "$cf_libtool_version" = yes ; then
5019         LIBTOOL_VERSION="-version-number"
5020 else
5021         LIBTOOL_VERSION="-version-info"
5022         case "x$VERSION" in
5023         (x)
5024                 { echo "$as_me:5024: WARNING: VERSION was not set" >&5
5025 echo "$as_me: WARNING: VERSION was not set" >&2;}
5026                 ;;
5027         (x*.*.*)
5028                 ABI_VERSION="$VERSION"
5029                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5030
5031 echo "${as_me:-configure}:5031: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5032
5033                 ;;
5034         (x*:*:*)
5035                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5036                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5037
5038 echo "${as_me:-configure}:5038: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5039
5040                 ;;
5041         (*)
5042                 { echo "$as_me:5042: WARNING: unexpected VERSION value: $VERSION" >&5
5043 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5044                 ;;
5045         esac
5046 fi
5047
5048 LIBTOOL=
5049
5050 # common library maintenance symbols that are convenient for libtool scripts:
5051 LIB_CREATE='${AR} -cr'
5052 LIB_OBJECT='${OBJECTS}'
5053 LIB_SUFFIX=.a
5054 LIB_PREP="$RANLIB"
5055
5056 # symbols used to prop libtool up to enable it to determine what it should be
5057 # doing:
5058 LIB_CLEAN=
5059 LIB_COMPILE=
5060 LIB_LINK='${CC}'
5061 LIB_INSTALL=
5062 LIB_UNINSTALL=
5063
5064 echo "$as_me:5064: checking if you want to build libraries with libtool" >&5
5065 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5066
5067 # Check whether --with-libtool or --without-libtool was given.
5068 if test "${with_libtool+set}" = set; then
5069   withval="$with_libtool"
5070   with_libtool=$withval
5071 else
5072   with_libtool=no
5073 fi;
5074 echo "$as_me:5074: result: $with_libtool" >&5
5075 echo "${ECHO_T}$with_libtool" >&6
5076 if test "$with_libtool" != "no"; then
5077
5078         if test "$with_libtool" != "yes" ; then
5079
5080 if test "x$prefix" != xNONE; then
5081         cf_path_syntax="$prefix"
5082 else
5083         cf_path_syntax="$ac_default_prefix"
5084 fi
5085
5086 case ".$with_libtool" in
5087 (.\$\(*\)*|.\'*\'*)
5088         ;;
5089 (..|./*|.\\*)
5090         ;;
5091 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5092         ;;
5093 (.\${*prefix}*|.\${*dir}*)
5094         eval with_libtool="$with_libtool"
5095         case ".$with_libtool" in
5096         (.NONE/*)
5097                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5098                 ;;
5099         esac
5100         ;;
5101 (.no|.NONE/*)
5102         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5103         ;;
5104 (*)
5105         { { echo "$as_me:5105: error: expected a pathname, not \"$with_libtool\"" >&5
5106 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5107    { (exit 1); exit 1; }; }
5108         ;;
5109 esac
5110
5111                 LIBTOOL=$with_libtool
5112         else
5113                 if test -n "$ac_tool_prefix"; then
5114   for ac_prog in libtool glibtool
5115   do
5116     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5117 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5118 echo "$as_me:5118: checking for $ac_word" >&5
5119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5120 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5121   echo $ECHO_N "(cached) $ECHO_C" >&6
5122 else
5123   if test -n "$LIBTOOL"; then
5124   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5125 else
5126   ac_save_IFS=$IFS; IFS=$ac_path_separator
5127 ac_dummy="$PATH"
5128 for ac_dir in $ac_dummy; do
5129   IFS=$ac_save_IFS
5130   test -z "$ac_dir" && ac_dir=.
5131   $as_executable_p "$ac_dir/$ac_word" || continue
5132 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5133 echo "$as_me:5133: found $ac_dir/$ac_word" >&5
5134 break
5135 done
5136
5137 fi
5138 fi
5139 LIBTOOL=$ac_cv_prog_LIBTOOL
5140 if test -n "$LIBTOOL"; then
5141   echo "$as_me:5141: result: $LIBTOOL" >&5
5142 echo "${ECHO_T}$LIBTOOL" >&6
5143 else
5144   echo "$as_me:5144: result: no" >&5
5145 echo "${ECHO_T}no" >&6
5146 fi
5147
5148     test -n "$LIBTOOL" && break
5149   done
5150 fi
5151 if test -z "$LIBTOOL"; then
5152   ac_ct_LIBTOOL=$LIBTOOL
5153   for ac_prog in libtool glibtool
5154 do
5155   # Extract the first word of "$ac_prog", so it can be a program name with args.
5156 set dummy $ac_prog; ac_word=$2
5157 echo "$as_me:5157: checking for $ac_word" >&5
5158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5159 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5160   echo $ECHO_N "(cached) $ECHO_C" >&6
5161 else
5162   if test -n "$ac_ct_LIBTOOL"; then
5163   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5164 else
5165   ac_save_IFS=$IFS; IFS=$ac_path_separator
5166 ac_dummy="$PATH"
5167 for ac_dir in $ac_dummy; do
5168   IFS=$ac_save_IFS
5169   test -z "$ac_dir" && ac_dir=.
5170   $as_executable_p "$ac_dir/$ac_word" || continue
5171 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5172 echo "$as_me:5172: found $ac_dir/$ac_word" >&5
5173 break
5174 done
5175
5176 fi
5177 fi
5178 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5179 if test -n "$ac_ct_LIBTOOL"; then
5180   echo "$as_me:5180: result: $ac_ct_LIBTOOL" >&5
5181 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5182 else
5183   echo "$as_me:5183: result: no" >&5
5184 echo "${ECHO_T}no" >&6
5185 fi
5186
5187   test -n "$ac_ct_LIBTOOL" && break
5188 done
5189 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5190
5191   LIBTOOL=$ac_ct_LIBTOOL
5192 fi
5193
5194 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5195 then
5196         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.].*//'`
5197 else
5198         cf_cv_libtool_version=
5199 fi
5200 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5201
5202                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5203                 then
5204
5205 unset ac_cv_prog_ac_ct_LIBTOOL
5206 unset ac_ct_LIBTOOL
5207 unset LIBTOOL
5208
5209                         if test -n "$ac_tool_prefix"; then
5210   for ac_prog in glibtool
5211   do
5212     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5213 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5214 echo "$as_me:5214: checking for $ac_word" >&5
5215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5216 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219   if test -n "$LIBTOOL"; then
5220   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5221 else
5222   ac_save_IFS=$IFS; IFS=$ac_path_separator
5223 ac_dummy="$PATH"
5224 for ac_dir in $ac_dummy; do
5225   IFS=$ac_save_IFS
5226   test -z "$ac_dir" && ac_dir=.
5227   $as_executable_p "$ac_dir/$ac_word" || continue
5228 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5229 echo "$as_me:5229: found $ac_dir/$ac_word" >&5
5230 break
5231 done
5232
5233 fi
5234 fi
5235 LIBTOOL=$ac_cv_prog_LIBTOOL
5236 if test -n "$LIBTOOL"; then
5237   echo "$as_me:5237: result: $LIBTOOL" >&5
5238 echo "${ECHO_T}$LIBTOOL" >&6
5239 else
5240   echo "$as_me:5240: result: no" >&5
5241 echo "${ECHO_T}no" >&6
5242 fi
5243
5244     test -n "$LIBTOOL" && break
5245   done
5246 fi
5247 if test -z "$LIBTOOL"; then
5248   ac_ct_LIBTOOL=$LIBTOOL
5249   for ac_prog in glibtool
5250 do
5251   # Extract the first word of "$ac_prog", so it can be a program name with args.
5252 set dummy $ac_prog; ac_word=$2
5253 echo "$as_me:5253: checking for $ac_word" >&5
5254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5255 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5256   echo $ECHO_N "(cached) $ECHO_C" >&6
5257 else
5258   if test -n "$ac_ct_LIBTOOL"; then
5259   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5260 else
5261   ac_save_IFS=$IFS; IFS=$ac_path_separator
5262 ac_dummy="$PATH"
5263 for ac_dir in $ac_dummy; do
5264   IFS=$ac_save_IFS
5265   test -z "$ac_dir" && ac_dir=.
5266   $as_executable_p "$ac_dir/$ac_word" || continue
5267 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5268 echo "$as_me:5268: found $ac_dir/$ac_word" >&5
5269 break
5270 done
5271
5272 fi
5273 fi
5274 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5275 if test -n "$ac_ct_LIBTOOL"; then
5276   echo "$as_me:5276: result: $ac_ct_LIBTOOL" >&5
5277 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5278 else
5279   echo "$as_me:5279: result: no" >&5
5280 echo "${ECHO_T}no" >&6
5281 fi
5282
5283   test -n "$ac_ct_LIBTOOL" && break
5284 done
5285 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5286
5287   LIBTOOL=$ac_ct_LIBTOOL
5288 fi
5289
5290 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5291 then
5292         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.].*//'`
5293 else
5294         cf_cv_libtool_version=
5295 fi
5296 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5297
5298                 fi
5299         fi
5300         if test -z "$LIBTOOL" ; then
5301                 { { echo "$as_me:5301: error: Cannot find libtool" >&5
5302 echo "$as_me: error: Cannot find libtool" >&2;}
5303    { (exit 1); exit 1; }; }
5304         fi
5305         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5306         LIB_OBJECT='${OBJECTS:.o=.lo}'
5307         LIB_SUFFIX=.la
5308         LIB_CLEAN='${LIBTOOL} --mode=clean'
5309         LIB_COMPILE='${LIBTOOL} --mode=compile'
5310         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5311         LIB_INSTALL='${LIBTOOL} --mode=install'
5312         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5313         LIB_PREP=:
5314
5315 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5316 then
5317         echo "$as_me:5317: checking version of $LIBTOOL" >&5
5318 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5319
5320 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5321 then
5322         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.].*//'`
5323 else
5324         cf_cv_libtool_version=
5325 fi
5326 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5327
5328         echo "$as_me:5328: result: $cf_cv_libtool_version" >&5
5329 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5330         if test -z "$cf_cv_libtool_version" ; then
5331                 { { echo "$as_me:5331: error: This is not GNU libtool" >&5
5332 echo "$as_me: error: This is not GNU libtool" >&2;}
5333    { (exit 1); exit 1; }; }
5334         fi
5335 else
5336         { { echo "$as_me:5336: error: GNU libtool has not been found" >&5
5337 echo "$as_me: error: GNU libtool has not been found" >&2;}
5338    { (exit 1); exit 1; }; }
5339 fi
5340
5341         # special hack to add -no-undefined (which libtool should do for itself)
5342         LT_UNDEF=
5343         case "$cf_cv_system_name" in
5344         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5345                 LT_UNDEF=-no-undefined
5346                 ;;
5347         esac
5348
5349         # special hack to add --tag option for C++ compiler
5350         case $cf_cv_libtool_version in
5351         (1.[5-9]*|[2-9].[0-9.a-z]*)
5352                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5353                 LIBTOOL="$LIBTOOL --tag=CC"
5354                 ;;
5355         (*)
5356                 LIBTOOL_CXX="$LIBTOOL"
5357                 ;;
5358         esac
5359 else
5360         LIBTOOL=""
5361         LIBTOOL_CXX=""
5362 fi
5363
5364 test -z "$LIBTOOL" && ECHO_LT=
5365
5366 if test "$with_libtool" != "no" ; then
5367
5368 cf_list_models="$cf_list_models libtool"
5369
5370 else
5371
5372 echo "$as_me:5372: checking if you want to build shared libraries" >&5
5373 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5374
5375 # Check whether --with-shared or --without-shared was given.
5376 if test "${with_shared+set}" = set; then
5377   withval="$with_shared"
5378   with_shared=$withval
5379 else
5380   with_shared=no
5381 fi;
5382 echo "$as_me:5382: result: $with_shared" >&5
5383 echo "${ECHO_T}$with_shared" >&6
5384 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5385
5386 echo "$as_me:5386: checking if you want to build static libraries" >&5
5387 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5388
5389 # Check whether --with-normal or --without-normal was given.
5390 if test "${with_normal+set}" = set; then
5391   withval="$with_normal"
5392   with_normal=$withval
5393 else
5394   with_normal=yes
5395 fi;
5396 echo "$as_me:5396: result: $with_normal" >&5
5397 echo "${ECHO_T}$with_normal" >&6
5398 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5399
5400 echo "$as_me:5400: checking if you want to build debug libraries" >&5
5401 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5402
5403 # Check whether --with-debug or --without-debug was given.
5404 if test "${with_debug+set}" = set; then
5405   withval="$with_debug"
5406   with_debug=$withval
5407 else
5408   with_debug=yes
5409 fi;
5410 echo "$as_me:5410: result: $with_debug" >&5
5411 echo "${ECHO_T}$with_debug" >&6
5412 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5413
5414 echo "$as_me:5414: checking if you want to build profiling libraries" >&5
5415 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5416
5417 # Check whether --with-profile or --without-profile was given.
5418 if test "${with_profile+set}" = set; then
5419   withval="$with_profile"
5420   with_profile=$withval
5421 else
5422   with_profile=no
5423 fi;
5424 echo "$as_me:5424: result: $with_profile" >&5
5425 echo "${ECHO_T}$with_profile" >&6
5426 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5427
5428 fi
5429
5430 if test "X$cf_with_cxx_binding" != Xno; then
5431 if test "x$with_shared" = "xyes"; then
5432 echo "$as_me:5432: checking if you want to build C++ shared libraries" >&5
5433 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5434
5435 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5436 if test "${with_cxx_shared+set}" = set; then
5437   withval="$with_cxx_shared"
5438   with_shared_cxx=$withval
5439 else
5440   with_shared_cxx=no
5441 fi;
5442 echo "$as_me:5442: result: $with_shared_cxx" >&5
5443 echo "${ECHO_T}$with_shared_cxx" >&6
5444 fi
5445 fi
5446
5447 ###############################################################################
5448
5449 echo "$as_me:5449: checking for specified models" >&5
5450 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5451 test -z "$cf_list_models" && cf_list_models=normal
5452 test "$with_libtool" != "no" && cf_list_models=libtool
5453 echo "$as_me:5453: result: $cf_list_models" >&5
5454 echo "${ECHO_T}$cf_list_models" >&6
5455
5456 ### Use the first model as the default, and save its suffix for use in building
5457 ### up test-applications.
5458 echo "$as_me:5458: checking for default model" >&5
5459 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5460 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5461 echo "$as_me:5461: result: $DFT_LWR_MODEL" >&5
5462 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5463
5464 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5465
5466 TICS_NAME=tic
5467
5468 TINFO_NAME=tinfo
5469
5470 LIB_NAME=ncurses
5471
5472 LIB_DIR=../lib
5473 LIB_2ND=../../lib
5474
5475 echo "$as_me:5475: checking if you want to have a library-prefix" >&5
5476 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5477
5478 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5479 if test "${with_lib_prefix+set}" = set; then
5480   withval="$with_lib_prefix"
5481   with_lib_prefix=$withval
5482 else
5483   with_lib_prefix=auto
5484 fi;
5485 echo "$as_me:5485: result: $with_lib_prefix" >&5
5486 echo "${ECHO_T}$with_lib_prefix" >&6
5487
5488 if test $with_lib_prefix = auto
5489 then
5490
5491         case $cf_cv_system_name in
5492         (OS/2*|os2*)
5493                 if test "$DFT_LWR_MODEL" = libtool; then
5494                         LIB_PREFIX='lib'
5495                 else
5496                         LIB_PREFIX=''
5497                 fi
5498                 ;;
5499         (*-msvc*)
5500                 LIB_PREFIX=''
5501                 ;;
5502         (*)     LIB_PREFIX='lib'
5503                 ;;
5504         esac
5505 cf_prefix=$LIB_PREFIX
5506
5507 elif test $with_lib_prefix = no
5508 then
5509         LIB_PREFIX=
5510 else
5511         LIB_PREFIX=$with_lib_prefix
5512 fi
5513
5514 LIB_SUFFIX=
5515
5516         echo "$as_me:5516: checking for PATH separator" >&5
5517 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5518         case $cf_cv_system_name in
5519         (os2*)  PATH_SEPARATOR=';'  ;;
5520         (*)     ${PATH_SEPARATOR:=':'}  ;;
5521         esac
5522
5523         echo "$as_me:5523: result: $PATH_SEPARATOR" >&5
5524 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5525
5526 ###############################################################################
5527
5528 echo "$as_me:5528: checking if you want to build a separate terminfo library" >&5
5529 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5530
5531 # Check whether --with-termlib or --without-termlib was given.
5532 if test "${with_termlib+set}" = set; then
5533   withval="$with_termlib"
5534   with_termlib=$withval
5535 else
5536   with_termlib=no
5537 fi;
5538 echo "$as_me:5538: result: $with_termlib" >&5
5539 echo "${ECHO_T}$with_termlib" >&6
5540
5541 echo "$as_me:5541: checking if you want to build a separate tic library" >&5
5542 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5543
5544 # Check whether --with-ticlib or --without-ticlib was given.
5545 if test "${with_ticlib+set}" = set; then
5546   withval="$with_ticlib"
5547   with_ticlib=$withval
5548 else
5549   with_ticlib=no
5550 fi;
5551 echo "$as_me:5551: result: $with_ticlib" >&5
5552 echo "${ECHO_T}$with_ticlib" >&6
5553
5554 if test X"$CC_G_OPT" = X"" ; then
5555         CC_G_OPT='-g'
5556         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5557 fi
5558
5559 if test X"$CXX_G_OPT" = X"" ; then
5560         CXX_G_OPT='-g'
5561         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5562 fi
5563
5564 echo "$as_me:5564: checking for default loader flags" >&5
5565 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5566 case $DFT_LWR_MODEL in
5567 (libtool) LD_MODEL=''   ;;
5568 (normal)  LD_MODEL=''   ;;
5569 (debug)   LD_MODEL=$CC_G_OPT ;;
5570 (profile) LD_MODEL='-pg';;
5571 (shared)  LD_MODEL=''   ;;
5572 esac
5573 echo "$as_me:5573: result: $LD_MODEL" >&5
5574 echo "${ECHO_T}$LD_MODEL" >&6
5575
5576 case $DFT_LWR_MODEL in
5577 (shared)
5578
5579 echo "$as_me:5579: checking if rpath option should be used" >&5
5580 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5581
5582 # Check whether --enable-rpath or --disable-rpath was given.
5583 if test "${enable_rpath+set}" = set; then
5584   enableval="$enable_rpath"
5585   cf_cv_enable_rpath=$enableval
5586 else
5587   cf_cv_enable_rpath=no
5588 fi;
5589 echo "$as_me:5589: result: $cf_cv_enable_rpath" >&5
5590 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5591
5592 echo "$as_me:5592: checking if shared libraries should be relinked during install" >&5
5593 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5594
5595 # Check whether --enable-relink or --disable-relink was given.
5596 if test "${enable_relink+set}" = set; then
5597   enableval="$enable_relink"
5598   cf_cv_do_relink=$enableval
5599 else
5600   cf_cv_do_relink=yes
5601 fi;
5602 echo "$as_me:5602: result: $cf_cv_do_relink" >&5
5603 echo "${ECHO_T}$cf_cv_do_relink" >&6
5604         ;;
5605 esac
5606
5607 # we will build libraries one-level down.
5608 rel_builddir=..
5609
5610 LD_RPATH_OPT=
5611 if test "x$cf_cv_enable_rpath" != xno
5612 then
5613         echo "$as_me:5613: checking for an rpath option" >&5
5614 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5615         case $cf_cv_system_name in
5616         (irix*)
5617                 if test "$GCC" = yes; then
5618                         LD_RPATH_OPT="-Wl,-rpath,"
5619                 else
5620                         LD_RPATH_OPT="-rpath "
5621                 fi
5622                 ;;
5623         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5624                 LD_RPATH_OPT="-Wl,-rpath,"
5625                 ;;
5626         (openbsd[2-9].*|mirbsd*)
5627                 LD_RPATH_OPT="-Wl,-rpath,"
5628                 ;;
5629         (dragonfly*)
5630                 LD_RPATH_OPT="-rpath "
5631                 ;;
5632         (netbsd*)
5633                 LD_RPATH_OPT="-Wl,-rpath,"
5634                 ;;
5635         (osf*|mls+*)
5636                 LD_RPATH_OPT="-rpath "
5637                 ;;
5638         (solaris2*)
5639                 LD_RPATH_OPT="-R"
5640                 ;;
5641         (*)
5642                 ;;
5643         esac
5644         echo "$as_me:5644: result: $LD_RPATH_OPT" >&5
5645 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5646
5647         case "x$LD_RPATH_OPT" in
5648         (x-R*)
5649                 echo "$as_me:5649: checking if we need a space after rpath option" >&5
5650 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5651                 cf_save_LIBS="$LIBS"
5652
5653 cf_add_libs="$LIBS"
5654 # reverse order
5655 cf_add_0lib=
5656 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5657 # filter duplicates
5658 for cf_add_1lib in $cf_add_0lib; do
5659         for cf_add_2lib in $cf_add_libs; do
5660                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5661                         cf_add_1lib=
5662                         break
5663                 fi
5664         done
5665         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5666 done
5667 LIBS="$cf_add_libs"
5668
5669                 cat >conftest.$ac_ext <<_ACEOF
5670 #line 5670 "configure"
5671 #include "confdefs.h"
5672
5673 int
5674 main (void)
5675 {
5676
5677   ;
5678   return 0;
5679 }
5680 _ACEOF
5681 rm -f conftest.$ac_objext conftest$ac_exeext
5682 if { (eval echo "$as_me:5682: \"$ac_link\"") >&5
5683   (eval $ac_link) 2>&5
5684   ac_status=$?
5685   echo "$as_me:5685: \$? = $ac_status" >&5
5686   (exit $ac_status); } &&
5687          { ac_try='test -s conftest$ac_exeext'
5688   { (eval echo "$as_me:5688: \"$ac_try\"") >&5
5689   (eval $ac_try) 2>&5
5690   ac_status=$?
5691   echo "$as_me:5691: \$? = $ac_status" >&5
5692   (exit $ac_status); }; }; then
5693   cf_rpath_space=no
5694 else
5695   echo "$as_me: failed program was:" >&5
5696 cat conftest.$ac_ext >&5
5697 cf_rpath_space=yes
5698 fi
5699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5700                 LIBS="$cf_save_LIBS"
5701                 echo "$as_me:5701: result: $cf_rpath_space" >&5
5702 echo "${ECHO_T}$cf_rpath_space" >&6
5703                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5704                 ;;
5705         esac
5706 fi
5707
5708         RM_SHARED_OPTS=
5709         LOCAL_LDFLAGS=
5710         LOCAL_LDFLAGS2=
5711         LD_SHARED_OPTS=
5712         INSTALL_LIB="-m 644"
5713         : ${rel_builddir:=.}
5714
5715         shlibdir=$libdir
5716
5717         MAKE_DLLS="#"
5718
5719         cf_cv_do_symlinks=no
5720         cf_ld_rpath_opt=
5721         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5722
5723         echo "$as_me:5723: checking if release/abi version should be used for shared libs" >&5
5724 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5725
5726 # Check whether --with-shlib-version or --without-shlib-version was given.
5727 if test "${with_shlib_version+set}" = set; then
5728   withval="$with_shlib_version"
5729   test -z "$withval" && withval=auto
5730         case $withval in
5731         (yes)
5732                 cf_cv_shlib_version=auto
5733                 ;;
5734         (rel|abi|auto)
5735                 cf_cv_shlib_version=$withval
5736                 ;;
5737         (*)
5738                 echo "$as_me:5738: result: $withval" >&5
5739 echo "${ECHO_T}$withval" >&6
5740                 { { echo "$as_me:5740: error: option value must be one of: rel, abi, or auto" >&5
5741 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5742    { (exit 1); exit 1; }; }
5743                 ;;
5744         esac
5745
5746 else
5747   cf_cv_shlib_version=auto
5748 fi;
5749         echo "$as_me:5749: result: $cf_cv_shlib_version" >&5
5750 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5751
5752         cf_cv_rm_so_locs=no
5753         cf_try_cflags=
5754
5755         # Some less-capable ports of gcc support only -fpic
5756         CC_SHARED_OPTS=
5757
5758         cf_try_fPIC=no
5759         if test "$GCC" = yes
5760         then
5761                 cf_try_fPIC=yes
5762         else
5763                 case $cf_cv_system_name in
5764                 (*linux*)       # e.g., PGI compiler
5765                         cf_try_fPIC=yes
5766                         ;;
5767                 esac
5768         fi
5769
5770         if test "$cf_try_fPIC" = yes
5771         then
5772                 echo "$as_me:5772: checking which $CC option to use" >&5
5773 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5774                 cf_save_CFLAGS="$CFLAGS"
5775                 for CC_SHARED_OPTS in -fPIC -fpic ''
5776                 do
5777                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5778                         cat >conftest.$ac_ext <<_ACEOF
5779 #line 5779 "configure"
5780 #include "confdefs.h"
5781 #include <stdio.h>
5782 int
5783 main (void)
5784 {
5785 int x = 1
5786   ;
5787   return 0;
5788 }
5789 _ACEOF
5790 rm -f conftest.$ac_objext
5791 if { (eval echo "$as_me:5791: \"$ac_compile\"") >&5
5792   (eval $ac_compile) 2>&5
5793   ac_status=$?
5794   echo "$as_me:5794: \$? = $ac_status" >&5
5795   (exit $ac_status); } &&
5796          { ac_try='test -s conftest.$ac_objext'
5797   { (eval echo "$as_me:5797: \"$ac_try\"") >&5
5798   (eval $ac_try) 2>&5
5799   ac_status=$?
5800   echo "$as_me:5800: \$? = $ac_status" >&5
5801   (exit $ac_status); }; }; then
5802   break
5803 else
5804   echo "$as_me: failed program was:" >&5
5805 cat conftest.$ac_ext >&5
5806 fi
5807 rm -f conftest.$ac_objext conftest.$ac_ext
5808                 done
5809                 echo "$as_me:5809: result: $CC_SHARED_OPTS" >&5
5810 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5811                 CFLAGS="$cf_save_CFLAGS"
5812         fi
5813
5814         cf_cv_shlib_version_infix=no
5815
5816         case $cf_cv_system_name in
5817         (aix4.3-9*|aix[5-7]*)
5818                 if test "$GCC" = yes; then
5819                         CC_SHARED_OPTS='-Wl,-brtl'
5820                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5821                 else
5822                         CC_SHARED_OPTS='-brtl'
5823                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5824                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5825                 fi
5826                 ;;
5827         (beos*)
5828                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5829                 ;;
5830         (cygwin*)
5831                 CC_SHARED_OPTS=
5832                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5833                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5834                 cf_cv_shlib_version=cygdll
5835                 cf_cv_shlib_version_infix=cygdll
5836                 shlibdir=$bindir
5837                 MAKE_DLLS=
5838                 cat >mk_shared_lib.sh <<-CF_EOF
5839                 #!$SHELL
5840                 SHARED_LIB=\$1
5841                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5842                 shift
5843                 cat <<-EOF
5844                 Linking shared library
5845                 ** SHARED_LIB \$SHARED_LIB
5846                 ** IMPORT_LIB \$IMPORT_LIB
5847 EOF
5848                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5849 CF_EOF
5850                 chmod +x mk_shared_lib.sh
5851                 ;;
5852         (msys*)
5853                 CC_SHARED_OPTS=
5854                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5855                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5856                 cf_cv_shlib_version=msysdll
5857                 cf_cv_shlib_version_infix=msysdll
5858                 shlibdir=$bindir
5859                 MAKE_DLLS=
5860                 cat >mk_shared_lib.sh <<-CF_EOF
5861                 #!$SHELL
5862                 SHARED_LIB=\$1
5863                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5864                 shift
5865                 cat <<-EOF
5866                 Linking shared library
5867                 ** SHARED_LIB \$SHARED_LIB
5868                 ** IMPORT_LIB \$IMPORT_LIB
5869 EOF
5870                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5871 CF_EOF
5872                 chmod +x mk_shared_lib.sh
5873                 ;;
5874         (darwin*)
5875                 cf_try_cflags="no-cpp-precomp"
5876                 CC_SHARED_OPTS="-dynamic"
5877                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5878                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5879                 cf_cv_shlib_version_infix=yes
5880                 echo "$as_me:5880: checking if ld -search_paths_first works" >&5
5881 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5882 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5883   echo $ECHO_N "(cached) $ECHO_C" >&6
5884 else
5885
5886                         cf_save_LDFLAGS=$LDFLAGS
5887                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5888                         cat >conftest.$ac_ext <<_ACEOF
5889 #line 5889 "configure"
5890 #include "confdefs.h"
5891
5892 int
5893 main (void)
5894 {
5895 int i;
5896   ;
5897   return 0;
5898 }
5899 _ACEOF
5900 rm -f conftest.$ac_objext conftest$ac_exeext
5901 if { (eval echo "$as_me:5901: \"$ac_link\"") >&5
5902   (eval $ac_link) 2>&5
5903   ac_status=$?
5904   echo "$as_me:5904: \$? = $ac_status" >&5
5905   (exit $ac_status); } &&
5906          { ac_try='test -s conftest$ac_exeext'
5907   { (eval echo "$as_me:5907: \"$ac_try\"") >&5
5908   (eval $ac_try) 2>&5
5909   ac_status=$?
5910   echo "$as_me:5910: \$? = $ac_status" >&5
5911   (exit $ac_status); }; }; then
5912   cf_cv_ldflags_search_paths_first=yes
5913 else
5914   echo "$as_me: failed program was:" >&5
5915 cat conftest.$ac_ext >&5
5916 cf_cv_ldflags_search_paths_first=no
5917 fi
5918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5919                                 LDFLAGS=$cf_save_LDFLAGS
5920 fi
5921 echo "$as_me:5921: result: $cf_cv_ldflags_search_paths_first" >&5
5922 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5923                 if test $cf_cv_ldflags_search_paths_first = yes; then
5924                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5925                 fi
5926                 ;;
5927         (hpux[7-8]*)
5928                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5929                 if test "$GCC" != yes; then
5930                         CC_SHARED_OPTS='+Z'
5931                 fi
5932                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5933                 INSTALL_LIB="-m 555"
5934                 ;;
5935         (hpux*)
5936                 # (tested with gcc 2.7.2 -- I don't have c89)
5937                 if test "$GCC" = yes; then
5938                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5939                 else
5940                         CC_SHARED_OPTS='+Z'
5941                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5942                 fi
5943                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5944                 # HP-UX shared libraries must be executable, and should be
5945                 # readonly to exploit a quirk in the memory manager.
5946                 INSTALL_LIB="-m 555"
5947                 ;;
5948         (interix*)
5949                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5950                 if test "$cf_cv_shlib_version" = rel; then
5951                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5952                 else
5953                         cf_shared_soname='`basename $@`'
5954                 fi
5955                 CC_SHARED_OPTS=
5956                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5957                 ;;
5958         (irix*)
5959                 if test "$cf_cv_enable_rpath" = yes ; then
5960                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5961                 fi
5962                 # tested with IRIX 5.2 and 'cc'.
5963                 if test "$GCC" != yes; then
5964                         CC_SHARED_OPTS='-KPIC'
5965                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5966                 else
5967                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5968                 fi
5969                 cf_cv_rm_so_locs=yes
5970                 ;;
5971         (linux*|gnu*|k*bsd*-gnu)
5972                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5973                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5974                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5975                 fi
5976                 if test "$cf_cv_enable_rpath" = yes ; then
5977                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5978                 fi
5979
5980         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5981         if test "$cf_cv_shlib_version" = rel; then
5982                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5983         else
5984                 cf_cv_shared_soname='`basename $@`'
5985         fi
5986
5987                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5988                 ;;
5989         (mingw*msvc*)
5990                 cf_cv_shlib_version=msvcdll
5991                 cf_cv_shlib_version_infix=msvcdll
5992                 shlibdir=$bindir
5993                 MAKE_DLLS=
5994                 if test "$DFT_LWR_MODEL" = "shared" ; then
5995                         LOCAL_LDFLAGS="-link -dll"
5996                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5997                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
5998                 fi
5999                 CC_SHARED_OPTS=
6000                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6001                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6002                 cat >mk_shared_lib.sh <<-CF_EOF
6003                 #!$SHELL
6004                 SHARED_LIB=\$1
6005                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6006                 shift
6007                 my_ld=\$1
6008                 shift
6009                 cat <<-EOF
6010                 Linking shared library
6011                 ** SHARED LIB \$SHARED_LIB
6012                 ** IMPORT_LIB \$IMPORT_LIB
6013 EOF
6014                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6015                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6016                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6017 CF_EOF
6018                 chmod +x mk_shared_lib.sh
6019                 cat >mk_prog.sh <<-CF_EOF
6020                 #!$SHELL
6021                 shift
6022                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6023                 LD="$LD"
6024                 clopts=()
6025                 ldopts=("/subsystem:console")
6026                 libs=()
6027                 isdll=0
6028                 while test \$# -gt 0; do
6029                         case "\$1" in
6030                                 -link)
6031                                         # ignore -link argument
6032                                         ;;
6033                                 -dll)
6034                                         isdll=1
6035                                         ;;
6036                                 -W* | -w*)
6037                                         # ignore warnings
6038                                         ;;
6039                                 -D*)
6040                                         clopts+=("\$1")
6041                                         ;;
6042                                 -I*)
6043                                         clopts+=("\$1")
6044                                         ;;
6045                                 -l*)
6046                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6047                                         ;;
6048                                 -L*)
6049                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6050                                         ;;
6051                                 *.obj | *.o)
6052                                         ldopts+=("\$1")
6053                                         ;;
6054                                 -Wl,*)
6055                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6056                                                 ldopts+=("\${linkarg}")
6057                                         done
6058                                         ;;
6059                                 *.lib)
6060                                         ldopts+=("\$1")
6061                                         ;;
6062                                 -o)
6063                                         shift
6064                                         ldopts+=("-out:\$1")
6065                                         ;;
6066                                 *)
6067                                         clopts+=("\$1")
6068                                         ldopts+=("\$1")
6069                                         ;;
6070                         esac
6071                         shift
6072                 done
6073                 if [ "\$isdll" -ne 0 ]; then
6074                         for lib in \${libs[*]}; do
6075                                 ldopts+=("\$lib.dll.lib")
6076                         done
6077                 else
6078                         for lib in \${libs[*]}; do
6079                                 ldopts+=("\$lib.lib")
6080                         done
6081                 fi
6082                 cat <<-EOF
6083                 Creating program
6084                 ** ld options:   "\${ldopts[@]}"
6085 EOF
6086                 exec \$LD \${ldopts[@]}
6087 CF_EOF
6088                 chmod +x mk_prog.sh
6089                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6090                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6091                 ;;
6092         (mingw*)
6093                 cf_cv_shlib_version=mingw
6094                 cf_cv_shlib_version_infix=mingw
6095                 shlibdir=$bindir
6096                 MAKE_DLLS=
6097                 if test "$DFT_LWR_MODEL" = "shared" ; then
6098                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6099                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6100                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6101                 fi
6102                 CC_SHARED_OPTS=
6103                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6104                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6105                 cat >mk_shared_lib.sh <<-CF_EOF
6106                 #!$SHELL
6107                 SHARED_LIB=\$1
6108                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6109                 shift
6110                 cat <<-EOF
6111                 Linking shared library
6112                 ** SHARED_LIB \$SHARED_LIB
6113                 ** IMPORT_LIB \$IMPORT_LIB
6114 EOF
6115                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6116 CF_EOF
6117                 chmod +x mk_shared_lib.sh
6118                 ;;
6119         (openbsd[2-9].*|mirbsd*)
6120                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6121                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6122                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6123                 fi
6124                 if test "$cf_cv_enable_rpath" = yes ; then
6125                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6126                 fi
6127                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6128
6129         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6130         if test "$cf_cv_shlib_version" = rel; then
6131                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6132         else
6133                 cf_cv_shared_soname='`basename $@`'
6134         fi
6135
6136                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6137                 ;;
6138         (nto-qnx*|openbsd*|freebsd[12].*)
6139                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6140                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6141                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6142                 ;;
6143         (dragonfly*|freebsd*)
6144                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6145                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6146                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6147                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6148                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6149                 fi
6150
6151         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6152         if test "$cf_cv_shlib_version" = rel; then
6153                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6154         else
6155                 cf_cv_shared_soname='`basename $@`'
6156         fi
6157
6158                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6159                 ;;
6160         (netbsd*)
6161                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6162                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6163                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6164                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6165                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6166                         if test "$cf_cv_shlib_version" = auto; then
6167                         if test -f /usr/libexec/ld.elf_so; then
6168                                 cf_cv_shlib_version=abi
6169                         else
6170                                 cf_cv_shlib_version=rel
6171                         fi
6172                         fi
6173
6174         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6175         if test "$cf_cv_shlib_version" = rel; then
6176                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6177         else
6178                 cf_cv_shared_soname='`basename $@`'
6179         fi
6180
6181                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6182                 else
6183                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6184                 fi
6185                 ;;
6186         (osf*|mls+*)
6187                 # tested with OSF/1 V3.2 and 'cc'
6188                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6189                 # link with shared libs).
6190                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6191                 case $host_os in
6192                 (osf4*)
6193                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6194                         ;;
6195                 esac
6196                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6197                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6198                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6199                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6200                 fi
6201                 cf_cv_rm_so_locs=yes
6202                 ;;
6203         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6204                 # tested with osr5.0.5
6205                 if test "$GCC" != yes; then
6206                         CC_SHARED_OPTS='-belf -KPIC'
6207                 fi
6208                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6209                 if test "$cf_cv_enable_rpath" = yes ; then
6210                         # only way is to set LD_RUN_PATH but no switch for it
6211                         RUN_PATH=$libdir
6212                 fi
6213                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6214                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6215                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6216                 ;;
6217         (sunos4*)
6218                 # tested with SunOS 4.1.1 and gcc 2.7.0
6219                 if test "$GCC" != yes; then
6220                         CC_SHARED_OPTS='-KPIC'
6221                 fi
6222                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6223                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6224                 ;;
6225         (solaris2*)
6226                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6227                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6228                 if test "$DFT_LWR_MODEL" = "shared" ; then
6229                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6230                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6231                 fi
6232                 if test "$cf_cv_enable_rpath" = yes ; then
6233                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6234                 fi
6235
6236         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6237         if test "$cf_cv_shlib_version" = rel; then
6238                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6239         else
6240                 cf_cv_shared_soname='`basename $@`'
6241         fi
6242
6243                 if test "$GCC" != yes; then
6244                         cf_save_CFLAGS="$CFLAGS"
6245                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6246                         do
6247                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6248                                 cat >conftest.$ac_ext <<_ACEOF
6249 #line 6249 "configure"
6250 #include "confdefs.h"
6251 #include <stdio.h>
6252 int
6253 main (void)
6254 {
6255 printf("Hello\n");
6256   ;
6257   return 0;
6258 }
6259 _ACEOF
6260 rm -f conftest.$ac_objext
6261 if { (eval echo "$as_me:6261: \"$ac_compile\"") >&5
6262   (eval $ac_compile) 2>&5
6263   ac_status=$?
6264   echo "$as_me:6264: \$? = $ac_status" >&5
6265   (exit $ac_status); } &&
6266          { ac_try='test -s conftest.$ac_objext'
6267   { (eval echo "$as_me:6267: \"$ac_try\"") >&5
6268   (eval $ac_try) 2>&5
6269   ac_status=$?
6270   echo "$as_me:6270: \$? = $ac_status" >&5
6271   (exit $ac_status); }; }; then
6272   break
6273 else
6274   echo "$as_me: failed program was:" >&5
6275 cat conftest.$ac_ext >&5
6276 fi
6277 rm -f conftest.$ac_objext conftest.$ac_ext
6278                         done
6279                         CFLAGS="$cf_save_CFLAGS"
6280                         CC_SHARED_OPTS=$cf_shared_opts
6281                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6282                 else
6283                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6284                 fi
6285                 ;;
6286         (sysv5uw7*|unix_sv*)
6287                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6288                 if test "$GCC" != yes; then
6289                         CC_SHARED_OPTS='-KPIC'
6290                 fi
6291                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6292                 ;;
6293         (*)
6294                 CC_SHARED_OPTS='unknown'
6295                 MK_SHARED_LIB='echo unknown'
6296                 ;;
6297         esac
6298
6299         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6300         case "$cf_cv_shlib_version" in
6301         (rel|abi)
6302                 case "$MK_SHARED_LIB" in
6303                 (*'-o $@')
6304                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6305                         ;;
6306                 (*)
6307                         { echo "$as_me:6307: WARNING: ignored --with-shlib-version" >&5
6308 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6309                         ;;
6310                 esac
6311                 ;;
6312         esac
6313
6314         if test -n "$cf_try_cflags"
6315         then
6316 cat > conftest.$ac_ext <<EOF
6317 #line 6317 "${as_me:-configure}"
6318 #include <stdio.h>
6319 int main(int argc, char *argv[])
6320 {
6321         printf("hello\n");
6322         return (argv[argc-1] == 0) ;
6323 }
6324 EOF
6325                 cf_save_CFLAGS="$CFLAGS"
6326                 for cf_opt in $cf_try_cflags
6327                 do
6328                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6329                         echo "$as_me:6329: checking if CFLAGS option -$cf_opt works" >&5
6330 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6331                         if { (eval echo "$as_me:6331: \"$ac_compile\"") >&5
6332   (eval $ac_compile) 2>&5
6333   ac_status=$?
6334   echo "$as_me:6334: \$? = $ac_status" >&5
6335   (exit $ac_status); }; then
6336                                 echo "$as_me:6336: result: yes" >&5
6337 echo "${ECHO_T}yes" >&6
6338                                 cf_save_CFLAGS="$CFLAGS"
6339                         else
6340                                 echo "$as_me:6340: result: no" >&5
6341 echo "${ECHO_T}no" >&6
6342                         fi
6343                 done
6344                 CFLAGS="$cf_save_CFLAGS"
6345         fi
6346
6347         # RPATH_LIST is a colon-separated list of directories
6348         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6349         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6350
6351         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6352
6353         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6354
6355 echo "${as_me:-configure}:6355: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6356
6357         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6358
6359 echo "${as_me:-configure}:6359: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6360
6361 for model in $cf_list_models; do
6362         case $model in
6363         (libtool)
6364
6365 echo "$as_me:6365: checking for additional libtool options" >&5
6366 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6367
6368 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6369 if test "${with_libtool_opts+set}" = set; then
6370   withval="$with_libtool_opts"
6371   with_libtool_opts=$withval
6372 else
6373   with_libtool_opts=no
6374 fi;
6375 echo "$as_me:6375: result: $with_libtool_opts" >&5
6376 echo "${ECHO_T}$with_libtool_opts" >&6
6377
6378 case .$with_libtool_opts in
6379 (.yes|.no|.)
6380         ;;
6381 (*)
6382         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6383         ;;
6384 esac
6385
6386 echo "$as_me:6386: checking if exported-symbols file should be used" >&5
6387 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6388
6389 # Check whether --with-export-syms or --without-export-syms was given.
6390 if test "${with_export_syms+set}" = set; then
6391   withval="$with_export_syms"
6392   with_export_syms=$withval
6393 else
6394   with_export_syms=no
6395 fi;
6396 if test "x$with_export_syms" = xyes
6397 then
6398         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6399
6400 fi
6401 echo "$as_me:6401: result: $with_export_syms" >&5
6402 echo "${ECHO_T}$with_export_syms" >&6
6403 if test "x$with_export_syms" != xno
6404 then
6405         EXPORT_SYMS="-export-symbols $with_export_syms"
6406
6407 fi
6408
6409                 ;;
6410         (shared)
6411                 if test "$CC_SHARED_OPTS" = "unknown"; then
6412                         { { echo "$as_me:6412: error: Shared libraries are not supported in this version" >&5
6413 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6414    { (exit 1); exit 1; }; }
6415                 fi
6416                 # workaround for inept transition to PIE vs PIC...
6417                 echo "$as_me:6417: checking if current CFLAGS link properly" >&5
6418 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6419                 cat >conftest.$ac_ext <<_ACEOF
6420 #line 6420 "configure"
6421 #include "confdefs.h"
6422 #include <stdio.h>
6423 int
6424 main (void)
6425 {
6426 printf("Hello work\n");
6427   ;
6428   return 0;
6429 }
6430 _ACEOF
6431 rm -f conftest.$ac_objext conftest$ac_exeext
6432 if { (eval echo "$as_me:6432: \"$ac_link\"") >&5
6433   (eval $ac_link) 2>&5
6434   ac_status=$?
6435   echo "$as_me:6435: \$? = $ac_status" >&5
6436   (exit $ac_status); } &&
6437          { ac_try='test -s conftest$ac_exeext'
6438   { (eval echo "$as_me:6438: \"$ac_try\"") >&5
6439   (eval $ac_try) 2>&5
6440   ac_status=$?
6441   echo "$as_me:6441: \$? = $ac_status" >&5
6442   (exit $ac_status); }; }; then
6443   cf_cflags_work=yes
6444 else
6445   echo "$as_me: failed program was:" >&5
6446 cat conftest.$ac_ext >&5
6447 cf_cflags_work=no
6448 fi
6449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6450                 echo "$as_me:6450: result: $cf_cflags_work" >&5
6451 echo "${ECHO_T}$cf_cflags_work" >&6
6452                 if test "$cf_cflags_work" = no
6453                 then
6454                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6455
6456 echo "${as_me:-configure}:6456: testing try to work around by appending shared-options ..." 1>&5
6457
6458                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6459                 fi
6460
6461 echo "$as_me:6461: checking if versioned-symbols file should be used" >&5
6462 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6463
6464 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6465 if test "${with_versioned_syms+set}" = set; then
6466   withval="$with_versioned_syms"
6467   with_versioned_syms=$withval
6468 else
6469   with_versioned_syms=no
6470 fi;
6471 case "x$with_versioned_syms" in
6472 (xyes)
6473         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6474
6475         ;;
6476 (xno)
6477         ;;
6478 (x/*)
6479         test -f "$with_versioned_syms" || { { echo "$as_me:6479: error: expected a filename: $with_versioned_syms" >&5
6480 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6481    { (exit 1); exit 1; }; }
6482         ;;
6483 (*)
6484         test -f "$with_versioned_syms" || { { echo "$as_me:6484: error: expected a filename: $with_versioned_syms" >&5
6485 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6486    { (exit 1); exit 1; }; }
6487         with_versioned_syms=`pwd`/"$with_versioned_syms"
6488         ;;
6489 esac
6490 echo "$as_me:6490: result: $with_versioned_syms" >&5
6491 echo "${ECHO_T}$with_versioned_syms" >&6
6492
6493 RESULTING_SYMS=
6494 VERSIONED_SYMS=
6495 WILDCARD_SYMS=
6496
6497 if test "x$with_versioned_syms" != xno
6498 then
6499         RESULTING_SYMS=$with_versioned_syms
6500         case "x$MK_SHARED_LIB" in
6501         (*-Wl,*)
6502                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6503                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6504                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6505
6506 echo "${as_me:-configure}:6506: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6507
6508                 ;;
6509         (*-dy\ *)
6510                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6511                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6512                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6513
6514 echo "${as_me:-configure}:6514: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6515
6516                 ;;
6517         (*)
6518                 { echo "$as_me:6518: WARNING: this system does not support versioned-symbols" >&5
6519 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6520                 ;;
6521         esac
6522
6523         # Linux ld can selectively override scope, e.g., of symbols beginning with
6524         # "_" by first declaring some as global, and then using a wildcard to
6525         # declare the others as local.  Some other loaders cannot do this.  Check
6526         # by constructing a (very) simple shared library and inspecting its
6527         # symbols.
6528         if test "x$VERSIONED_SYMS" != "x"
6529         then
6530                 echo "$as_me:6530: checking if wildcards can be used to selectively omit symbols" >&5
6531 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6532                 WILDCARD_SYMS=no
6533
6534                 # make sources
6535                 rm -f conftest.*
6536
6537                 cat >conftest.ver <<EOF
6538 module_1.0 {
6539 global:
6540         globalf1;
6541 local:
6542         localf1;
6543 };
6544 module_2.0 {
6545 global:
6546         globalf2;
6547 local:
6548         localf2;
6549         _*;
6550 } module_1.0;
6551 submodule_1.0 {
6552 global:
6553         subglobalf1;
6554         _ismissing;
6555 local:
6556         sublocalf1;
6557 };
6558 submodule_2.0 {
6559 global:
6560         subglobalf2;
6561 local:
6562         sublocalf2;
6563         _*;
6564 } submodule_1.0;
6565 EOF
6566                 cat >conftest.$ac_ext <<EOF
6567 #line 6567 "configure"
6568 int     _ismissing(void) { return 1; }
6569 int     _localf1(void) { return 1; }
6570 int     _localf2(void) { return 2; }
6571 int     globalf1(void) { return 1; }
6572 int     globalf2(void) { return 2; }
6573 int     _sublocalf1(void) { return 1; }
6574 int     _sublocalf2(void) { return 2; }
6575 int     subglobalf1(void) { return 1; }
6576 int     subglobalf2(void) { return 2; }
6577 EOF
6578                 cat >conftest.mk <<EOF
6579 CC=${CC}
6580 CFLAGS=${CFLAGS}
6581 CPPFLAGS=${CPPFLAGS}
6582 LDFLAGS=${LDFLAGS}
6583 LIBS=${LIBS}
6584 VERSIONED_SYMS=${VERSIONED_SYMS}
6585 RESULTING_SYMS=conftest.ver
6586 MK_SHARED_LIB=${MK_SHARED_LIB}
6587 conftest.so: conftest.$ac_cv_objext
6588                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6589 EOF
6590
6591                 # compile source, make library
6592                 if make -f conftest.mk 2>&5 >/dev/null
6593                 then
6594                         # test for missing symbol in either Data or Text section
6595                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6596                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6597                 fi
6598                 echo "$as_me:6598: result: $WILDCARD_SYMS" >&5
6599 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6600                 rm -f conftest.*
6601         fi
6602 fi
6603
6604                 ;;
6605         esac
6606 done
6607
6608 ### Checks for special libraries, must be done up-front.
6609 SHLIB_LIST=""
6610
6611 echo "$as_me:6611: checking if you want to link with the GPM mouse library" >&5
6612 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6613
6614 # Check whether --with-gpm or --without-gpm was given.
6615 if test "${with_gpm+set}" = set; then
6616   withval="$with_gpm"
6617   with_gpm=$withval
6618 else
6619   with_gpm=maybe
6620 fi;
6621 echo "$as_me:6621: result: $with_gpm" >&5
6622 echo "${ECHO_T}$with_gpm" >&6
6623
6624 if test "$with_gpm" != no ; then
6625         echo "$as_me:6625: checking for gpm.h" >&5
6626 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6627 if test "${ac_cv_header_gpm_h+set}" = set; then
6628   echo $ECHO_N "(cached) $ECHO_C" >&6
6629 else
6630   cat >conftest.$ac_ext <<_ACEOF
6631 #line 6631 "configure"
6632 #include "confdefs.h"
6633 #include <gpm.h>
6634 _ACEOF
6635 if { (eval echo "$as_me:6635: \"$ac_cpp conftest.$ac_ext\"") >&5
6636   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6637   ac_status=$?
6638   egrep -v '^ *\+' conftest.er1 >conftest.err
6639   rm -f conftest.er1
6640   cat conftest.err >&5
6641   echo "$as_me:6641: \$? = $ac_status" >&5
6642   (exit $ac_status); } >/dev/null; then
6643   if test -s conftest.err; then
6644     ac_cpp_err=$ac_c_preproc_warn_flag
6645   else
6646     ac_cpp_err=
6647   fi
6648 else
6649   ac_cpp_err=yes
6650 fi
6651 if test -z "$ac_cpp_err"; then
6652   ac_cv_header_gpm_h=yes
6653 else
6654   echo "$as_me: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   ac_cv_header_gpm_h=no
6657 fi
6658 rm -f conftest.err conftest.$ac_ext
6659 fi
6660 echo "$as_me:6660: result: $ac_cv_header_gpm_h" >&5
6661 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6662 if test $ac_cv_header_gpm_h = yes; then
6663
6664 cat >>confdefs.h <<\EOF
6665 #define HAVE_GPM_H 1
6666 EOF
6667
6668                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6669                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6670
6671 echo "${as_me:-configure}:6671: testing assuming we really have GPM library ..." 1>&5
6672
6673 cat >>confdefs.h <<\EOF
6674 #define HAVE_LIBGPM 1
6675 EOF
6676
6677                         with_gpm=yes
6678                 else
6679                         echo "$as_me:6679: checking for Gpm_Open in -lgpm" >&5
6680 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6681 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6682   echo $ECHO_N "(cached) $ECHO_C" >&6
6683 else
6684   ac_check_lib_save_LIBS=$LIBS
6685 LIBS="-lgpm  $LIBS"
6686 cat >conftest.$ac_ext <<_ACEOF
6687 #line 6687 "configure"
6688 #include "confdefs.h"
6689
6690 /* Override any gcc2 internal prototype to avoid an error.  */
6691 #ifdef __cplusplus
6692 extern "C"
6693 #endif
6694 /* We use char because int might match the return type of a gcc2
6695    builtin and then its argument prototype would still apply.  */
6696 char Gpm_Open ();
6697 int
6698 main (void)
6699 {
6700 Gpm_Open ();
6701   ;
6702   return 0;
6703 }
6704 _ACEOF
6705 rm -f conftest.$ac_objext conftest$ac_exeext
6706 if { (eval echo "$as_me:6706: \"$ac_link\"") >&5
6707   (eval $ac_link) 2>&5
6708   ac_status=$?
6709   echo "$as_me:6709: \$? = $ac_status" >&5
6710   (exit $ac_status); } &&
6711          { ac_try='test -s conftest$ac_exeext'
6712   { (eval echo "$as_me:6712: \"$ac_try\"") >&5
6713   (eval $ac_try) 2>&5
6714   ac_status=$?
6715   echo "$as_me:6715: \$? = $ac_status" >&5
6716   (exit $ac_status); }; }; then
6717   ac_cv_lib_gpm_Gpm_Open=yes
6718 else
6719   echo "$as_me: failed program was:" >&5
6720 cat conftest.$ac_ext >&5
6721 ac_cv_lib_gpm_Gpm_Open=no
6722 fi
6723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6724 LIBS=$ac_check_lib_save_LIBS
6725 fi
6726 echo "$as_me:6726: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6727 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6728 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6729   with_gpm=yes
6730 else
6731
6732                                 if test "$with_gpm" = maybe; then
6733                                         { echo "$as_me:6733: WARNING: Cannot link with GPM library" >&5
6734 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6735                                         with_gpm=no
6736                                 else
6737                                         { { echo "$as_me:6737: error: Cannot link with GPM library" >&5
6738 echo "$as_me: error: Cannot link with GPM library" >&2;}
6739    { (exit 1); exit 1; }; }
6740                                 fi
6741
6742 fi
6743
6744                 fi
6745
6746 else
6747
6748                 test "$with_gpm" != maybe && { echo "$as_me:6748: WARNING: Cannot find GPM header" >&5
6749 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6750                 with_gpm=no
6751
6752 fi
6753
6754 fi
6755
6756 if test "$with_gpm" != no ; then
6757         echo "$as_me:6757: checking if you want to load GPM dynamically" >&5
6758 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6759
6760 # Check whether --with-dlsym or --without-dlsym was given.
6761 if test "${with_dlsym+set}" = set; then
6762   withval="$with_dlsym"
6763   with_dlsym=$withval
6764 else
6765   with_dlsym=yes
6766 fi;
6767         echo "$as_me:6767: result: $with_dlsym" >&5
6768 echo "${ECHO_T}$with_dlsym" >&6
6769         if test "x$with_dlsym" = xyes ; then
6770
6771 cf_have_dlsym=no
6772 echo "$as_me:6772: checking for dlsym" >&5
6773 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6774 if test "${ac_cv_func_dlsym+set}" = set; then
6775   echo $ECHO_N "(cached) $ECHO_C" >&6
6776 else
6777   cat >conftest.$ac_ext <<_ACEOF
6778 #line 6778 "configure"
6779 #include "confdefs.h"
6780 #define dlsym autoconf_temporary
6781 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6782 #undef dlsym
6783
6784 #ifdef __cplusplus
6785 extern "C"
6786 #endif
6787
6788 /* We use char because int might match the return type of a gcc2
6789    builtin and then its argument prototype would still apply.  */
6790 char dlsym (void);
6791
6792 int
6793 main (void)
6794 {
6795
6796 /* The GNU C library defines stubs for functions which it implements
6797     to always fail with ENOSYS.  Some functions are actually named
6798     something starting with __ and the normal name is an alias.  */
6799 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6800 #error found stub for dlsym
6801 #endif
6802
6803         return dlsym ();
6804   ;
6805   return 0;
6806 }
6807 _ACEOF
6808 rm -f conftest.$ac_objext conftest$ac_exeext
6809 if { (eval echo "$as_me:6809: \"$ac_link\"") >&5
6810   (eval $ac_link) 2>&5
6811   ac_status=$?
6812   echo "$as_me:6812: \$? = $ac_status" >&5
6813   (exit $ac_status); } &&
6814          { ac_try='test -s conftest$ac_exeext'
6815   { (eval echo "$as_me:6815: \"$ac_try\"") >&5
6816   (eval $ac_try) 2>&5
6817   ac_status=$?
6818   echo "$as_me:6818: \$? = $ac_status" >&5
6819   (exit $ac_status); }; }; then
6820   ac_cv_func_dlsym=yes
6821 else
6822   echo "$as_me: failed program was:" >&5
6823 cat conftest.$ac_ext >&5
6824 ac_cv_func_dlsym=no
6825 fi
6826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6827 fi
6828 echo "$as_me:6828: result: $ac_cv_func_dlsym" >&5
6829 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6830 if test $ac_cv_func_dlsym = yes; then
6831   cf_have_dlsym=yes
6832 else
6833
6834 cf_have_libdl=no
6835 echo "$as_me:6835: checking for dlsym in -ldl" >&5
6836 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6837 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6838   echo $ECHO_N "(cached) $ECHO_C" >&6
6839 else
6840   ac_check_lib_save_LIBS=$LIBS
6841 LIBS="-ldl  $LIBS"
6842 cat >conftest.$ac_ext <<_ACEOF
6843 #line 6843 "configure"
6844 #include "confdefs.h"
6845
6846 /* Override any gcc2 internal prototype to avoid an error.  */
6847 #ifdef __cplusplus
6848 extern "C"
6849 #endif
6850 /* We use char because int might match the return type of a gcc2
6851    builtin and then its argument prototype would still apply.  */
6852 char dlsym ();
6853 int
6854 main (void)
6855 {
6856 dlsym ();
6857   ;
6858   return 0;
6859 }
6860 _ACEOF
6861 rm -f conftest.$ac_objext conftest$ac_exeext
6862 if { (eval echo "$as_me:6862: \"$ac_link\"") >&5
6863   (eval $ac_link) 2>&5
6864   ac_status=$?
6865   echo "$as_me:6865: \$? = $ac_status" >&5
6866   (exit $ac_status); } &&
6867          { ac_try='test -s conftest$ac_exeext'
6868   { (eval echo "$as_me:6868: \"$ac_try\"") >&5
6869   (eval $ac_try) 2>&5
6870   ac_status=$?
6871   echo "$as_me:6871: \$? = $ac_status" >&5
6872   (exit $ac_status); }; }; then
6873   ac_cv_lib_dl_dlsym=yes
6874 else
6875   echo "$as_me: failed program was:" >&5
6876 cat conftest.$ac_ext >&5
6877 ac_cv_lib_dl_dlsym=no
6878 fi
6879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6880 LIBS=$ac_check_lib_save_LIBS
6881 fi
6882 echo "$as_me:6882: result: $ac_cv_lib_dl_dlsym" >&5
6883 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6884 if test $ac_cv_lib_dl_dlsym = yes; then
6885
6886         cf_have_dlsym=yes
6887         cf_have_libdl=yes
6888 fi
6889
6890 fi
6891
6892 if test "$cf_have_dlsym" = yes ; then
6893         test "$cf_have_libdl" = yes && {
6894 cf_add_libs="$LIBS"
6895 # reverse order
6896 cf_add_0lib=
6897 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6898 # filter duplicates
6899 for cf_add_1lib in $cf_add_0lib; do
6900         for cf_add_2lib in $cf_add_libs; do
6901                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6902                         cf_add_1lib=
6903                         break
6904                 fi
6905         done
6906         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6907 done
6908 LIBS="$cf_add_libs"
6909  }
6910
6911         echo "$as_me:6911: checking whether able to link to dl*() functions" >&5
6912 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6913         cat >conftest.$ac_ext <<_ACEOF
6914 #line 6914 "configure"
6915 #include "confdefs.h"
6916 #include <dlfcn.h>
6917 int
6918 main (void)
6919 {
6920
6921                 void *obj;
6922                 if ((obj = dlopen("filename", 0)) != 0) {
6923                         if (dlsym(obj, "symbolname") == 0) {
6924                         dlclose(obj);
6925                         }
6926                 }
6927   ;
6928   return 0;
6929 }
6930 _ACEOF
6931 rm -f conftest.$ac_objext conftest$ac_exeext
6932 if { (eval echo "$as_me:6932: \"$ac_link\"") >&5
6933   (eval $ac_link) 2>&5
6934   ac_status=$?
6935   echo "$as_me:6935: \$? = $ac_status" >&5
6936   (exit $ac_status); } &&
6937          { ac_try='test -s conftest$ac_exeext'
6938   { (eval echo "$as_me:6938: \"$ac_try\"") >&5
6939   (eval $ac_try) 2>&5
6940   ac_status=$?
6941   echo "$as_me:6941: \$? = $ac_status" >&5
6942   (exit $ac_status); }; }; then
6943
6944 cat >>confdefs.h <<\EOF
6945 #define HAVE_LIBDL 1
6946 EOF
6947
6948 else
6949   echo "$as_me: failed program was:" >&5
6950 cat conftest.$ac_ext >&5
6951
6952                 { { echo "$as_me:6952: error: Cannot link test program for libdl" >&5
6953 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6954    { (exit 1); exit 1; }; }
6955 fi
6956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6957         echo "$as_me:6957: result: ok" >&5
6958 echo "${ECHO_T}ok" >&6
6959 else
6960         { { echo "$as_me:6960: error: Cannot find dlsym function" >&5
6961 echo "$as_me: error: Cannot find dlsym function" >&2;}
6962    { (exit 1); exit 1; }; }
6963 fi
6964
6965                 if test "x$with_gpm" != xyes ; then
6966                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6967
6968 echo "${as_me:-configure}:6968: testing assuming soname for gpm is $with_gpm ..." 1>&5
6969
6970                         cf_cv_gpm_soname="$with_gpm"
6971                 else
6972
6973 echo "$as_me:6973: checking for soname of gpm library" >&5
6974 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6975 if test "${cf_cv_gpm_soname+set}" = set; then
6976   echo $ECHO_N "(cached) $ECHO_C" >&6
6977 else
6978
6979 cf_cv_gpm_soname=unknown
6980 if test "$cross_compiling" != yes ; then
6981 cat >conftest.$ac_ext <<CF_EOF
6982 #include <gpm.h>
6983 int main(void)
6984 {
6985 if (Gpm_Open(0,0)) Gpm_Close();
6986         ${cf_cv_main_return:-return}(0);
6987 }
6988 CF_EOF
6989 cf_save_LIBS="$LIBS"
6990
6991 cf_add_libs="$LIBS"
6992 # reverse order
6993 cf_add_0lib=
6994 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6995 # filter duplicates
6996 for cf_add_1lib in $cf_add_0lib; do
6997         for cf_add_2lib in $cf_add_libs; do
6998                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6999                         cf_add_1lib=
7000                         break
7001                 fi
7002         done
7003         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7004 done
7005 LIBS="$cf_add_libs"
7006
7007         if { (eval echo "$as_me:7007: \"$ac_compile\"") >&5
7008   (eval $ac_compile) 2>&5
7009   ac_status=$?
7010   echo "$as_me:7010: \$? = $ac_status" >&5
7011   (exit $ac_status); } ; then
7012                 if { (eval echo "$as_me:7012: \"$ac_link\"") >&5
7013   (eval $ac_link) 2>&5
7014   ac_status=$?
7015   echo "$as_me:7015: \$? = $ac_status" >&5
7016   (exit $ac_status); } ; then
7017                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7018                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7019                 fi
7020         fi
7021 rm -rf conftest*
7022 LIBS="$cf_save_LIBS"
7023 fi
7024
7025 fi
7026 echo "$as_me:7026: result: $cf_cv_gpm_soname" >&5
7027 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7028
7029                 fi
7030                 test "$cf_cv_gpm_soname" != "unknown" &&
7031 cat >>confdefs.h <<EOF
7032 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7033 EOF
7034
7035                 SHLIB_LIST="-ldl $SHLIB_LIST"
7036
7037 cf_add_libs="$PRIVATE_LIBS"
7038 # reverse order
7039 cf_add_0lib=
7040 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7041 # filter duplicates
7042 for cf_add_1lib in $cf_add_0lib; do
7043         for cf_add_2lib in $cf_add_libs; do
7044                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7045                         cf_add_1lib=
7046                         break
7047                 fi
7048         done
7049         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7050 done
7051 PRIVATE_LIBS="$cf_add_libs"
7052
7053         else
7054                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7055
7056 cf_add_libs="$TEST_LIBS"
7057 # reverse order
7058 cf_add_0lib=
7059 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7060 # filter duplicates
7061 for cf_add_1lib in $cf_add_0lib; do
7062         for cf_add_2lib in $cf_add_libs; do
7063                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7064                         cf_add_1lib=
7065                         break
7066                 fi
7067         done
7068         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7069 done
7070 TEST_LIBS="$cf_add_libs"
7071
7072 cf_add_libs="$PRIVATE_LIBS"
7073 # reverse order
7074 cf_add_0lib=
7075 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7076 # filter duplicates
7077 for cf_add_1lib in $cf_add_0lib; do
7078         for cf_add_2lib in $cf_add_libs; do
7079                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7080                         cf_add_1lib=
7081                         break
7082                 fi
7083         done
7084         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7085 done
7086 PRIVATE_LIBS="$cf_add_libs"
7087
7088         fi
7089
7090 cat >>confdefs.h <<\EOF
7091 #define HAVE_LIBGPM 1
7092 EOF
7093
7094 echo "$as_me:7094: checking for Gpm_Wgetch in -lgpm" >&5
7095 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7096 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7097   echo $ECHO_N "(cached) $ECHO_C" >&6
7098 else
7099   ac_check_lib_save_LIBS=$LIBS
7100 LIBS="-lgpm  $LIBS"
7101 cat >conftest.$ac_ext <<_ACEOF
7102 #line 7102 "configure"
7103 #include "confdefs.h"
7104
7105 /* Override any gcc2 internal prototype to avoid an error.  */
7106 #ifdef __cplusplus
7107 extern "C"
7108 #endif
7109 /* We use char because int might match the return type of a gcc2
7110    builtin and then its argument prototype would still apply.  */
7111 char Gpm_Wgetch ();
7112 int
7113 main (void)
7114 {
7115 Gpm_Wgetch ();
7116   ;
7117   return 0;
7118 }
7119 _ACEOF
7120 rm -f conftest.$ac_objext conftest$ac_exeext
7121 if { (eval echo "$as_me:7121: \"$ac_link\"") >&5
7122   (eval $ac_link) 2>&5
7123   ac_status=$?
7124   echo "$as_me:7124: \$? = $ac_status" >&5
7125   (exit $ac_status); } &&
7126          { ac_try='test -s conftest$ac_exeext'
7127   { (eval echo "$as_me:7127: \"$ac_try\"") >&5
7128   (eval $ac_try) 2>&5
7129   ac_status=$?
7130   echo "$as_me:7130: \$? = $ac_status" >&5
7131   (exit $ac_status); }; }; then
7132   ac_cv_lib_gpm_Gpm_Wgetch=yes
7133 else
7134   echo "$as_me: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
7136 ac_cv_lib_gpm_Gpm_Wgetch=no
7137 fi
7138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7139 LIBS=$ac_check_lib_save_LIBS
7140 fi
7141 echo "$as_me:7141: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7142 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7143 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7144
7145 echo "$as_me:7145: checking if GPM is weakly bound to curses library" >&5
7146 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7147 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7148   echo $ECHO_N "(cached) $ECHO_C" >&6
7149 else
7150
7151 cf_cv_check_gpm_wgetch=unknown
7152 if test "$cross_compiling" != yes ; then
7153
7154 cat >conftest.$ac_ext <<CF_EOF
7155 #include <gpm.h>
7156 int main(void)
7157 {
7158         Gpm_Wgetch();
7159         ${cf_cv_main_return:-return}(0);
7160 }
7161 CF_EOF
7162
7163         cf_save_LIBS="$LIBS"
7164         # This only works if we can look at the symbol table.  If a shared
7165         # library is stripped for install, we cannot use that.  So we're forced
7166         # to rely on the static library, noting that some packagers may not
7167         # include it.
7168         LIBS="-static -lgpm -dynamic $LIBS"
7169         if { (eval echo "$as_me:7169: \"$ac_compile\"") >&5
7170   (eval $ac_compile) 2>&5
7171   ac_status=$?
7172   echo "$as_me:7172: \$? = $ac_status" >&5
7173   (exit $ac_status); } ; then
7174                 if { (eval echo "$as_me:7174: \"$ac_link\"") >&5
7175   (eval $ac_link) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); } ; then
7179                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7180                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7181                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7182                 fi
7183         fi
7184         rm -rf conftest*
7185         LIBS="$cf_save_LIBS"
7186 fi
7187
7188 fi
7189 echo "$as_me:7189: result: $cf_cv_check_gpm_wgetch" >&5
7190 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7191
7192 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7193         { echo "$as_me:7193: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7194 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7195 fi
7196
7197 fi
7198
7199 fi
7200
7201 echo "$as_me:7201: checking if you want to use PCRE2 for regular-expressions" >&5
7202 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7203
7204 # Check whether --with-pcre2 or --without-pcre2 was given.
7205 if test "${with_pcre2+set}" = set; then
7206   withval="$with_pcre2"
7207
7208 fi;
7209 test -z "$with_pcre2" && with_pcre2=no
7210 echo "$as_me:7210: result: $with_pcre2" >&5
7211 echo "${ECHO_T}$with_pcre2" >&6
7212
7213 if test "x$with_pcre2" != xno ; then
7214
7215 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7216         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7217
7218 echo "${as_me:-configure}:7218: testing found package libpcre2 ..." 1>&5
7219
7220         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7221         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7222         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7223
7224 echo "${as_me:-configure}:7224: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7225
7226         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7227
7228 echo "${as_me:-configure}:7228: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7229
7230 cf_fix_cppflags=no
7231 cf_new_cflags=
7232 cf_new_cppflags=
7233 cf_new_extra_cppflags=
7234
7235 for cf_add_cflags in $cf_pkgconfig_incs
7236 do
7237 case $cf_fix_cppflags in
7238 (no)
7239         case $cf_add_cflags in
7240         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7241                 case $cf_add_cflags in
7242                 (-D*)
7243                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7244
7245                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7246                                 && test -z "${cf_tst_cflags}" \
7247                                 && cf_fix_cppflags=yes
7248
7249                         if test $cf_fix_cppflags = yes ; then
7250
7251         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7252         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7253
7254                                 continue
7255                         elif test "${cf_tst_cflags}" = "\"'" ; then
7256
7257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7259
7260                                 continue
7261                         fi
7262                         ;;
7263                 esac
7264                 case "$CPPFLAGS" in
7265                 (*$cf_add_cflags)
7266                         ;;
7267                 (*)
7268                         case $cf_add_cflags in
7269                         (-D*)
7270                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7271
7272 CPPFLAGS=`echo "$CPPFLAGS" | \
7273         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7274                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7275
7276                                 ;;
7277                         esac
7278
7279         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7280         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7281
7282                         ;;
7283                 esac
7284                 ;;
7285         (*)
7286
7287         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7288         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7289
7290                 ;;
7291         esac
7292         ;;
7293 (yes)
7294
7295         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7296         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7297
7298         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7299
7300         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7301                 && test -z "${cf_tst_cflags}" \
7302                 && cf_fix_cppflags=no
7303         ;;
7304 esac
7305 done
7306
7307 if test -n "$cf_new_cflags" ; then
7308
7309         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7310         CFLAGS="${CFLAGS}$cf_new_cflags"
7311
7312 fi
7313
7314 if test -n "$cf_new_cppflags" ; then
7315
7316         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7317         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7318
7319 fi
7320
7321 if test -n "$cf_new_extra_cppflags" ; then
7322
7323         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7324         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7325
7326 fi
7327
7328 cf_add_libs="$LIBS"
7329 # reverse order
7330 cf_add_0lib=
7331 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7332 # filter duplicates
7333 for cf_add_1lib in $cf_add_0lib; do
7334         for cf_add_2lib in $cf_add_libs; do
7335                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7336                         cf_add_1lib=
7337                         break
7338                 fi
7339         done
7340         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7341 done
7342 LIBS="$cf_add_libs"
7343
7344         :
7345 else
7346         cf_pkgconfig_incs=
7347         cf_pkgconfig_libs=
7348
7349 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7350         test -n "$verbose" && echo "    found package libpcre" 1>&6
7351
7352 echo "${as_me:-configure}:7352: testing found package libpcre ..." 1>&5
7353
7354         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7355         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7356         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7357
7358 echo "${as_me:-configure}:7358: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7359
7360         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7361
7362 echo "${as_me:-configure}:7362: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7363
7364 cf_fix_cppflags=no
7365 cf_new_cflags=
7366 cf_new_cppflags=
7367 cf_new_extra_cppflags=
7368
7369 for cf_add_cflags in $cf_pkgconfig_incs
7370 do
7371 case $cf_fix_cppflags in
7372 (no)
7373         case $cf_add_cflags in
7374         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7375                 case $cf_add_cflags in
7376                 (-D*)
7377                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7378
7379                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7380                                 && test -z "${cf_tst_cflags}" \
7381                                 && cf_fix_cppflags=yes
7382
7383                         if test $cf_fix_cppflags = yes ; then
7384
7385         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7386         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7387
7388                                 continue
7389                         elif test "${cf_tst_cflags}" = "\"'" ; then
7390
7391         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7392         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7393
7394                                 continue
7395                         fi
7396                         ;;
7397                 esac
7398                 case "$CPPFLAGS" in
7399                 (*$cf_add_cflags)
7400                         ;;
7401                 (*)
7402                         case $cf_add_cflags in
7403                         (-D*)
7404                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7405
7406 CPPFLAGS=`echo "$CPPFLAGS" | \
7407         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7408                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7409
7410                                 ;;
7411                         esac
7412
7413         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7414         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7415
7416                         ;;
7417                 esac
7418                 ;;
7419         (*)
7420
7421         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7422         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7423
7424                 ;;
7425         esac
7426         ;;
7427 (yes)
7428
7429         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7430         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7431
7432         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7433
7434         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7435                 && test -z "${cf_tst_cflags}" \
7436                 && cf_fix_cppflags=no
7437         ;;
7438 esac
7439 done
7440
7441 if test -n "$cf_new_cflags" ; then
7442
7443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7444         CFLAGS="${CFLAGS}$cf_new_cflags"
7445
7446 fi
7447
7448 if test -n "$cf_new_cppflags" ; then
7449
7450         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7451         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7452
7453 fi
7454
7455 if test -n "$cf_new_extra_cppflags" ; then
7456
7457         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7458         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7459
7460 fi
7461
7462 cf_add_libs="$LIBS"
7463 # reverse order
7464 cf_add_0lib=
7465 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7466 # filter duplicates
7467 for cf_add_1lib in $cf_add_0lib; do
7468         for cf_add_2lib in $cf_add_libs; do
7469                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7470                         cf_add_1lib=
7471                         break
7472                 fi
7473         done
7474         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7475 done
7476 LIBS="$cf_add_libs"
7477
7478         :
7479 else
7480         cf_pkgconfig_incs=
7481         cf_pkgconfig_libs=
7482
7483                         { { echo "$as_me:7483: error: Cannot find PCRE2 library" >&5
7484 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7485    { (exit 1); exit 1; }; }
7486 fi
7487
7488 fi
7489
7490 cat >>confdefs.h <<\EOF
7491 #define HAVE_LIB_PCRE2 1
7492 EOF
7493
7494         # if pkgconfig gave no results, look for the libraries directly
7495         case $LIBS in
7496         (*pcre2-posix*|*pcreposix*)
7497                 ;;
7498         (*)
7499                 echo "$as_me:7499: checking for regcomp in -lpcre2-posix" >&5
7500 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7501 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7502   echo $ECHO_N "(cached) $ECHO_C" >&6
7503 else
7504   ac_check_lib_save_LIBS=$LIBS
7505 LIBS="-lpcre2-posix  $LIBS"
7506 cat >conftest.$ac_ext <<_ACEOF
7507 #line 7507 "configure"
7508 #include "confdefs.h"
7509
7510 /* Override any gcc2 internal prototype to avoid an error.  */
7511 #ifdef __cplusplus
7512 extern "C"
7513 #endif
7514 /* We use char because int might match the return type of a gcc2
7515    builtin and then its argument prototype would still apply.  */
7516 char regcomp ();
7517 int
7518 main (void)
7519 {
7520 regcomp ();
7521   ;
7522   return 0;
7523 }
7524 _ACEOF
7525 rm -f conftest.$ac_objext conftest$ac_exeext
7526 if { (eval echo "$as_me:7526: \"$ac_link\"") >&5
7527   (eval $ac_link) 2>&5
7528   ac_status=$?
7529   echo "$as_me:7529: \$? = $ac_status" >&5
7530   (exit $ac_status); } &&
7531          { ac_try='test -s conftest$ac_exeext'
7532   { (eval echo "$as_me:7532: \"$ac_try\"") >&5
7533   (eval $ac_try) 2>&5
7534   ac_status=$?
7535   echo "$as_me:7535: \$? = $ac_status" >&5
7536   (exit $ac_status); }; }; then
7537   ac_cv_lib_pcre2_posix_regcomp=yes
7538 else
7539   echo "$as_me: failed program was:" >&5
7540 cat conftest.$ac_ext >&5
7541 ac_cv_lib_pcre2_posix_regcomp=no
7542 fi
7543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7544 LIBS=$ac_check_lib_save_LIBS
7545 fi
7546 echo "$as_me:7546: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7547 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7548 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7549
7550 cf_add_libs="$LIBS"
7551 # reverse order
7552 cf_add_0lib=
7553 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7554 # filter duplicates
7555 for cf_add_1lib in $cf_add_0lib; do
7556         for cf_add_2lib in $cf_add_libs; do
7557                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7558                         cf_add_1lib=
7559                         break
7560                 fi
7561         done
7562         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7563 done
7564 LIBS="$cf_add_libs"
7565
7566 else
7567   echo "$as_me:7567: checking for regcomp in -lpcreposix" >&5
7568 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7569 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7570   echo $ECHO_N "(cached) $ECHO_C" >&6
7571 else
7572   ac_check_lib_save_LIBS=$LIBS
7573 LIBS="-lpcreposix  $LIBS"
7574 cat >conftest.$ac_ext <<_ACEOF
7575 #line 7575 "configure"
7576 #include "confdefs.h"
7577
7578 /* Override any gcc2 internal prototype to avoid an error.  */
7579 #ifdef __cplusplus
7580 extern "C"
7581 #endif
7582 /* We use char because int might match the return type of a gcc2
7583    builtin and then its argument prototype would still apply.  */
7584 char regcomp ();
7585 int
7586 main (void)
7587 {
7588 regcomp ();
7589   ;
7590   return 0;
7591 }
7592 _ACEOF
7593 rm -f conftest.$ac_objext conftest$ac_exeext
7594 if { (eval echo "$as_me:7594: \"$ac_link\"") >&5
7595   (eval $ac_link) 2>&5
7596   ac_status=$?
7597   echo "$as_me:7597: \$? = $ac_status" >&5
7598   (exit $ac_status); } &&
7599          { ac_try='test -s conftest$ac_exeext'
7600   { (eval echo "$as_me:7600: \"$ac_try\"") >&5
7601   (eval $ac_try) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); }; }; then
7605   ac_cv_lib_pcreposix_regcomp=yes
7606 else
7607   echo "$as_me: failed program was:" >&5
7608 cat conftest.$ac_ext >&5
7609 ac_cv_lib_pcreposix_regcomp=no
7610 fi
7611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7612 LIBS=$ac_check_lib_save_LIBS
7613 fi
7614 echo "$as_me:7614: result: $ac_cv_lib_pcreposix_regcomp" >&5
7615 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7616 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7617
7618 cf_add_libs="$LIBS"
7619 # reverse order
7620 cf_add_0lib=
7621 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7622 # filter duplicates
7623 for cf_add_1lib in $cf_add_0lib; do
7624         for cf_add_2lib in $cf_add_libs; do
7625                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7626                         cf_add_1lib=
7627                         break
7628                 fi
7629         done
7630         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7631 done
7632 LIBS="$cf_add_libs"
7633
7634 else
7635   { { echo "$as_me:7635: error: Cannot find PCRE2 POSIX library" >&5
7636 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7637    { (exit 1); exit 1; }; }
7638 fi
7639
7640 fi
7641
7642                 ;;
7643         esac
7644
7645         # either way, check for the library header files
7646
7647 for ac_header in pcre2posix.h pcreposix.h
7648 do
7649 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7650 echo "$as_me:7650: checking for $ac_header" >&5
7651 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7652 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7653   echo $ECHO_N "(cached) $ECHO_C" >&6
7654 else
7655   cat >conftest.$ac_ext <<_ACEOF
7656 #line 7656 "configure"
7657 #include "confdefs.h"
7658 #include <$ac_header>
7659 _ACEOF
7660 if { (eval echo "$as_me:7660: \"$ac_cpp conftest.$ac_ext\"") >&5
7661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7662   ac_status=$?
7663   egrep -v '^ *\+' conftest.er1 >conftest.err
7664   rm -f conftest.er1
7665   cat conftest.err >&5
7666   echo "$as_me:7666: \$? = $ac_status" >&5
7667   (exit $ac_status); } >/dev/null; then
7668   if test -s conftest.err; then
7669     ac_cpp_err=$ac_c_preproc_warn_flag
7670   else
7671     ac_cpp_err=
7672   fi
7673 else
7674   ac_cpp_err=yes
7675 fi
7676 if test -z "$ac_cpp_err"; then
7677   eval "$as_ac_Header=yes"
7678 else
7679   echo "$as_me: failed program was:" >&5
7680   cat conftest.$ac_ext >&5
7681   eval "$as_ac_Header=no"
7682 fi
7683 rm -f conftest.err conftest.$ac_ext
7684 fi
7685 echo "$as_me:7685: result: `eval echo '${'$as_ac_Header'}'`" >&5
7686 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7687 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7688   cat >>confdefs.h <<EOF
7689 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7690 EOF
7691
7692 fi
7693 done
7694
7695 fi
7696
7697 # not everyone has "test -c"
7698 if test -c /dev/sysmouse 2>/dev/null ; then
7699 echo "$as_me:7699: checking if you want to use sysmouse" >&5
7700 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7701
7702 # Check whether --with-sysmouse or --without-sysmouse was given.
7703 if test "${with_sysmouse+set}" = set; then
7704   withval="$with_sysmouse"
7705   cf_with_sysmouse=$withval
7706 else
7707   cf_with_sysmouse=maybe
7708 fi;
7709         if test "$cf_with_sysmouse" != no ; then
7710         cat >conftest.$ac_ext <<_ACEOF
7711 #line 7711 "configure"
7712 #include "confdefs.h"
7713
7714 #include <osreldate.h>
7715 #if (__FreeBSD_version >= 400017)
7716 #include <sys/consio.h>
7717 #include <sys/fbio.h>
7718 #else
7719 #include <machine/console.h>
7720 #endif
7721
7722 int
7723 main (void)
7724 {
7725
7726         struct mouse_info the_mouse;
7727         ioctl(0, CONS_MOUSECTL, &the_mouse);
7728
7729   ;
7730   return 0;
7731 }
7732 _ACEOF
7733 rm -f conftest.$ac_objext
7734 if { (eval echo "$as_me:7734: \"$ac_compile\"") >&5
7735   (eval $ac_compile) 2>&5
7736   ac_status=$?
7737   echo "$as_me:7737: \$? = $ac_status" >&5
7738   (exit $ac_status); } &&
7739          { ac_try='test -s conftest.$ac_objext'
7740   { (eval echo "$as_me:7740: \"$ac_try\"") >&5
7741   (eval $ac_try) 2>&5
7742   ac_status=$?
7743   echo "$as_me:7743: \$? = $ac_status" >&5
7744   (exit $ac_status); }; }; then
7745   cf_with_sysmouse=yes
7746 else
7747   echo "$as_me: failed program was:" >&5
7748 cat conftest.$ac_ext >&5
7749 cf_with_sysmouse=no
7750 fi
7751 rm -f conftest.$ac_objext conftest.$ac_ext
7752         fi
7753 echo "$as_me:7753: result: $cf_with_sysmouse" >&5
7754 echo "${ECHO_T}$cf_with_sysmouse" >&6
7755 test "$cf_with_sysmouse" = yes &&
7756 cat >>confdefs.h <<\EOF
7757 #define USE_SYSMOUSE 1
7758 EOF
7759
7760 fi
7761
7762 # pretend that ncurses==ncursesw==ncursest
7763 echo "$as_me:7763: checking if you want to disable library suffixes" >&5
7764 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7765
7766 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7767 if test "${enable_lib_suffixes+set}" = set; then
7768   enableval="$enable_lib_suffixes"
7769   test "$enableval" != no && enableval=yes
7770         if test "$enableval" != "yes" ; then
7771     disable_lib_suffixes=yes
7772         else
7773                 disable_lib_suffixes=no
7774         fi
7775 else
7776   enableval=yes
7777         disable_lib_suffixes=no
7778
7779 fi;
7780 echo "$as_me:7780: result: $disable_lib_suffixes" >&5
7781 echo "${ECHO_T}$disable_lib_suffixes" >&6
7782
7783 ### If we're building with rpath, try to link non-standard libs that way too.
7784 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7785
7786 echo "$as_me:7786: checking if rpath-hack should be disabled" >&5
7787 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7788
7789 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7790 if test "${enable_rpath_hack+set}" = set; then
7791   enableval="$enable_rpath_hack"
7792   test "$enableval" != no && enableval=yes
7793         if test "$enableval" != "yes" ; then
7794     cf_disable_rpath_hack=yes
7795         else
7796                 cf_disable_rpath_hack=no
7797         fi
7798 else
7799   enableval=yes
7800         cf_disable_rpath_hack=no
7801
7802 fi;
7803 echo "$as_me:7803: result: $cf_disable_rpath_hack" >&5
7804 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7805 if test "$cf_disable_rpath_hack" = no ; then
7806
7807 echo "$as_me:7807: checking for updated LDFLAGS" >&5
7808 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7809 if test -n "$LD_RPATH_OPT" ; then
7810         echo "$as_me:7810: result: maybe" >&5
7811 echo "${ECHO_T}maybe" >&6
7812
7813         for ac_prog in ldd
7814 do
7815   # Extract the first word of "$ac_prog", so it can be a program name with args.
7816 set dummy $ac_prog; ac_word=$2
7817 echo "$as_me:7817: checking for $ac_word" >&5
7818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7819 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7820   echo $ECHO_N "(cached) $ECHO_C" >&6
7821 else
7822   if test -n "$cf_ldd_prog"; then
7823   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7824 else
7825   ac_save_IFS=$IFS; IFS=$ac_path_separator
7826 ac_dummy="$PATH"
7827 for ac_dir in $ac_dummy; do
7828   IFS=$ac_save_IFS
7829   test -z "$ac_dir" && ac_dir=.
7830   $as_executable_p "$ac_dir/$ac_word" || continue
7831 ac_cv_prog_cf_ldd_prog="$ac_prog"
7832 echo "$as_me:7832: found $ac_dir/$ac_word" >&5
7833 break
7834 done
7835
7836 fi
7837 fi
7838 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7839 if test -n "$cf_ldd_prog"; then
7840   echo "$as_me:7840: result: $cf_ldd_prog" >&5
7841 echo "${ECHO_T}$cf_ldd_prog" >&6
7842 else
7843   echo "$as_me:7843: result: no" >&5
7844 echo "${ECHO_T}no" >&6
7845 fi
7846
7847   test -n "$cf_ldd_prog" && break
7848 done
7849 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7850
7851         cf_rpath_list="/usr/lib /lib"
7852         if test "$cf_ldd_prog" != no
7853         then
7854                 cf_rpath_oops=
7855
7856 cat >conftest.$ac_ext <<_ACEOF
7857 #line 7857 "configure"
7858 #include "confdefs.h"
7859 #include <stdio.h>
7860 int
7861 main (void)
7862 {
7863 printf("Hello");
7864   ;
7865   return 0;
7866 }
7867 _ACEOF
7868 rm -f conftest.$ac_objext conftest$ac_exeext
7869 if { (eval echo "$as_me:7869: \"$ac_link\"") >&5
7870   (eval $ac_link) 2>&5
7871   ac_status=$?
7872   echo "$as_me:7872: \$? = $ac_status" >&5
7873   (exit $ac_status); } &&
7874          { ac_try='test -s conftest$ac_exeext'
7875   { (eval echo "$as_me:7875: \"$ac_try\"") >&5
7876   (eval $ac_try) 2>&5
7877   ac_status=$?
7878   echo "$as_me:7878: \$? = $ac_status" >&5
7879   (exit $ac_status); }; }; then
7880   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7881                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7882 else
7883   echo "$as_me: failed program was:" >&5
7884 cat conftest.$ac_ext >&5
7885 fi
7886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7887
7888                 # If we passed the link-test, but get a "not found" on a given library,
7889                 # this could be due to inept reconfiguration of gcc to make it only
7890                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7891                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7892                 # /usr/local libraries.
7893                 if test -n "$cf_rpath_oops"
7894                 then
7895                         for cf_rpath_src in $cf_rpath_oops
7896                         do
7897                                 for cf_rpath_dir in \
7898                                         /usr/local \
7899                                         /usr/pkg \
7900                                         /opt/sfw
7901                                 do
7902                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7903                                         then
7904                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7905
7906 echo "${as_me:-configure}:7906: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7907
7908                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7909                                                 break
7910                                         fi
7911                                 done
7912                         done
7913                 fi
7914         fi
7915
7916         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7917
7918 echo "${as_me:-configure}:7918: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7919
7920 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7921
7922 echo "${as_me:-configure}:7922: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7923
7924 cf_rpath_dst=
7925 for cf_rpath_src in $LDFLAGS
7926 do
7927         case $cf_rpath_src in
7928         (-L*)
7929
7930                 # check if this refers to a directory which we will ignore
7931                 cf_rpath_skip=no
7932                 if test -n "$cf_rpath_list"
7933                 then
7934                         for cf_rpath_item in $cf_rpath_list
7935                         do
7936                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7937                                 then
7938                                         cf_rpath_skip=yes
7939                                         break
7940                                 fi
7941                         done
7942                 fi
7943
7944                 if test "$cf_rpath_skip" = no
7945                 then
7946                         # transform the option
7947                         if test "$LD_RPATH_OPT" = "-R " ; then
7948                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7949                         else
7950                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7951                         fi
7952
7953                         # if we have not already added this, add it now
7954                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7955                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7956                         then
7957                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7958
7959 echo "${as_me:-configure}:7959: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7960
7961                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7962                         fi
7963                 fi
7964                 ;;
7965         esac
7966         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7967 done
7968 LDFLAGS=$cf_rpath_dst
7969
7970 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7971
7972 echo "${as_me:-configure}:7972: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7973
7974 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7975
7976 echo "${as_me:-configure}:7976: testing ...checking LIBS $LIBS ..." 1>&5
7977
7978 cf_rpath_dst=
7979 for cf_rpath_src in $LIBS
7980 do
7981         case $cf_rpath_src in
7982         (-L*)
7983
7984                 # check if this refers to a directory which we will ignore
7985                 cf_rpath_skip=no
7986                 if test -n "$cf_rpath_list"
7987                 then
7988                         for cf_rpath_item in $cf_rpath_list
7989                         do
7990                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7991                                 then
7992                                         cf_rpath_skip=yes
7993                                         break
7994                                 fi
7995                         done
7996                 fi
7997
7998                 if test "$cf_rpath_skip" = no
7999                 then
8000                         # transform the option
8001                         if test "$LD_RPATH_OPT" = "-R " ; then
8002                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8003                         else
8004                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8005                         fi
8006
8007                         # if we have not already added this, add it now
8008                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8009                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8010                         then
8011                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8012
8013 echo "${as_me:-configure}:8013: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8014
8015                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8016                         fi
8017                 fi
8018                 ;;
8019         esac
8020         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8021 done
8022 LIBS=$cf_rpath_dst
8023
8024 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8025
8026 echo "${as_me:-configure}:8026: testing ...checked LIBS $LIBS ..." 1>&5
8027
8028         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8029
8030 echo "${as_me:-configure}:8030: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8031
8032 else
8033         echo "$as_me:8033: result: no" >&5
8034 echo "${ECHO_T}no" >&6
8035 fi
8036
8037 fi
8038
8039 fi
8040
8041 ### Depending on the system, someone may use rpath to build ncurses but not
8042 # want users of the package to rely upon that feature.  Give those people an
8043 # option to suppress that detail from EXTRA_LDFLAGS.
8044 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8045 if test -n "$EXTRA_PKG_LDFLAGS"
8046 then
8047         echo "$as_me:8047: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8048 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8049
8050 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8051 if test "${enable_pkg_ldflags+set}" = set; then
8052   enableval="$enable_pkg_ldflags"
8053   test "$enableval" != no && enableval=yes
8054         if test "$enableval" != "yes" ; then
8055     disable_pkg_ldflags=yes
8056         else
8057                 disable_pkg_ldflags=no
8058         fi
8059 else
8060   enableval=yes
8061         disable_pkg_ldflags=no
8062
8063 fi;
8064         echo "$as_me:8064: result: $disable_pkg_ldflags" >&5
8065 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8066         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8067 fi
8068
8069 ###############################################################################
8070
8071 ###     use option --with-extra-suffix to append suffix to headers and libraries
8072 echo "$as_me:8072: checking if you wish to append extra suffix to header/library paths" >&5
8073 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8074 EXTRA_SUFFIX=
8075
8076 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8077 if test "${with_extra_suffix+set}" = set; then
8078   withval="$with_extra_suffix"
8079   case x$withval in
8080         (no)
8081                 ;;
8082         (xyes|x)
8083                 EXTRA_SUFFIX=$cf_cv_abi_version
8084                 ;;
8085         (*)
8086                 EXTRA_SUFFIX=$withval
8087                 ;;
8088         esac
8089
8090 fi;
8091 echo "$as_me:8091: result: $EXTRA_SUFFIX" >&5
8092 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8093
8094 ###     use option --disable-overwrite to leave out the link to -lcurses
8095 echo "$as_me:8095: checking if you wish to install ncurses overwriting curses" >&5
8096 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8097
8098 # Check whether --enable-overwrite or --disable-overwrite was given.
8099 if test "${enable_overwrite+set}" = set; then
8100   enableval="$enable_overwrite"
8101   with_overwrite=$enableval
8102 else
8103   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8104 fi;
8105 echo "$as_me:8105: result: $with_overwrite" >&5
8106 echo "${ECHO_T}$with_overwrite" >&6
8107
8108 echo "$as_me:8108: checking if external terminfo-database is used" >&5
8109 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8110
8111 # Check whether --enable-database or --disable-database was given.
8112 if test "${enable_database+set}" = set; then
8113   enableval="$enable_database"
8114   use_database=$enableval
8115 else
8116   use_database=yes
8117 fi;
8118 echo "$as_me:8118: result: $use_database" >&5
8119 echo "${ECHO_T}$use_database" >&6
8120
8121 case $host_os in
8122 (os2*)
8123         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8124         ;;
8125 (*)
8126         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8127         ;;
8128 esac
8129
8130 NCURSES_USE_DATABASE=0
8131 if test "$use_database" != no ; then
8132         NCURSES_USE_DATABASE=1
8133
8134         echo "$as_me:8134: checking which terminfo source-file will be installed" >&5
8135 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8136
8137 # Check whether --with-database or --without-database was given.
8138 if test "${with_database+set}" = set; then
8139   withval="$with_database"
8140   TERMINFO_SRC=$withval
8141 fi;
8142         echo "$as_me:8142: result: $TERMINFO_SRC" >&5
8143 echo "${ECHO_T}$TERMINFO_SRC" >&6
8144
8145         echo "$as_me:8145: checking whether to use hashed database instead of directory/tree" >&5
8146 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8147
8148 # Check whether --with-hashed-db or --without-hashed-db was given.
8149 if test "${with_hashed_db+set}" = set; then
8150   withval="$with_hashed_db"
8151
8152 else
8153   with_hashed_db=no
8154 fi;
8155         echo "$as_me:8155: result: $with_hashed_db" >&5
8156 echo "${ECHO_T}$with_hashed_db" >&6
8157 else
8158         with_hashed_db=no
8159 fi
8160
8161 echo "$as_me:8161: checking for list of fallback descriptions" >&5
8162 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8163
8164 # Check whether --with-fallbacks or --without-fallbacks was given.
8165 if test "${with_fallbacks+set}" = set; then
8166   withval="$with_fallbacks"
8167   with_fallback=$withval
8168 else
8169   with_fallback=
8170 fi;
8171 echo "$as_me:8171: result: $with_fallback" >&5
8172 echo "${ECHO_T}$with_fallback" >&6
8173
8174 case ".$with_fallback" in
8175 (.|.no)
8176         FALLBACK_LIST=
8177         ;;
8178 (.yes)
8179         { echo "$as_me:8179: WARNING: expected a list of terminal descriptions" >&5
8180 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8181         ;;
8182 (*)
8183         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8184         ;;
8185 esac
8186
8187 USE_FALLBACKS=
8188 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8189
8190 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8191 # tree for generating the terminal descriptions that will be compiled into the
8192 # library.  If your toolchain is old, it may not handle current terminal
8193 # databases.  Use configure-options to point to the tools which will be used,
8194 # rather than the first ones found on the $PATH.
8195 if test -n "$FALLBACK_LIST"
8196 then
8197
8198 # Check whether --with-tic-path or --without-tic-path was given.
8199 if test "${with_tic_path+set}" = set; then
8200   withval="$with_tic_path"
8201   echo "$as_me:8201: checking for tic program for fallbacks" >&5
8202 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8203                 TIC=$withval
8204                 echo "$as_me:8204: result: $TIC" >&5
8205 echo "${ECHO_T}$TIC" >&6
8206
8207 if test "x$prefix" != xNONE; then
8208         cf_path_syntax="$prefix"
8209 else
8210         cf_path_syntax="$ac_default_prefix"
8211 fi
8212
8213 case ".$TIC" in
8214 (.\$\(*\)*|.\'*\'*)
8215         ;;
8216 (..|./*|.\\*)
8217         ;;
8218 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8219         ;;
8220 (.\${*prefix}*|.\${*dir}*)
8221         eval TIC="$TIC"
8222         case ".$TIC" in
8223         (.NONE/*)
8224                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8225                 ;;
8226         esac
8227         ;;
8228 (.no|.NONE/*)
8229         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8230         ;;
8231 (*)
8232         { { echo "$as_me:8232: error: expected a pathname, not \"$TIC\"" >&5
8233 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8234    { (exit 1); exit 1; }; }
8235         ;;
8236 esac
8237
8238 else
8239
8240 test -z "$TIC" && TIC=tic
8241 for ac_prog in $TIC tic
8242 do
8243   # Extract the first word of "$ac_prog", so it can be a program name with args.
8244 set dummy $ac_prog; ac_word=$2
8245 echo "$as_me:8245: checking for $ac_word" >&5
8246 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8247 if test "${ac_cv_path_TIC+set}" = set; then
8248   echo $ECHO_N "(cached) $ECHO_C" >&6
8249 else
8250   case $TIC in
8251   [\\/]* | ?:[\\/]*)
8252   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8253   ;;
8254   *)
8255   ac_save_IFS=$IFS; IFS=$ac_path_separator
8256 ac_dummy="$PATH:/usr/local/ncurses/bin"
8257 for ac_dir in $ac_dummy; do
8258   IFS=$ac_save_IFS
8259   test -z "$ac_dir" && ac_dir=.
8260   if $as_executable_p "$ac_dir/$ac_word"; then
8261    ac_cv_path_TIC="$ac_dir/$ac_word"
8262    echo "$as_me:8262: found $ac_dir/$ac_word" >&5
8263    break
8264 fi
8265 done
8266
8267   ;;
8268 esac
8269 fi
8270 TIC=$ac_cv_path_TIC
8271
8272 if test -n "$TIC"; then
8273   echo "$as_me:8273: result: $TIC" >&5
8274 echo "${ECHO_T}$TIC" >&6
8275 else
8276   echo "$as_me:8276: result: no" >&5
8277 echo "${ECHO_T}no" >&6
8278 fi
8279
8280   test -n "$TIC" && break
8281 done
8282 test -n "$TIC" || TIC="$TIC"
8283
8284 cf_path_prog=""
8285 cf_path_args=""
8286 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8287 for cf_temp in $ac_cv_path_TIC
8288 do
8289         if test -z "$cf_path_prog" ; then
8290                 if test "$with_full_paths" = yes ; then
8291
8292 if test "x$prefix" != xNONE; then
8293         cf_path_syntax="$prefix"
8294 else
8295         cf_path_syntax="$ac_default_prefix"
8296 fi
8297
8298 case ".$cf_temp" in
8299 (.\$\(*\)*|.\'*\'*)
8300         ;;
8301 (..|./*|.\\*)
8302         ;;
8303 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8304         ;;
8305 (.\${*prefix}*|.\${*dir}*)
8306         eval cf_temp="$cf_temp"
8307         case ".$cf_temp" in
8308         (.NONE/*)
8309                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8310                 ;;
8311         esac
8312         ;;
8313 (.no|.NONE/*)
8314         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8315         ;;
8316 (*)
8317         break
8318         ;;
8319 esac
8320
8321                         cf_path_prog="$cf_temp"
8322                 else
8323                         cf_path_prog="`basename $cf_temp`"
8324                 fi
8325         elif test -z "$cf_path_args" ; then
8326                 cf_path_args="$cf_temp"
8327         else
8328                 cf_path_args="$cf_path_args $cf_temp"
8329         fi
8330 done
8331 IFS="$cf_save_ifs"
8332
8333 if test -n "$cf_path_prog" ; then
8334
8335 echo "${as_me:-configure}:8335: testing defining path for ${cf_path_prog} ..." 1>&5
8336
8337 cat >>confdefs.h <<EOF
8338 #define TIC_PATH "$cf_path_prog"
8339 EOF
8340
8341         test -n "$cf_path_args" &&
8342 cat >>confdefs.h <<EOF
8343 #define TIC_ARGS "$cf_path_args"
8344 EOF
8345
8346 fi
8347
8348                 if test -z "$TIC"
8349                 then
8350                         { echo "$as_me:8350: WARNING: no tic program found for fallbacks" >&5
8351 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8352                 fi
8353
8354 fi;
8355
8356 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8357 if test "${with_infocmp_path+set}" = set; then
8358   withval="$with_infocmp_path"
8359   echo "$as_me:8359: checking for infocmp program for fallbacks" >&5
8360 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8361                 INFOCMP=$withval
8362                 echo "$as_me:8362: result: $INFOCMP" >&5
8363 echo "${ECHO_T}$INFOCMP" >&6
8364
8365 if test "x$prefix" != xNONE; then
8366         cf_path_syntax="$prefix"
8367 else
8368         cf_path_syntax="$ac_default_prefix"
8369 fi
8370
8371 case ".$INFOCMP" in
8372 (.\$\(*\)*|.\'*\'*)
8373         ;;
8374 (..|./*|.\\*)
8375         ;;
8376 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8377         ;;
8378 (.\${*prefix}*|.\${*dir}*)
8379         eval INFOCMP="$INFOCMP"
8380         case ".$INFOCMP" in
8381         (.NONE/*)
8382                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8383                 ;;
8384         esac
8385         ;;
8386 (.no|.NONE/*)
8387         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8388         ;;
8389 (*)
8390         { { echo "$as_me:8390: error: expected a pathname, not \"$INFOCMP\"" >&5
8391 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8392    { (exit 1); exit 1; }; }
8393         ;;
8394 esac
8395
8396 else
8397
8398 test -z "$INFOCMP" && INFOCMP=infocmp
8399 for ac_prog in $INFOCMP infocmp
8400 do
8401   # Extract the first word of "$ac_prog", so it can be a program name with args.
8402 set dummy $ac_prog; ac_word=$2
8403 echo "$as_me:8403: checking for $ac_word" >&5
8404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8405 if test "${ac_cv_path_INFOCMP+set}" = set; then
8406   echo $ECHO_N "(cached) $ECHO_C" >&6
8407 else
8408   case $INFOCMP in
8409   [\\/]* | ?:[\\/]*)
8410   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8411   ;;
8412   *)
8413   ac_save_IFS=$IFS; IFS=$ac_path_separator
8414 ac_dummy="$PATH:/usr/local/ncurses/bin"
8415 for ac_dir in $ac_dummy; do
8416   IFS=$ac_save_IFS
8417   test -z "$ac_dir" && ac_dir=.
8418   if $as_executable_p "$ac_dir/$ac_word"; then
8419    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8420    echo "$as_me:8420: found $ac_dir/$ac_word" >&5
8421    break
8422 fi
8423 done
8424
8425   ;;
8426 esac
8427 fi
8428 INFOCMP=$ac_cv_path_INFOCMP
8429
8430 if test -n "$INFOCMP"; then
8431   echo "$as_me:8431: result: $INFOCMP" >&5
8432 echo "${ECHO_T}$INFOCMP" >&6
8433 else
8434   echo "$as_me:8434: result: no" >&5
8435 echo "${ECHO_T}no" >&6
8436 fi
8437
8438   test -n "$INFOCMP" && break
8439 done
8440 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8441
8442 cf_path_prog=""
8443 cf_path_args=""
8444 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8445 for cf_temp in $ac_cv_path_INFOCMP
8446 do
8447         if test -z "$cf_path_prog" ; then
8448                 if test "$with_full_paths" = yes ; then
8449
8450 if test "x$prefix" != xNONE; then
8451         cf_path_syntax="$prefix"
8452 else
8453         cf_path_syntax="$ac_default_prefix"
8454 fi
8455
8456 case ".$cf_temp" in
8457 (.\$\(*\)*|.\'*\'*)
8458         ;;
8459 (..|./*|.\\*)
8460         ;;
8461 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8462         ;;
8463 (.\${*prefix}*|.\${*dir}*)
8464         eval cf_temp="$cf_temp"
8465         case ".$cf_temp" in
8466         (.NONE/*)
8467                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8468                 ;;
8469         esac
8470         ;;
8471 (.no|.NONE/*)
8472         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8473         ;;
8474 (*)
8475         break
8476         ;;
8477 esac
8478
8479                         cf_path_prog="$cf_temp"
8480                 else
8481                         cf_path_prog="`basename $cf_temp`"
8482                 fi
8483         elif test -z "$cf_path_args" ; then
8484                 cf_path_args="$cf_temp"
8485         else
8486                 cf_path_args="$cf_path_args $cf_temp"
8487         fi
8488 done
8489 IFS="$cf_save_ifs"
8490
8491 if test -n "$cf_path_prog" ; then
8492
8493 echo "${as_me:-configure}:8493: testing defining path for ${cf_path_prog} ..." 1>&5
8494
8495 cat >>confdefs.h <<EOF
8496 #define INFOCMP_PATH "$cf_path_prog"
8497 EOF
8498
8499         test -n "$cf_path_args" &&
8500 cat >>confdefs.h <<EOF
8501 #define INFOCMP_ARGS "$cf_path_args"
8502 EOF
8503
8504 fi
8505
8506                 if test -z "$INFOCMP"
8507                 then
8508                         { echo "$as_me:8508: WARNING: no infocmp program found for fallbacks" >&5
8509 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8510                 fi
8511
8512 fi;
8513
8514 else
8515         : ${TIC:=tic}
8516         : ${INFOCMP:=infocmp}
8517 fi
8518
8519 echo "$as_me:8519: checking if you want modern xterm or antique" >&5
8520 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8521
8522 # Check whether --with-xterm-new or --without-xterm-new was given.
8523 if test "${with_xterm_new+set}" = set; then
8524   withval="$with_xterm_new"
8525   with_xterm_new=$withval
8526 else
8527   with_xterm_new=yes
8528 fi;
8529 case $with_xterm_new in
8530 (no) with_xterm_new=xterm-old;;
8531 (*)      with_xterm_new=xterm-new;;
8532 esac
8533 echo "$as_me:8533: result: $with_xterm_new" >&5
8534 echo "${ECHO_T}$with_xterm_new" >&6
8535 WHICH_XTERM=$with_xterm_new
8536
8537 echo "$as_me:8537: checking if xterm backspace sends BS or DEL" >&5
8538 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8539
8540 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8541 if test "${with_xterm_kbs+set}" = set; then
8542   withval="$with_xterm_kbs"
8543   with_xterm_kbs=$withval
8544 else
8545   with_xterm_kbs=BS
8546 fi;
8547 case x$with_xterm_kbs in
8548 (xyes|xno|xBS|xbs|x8)
8549         with_xterm_kbs=BS
8550         ;;
8551 (xDEL|xdel|x127)
8552         with_xterm_kbs=DEL
8553         ;;
8554 (*)
8555         with_xterm_kbs=$withval
8556         ;;
8557 esac
8558 echo "$as_me:8558: result: $with_xterm_kbs" >&5
8559 echo "${ECHO_T}$with_xterm_kbs" >&6
8560 XTERM_KBS=$with_xterm_kbs
8561
8562 MAKE_TERMINFO=
8563 if test "$use_database" = no ; then
8564         TERMINFO="${datadir}/terminfo"
8565         MAKE_TERMINFO="#"
8566 else
8567
8568 echo "$as_me:8568: checking for list of terminfo directories" >&5
8569 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8570
8571 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8572 if test "${with_terminfo_dirs+set}" = set; then
8573   withval="$with_terminfo_dirs"
8574
8575 else
8576   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8577 fi;
8578 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8579 cf_dst_path=
8580 for cf_src_path in $withval
8581 do
8582
8583 if test "x$prefix" != xNONE; then
8584         cf_path_syntax="$prefix"
8585 else
8586         cf_path_syntax="$ac_default_prefix"
8587 fi
8588
8589 case ".$cf_src_path" in
8590 (.\$\(*\)*|.\'*\'*)
8591         ;;
8592 (..|./*|.\\*)
8593         ;;
8594 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8595         ;;
8596 (.\${*prefix}*|.\${*dir}*)
8597         eval cf_src_path="$cf_src_path"
8598         case ".$cf_src_path" in
8599         (.NONE/*)
8600                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8601                 ;;
8602         esac
8603         ;;
8604 (.no|.NONE/*)
8605         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8606         ;;
8607 (*)
8608         { { echo "$as_me:8608: error: expected a pathname, not \"$cf_src_path\"" >&5
8609 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8610    { (exit 1); exit 1; }; }
8611         ;;
8612 esac
8613
8614   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8615   cf_dst_path="${cf_dst_path}${cf_src_path}"
8616 done
8617 IFS="$ac_save_ifs"
8618
8619 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8620 # so we have to check/work around.  We do prefer the result of "eval"...
8621 eval cf_dst_eval="$cf_dst_path"
8622 case "x$cf_dst_eval" in
8623 (xNONE*)
8624         TERMINFO_DIRS=$cf_dst_path
8625         ;;
8626 (*)
8627         TERMINFO_DIRS="$cf_dst_eval"
8628         ;;
8629 esac
8630
8631 echo "$as_me:8631: result: $TERMINFO_DIRS" >&5
8632 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8633 test -n "$TERMINFO_DIRS" &&
8634 cat >>confdefs.h <<EOF
8635 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8636 EOF
8637
8638 case "x$TERMINFO" in
8639 x???:*)
8640         { echo "$as_me:8640: WARNING: ignoring non-directory/file TERMINFO value" >&5
8641 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8642         unset TERMINFO
8643         ;;
8644 esac
8645
8646 echo "$as_me:8646: checking for default terminfo directory" >&5
8647 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8648
8649 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8650 if test "${with_default_terminfo_dir+set}" = set; then
8651   withval="$with_default_terminfo_dir"
8652
8653 else
8654   withval="${TERMINFO:-${datadir}/terminfo}"
8655 fi; if test -n "${datadir}/terminfo" ; then
8656
8657 if test "x$prefix" != xNONE; then
8658         cf_path_syntax="$prefix"
8659 else
8660         cf_path_syntax="$ac_default_prefix"
8661 fi
8662
8663 case ".$withval" in
8664 (.\$\(*\)*|.\'*\'*)
8665         ;;
8666 (..|./*|.\\*)
8667         ;;
8668 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8669         ;;
8670 (.\${*prefix}*|.\${*dir}*)
8671         eval withval="$withval"
8672         case ".$withval" in
8673         (.NONE/*)
8674                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8675                 ;;
8676         esac
8677         ;;
8678 (.no|.NONE/*)
8679         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8680         ;;
8681 (*)
8682         { { echo "$as_me:8682: error: expected a pathname, not \"$withval\"" >&5
8683 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8684    { (exit 1); exit 1; }; }
8685         ;;
8686 esac
8687
8688 fi
8689 eval TERMINFO="$withval"
8690
8691 echo "$as_me:8691: result: $TERMINFO" >&5
8692 echo "${ECHO_T}$TERMINFO" >&6
8693
8694 cat >>confdefs.h <<EOF
8695 #define TERMINFO "$TERMINFO"
8696 EOF
8697
8698 fi
8699
8700 ###     use option --disable-big-core to make tic run on small machines
8701 ###     We need 4Mb, check if we can allocate 50% more than that.
8702 echo "$as_me:8702: checking if big-core option selected" >&5
8703 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8704
8705 # Check whether --enable-big-core or --disable-big-core was given.
8706 if test "${enable_big_core+set}" = set; then
8707   enableval="$enable_big_core"
8708   with_big_core=$enableval
8709 else
8710   if test "$cross_compiling" = yes; then
8711   with_big_core=no
8712 else
8713   cat >conftest.$ac_ext <<_ACEOF
8714 #line 8714 "configure"
8715 #include "confdefs.h"
8716
8717 #include <stdlib.h>
8718 #include <string.h>
8719 int main() {
8720         unsigned long n = 6000000L;
8721         char *s = malloc(n);
8722         if (s != 0)
8723                 s[0] = s[n-1] = 0;
8724         ${cf_cv_main_return:-return}(s == 0);
8725 }
8726 _ACEOF
8727 rm -f conftest$ac_exeext
8728 if { (eval echo "$as_me:8728: \"$ac_link\"") >&5
8729   (eval $ac_link) 2>&5
8730   ac_status=$?
8731   echo "$as_me:8731: \$? = $ac_status" >&5
8732   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8733   { (eval echo "$as_me:8733: \"$ac_try\"") >&5
8734   (eval $ac_try) 2>&5
8735   ac_status=$?
8736   echo "$as_me:8736: \$? = $ac_status" >&5
8737   (exit $ac_status); }; }; then
8738   with_big_core=yes
8739 else
8740   echo "$as_me: program exited with status $ac_status" >&5
8741 echo "$as_me: failed program was:" >&5
8742 cat conftest.$ac_ext >&5
8743 with_big_core=no
8744 fi
8745 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8746 fi
8747 fi;
8748 echo "$as_me:8748: result: $with_big_core" >&5
8749 echo "${ECHO_T}$with_big_core" >&6
8750 test "x$with_big_core" = "xyes" &&
8751 cat >>confdefs.h <<\EOF
8752 #define HAVE_BIG_CORE 1
8753 EOF
8754
8755 ### ISO C only guarantees 512-char strings, we have tables which load faster
8756 ### when constructed using "big" strings.  More than the C compiler, the awk
8757 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8758 echo "$as_me:8758: checking if big-strings option selected" >&5
8759 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8760
8761 # Check whether --enable-big-strings or --disable-big-strings was given.
8762 if test "${enable_big_strings+set}" = set; then
8763   enableval="$enable_big_strings"
8764   with_big_strings=$enableval
8765 else
8766
8767         case x$AWK in
8768         (x)
8769                 eval with_big_strings=no
8770                 ;;
8771         (*)
8772                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8773                         | $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
8774                         eval with_big_strings=yes
8775                 else
8776                         eval with_big_strings=no
8777                 fi
8778                 ;;
8779         esac
8780
8781 fi;
8782 echo "$as_me:8782: result: $with_big_strings" >&5
8783 echo "${ECHO_T}$with_big_strings" >&6
8784
8785 USE_BIG_STRINGS=0
8786 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8787
8788 ###     use option --enable-termcap to compile in the termcap fallback support
8789 echo "$as_me:8789: checking if you want termcap-fallback support" >&5
8790 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8791
8792 # Check whether --enable-termcap or --disable-termcap was given.
8793 if test "${enable_termcap+set}" = set; then
8794   enableval="$enable_termcap"
8795   with_termcap=$enableval
8796 else
8797   with_termcap=no
8798 fi;
8799 echo "$as_me:8799: result: $with_termcap" >&5
8800 echo "${ECHO_T}$with_termcap" >&6
8801
8802 NCURSES_USE_TERMCAP=0
8803 if test "x$with_termcap" != "xyes" ; then
8804         if test "$use_database" = no ; then
8805                 if test -z "$with_fallback" ; then
8806                         { { echo "$as_me:8806: error: You have disabled the database w/o specifying fallbacks" >&5
8807 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8808    { (exit 1); exit 1; }; }
8809                 fi
8810         fi
8811
8812 cat >>confdefs.h <<\EOF
8813 #define PURE_TERMINFO 1
8814 EOF
8815
8816 else
8817
8818         if test "$with_ticlib" != no ; then
8819                 { { echo "$as_me:8819: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8820 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8821    { (exit 1); exit 1; }; }
8822         fi
8823
8824         NCURSES_USE_TERMCAP=1
8825         echo "$as_me:8825: checking for list of termcap files" >&5
8826 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8827
8828 # Check whether --with-termpath or --without-termpath was given.
8829 if test "${with_termpath+set}" = set; then
8830   withval="$with_termpath"
8831
8832 else
8833   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8834 fi;
8835 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8836 cf_dst_path=
8837 for cf_src_path in $withval
8838 do
8839
8840 if test "x$prefix" != xNONE; then
8841         cf_path_syntax="$prefix"
8842 else
8843         cf_path_syntax="$ac_default_prefix"
8844 fi
8845
8846 case ".$cf_src_path" in
8847 (.\$\(*\)*|.\'*\'*)
8848         ;;
8849 (..|./*|.\\*)
8850         ;;
8851 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8852         ;;
8853 (.\${*prefix}*|.\${*dir}*)
8854         eval cf_src_path="$cf_src_path"
8855         case ".$cf_src_path" in
8856         (.NONE/*)
8857                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8858                 ;;
8859         esac
8860         ;;
8861 (.no|.NONE/*)
8862         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8863         ;;
8864 (*)
8865         { { echo "$as_me:8865: error: expected a pathname, not \"$cf_src_path\"" >&5
8866 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8867    { (exit 1); exit 1; }; }
8868         ;;
8869 esac
8870
8871   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8872   cf_dst_path="${cf_dst_path}${cf_src_path}"
8873 done
8874 IFS="$ac_save_ifs"
8875
8876 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8877 # so we have to check/work around.  We do prefer the result of "eval"...
8878 eval cf_dst_eval="$cf_dst_path"
8879 case "x$cf_dst_eval" in
8880 (xNONE*)
8881         TERMPATH=$cf_dst_path
8882         ;;
8883 (*)
8884         TERMPATH="$cf_dst_eval"
8885         ;;
8886 esac
8887
8888         echo "$as_me:8888: result: $TERMPATH" >&5
8889 echo "${ECHO_T}$TERMPATH" >&6
8890         test -n "$TERMPATH" &&
8891 cat >>confdefs.h <<EOF
8892 #define TERMPATH "$TERMPATH"
8893 EOF
8894
8895         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8896         echo "$as_me:8896: checking if fast termcap-loader is needed" >&5
8897 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8898
8899 # Check whether --enable-getcap or --disable-getcap was given.
8900 if test "${enable_getcap+set}" = set; then
8901   enableval="$enable_getcap"
8902   with_getcap=$enableval
8903 else
8904   with_getcap=no
8905 fi;
8906         echo "$as_me:8906: result: $with_getcap" >&5
8907 echo "${ECHO_T}$with_getcap" >&6
8908         test "x$with_getcap" = "xyes" &&
8909 cat >>confdefs.h <<\EOF
8910 #define USE_GETCAP 1
8911 EOF
8912
8913         echo "$as_me:8913: checking if translated termcaps will be cached in ~/.terminfo" >&5
8914 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8915
8916 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8917 if test "${enable_getcap_cache+set}" = set; then
8918   enableval="$enable_getcap_cache"
8919   with_getcap_cache=$enableval
8920 else
8921   with_getcap_cache=no
8922 fi;
8923         echo "$as_me:8923: result: $with_getcap_cache" >&5
8924 echo "${ECHO_T}$with_getcap_cache" >&6
8925         test "x$with_getcap_cache" = "xyes" &&
8926 cat >>confdefs.h <<\EOF
8927 #define USE_GETCAP_CACHE 1
8928 EOF
8929
8930 fi
8931
8932 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8933 echo "$as_me:8933: checking if ~/.terminfo is wanted" >&5
8934 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8935
8936 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8937 if test "${enable_home_terminfo+set}" = set; then
8938   enableval="$enable_home_terminfo"
8939   with_home_terminfo=$enableval
8940 else
8941   with_home_terminfo=yes
8942 fi;
8943 echo "$as_me:8943: result: $with_home_terminfo" >&5
8944 echo "${ECHO_T}$with_home_terminfo" >&6
8945 test "x$with_home_terminfo" = "xyes" &&
8946 cat >>confdefs.h <<\EOF
8947 #define USE_HOME_TERMINFO 1
8948 EOF
8949
8950 echo "$as_me:8950: checking if you want to use restricted environment when running as root" >&5
8951 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8952
8953 # Check whether --enable-root-environ or --disable-root-environ was given.
8954 if test "${enable_root_environ+set}" = set; then
8955   enableval="$enable_root_environ"
8956   with_root_environ=$enableval
8957 else
8958   with_root_environ=yes
8959 fi;
8960 echo "$as_me:8960: result: $with_root_environ" >&5
8961 echo "${ECHO_T}$with_root_environ" >&6
8962 test "x$with_root_environ" = xyes &&
8963 cat >>confdefs.h <<\EOF
8964 #define USE_ROOT_ENVIRON 1
8965 EOF
8966
8967 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8968 ###   to reduce storage requirements for the terminfo database.
8969
8970 for ac_header in \
8971 unistd.h \
8972
8973 do
8974 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8975 echo "$as_me:8975: checking for $ac_header" >&5
8976 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8977 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8978   echo $ECHO_N "(cached) $ECHO_C" >&6
8979 else
8980   cat >conftest.$ac_ext <<_ACEOF
8981 #line 8981 "configure"
8982 #include "confdefs.h"
8983 #include <$ac_header>
8984 _ACEOF
8985 if { (eval echo "$as_me:8985: \"$ac_cpp conftest.$ac_ext\"") >&5
8986   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8987   ac_status=$?
8988   egrep -v '^ *\+' conftest.er1 >conftest.err
8989   rm -f conftest.er1
8990   cat conftest.err >&5
8991   echo "$as_me:8991: \$? = $ac_status" >&5
8992   (exit $ac_status); } >/dev/null; then
8993   if test -s conftest.err; then
8994     ac_cpp_err=$ac_c_preproc_warn_flag
8995   else
8996     ac_cpp_err=
8997   fi
8998 else
8999   ac_cpp_err=yes
9000 fi
9001 if test -z "$ac_cpp_err"; then
9002   eval "$as_ac_Header=yes"
9003 else
9004   echo "$as_me: failed program was:" >&5
9005   cat conftest.$ac_ext >&5
9006   eval "$as_ac_Header=no"
9007 fi
9008 rm -f conftest.err conftest.$ac_ext
9009 fi
9010 echo "$as_me:9010: result: `eval echo '${'$as_ac_Header'}'`" >&5
9011 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9012 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9013   cat >>confdefs.h <<EOF
9014 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9015 EOF
9016
9017 fi
9018 done
9019
9020 for ac_func in \
9021         remove \
9022         unlink
9023 do
9024 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9025 echo "$as_me:9025: checking for $ac_func" >&5
9026 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9027 if eval "test \"\${$as_ac_var+set}\" = set"; then
9028   echo $ECHO_N "(cached) $ECHO_C" >&6
9029 else
9030   cat >conftest.$ac_ext <<_ACEOF
9031 #line 9031 "configure"
9032 #include "confdefs.h"
9033 #define $ac_func autoconf_temporary
9034 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9035 #undef $ac_func
9036
9037 #ifdef __cplusplus
9038 extern "C"
9039 #endif
9040
9041 /* We use char because int might match the return type of a gcc2
9042    builtin and then its argument prototype would still apply.  */
9043 char $ac_func (void);
9044
9045 int
9046 main (void)
9047 {
9048
9049 /* The GNU C library defines stubs for functions which it implements
9050     to always fail with ENOSYS.  Some functions are actually named
9051     something starting with __ and the normal name is an alias.  */
9052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9053 #error found stub for $ac_func
9054 #endif
9055
9056         return $ac_func ();
9057   ;
9058   return 0;
9059 }
9060 _ACEOF
9061 rm -f conftest.$ac_objext conftest$ac_exeext
9062 if { (eval echo "$as_me:9062: \"$ac_link\"") >&5
9063   (eval $ac_link) 2>&5
9064   ac_status=$?
9065   echo "$as_me:9065: \$? = $ac_status" >&5
9066   (exit $ac_status); } &&
9067          { ac_try='test -s conftest$ac_exeext'
9068   { (eval echo "$as_me:9068: \"$ac_try\"") >&5
9069   (eval $ac_try) 2>&5
9070   ac_status=$?
9071   echo "$as_me:9071: \$? = $ac_status" >&5
9072   (exit $ac_status); }; }; then
9073   eval "$as_ac_var=yes"
9074 else
9075   echo "$as_me: failed program was:" >&5
9076 cat conftest.$ac_ext >&5
9077 eval "$as_ac_var=no"
9078 fi
9079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9080 fi
9081 echo "$as_me:9081: result: `eval echo '${'$as_ac_var'}'`" >&5
9082 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9083 if test `eval echo '${'$as_ac_var'}'` = yes; then
9084   cat >>confdefs.h <<EOF
9085 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9086 EOF
9087
9088 fi
9089 done
9090
9091 if test "$cross_compiling" = yes ; then
9092
9093 for ac_func in \
9094                 link \
9095                 symlink
9096 do
9097 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9098 echo "$as_me:9098: checking for $ac_func" >&5
9099 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9100 if eval "test \"\${$as_ac_var+set}\" = set"; then
9101   echo $ECHO_N "(cached) $ECHO_C" >&6
9102 else
9103   cat >conftest.$ac_ext <<_ACEOF
9104 #line 9104 "configure"
9105 #include "confdefs.h"
9106 #define $ac_func autoconf_temporary
9107 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9108 #undef $ac_func
9109
9110 #ifdef __cplusplus
9111 extern "C"
9112 #endif
9113
9114 /* We use char because int might match the return type of a gcc2
9115    builtin and then its argument prototype would still apply.  */
9116 char $ac_func (void);
9117
9118 int
9119 main (void)
9120 {
9121
9122 /* The GNU C library defines stubs for functions which it implements
9123     to always fail with ENOSYS.  Some functions are actually named
9124     something starting with __ and the normal name is an alias.  */
9125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9126 #error found stub for $ac_func
9127 #endif
9128
9129         return $ac_func ();
9130   ;
9131   return 0;
9132 }
9133 _ACEOF
9134 rm -f conftest.$ac_objext conftest$ac_exeext
9135 if { (eval echo "$as_me:9135: \"$ac_link\"") >&5
9136   (eval $ac_link) 2>&5
9137   ac_status=$?
9138   echo "$as_me:9138: \$? = $ac_status" >&5
9139   (exit $ac_status); } &&
9140          { ac_try='test -s conftest$ac_exeext'
9141   { (eval echo "$as_me:9141: \"$ac_try\"") >&5
9142   (eval $ac_try) 2>&5
9143   ac_status=$?
9144   echo "$as_me:9144: \$? = $ac_status" >&5
9145   (exit $ac_status); }; }; then
9146   eval "$as_ac_var=yes"
9147 else
9148   echo "$as_me: failed program was:" >&5
9149 cat conftest.$ac_ext >&5
9150 eval "$as_ac_var=no"
9151 fi
9152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9153 fi
9154 echo "$as_me:9154: result: `eval echo '${'$as_ac_var'}'`" >&5
9155 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9156 if test `eval echo '${'$as_ac_var'}'` = yes; then
9157   cat >>confdefs.h <<EOF
9158 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9159 EOF
9160
9161 fi
9162 done
9163
9164 else
9165         echo "$as_me:9165: checking if link/symlink functions work" >&5
9166 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9167 if test "${cf_cv_link_funcs+set}" = set; then
9168   echo $ECHO_N "(cached) $ECHO_C" >&6
9169 else
9170
9171                 cf_cv_link_funcs=
9172                 for cf_func in link symlink ; do
9173                         if test "$cross_compiling" = yes; then
9174
9175                         eval 'ac_cv_func_'$cf_func'=error'
9176 else
9177   cat >conftest.$ac_ext <<_ACEOF
9178 #line 9178 "configure"
9179 #include "confdefs.h"
9180
9181 #include <sys/types.h>
9182 #include <sys/stat.h>
9183 #ifdef HAVE_UNISTD_H
9184 #include <unistd.h>
9185 #endif
9186 int main(void)
9187 {
9188         int fail = 0;
9189         char *src = "config.log";
9190         char *dst = "conftest.chk";
9191         struct stat src_sb;
9192         struct stat dst_sb;
9193
9194         stat(src, &src_sb);
9195         fail = ($cf_func("config.log", "conftest.chk") < 0)
9196             || (stat(dst, &dst_sb) < 0)
9197             || (dst_sb.st_mtime != src_sb.st_mtime);
9198 #ifdef HAVE_UNLINK
9199         unlink(dst);
9200 #else
9201         remove(dst);
9202 #endif
9203         ${cf_cv_main_return:-return} (fail);
9204 }
9205
9206 _ACEOF
9207 rm -f conftest$ac_exeext
9208 if { (eval echo "$as_me:9208: \"$ac_link\"") >&5
9209   (eval $ac_link) 2>&5
9210   ac_status=$?
9211   echo "$as_me:9211: \$? = $ac_status" >&5
9212   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9213   { (eval echo "$as_me:9213: \"$ac_try\"") >&5
9214   (eval $ac_try) 2>&5
9215   ac_status=$?
9216   echo "$as_me:9216: \$? = $ac_status" >&5
9217   (exit $ac_status); }; }; then
9218
9219                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9220                         eval 'ac_cv_func_'$cf_func'=yes'
9221 else
9222   echo "$as_me: program exited with status $ac_status" >&5
9223 echo "$as_me: failed program was:" >&5
9224 cat conftest.$ac_ext >&5
9225
9226                         eval 'ac_cv_func_'$cf_func'=no'
9227 fi
9228 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9229 fi
9230                 done
9231                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9232
9233 fi
9234 echo "$as_me:9234: result: $cf_cv_link_funcs" >&5
9235 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9236         test "$ac_cv_func_link"    = yes &&
9237 cat >>confdefs.h <<\EOF
9238 #define HAVE_LINK 1
9239 EOF
9240
9241         test "$ac_cv_func_symlink" = yes &&
9242 cat >>confdefs.h <<\EOF
9243 #define HAVE_SYMLINK 1
9244 EOF
9245
9246 fi
9247
9248 with_links=no
9249 with_symlinks=no
9250
9251 # soft links (symbolic links) are useful for some systems where hard links do
9252 # not work, or to make it simpler to copy terminfo trees around.
9253 if test "x$ac_cv_func_symlink" = xyes ; then
9254         echo "$as_me:9254: checking if tic should use symbolic links" >&5
9255 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9256
9257 # Check whether --enable-symlinks or --disable-symlinks was given.
9258 if test "${enable_symlinks+set}" = set; then
9259   enableval="$enable_symlinks"
9260   with_symlinks=$enableval
9261 else
9262   with_symlinks=no
9263 fi;
9264         echo "$as_me:9264: result: $with_symlinks" >&5
9265 echo "${ECHO_T}$with_symlinks" >&6
9266 fi
9267
9268 # If we have hard links and did not choose to use soft links instead, there is
9269 # no reason to make this choice optional - use the hard links.
9270 if test "$with_symlinks" = no ; then
9271         echo "$as_me:9271: checking if tic should use hard links" >&5
9272 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9273         if test "x$ac_cv_func_link" = xyes ; then
9274                 with_links=yes
9275         else
9276                 with_links=no
9277         fi
9278         echo "$as_me:9278: result: $with_links" >&5
9279 echo "${ECHO_T}$with_links" >&6
9280 fi
9281
9282 test "x$with_links" = xyes &&
9283 cat >>confdefs.h <<\EOF
9284 #define USE_LINKS 1
9285 EOF
9286
9287 test "x$with_symlinks" = xyes &&
9288 cat >>confdefs.h <<\EOF
9289 #define USE_SYMLINKS 1
9290 EOF
9291
9292 ###   use option --enable-broken-linker to force on use of broken-linker support
9293
9294 echo "$as_me:9294: checking if you want broken-linker support code" >&5
9295 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9296
9297 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9298 if test "${enable_broken_linker+set}" = set; then
9299   enableval="$enable_broken_linker"
9300   with_broken_linker=$enableval
9301 else
9302   with_broken_linker=no
9303 fi;
9304 echo "$as_me:9304: result: $with_broken_linker" >&5
9305 echo "${ECHO_T}$with_broken_linker" >&6
9306
9307 : ${BROKEN_LINKER:=0}
9308 if test "x$with_broken_linker" = xyes ; then
9309
9310 cat >>confdefs.h <<\EOF
9311 #define BROKEN_LINKER 1
9312 EOF
9313
9314         BROKEN_LINKER=1
9315 fi
9316
9317 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9318 echo "$as_me:9318: checking if tputs should process BSD-style prefix padding" >&5
9319 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9320
9321 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9322 if test "${enable_bsdpad+set}" = set; then
9323   enableval="$enable_bsdpad"
9324   with_bsdpad=$enableval
9325 else
9326   with_bsdpad=no
9327 fi;
9328 echo "$as_me:9328: result: $with_bsdpad" >&5
9329 echo "${ECHO_T}$with_bsdpad" >&6
9330 test "x$with_bsdpad" = xyes &&
9331 cat >>confdefs.h <<\EOF
9332 #define BSD_TPUTS 1
9333 EOF
9334
9335 ###   use option --enable-widec to turn on use of wide-character support
9336 NCURSES_CH_T=chtype
9337 NCURSES_LIBUTF8=0
9338
9339 NEED_WCHAR_H=0
9340 NCURSES_MBSTATE_T=0
9341 NCURSES_WCHAR_T=0
9342 NCURSES_WINT_T=0
9343
9344 # Check to define _XOPEN_SOURCE "automatically"
9345 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9346
9347 echo "$as_me:9347: checking if the POSIX test-macros are already defined" >&5
9348 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9349 if test "${cf_cv_posix_visible+set}" = set; then
9350   echo $ECHO_N "(cached) $ECHO_C" >&6
9351 else
9352
9353 cat >conftest.$ac_ext <<_ACEOF
9354 #line 9354 "configure"
9355 #include "confdefs.h"
9356 #include <stdio.h>
9357 int
9358 main (void)
9359 {
9360
9361 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9362         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9363         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9364         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9365 #error conflicting symbols found
9366 #endif
9367
9368   ;
9369   return 0;
9370 }
9371 _ACEOF
9372 rm -f conftest.$ac_objext
9373 if { (eval echo "$as_me:9373: \"$ac_compile\"") >&5
9374   (eval $ac_compile) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); } &&
9378          { ac_try='test -s conftest.$ac_objext'
9379   { (eval echo "$as_me:9379: \"$ac_try\"") >&5
9380   (eval $ac_try) 2>&5
9381   ac_status=$?
9382   echo "$as_me:9382: \$? = $ac_status" >&5
9383   (exit $ac_status); }; }; then
9384   cf_cv_posix_visible=no
9385 else
9386   echo "$as_me: failed program was:" >&5
9387 cat conftest.$ac_ext >&5
9388 cf_cv_posix_visible=yes
9389 fi
9390 rm -f conftest.$ac_objext conftest.$ac_ext
9391
9392 fi
9393 echo "$as_me:9393: result: $cf_cv_posix_visible" >&5
9394 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9395
9396 if test "$cf_cv_posix_visible" = no; then
9397
9398 cf_XOPEN_SOURCE=600
9399 cf_POSIX_C_SOURCE=199506L
9400 cf_xopen_source=
9401
9402 case $host_os in
9403 (aix[4-7]*)
9404         cf_xopen_source="-D_ALL_SOURCE"
9405         ;;
9406 (msys)
9407         cf_XOPEN_SOURCE=600
9408         ;;
9409 (darwin[0-8].*)
9410         cf_xopen_source="-D_APPLE_C_SOURCE"
9411         ;;
9412 (darwin*)
9413         cf_xopen_source="-D_DARWIN_C_SOURCE"
9414         cf_XOPEN_SOURCE=
9415         ;;
9416 (freebsd*|dragonfly*|midnightbsd*)
9417         # 5.x headers associate
9418         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9419         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9420         cf_POSIX_C_SOURCE=200112L
9421         cf_XOPEN_SOURCE=600
9422         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9423         ;;
9424 (hpux11*)
9425         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9426         ;;
9427 (hpux*)
9428         cf_xopen_source="-D_HPUX_SOURCE"
9429         ;;
9430 (irix[56].*)
9431         cf_xopen_source="-D_SGI_SOURCE"
9432         cf_XOPEN_SOURCE=
9433         ;;
9434 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9435
9436 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9437
9438 echo "$as_me:9438: checking if this is the GNU C library" >&5
9439 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9440 if test "${cf_cv_gnu_library+set}" = set; then
9441   echo $ECHO_N "(cached) $ECHO_C" >&6
9442 else
9443
9444 cat >conftest.$ac_ext <<_ACEOF
9445 #line 9445 "configure"
9446 #include "confdefs.h"
9447 #include <sys/types.h>
9448 int
9449 main (void)
9450 {
9451
9452         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9453                 return 0;
9454         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9455                 return 0;
9456         #else
9457         #       error not GNU C library
9458         #endif
9459   ;
9460   return 0;
9461 }
9462 _ACEOF
9463 rm -f conftest.$ac_objext
9464 if { (eval echo "$as_me:9464: \"$ac_compile\"") >&5
9465   (eval $ac_compile) 2>&5
9466   ac_status=$?
9467   echo "$as_me:9467: \$? = $ac_status" >&5
9468   (exit $ac_status); } &&
9469          { ac_try='test -s conftest.$ac_objext'
9470   { (eval echo "$as_me:9470: \"$ac_try\"") >&5
9471   (eval $ac_try) 2>&5
9472   ac_status=$?
9473   echo "$as_me:9473: \$? = $ac_status" >&5
9474   (exit $ac_status); }; }; then
9475   cf_cv_gnu_library=yes
9476 else
9477   echo "$as_me: failed program was:" >&5
9478 cat conftest.$ac_ext >&5
9479 cf_cv_gnu_library=no
9480 fi
9481 rm -f conftest.$ac_objext conftest.$ac_ext
9482
9483 fi
9484 echo "$as_me:9484: result: $cf_cv_gnu_library" >&5
9485 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9486
9487 if test x$cf_cv_gnu_library = xyes; then
9488
9489         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9490         # was changed to help a little.  newlib incorporated the change about 4
9491         # years later.
9492         echo "$as_me:9492: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9493 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9494 if test "${cf_cv_gnu_library_219+set}" = set; then
9495   echo $ECHO_N "(cached) $ECHO_C" >&6
9496 else
9497
9498                 cf_save="$CPPFLAGS"
9499
9500         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9501         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9502
9503                 cat >conftest.$ac_ext <<_ACEOF
9504 #line 9504 "configure"
9505 #include "confdefs.h"
9506 #include <sys/types.h>
9507 int
9508 main (void)
9509 {
9510
9511                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9512                                 return 0;
9513                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9514                                 return 0;
9515                         #else
9516                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9517                         #endif
9518   ;
9519   return 0;
9520 }
9521 _ACEOF
9522 rm -f conftest.$ac_objext
9523 if { (eval echo "$as_me:9523: \"$ac_compile\"") >&5
9524   (eval $ac_compile) 2>&5
9525   ac_status=$?
9526   echo "$as_me:9526: \$? = $ac_status" >&5
9527   (exit $ac_status); } &&
9528          { ac_try='test -s conftest.$ac_objext'
9529   { (eval echo "$as_me:9529: \"$ac_try\"") >&5
9530   (eval $ac_try) 2>&5
9531   ac_status=$?
9532   echo "$as_me:9532: \$? = $ac_status" >&5
9533   (exit $ac_status); }; }; then
9534   cf_cv_gnu_library_219=yes
9535 else
9536   echo "$as_me: failed program was:" >&5
9537 cat conftest.$ac_ext >&5
9538 cf_cv_gnu_library_219=no
9539 fi
9540 rm -f conftest.$ac_objext conftest.$ac_ext
9541                 CPPFLAGS="$cf_save"
9542
9543 fi
9544 echo "$as_me:9544: result: $cf_cv_gnu_library_219" >&5
9545 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9546
9547         if test "x$cf_cv_gnu_library_219" = xyes; then
9548                 cf_save="$CPPFLAGS"
9549                 echo "$as_me:9549: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9550 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9551 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9552   echo $ECHO_N "(cached) $ECHO_C" >&6
9553 else
9554
9555 cf_fix_cppflags=no
9556 cf_new_cflags=
9557 cf_new_cppflags=
9558 cf_new_extra_cppflags=
9559
9560 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9561 do
9562 case $cf_fix_cppflags in
9563 (no)
9564         case $cf_add_cflags in
9565         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9566                 case $cf_add_cflags in
9567                 (-D*)
9568                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9569
9570                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9571                                 && test -z "${cf_tst_cflags}" \
9572                                 && cf_fix_cppflags=yes
9573
9574                         if test $cf_fix_cppflags = yes ; then
9575
9576         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9577         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9578
9579                                 continue
9580                         elif test "${cf_tst_cflags}" = "\"'" ; then
9581
9582         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9583         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9584
9585                                 continue
9586                         fi
9587                         ;;
9588                 esac
9589                 case "$CPPFLAGS" in
9590                 (*$cf_add_cflags)
9591                         ;;
9592                 (*)
9593                         case $cf_add_cflags in
9594                         (-D*)
9595                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9596
9597 CPPFLAGS=`echo "$CPPFLAGS" | \
9598         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9599                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9600
9601                                 ;;
9602                         esac
9603
9604         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9605         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9606
9607                         ;;
9608                 esac
9609                 ;;
9610         (*)
9611
9612         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9613         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9614
9615                 ;;
9616         esac
9617         ;;
9618 (yes)
9619
9620         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9621         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9622
9623         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9624
9625         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9626                 && test -z "${cf_tst_cflags}" \
9627                 && cf_fix_cppflags=no
9628         ;;
9629 esac
9630 done
9631
9632 if test -n "$cf_new_cflags" ; then
9633
9634         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9635         CFLAGS="${CFLAGS}$cf_new_cflags"
9636
9637 fi
9638
9639 if test -n "$cf_new_cppflags" ; then
9640
9641         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9642         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9643
9644 fi
9645
9646 if test -n "$cf_new_extra_cppflags" ; then
9647
9648         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9649         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9650
9651 fi
9652
9653                         cat >conftest.$ac_ext <<_ACEOF
9654 #line 9654 "configure"
9655 #include "confdefs.h"
9656
9657                                 #include <limits.h>
9658                                 #include <sys/types.h>
9659
9660 int
9661 main (void)
9662 {
9663
9664                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9665                                         return 0;
9666                                 #else
9667                                 #       error GNU C library is too old
9668                                 #endif
9669   ;
9670   return 0;
9671 }
9672 _ACEOF
9673 rm -f conftest.$ac_objext
9674 if { (eval echo "$as_me:9674: \"$ac_compile\"") >&5
9675   (eval $ac_compile) 2>&5
9676   ac_status=$?
9677   echo "$as_me:9677: \$? = $ac_status" >&5
9678   (exit $ac_status); } &&
9679          { ac_try='test -s conftest.$ac_objext'
9680   { (eval echo "$as_me:9680: \"$ac_try\"") >&5
9681   (eval $ac_try) 2>&5
9682   ac_status=$?
9683   echo "$as_me:9683: \$? = $ac_status" >&5
9684   (exit $ac_status); }; }; then
9685   cf_cv_gnu_dftsrc_219=yes
9686 else
9687   echo "$as_me: failed program was:" >&5
9688 cat conftest.$ac_ext >&5
9689 cf_cv_gnu_dftsrc_219=no
9690 fi
9691 rm -f conftest.$ac_objext conftest.$ac_ext
9692
9693 fi
9694 echo "$as_me:9694: result: $cf_cv_gnu_dftsrc_219" >&5
9695 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9696                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9697         else
9698                 cf_cv_gnu_dftsrc_219=maybe
9699         fi
9700
9701         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9702
9703                 echo "$as_me:9703: checking if we must define _GNU_SOURCE" >&5
9704 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9705 if test "${cf_cv_gnu_source+set}" = set; then
9706   echo $ECHO_N "(cached) $ECHO_C" >&6
9707 else
9708
9709                 cat >conftest.$ac_ext <<_ACEOF
9710 #line 9710 "configure"
9711 #include "confdefs.h"
9712 #include <sys/types.h>
9713 int
9714 main (void)
9715 {
9716
9717                         #ifndef _XOPEN_SOURCE
9718                         #error  expected _XOPEN_SOURCE to be defined
9719                         #endif
9720   ;
9721   return 0;
9722 }
9723 _ACEOF
9724 rm -f conftest.$ac_objext
9725 if { (eval echo "$as_me:9725: \"$ac_compile\"") >&5
9726   (eval $ac_compile) 2>&5
9727   ac_status=$?
9728   echo "$as_me:9728: \$? = $ac_status" >&5
9729   (exit $ac_status); } &&
9730          { ac_try='test -s conftest.$ac_objext'
9731   { (eval echo "$as_me:9731: \"$ac_try\"") >&5
9732   (eval $ac_try) 2>&5
9733   ac_status=$?
9734   echo "$as_me:9734: \$? = $ac_status" >&5
9735   (exit $ac_status); }; }; then
9736   cf_cv_gnu_source=no
9737 else
9738   echo "$as_me: failed program was:" >&5
9739 cat conftest.$ac_ext >&5
9740 cf_save="$CPPFLAGS"
9741
9742 cf_fix_cppflags=no
9743 cf_new_cflags=
9744 cf_new_cppflags=
9745 cf_new_extra_cppflags=
9746
9747 for cf_add_cflags in -D_GNU_SOURCE
9748 do
9749 case $cf_fix_cppflags in
9750 (no)
9751         case $cf_add_cflags in
9752         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9753                 case $cf_add_cflags in
9754                 (-D*)
9755                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9756
9757                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9758                                 && test -z "${cf_tst_cflags}" \
9759                                 && cf_fix_cppflags=yes
9760
9761                         if test $cf_fix_cppflags = yes ; then
9762
9763         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9764         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9765
9766                                 continue
9767                         elif test "${cf_tst_cflags}" = "\"'" ; then
9768
9769         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9770         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9771
9772                                 continue
9773                         fi
9774                         ;;
9775                 esac
9776                 case "$CPPFLAGS" in
9777                 (*$cf_add_cflags)
9778                         ;;
9779                 (*)
9780                         case $cf_add_cflags in
9781                         (-D*)
9782                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9783
9784 CPPFLAGS=`echo "$CPPFLAGS" | \
9785         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9786                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9787
9788                                 ;;
9789                         esac
9790
9791         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9792         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9793
9794                         ;;
9795                 esac
9796                 ;;
9797         (*)
9798
9799         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9800         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9801
9802                 ;;
9803         esac
9804         ;;
9805 (yes)
9806
9807         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9808         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9809
9810         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9811
9812         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9813                 && test -z "${cf_tst_cflags}" \
9814                 && cf_fix_cppflags=no
9815         ;;
9816 esac
9817 done
9818
9819 if test -n "$cf_new_cflags" ; then
9820
9821         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9822         CFLAGS="${CFLAGS}$cf_new_cflags"
9823
9824 fi
9825
9826 if test -n "$cf_new_cppflags" ; then
9827
9828         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9829         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9830
9831 fi
9832
9833 if test -n "$cf_new_extra_cppflags" ; then
9834
9835         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9836         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9837
9838 fi
9839
9840                          cat >conftest.$ac_ext <<_ACEOF
9841 #line 9841 "configure"
9842 #include "confdefs.h"
9843 #include <sys/types.h>
9844 int
9845 main (void)
9846 {
9847
9848                                 #ifdef _XOPEN_SOURCE
9849                                 #error  expected _XOPEN_SOURCE to be undefined
9850                                 #endif
9851   ;
9852   return 0;
9853 }
9854 _ACEOF
9855 rm -f conftest.$ac_objext
9856 if { (eval echo "$as_me:9856: \"$ac_compile\"") >&5
9857   (eval $ac_compile) 2>&5
9858   ac_status=$?
9859   echo "$as_me:9859: \$? = $ac_status" >&5
9860   (exit $ac_status); } &&
9861          { ac_try='test -s conftest.$ac_objext'
9862   { (eval echo "$as_me:9862: \"$ac_try\"") >&5
9863   (eval $ac_try) 2>&5
9864   ac_status=$?
9865   echo "$as_me:9865: \$? = $ac_status" >&5
9866   (exit $ac_status); }; }; then
9867   cf_cv_gnu_source=no
9868 else
9869   echo "$as_me: failed program was:" >&5
9870 cat conftest.$ac_ext >&5
9871 cf_cv_gnu_source=yes
9872 fi
9873 rm -f conftest.$ac_objext conftest.$ac_ext
9874                         CPPFLAGS="$cf_save"
9875
9876 fi
9877 rm -f conftest.$ac_objext conftest.$ac_ext
9878
9879 fi
9880 echo "$as_me:9880: result: $cf_cv_gnu_source" >&5
9881 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9882
9883                 if test "$cf_cv_gnu_source" = yes
9884                 then
9885                 echo "$as_me:9885: checking if we should also define _DEFAULT_SOURCE" >&5
9886 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9887 if test "${cf_cv_default_source+set}" = set; then
9888   echo $ECHO_N "(cached) $ECHO_C" >&6
9889 else
9890
9891         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9892         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9893
9894                         cat >conftest.$ac_ext <<_ACEOF
9895 #line 9895 "configure"
9896 #include "confdefs.h"
9897 #include <sys/types.h>
9898 int
9899 main (void)
9900 {
9901
9902                                 #ifdef _DEFAULT_SOURCE
9903                                 #error  expected _DEFAULT_SOURCE to be undefined
9904                                 #endif
9905   ;
9906   return 0;
9907 }
9908 _ACEOF
9909 rm -f conftest.$ac_objext
9910 if { (eval echo "$as_me:9910: \"$ac_compile\"") >&5
9911   (eval $ac_compile) 2>&5
9912   ac_status=$?
9913   echo "$as_me:9913: \$? = $ac_status" >&5
9914   (exit $ac_status); } &&
9915          { ac_try='test -s conftest.$ac_objext'
9916   { (eval echo "$as_me:9916: \"$ac_try\"") >&5
9917   (eval $ac_try) 2>&5
9918   ac_status=$?
9919   echo "$as_me:9919: \$? = $ac_status" >&5
9920   (exit $ac_status); }; }; then
9921   cf_cv_default_source=no
9922 else
9923   echo "$as_me: failed program was:" >&5
9924 cat conftest.$ac_ext >&5
9925 cf_cv_default_source=yes
9926 fi
9927 rm -f conftest.$ac_objext conftest.$ac_ext
9928
9929 fi
9930 echo "$as_me:9930: result: $cf_cv_default_source" >&5
9931 echo "${ECHO_T}$cf_cv_default_source" >&6
9932                         if test "$cf_cv_default_source" = yes
9933                         then
9934
9935         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9936         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9937
9938                         fi
9939                 fi
9940         fi
9941
9942 fi
9943
9944         ;;
9945 (minix*)
9946         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9947         ;;
9948 (mirbsd*)
9949         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9950         cf_XOPEN_SOURCE=
9951
9952 if test "$cf_cv_posix_visible" = no; then
9953
9954 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9955
9956 cf_save_CFLAGS="$CFLAGS"
9957 cf_save_CPPFLAGS="$CPPFLAGS"
9958
9959 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9960         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9961                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9962
9963 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9964         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9965                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9966
9967 echo "$as_me:9967: checking if we should define _POSIX_C_SOURCE" >&5
9968 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9969 if test "${cf_cv_posix_c_source+set}" = set; then
9970   echo $ECHO_N "(cached) $ECHO_C" >&6
9971 else
9972
9973 echo "${as_me:-configure}:9973: testing if the symbol is already defined go no further ..." 1>&5
9974
9975         cat >conftest.$ac_ext <<_ACEOF
9976 #line 9976 "configure"
9977 #include "confdefs.h"
9978 #include <sys/types.h>
9979 int
9980 main (void)
9981 {
9982
9983 #ifndef _POSIX_C_SOURCE
9984 make an error
9985 #endif
9986   ;
9987   return 0;
9988 }
9989 _ACEOF
9990 rm -f conftest.$ac_objext
9991 if { (eval echo "$as_me:9991: \"$ac_compile\"") >&5
9992   (eval $ac_compile) 2>&5
9993   ac_status=$?
9994   echo "$as_me:9994: \$? = $ac_status" >&5
9995   (exit $ac_status); } &&
9996          { ac_try='test -s conftest.$ac_objext'
9997   { (eval echo "$as_me:9997: \"$ac_try\"") >&5
9998   (eval $ac_try) 2>&5
9999   ac_status=$?
10000   echo "$as_me:10000: \$? = $ac_status" >&5
10001   (exit $ac_status); }; }; then
10002   cf_cv_posix_c_source=no
10003 else
10004   echo "$as_me: failed program was:" >&5
10005 cat conftest.$ac_ext >&5
10006 cf_want_posix_source=no
10007          case .$cf_POSIX_C_SOURCE in
10008          (.[12]??*)
10009                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10010                 ;;
10011          (.2)
10012                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10013                 cf_want_posix_source=yes
10014                 ;;
10015          (.*)
10016                 cf_want_posix_source=yes
10017                 ;;
10018          esac
10019          if test "$cf_want_posix_source" = yes ; then
10020                 cat >conftest.$ac_ext <<_ACEOF
10021 #line 10021 "configure"
10022 #include "confdefs.h"
10023 #include <sys/types.h>
10024 int
10025 main (void)
10026 {
10027
10028 #ifdef _POSIX_SOURCE
10029 make an error
10030 #endif
10031   ;
10032   return 0;
10033 }
10034 _ACEOF
10035 rm -f conftest.$ac_objext
10036 if { (eval echo "$as_me:10036: \"$ac_compile\"") >&5
10037   (eval $ac_compile) 2>&5
10038   ac_status=$?
10039   echo "$as_me:10039: \$? = $ac_status" >&5
10040   (exit $ac_status); } &&
10041          { ac_try='test -s conftest.$ac_objext'
10042   { (eval echo "$as_me:10042: \"$ac_try\"") >&5
10043   (eval $ac_try) 2>&5
10044   ac_status=$?
10045   echo "$as_me:10045: \$? = $ac_status" >&5
10046   (exit $ac_status); }; }; then
10047   :
10048 else
10049   echo "$as_me: failed program was:" >&5
10050 cat conftest.$ac_ext >&5
10051 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10052 fi
10053 rm -f conftest.$ac_objext conftest.$ac_ext
10054          fi
10055
10056 echo "${as_me:-configure}:10056: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10057
10058          CFLAGS="$cf_trim_CFLAGS"
10059          CPPFLAGS="$cf_trim_CPPFLAGS"
10060
10061         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10062         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10063
10064 echo "${as_me:-configure}:10064: testing if the second compile does not leave our definition intact error ..." 1>&5
10065
10066          cat >conftest.$ac_ext <<_ACEOF
10067 #line 10067 "configure"
10068 #include "confdefs.h"
10069 #include <sys/types.h>
10070 int
10071 main (void)
10072 {
10073
10074 #ifndef _POSIX_C_SOURCE
10075 make an error
10076 #endif
10077   ;
10078   return 0;
10079 }
10080 _ACEOF
10081 rm -f conftest.$ac_objext
10082 if { (eval echo "$as_me:10082: \"$ac_compile\"") >&5
10083   (eval $ac_compile) 2>&5
10084   ac_status=$?
10085   echo "$as_me:10085: \$? = $ac_status" >&5
10086   (exit $ac_status); } &&
10087          { ac_try='test -s conftest.$ac_objext'
10088   { (eval echo "$as_me:10088: \"$ac_try\"") >&5
10089   (eval $ac_try) 2>&5
10090   ac_status=$?
10091   echo "$as_me:10091: \$? = $ac_status" >&5
10092   (exit $ac_status); }; }; then
10093   :
10094 else
10095   echo "$as_me: failed program was:" >&5
10096 cat conftest.$ac_ext >&5
10097 cf_cv_posix_c_source=no
10098 fi
10099 rm -f conftest.$ac_objext conftest.$ac_ext
10100          CFLAGS="$cf_save_CFLAGS"
10101          CPPFLAGS="$cf_save_CPPFLAGS"
10102
10103 fi
10104 rm -f conftest.$ac_objext conftest.$ac_ext
10105
10106 fi
10107 echo "$as_me:10107: result: $cf_cv_posix_c_source" >&5
10108 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10109
10110 if test "$cf_cv_posix_c_source" != no ; then
10111         CFLAGS="$cf_trim_CFLAGS"
10112         CPPFLAGS="$cf_trim_CPPFLAGS"
10113
10114 cf_fix_cppflags=no
10115 cf_new_cflags=
10116 cf_new_cppflags=
10117 cf_new_extra_cppflags=
10118
10119 for cf_add_cflags in $cf_cv_posix_c_source
10120 do
10121 case $cf_fix_cppflags in
10122 (no)
10123         case $cf_add_cflags in
10124         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10125                 case $cf_add_cflags in
10126                 (-D*)
10127                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10128
10129                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10130                                 && test -z "${cf_tst_cflags}" \
10131                                 && cf_fix_cppflags=yes
10132
10133                         if test $cf_fix_cppflags = yes ; then
10134
10135         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10136         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10137
10138                                 continue
10139                         elif test "${cf_tst_cflags}" = "\"'" ; then
10140
10141         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10142         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10143
10144                                 continue
10145                         fi
10146                         ;;
10147                 esac
10148                 case "$CPPFLAGS" in
10149                 (*$cf_add_cflags)
10150                         ;;
10151                 (*)
10152                         case $cf_add_cflags in
10153                         (-D*)
10154                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10155
10156 CPPFLAGS=`echo "$CPPFLAGS" | \
10157         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10158                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10159
10160                                 ;;
10161                         esac
10162
10163         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10164         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10165
10166                         ;;
10167                 esac
10168                 ;;
10169         (*)
10170
10171         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10172         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10173
10174                 ;;
10175         esac
10176         ;;
10177 (yes)
10178
10179         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10180         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10181
10182         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10183
10184         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10185                 && test -z "${cf_tst_cflags}" \
10186                 && cf_fix_cppflags=no
10187         ;;
10188 esac
10189 done
10190
10191 if test -n "$cf_new_cflags" ; then
10192
10193         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10194         CFLAGS="${CFLAGS}$cf_new_cflags"
10195
10196 fi
10197
10198 if test -n "$cf_new_cppflags" ; then
10199
10200         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10201         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10202
10203 fi
10204
10205 if test -n "$cf_new_extra_cppflags" ; then
10206
10207         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10208         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10209
10210 fi
10211
10212 fi
10213
10214 fi # cf_cv_posix_visible
10215
10216         ;;
10217 (netbsd*)
10218         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10219         ;;
10220 (openbsd[4-9]*)
10221         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10222         cf_xopen_source="-D_BSD_SOURCE"
10223         cf_XOPEN_SOURCE=600
10224         ;;
10225 (openbsd*)
10226         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10227         ;;
10228 (osf[45]*)
10229         cf_xopen_source="-D_OSF_SOURCE"
10230         ;;
10231 (nto-qnx*)
10232         cf_xopen_source="-D_QNX_SOURCE"
10233         ;;
10234 (sco*)
10235         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10236         ;;
10237 (solaris2.*)
10238         cf_xopen_source="-D__EXTENSIONS__"
10239         cf_cv_xopen_source=broken
10240         ;;
10241 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10242         cf_XOPEN_SOURCE=
10243         cf_POSIX_C_SOURCE=
10244         ;;
10245 (*)
10246
10247 echo "$as_me:10247: checking if we should define _XOPEN_SOURCE" >&5
10248 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10249 if test "${cf_cv_xopen_source+set}" = set; then
10250   echo $ECHO_N "(cached) $ECHO_C" >&6
10251 else
10252
10253         cat >conftest.$ac_ext <<_ACEOF
10254 #line 10254 "configure"
10255 #include "confdefs.h"
10256
10257 #include <stdlib.h>
10258 #include <string.h>
10259 #include <sys/types.h>
10260
10261 int
10262 main (void)
10263 {
10264
10265 #ifndef _XOPEN_SOURCE
10266 make an error
10267 #endif
10268   ;
10269   return 0;
10270 }
10271 _ACEOF
10272 rm -f conftest.$ac_objext
10273 if { (eval echo "$as_me:10273: \"$ac_compile\"") >&5
10274   (eval $ac_compile) 2>&5
10275   ac_status=$?
10276   echo "$as_me:10276: \$? = $ac_status" >&5
10277   (exit $ac_status); } &&
10278          { ac_try='test -s conftest.$ac_objext'
10279   { (eval echo "$as_me:10279: \"$ac_try\"") >&5
10280   (eval $ac_try) 2>&5
10281   ac_status=$?
10282   echo "$as_me:10282: \$? = $ac_status" >&5
10283   (exit $ac_status); }; }; then
10284   cf_cv_xopen_source=no
10285 else
10286   echo "$as_me: failed program was:" >&5
10287 cat conftest.$ac_ext >&5
10288 cf_save="$CPPFLAGS"
10289
10290         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10291         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10292
10293          cat >conftest.$ac_ext <<_ACEOF
10294 #line 10294 "configure"
10295 #include "confdefs.h"
10296
10297 #include <stdlib.h>
10298 #include <string.h>
10299 #include <sys/types.h>
10300
10301 int
10302 main (void)
10303 {
10304
10305 #ifdef _XOPEN_SOURCE
10306 make an error
10307 #endif
10308   ;
10309   return 0;
10310 }
10311 _ACEOF
10312 rm -f conftest.$ac_objext
10313 if { (eval echo "$as_me:10313: \"$ac_compile\"") >&5
10314   (eval $ac_compile) 2>&5
10315   ac_status=$?
10316   echo "$as_me:10316: \$? = $ac_status" >&5
10317   (exit $ac_status); } &&
10318          { ac_try='test -s conftest.$ac_objext'
10319   { (eval echo "$as_me:10319: \"$ac_try\"") >&5
10320   (eval $ac_try) 2>&5
10321   ac_status=$?
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit $ac_status); }; }; then
10324   cf_cv_xopen_source=no
10325 else
10326   echo "$as_me: failed program was:" >&5
10327 cat conftest.$ac_ext >&5
10328 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10329 fi
10330 rm -f conftest.$ac_objext conftest.$ac_ext
10331         CPPFLAGS="$cf_save"
10332
10333 fi
10334 rm -f conftest.$ac_objext conftest.$ac_ext
10335
10336 fi
10337 echo "$as_me:10337: result: $cf_cv_xopen_source" >&5
10338 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10339
10340 if test "$cf_cv_xopen_source" != no ; then
10341
10342 CFLAGS=`echo "$CFLAGS" | \
10343         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10344                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10345
10346 CPPFLAGS=`echo "$CPPFLAGS" | \
10347         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10348                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10349
10350         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10351
10352 cf_fix_cppflags=no
10353 cf_new_cflags=
10354 cf_new_cppflags=
10355 cf_new_extra_cppflags=
10356
10357 for cf_add_cflags in $cf_temp_xopen_source
10358 do
10359 case $cf_fix_cppflags in
10360 (no)
10361         case $cf_add_cflags in
10362         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10363                 case $cf_add_cflags in
10364                 (-D*)
10365                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10366
10367                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10368                                 && test -z "${cf_tst_cflags}" \
10369                                 && cf_fix_cppflags=yes
10370
10371                         if test $cf_fix_cppflags = yes ; then
10372
10373         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10374         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10375
10376                                 continue
10377                         elif test "${cf_tst_cflags}" = "\"'" ; then
10378
10379         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10380         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10381
10382                                 continue
10383                         fi
10384                         ;;
10385                 esac
10386                 case "$CPPFLAGS" in
10387                 (*$cf_add_cflags)
10388                         ;;
10389                 (*)
10390                         case $cf_add_cflags in
10391                         (-D*)
10392                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10393
10394 CPPFLAGS=`echo "$CPPFLAGS" | \
10395         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10396                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10397
10398                                 ;;
10399                         esac
10400
10401         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10402         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10403
10404                         ;;
10405                 esac
10406                 ;;
10407         (*)
10408
10409         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10410         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10411
10412                 ;;
10413         esac
10414         ;;
10415 (yes)
10416
10417         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10418         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10419
10420         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10421
10422         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10423                 && test -z "${cf_tst_cflags}" \
10424                 && cf_fix_cppflags=no
10425         ;;
10426 esac
10427 done
10428
10429 if test -n "$cf_new_cflags" ; then
10430
10431         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10432         CFLAGS="${CFLAGS}$cf_new_cflags"
10433
10434 fi
10435
10436 if test -n "$cf_new_cppflags" ; then
10437
10438         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10439         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10440
10441 fi
10442
10443 if test -n "$cf_new_extra_cppflags" ; then
10444
10445         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10446         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10447
10448 fi
10449
10450 fi
10451
10452 if test "$cf_cv_posix_visible" = no; then
10453
10454 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10455
10456 cf_save_CFLAGS="$CFLAGS"
10457 cf_save_CPPFLAGS="$CPPFLAGS"
10458
10459 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10460         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10461                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10462
10463 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10464         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10465                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10466
10467 echo "$as_me:10467: checking if we should define _POSIX_C_SOURCE" >&5
10468 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10469 if test "${cf_cv_posix_c_source+set}" = set; then
10470   echo $ECHO_N "(cached) $ECHO_C" >&6
10471 else
10472
10473 echo "${as_me:-configure}:10473: testing if the symbol is already defined go no further ..." 1>&5
10474
10475         cat >conftest.$ac_ext <<_ACEOF
10476 #line 10476 "configure"
10477 #include "confdefs.h"
10478 #include <sys/types.h>
10479 int
10480 main (void)
10481 {
10482
10483 #ifndef _POSIX_C_SOURCE
10484 make an error
10485 #endif
10486   ;
10487   return 0;
10488 }
10489 _ACEOF
10490 rm -f conftest.$ac_objext
10491 if { (eval echo "$as_me:10491: \"$ac_compile\"") >&5
10492   (eval $ac_compile) 2>&5
10493   ac_status=$?
10494   echo "$as_me:10494: \$? = $ac_status" >&5
10495   (exit $ac_status); } &&
10496          { ac_try='test -s conftest.$ac_objext'
10497   { (eval echo "$as_me:10497: \"$ac_try\"") >&5
10498   (eval $ac_try) 2>&5
10499   ac_status=$?
10500   echo "$as_me:10500: \$? = $ac_status" >&5
10501   (exit $ac_status); }; }; then
10502   cf_cv_posix_c_source=no
10503 else
10504   echo "$as_me: failed program was:" >&5
10505 cat conftest.$ac_ext >&5
10506 cf_want_posix_source=no
10507          case .$cf_POSIX_C_SOURCE in
10508          (.[12]??*)
10509                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10510                 ;;
10511          (.2)
10512                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10513                 cf_want_posix_source=yes
10514                 ;;
10515          (.*)
10516                 cf_want_posix_source=yes
10517                 ;;
10518          esac
10519          if test "$cf_want_posix_source" = yes ; then
10520                 cat >conftest.$ac_ext <<_ACEOF
10521 #line 10521 "configure"
10522 #include "confdefs.h"
10523 #include <sys/types.h>
10524 int
10525 main (void)
10526 {
10527
10528 #ifdef _POSIX_SOURCE
10529 make an error
10530 #endif
10531   ;
10532   return 0;
10533 }
10534 _ACEOF
10535 rm -f conftest.$ac_objext
10536 if { (eval echo "$as_me:10536: \"$ac_compile\"") >&5
10537   (eval $ac_compile) 2>&5
10538   ac_status=$?
10539   echo "$as_me:10539: \$? = $ac_status" >&5
10540   (exit $ac_status); } &&
10541          { ac_try='test -s conftest.$ac_objext'
10542   { (eval echo "$as_me:10542: \"$ac_try\"") >&5
10543   (eval $ac_try) 2>&5
10544   ac_status=$?
10545   echo "$as_me:10545: \$? = $ac_status" >&5
10546   (exit $ac_status); }; }; then
10547   :
10548 else
10549   echo "$as_me: failed program was:" >&5
10550 cat conftest.$ac_ext >&5
10551 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10552 fi
10553 rm -f conftest.$ac_objext conftest.$ac_ext
10554          fi
10555
10556 echo "${as_me:-configure}:10556: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10557
10558          CFLAGS="$cf_trim_CFLAGS"
10559          CPPFLAGS="$cf_trim_CPPFLAGS"
10560
10561         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10562         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10563
10564 echo "${as_me:-configure}:10564: testing if the second compile does not leave our definition intact error ..." 1>&5
10565
10566          cat >conftest.$ac_ext <<_ACEOF
10567 #line 10567 "configure"
10568 #include "confdefs.h"
10569 #include <sys/types.h>
10570 int
10571 main (void)
10572 {
10573
10574 #ifndef _POSIX_C_SOURCE
10575 make an error
10576 #endif
10577   ;
10578   return 0;
10579 }
10580 _ACEOF
10581 rm -f conftest.$ac_objext
10582 if { (eval echo "$as_me:10582: \"$ac_compile\"") >&5
10583   (eval $ac_compile) 2>&5
10584   ac_status=$?
10585   echo "$as_me:10585: \$? = $ac_status" >&5
10586   (exit $ac_status); } &&
10587          { ac_try='test -s conftest.$ac_objext'
10588   { (eval echo "$as_me:10588: \"$ac_try\"") >&5
10589   (eval $ac_try) 2>&5
10590   ac_status=$?
10591   echo "$as_me:10591: \$? = $ac_status" >&5
10592   (exit $ac_status); }; }; then
10593   :
10594 else
10595   echo "$as_me: failed program was:" >&5
10596 cat conftest.$ac_ext >&5
10597 cf_cv_posix_c_source=no
10598 fi
10599 rm -f conftest.$ac_objext conftest.$ac_ext
10600          CFLAGS="$cf_save_CFLAGS"
10601          CPPFLAGS="$cf_save_CPPFLAGS"
10602
10603 fi
10604 rm -f conftest.$ac_objext conftest.$ac_ext
10605
10606 fi
10607 echo "$as_me:10607: result: $cf_cv_posix_c_source" >&5
10608 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10609
10610 if test "$cf_cv_posix_c_source" != no ; then
10611         CFLAGS="$cf_trim_CFLAGS"
10612         CPPFLAGS="$cf_trim_CPPFLAGS"
10613
10614 cf_fix_cppflags=no
10615 cf_new_cflags=
10616 cf_new_cppflags=
10617 cf_new_extra_cppflags=
10618
10619 for cf_add_cflags in $cf_cv_posix_c_source
10620 do
10621 case $cf_fix_cppflags in
10622 (no)
10623         case $cf_add_cflags in
10624         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10625                 case $cf_add_cflags in
10626                 (-D*)
10627                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10628
10629                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10630                                 && test -z "${cf_tst_cflags}" \
10631                                 && cf_fix_cppflags=yes
10632
10633                         if test $cf_fix_cppflags = yes ; then
10634
10635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10637
10638                                 continue
10639                         elif test "${cf_tst_cflags}" = "\"'" ; then
10640
10641         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10642         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10643
10644                                 continue
10645                         fi
10646                         ;;
10647                 esac
10648                 case "$CPPFLAGS" in
10649                 (*$cf_add_cflags)
10650                         ;;
10651                 (*)
10652                         case $cf_add_cflags in
10653                         (-D*)
10654                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10655
10656 CPPFLAGS=`echo "$CPPFLAGS" | \
10657         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10658                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10659
10660                                 ;;
10661                         esac
10662
10663         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10664         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10665
10666                         ;;
10667                 esac
10668                 ;;
10669         (*)
10670
10671         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10672         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10673
10674                 ;;
10675         esac
10676         ;;
10677 (yes)
10678
10679         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10680         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10681
10682         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10683
10684         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10685                 && test -z "${cf_tst_cflags}" \
10686                 && cf_fix_cppflags=no
10687         ;;
10688 esac
10689 done
10690
10691 if test -n "$cf_new_cflags" ; then
10692
10693         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10694         CFLAGS="${CFLAGS}$cf_new_cflags"
10695
10696 fi
10697
10698 if test -n "$cf_new_cppflags" ; then
10699
10700         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10701         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10702
10703 fi
10704
10705 if test -n "$cf_new_extra_cppflags" ; then
10706
10707         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10708         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10709
10710 fi
10711
10712 fi
10713
10714 fi # cf_cv_posix_visible
10715
10716         ;;
10717 esac
10718
10719 if test -n "$cf_xopen_source" ; then
10720
10721 cf_fix_cppflags=no
10722 cf_new_cflags=
10723 cf_new_cppflags=
10724 cf_new_extra_cppflags=
10725
10726 for cf_add_cflags in $cf_xopen_source
10727 do
10728 case $cf_fix_cppflags in
10729 (no)
10730         case $cf_add_cflags in
10731         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10732                 case $cf_add_cflags in
10733                 (-D*)
10734                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10735
10736                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10737                                 && test -z "${cf_tst_cflags}" \
10738                                 && cf_fix_cppflags=yes
10739
10740                         if test $cf_fix_cppflags = yes ; then
10741
10742         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10743         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10744
10745                                 continue
10746                         elif test "${cf_tst_cflags}" = "\"'" ; then
10747
10748         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10749         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10750
10751                                 continue
10752                         fi
10753                         ;;
10754                 esac
10755                 case "$CPPFLAGS" in
10756                 (*$cf_add_cflags)
10757                         ;;
10758                 (*)
10759                         case $cf_add_cflags in
10760                         (-D*)
10761                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10762
10763 CPPFLAGS=`echo "$CPPFLAGS" | \
10764         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10765                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10766
10767                                 ;;
10768                         esac
10769
10770         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10771         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10772
10773                         ;;
10774                 esac
10775                 ;;
10776         (*)
10777
10778         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10779         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10780
10781                 ;;
10782         esac
10783         ;;
10784 (yes)
10785
10786         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10787         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10788
10789         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10790
10791         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10792                 && test -z "${cf_tst_cflags}" \
10793                 && cf_fix_cppflags=no
10794         ;;
10795 esac
10796 done
10797
10798 if test -n "$cf_new_cflags" ; then
10799         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10800
10801 echo "${as_me:-configure}:10801: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10802
10803         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10804         CFLAGS="${CFLAGS}$cf_new_cflags"
10805
10806 fi
10807
10808 if test -n "$cf_new_cppflags" ; then
10809         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10810
10811 echo "${as_me:-configure}:10811: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10812
10813         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10814         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10815
10816 fi
10817
10818 if test -n "$cf_new_extra_cppflags" ; then
10819         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10820
10821 echo "${as_me:-configure}:10821: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10822
10823         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10824         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10825
10826 fi
10827
10828 fi
10829
10830 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10831         echo "$as_me:10831: checking if _XOPEN_SOURCE really is set" >&5
10832 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10833         cat >conftest.$ac_ext <<_ACEOF
10834 #line 10834 "configure"
10835 #include "confdefs.h"
10836 #include <stdlib.h>
10837 int
10838 main (void)
10839 {
10840
10841 #ifndef _XOPEN_SOURCE
10842 make an error
10843 #endif
10844   ;
10845   return 0;
10846 }
10847 _ACEOF
10848 rm -f conftest.$ac_objext
10849 if { (eval echo "$as_me:10849: \"$ac_compile\"") >&5
10850   (eval $ac_compile) 2>&5
10851   ac_status=$?
10852   echo "$as_me:10852: \$? = $ac_status" >&5
10853   (exit $ac_status); } &&
10854          { ac_try='test -s conftest.$ac_objext'
10855   { (eval echo "$as_me:10855: \"$ac_try\"") >&5
10856   (eval $ac_try) 2>&5
10857   ac_status=$?
10858   echo "$as_me:10858: \$? = $ac_status" >&5
10859   (exit $ac_status); }; }; then
10860   cf_XOPEN_SOURCE_set=yes
10861 else
10862   echo "$as_me: failed program was:" >&5
10863 cat conftest.$ac_ext >&5
10864 cf_XOPEN_SOURCE_set=no
10865 fi
10866 rm -f conftest.$ac_objext conftest.$ac_ext
10867         echo "$as_me:10867: result: $cf_XOPEN_SOURCE_set" >&5
10868 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10869         if test $cf_XOPEN_SOURCE_set = yes
10870         then
10871                 cat >conftest.$ac_ext <<_ACEOF
10872 #line 10872 "configure"
10873 #include "confdefs.h"
10874 #include <stdlib.h>
10875 int
10876 main (void)
10877 {
10878
10879 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10880 make an error
10881 #endif
10882   ;
10883   return 0;
10884 }
10885 _ACEOF
10886 rm -f conftest.$ac_objext
10887 if { (eval echo "$as_me:10887: \"$ac_compile\"") >&5
10888   (eval $ac_compile) 2>&5
10889   ac_status=$?
10890   echo "$as_me:10890: \$? = $ac_status" >&5
10891   (exit $ac_status); } &&
10892          { ac_try='test -s conftest.$ac_objext'
10893   { (eval echo "$as_me:10893: \"$ac_try\"") >&5
10894   (eval $ac_try) 2>&5
10895   ac_status=$?
10896   echo "$as_me:10896: \$? = $ac_status" >&5
10897   (exit $ac_status); }; }; then
10898   cf_XOPEN_SOURCE_set_ok=yes
10899 else
10900   echo "$as_me: failed program was:" >&5
10901 cat conftest.$ac_ext >&5
10902 cf_XOPEN_SOURCE_set_ok=no
10903 fi
10904 rm -f conftest.$ac_objext conftest.$ac_ext
10905                 if test $cf_XOPEN_SOURCE_set_ok = no
10906                 then
10907                         { echo "$as_me:10907: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10908 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10909                 fi
10910         else
10911
10912 echo "$as_me:10912: checking if we should define _XOPEN_SOURCE" >&5
10913 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10914 if test "${cf_cv_xopen_source+set}" = set; then
10915   echo $ECHO_N "(cached) $ECHO_C" >&6
10916 else
10917
10918         cat >conftest.$ac_ext <<_ACEOF
10919 #line 10919 "configure"
10920 #include "confdefs.h"
10921
10922 #include <stdlib.h>
10923 #include <string.h>
10924 #include <sys/types.h>
10925
10926 int
10927 main (void)
10928 {
10929
10930 #ifndef _XOPEN_SOURCE
10931 make an error
10932 #endif
10933   ;
10934   return 0;
10935 }
10936 _ACEOF
10937 rm -f conftest.$ac_objext
10938 if { (eval echo "$as_me:10938: \"$ac_compile\"") >&5
10939   (eval $ac_compile) 2>&5
10940   ac_status=$?
10941   echo "$as_me:10941: \$? = $ac_status" >&5
10942   (exit $ac_status); } &&
10943          { ac_try='test -s conftest.$ac_objext'
10944   { (eval echo "$as_me:10944: \"$ac_try\"") >&5
10945   (eval $ac_try) 2>&5
10946   ac_status=$?
10947   echo "$as_me:10947: \$? = $ac_status" >&5
10948   (exit $ac_status); }; }; then
10949   cf_cv_xopen_source=no
10950 else
10951   echo "$as_me: failed program was:" >&5
10952 cat conftest.$ac_ext >&5
10953 cf_save="$CPPFLAGS"
10954
10955         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10956         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10957
10958          cat >conftest.$ac_ext <<_ACEOF
10959 #line 10959 "configure"
10960 #include "confdefs.h"
10961
10962 #include <stdlib.h>
10963 #include <string.h>
10964 #include <sys/types.h>
10965
10966 int
10967 main (void)
10968 {
10969
10970 #ifdef _XOPEN_SOURCE
10971 make an error
10972 #endif
10973   ;
10974   return 0;
10975 }
10976 _ACEOF
10977 rm -f conftest.$ac_objext
10978 if { (eval echo "$as_me:10978: \"$ac_compile\"") >&5
10979   (eval $ac_compile) 2>&5
10980   ac_status=$?
10981   echo "$as_me:10981: \$? = $ac_status" >&5
10982   (exit $ac_status); } &&
10983          { ac_try='test -s conftest.$ac_objext'
10984   { (eval echo "$as_me:10984: \"$ac_try\"") >&5
10985   (eval $ac_try) 2>&5
10986   ac_status=$?
10987   echo "$as_me:10987: \$? = $ac_status" >&5
10988   (exit $ac_status); }; }; then
10989   cf_cv_xopen_source=no
10990 else
10991   echo "$as_me: failed program was:" >&5
10992 cat conftest.$ac_ext >&5
10993 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10994 fi
10995 rm -f conftest.$ac_objext conftest.$ac_ext
10996         CPPFLAGS="$cf_save"
10997
10998 fi
10999 rm -f conftest.$ac_objext conftest.$ac_ext
11000
11001 fi
11002 echo "$as_me:11002: result: $cf_cv_xopen_source" >&5
11003 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11004
11005 if test "$cf_cv_xopen_source" != no ; then
11006
11007 CFLAGS=`echo "$CFLAGS" | \
11008         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11009                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11010
11011 CPPFLAGS=`echo "$CPPFLAGS" | \
11012         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11013                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11014
11015         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11016
11017 cf_fix_cppflags=no
11018 cf_new_cflags=
11019 cf_new_cppflags=
11020 cf_new_extra_cppflags=
11021
11022 for cf_add_cflags in $cf_temp_xopen_source
11023 do
11024 case $cf_fix_cppflags in
11025 (no)
11026         case $cf_add_cflags in
11027         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11028                 case $cf_add_cflags in
11029                 (-D*)
11030                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11031
11032                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11033                                 && test -z "${cf_tst_cflags}" \
11034                                 && cf_fix_cppflags=yes
11035
11036                         if test $cf_fix_cppflags = yes ; then
11037
11038         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11039         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11040
11041                                 continue
11042                         elif test "${cf_tst_cflags}" = "\"'" ; then
11043
11044         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11045         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11046
11047                                 continue
11048                         fi
11049                         ;;
11050                 esac
11051                 case "$CPPFLAGS" in
11052                 (*$cf_add_cflags)
11053                         ;;
11054                 (*)
11055                         case $cf_add_cflags in
11056                         (-D*)
11057                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11058
11059 CPPFLAGS=`echo "$CPPFLAGS" | \
11060         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11061                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11062
11063                                 ;;
11064                         esac
11065
11066         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11067         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11068
11069                         ;;
11070                 esac
11071                 ;;
11072         (*)
11073
11074         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11075         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11076
11077                 ;;
11078         esac
11079         ;;
11080 (yes)
11081
11082         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11083         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11084
11085         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11086
11087         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11088                 && test -z "${cf_tst_cflags}" \
11089                 && cf_fix_cppflags=no
11090         ;;
11091 esac
11092 done
11093
11094 if test -n "$cf_new_cflags" ; then
11095
11096         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11097         CFLAGS="${CFLAGS}$cf_new_cflags"
11098
11099 fi
11100
11101 if test -n "$cf_new_cppflags" ; then
11102
11103         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11104         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11105
11106 fi
11107
11108 if test -n "$cf_new_extra_cppflags" ; then
11109
11110         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11111         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11112
11113 fi
11114
11115 fi
11116
11117         fi
11118 fi
11119 fi # cf_cv_posix_visible
11120
11121 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11122
11123 # Work around breakage on OS X
11124
11125 echo "$as_me:11125: checking if SIGWINCH is defined" >&5
11126 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11127 if test "${cf_cv_define_sigwinch+set}" = set; then
11128   echo $ECHO_N "(cached) $ECHO_C" >&6
11129 else
11130
11131         cat >conftest.$ac_ext <<_ACEOF
11132 #line 11132 "configure"
11133 #include "confdefs.h"
11134
11135 #include <sys/types.h>
11136 #include <sys/signal.h>
11137
11138 int
11139 main (void)
11140 {
11141 int x = SIGWINCH; (void)x
11142   ;
11143   return 0;
11144 }
11145 _ACEOF
11146 rm -f conftest.$ac_objext
11147 if { (eval echo "$as_me:11147: \"$ac_compile\"") >&5
11148   (eval $ac_compile) 2>&5
11149   ac_status=$?
11150   echo "$as_me:11150: \$? = $ac_status" >&5
11151   (exit $ac_status); } &&
11152          { ac_try='test -s conftest.$ac_objext'
11153   { (eval echo "$as_me:11153: \"$ac_try\"") >&5
11154   (eval $ac_try) 2>&5
11155   ac_status=$?
11156   echo "$as_me:11156: \$? = $ac_status" >&5
11157   (exit $ac_status); }; }; then
11158   cf_cv_define_sigwinch=yes
11159 else
11160   echo "$as_me: failed program was:" >&5
11161 cat conftest.$ac_ext >&5
11162 cat >conftest.$ac_ext <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11165
11166 #undef _XOPEN_SOURCE
11167 #undef _POSIX_SOURCE
11168 #undef _POSIX_C_SOURCE
11169 #include <sys/types.h>
11170 #include <sys/signal.h>
11171
11172 int
11173 main (void)
11174 {
11175 int x = SIGWINCH; (void)x
11176   ;
11177   return 0;
11178 }
11179 _ACEOF
11180 rm -f conftest.$ac_objext
11181 if { (eval echo "$as_me:11181: \"$ac_compile\"") >&5
11182   (eval $ac_compile) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); } &&
11186          { ac_try='test -s conftest.$ac_objext'
11187   { (eval echo "$as_me:11187: \"$ac_try\"") >&5
11188   (eval $ac_try) 2>&5
11189   ac_status=$?
11190   echo "$as_me:11190: \$? = $ac_status" >&5
11191   (exit $ac_status); }; }; then
11192   cf_cv_define_sigwinch=maybe
11193 else
11194   echo "$as_me: failed program was:" >&5
11195 cat conftest.$ac_ext >&5
11196 cf_cv_define_sigwinch=no
11197 fi
11198 rm -f conftest.$ac_objext conftest.$ac_ext
11199
11200 fi
11201 rm -f conftest.$ac_objext conftest.$ac_ext
11202
11203 fi
11204 echo "$as_me:11204: result: $cf_cv_define_sigwinch" >&5
11205 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11206
11207 if test "$cf_cv_define_sigwinch" = maybe ; then
11208 echo "$as_me:11208: checking for actual SIGWINCH definition" >&5
11209 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11210 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11211   echo $ECHO_N "(cached) $ECHO_C" >&6
11212 else
11213
11214 cf_cv_fixup_sigwinch=unknown
11215 cf_sigwinch=32
11216 while test $cf_sigwinch != 1
11217 do
11218         cat >conftest.$ac_ext <<_ACEOF
11219 #line 11219 "configure"
11220 #include "confdefs.h"
11221
11222 #undef _XOPEN_SOURCE
11223 #undef _POSIX_SOURCE
11224 #undef _POSIX_C_SOURCE
11225 #include <sys/types.h>
11226 #include <sys/signal.h>
11227
11228 int
11229 main (void)
11230 {
11231
11232 #if SIGWINCH != $cf_sigwinch
11233 make an error
11234 #endif
11235 int x = SIGWINCH; (void)x
11236   ;
11237   return 0;
11238 }
11239 _ACEOF
11240 rm -f conftest.$ac_objext
11241 if { (eval echo "$as_me:11241: \"$ac_compile\"") >&5
11242   (eval $ac_compile) 2>&5
11243   ac_status=$?
11244   echo "$as_me:11244: \$? = $ac_status" >&5
11245   (exit $ac_status); } &&
11246          { ac_try='test -s conftest.$ac_objext'
11247   { (eval echo "$as_me:11247: \"$ac_try\"") >&5
11248   (eval $ac_try) 2>&5
11249   ac_status=$?
11250   echo "$as_me:11250: \$? = $ac_status" >&5
11251   (exit $ac_status); }; }; then
11252   cf_cv_fixup_sigwinch=$cf_sigwinch
11253          break
11254 else
11255   echo "$as_me: failed program was:" >&5
11256 cat conftest.$ac_ext >&5
11257 fi
11258 rm -f conftest.$ac_objext conftest.$ac_ext
11259
11260 cf_sigwinch=`expr $cf_sigwinch - 1`
11261 done
11262
11263 fi
11264 echo "$as_me:11264: result: $cf_cv_fixup_sigwinch" >&5
11265 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11266
11267         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11268                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11269         fi
11270 fi
11271
11272 # Checks for CODESET support.
11273
11274 echo "$as_me:11274: checking for nl_langinfo and CODESET" >&5
11275 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11276 if test "${am_cv_langinfo_codeset+set}" = set; then
11277   echo $ECHO_N "(cached) $ECHO_C" >&6
11278 else
11279   cat >conftest.$ac_ext <<_ACEOF
11280 #line 11280 "configure"
11281 #include "confdefs.h"
11282 #include <langinfo.h>
11283 int
11284 main (void)
11285 {
11286 char* cs = nl_langinfo(CODESET); (void)cs
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 rm -f conftest.$ac_objext conftest$ac_exeext
11292 if { (eval echo "$as_me:11292: \"$ac_link\"") >&5
11293   (eval $ac_link) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit $ac_status); } &&
11297          { ac_try='test -s conftest$ac_exeext'
11298   { (eval echo "$as_me:11298: \"$ac_try\"") >&5
11299   (eval $ac_try) 2>&5
11300   ac_status=$?
11301   echo "$as_me:11301: \$? = $ac_status" >&5
11302   (exit $ac_status); }; }; then
11303   am_cv_langinfo_codeset=yes
11304 else
11305   echo "$as_me: failed program was:" >&5
11306 cat conftest.$ac_ext >&5
11307 am_cv_langinfo_codeset=no
11308 fi
11309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11310
11311 fi
11312 echo "$as_me:11312: result: $am_cv_langinfo_codeset" >&5
11313 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11314         if test $am_cv_langinfo_codeset = yes; then
11315
11316 cat >>confdefs.h <<\EOF
11317 #define HAVE_LANGINFO_CODESET 1
11318 EOF
11319
11320         fi
11321
11322 # use these variables to work around a defect in gcc's fixincludes.
11323 NCURSES_OK_WCHAR_T=
11324 NCURSES_OK_WINT_T=
11325
11326 echo "$as_me:11326: checking if you want wide-character code" >&5
11327 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11328
11329 # Check whether --enable-widec or --disable-widec was given.
11330 if test "${enable_widec+set}" = set; then
11331   enableval="$enable_widec"
11332   with_widec=$enableval
11333 else
11334   with_widec=no
11335 fi;
11336 echo "$as_me:11336: result: $with_widec" >&5
11337 echo "${ECHO_T}$with_widec" >&6
11338
11339 NCURSES_WCWIDTH_GRAPHICS=1
11340
11341 if test "x$with_widec" = xyes ; then
11342         if test "x$disable_lib_suffixes" = xno ; then
11343                 LIB_SUFFIX="w${LIB_SUFFIX}"
11344         fi
11345
11346 cat >>confdefs.h <<\EOF
11347 #define USE_WIDEC_SUPPORT 1
11348 EOF
11349
11350 cat >>confdefs.h <<\EOF
11351 #define NCURSES_WIDECHAR 1
11352 EOF
11353
11354 for ac_header in \
11355 wchar.h \
11356 wctype.h \
11357
11358 do
11359 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11360 echo "$as_me:11360: checking for $ac_header" >&5
11361 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11362 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11363   echo $ECHO_N "(cached) $ECHO_C" >&6
11364 else
11365   cat >conftest.$ac_ext <<_ACEOF
11366 #line 11366 "configure"
11367 #include "confdefs.h"
11368 #include <$ac_header>
11369 _ACEOF
11370 if { (eval echo "$as_me:11370: \"$ac_cpp conftest.$ac_ext\"") >&5
11371   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11372   ac_status=$?
11373   egrep -v '^ *\+' conftest.er1 >conftest.err
11374   rm -f conftest.er1
11375   cat conftest.err >&5
11376   echo "$as_me:11376: \$? = $ac_status" >&5
11377   (exit $ac_status); } >/dev/null; then
11378   if test -s conftest.err; then
11379     ac_cpp_err=$ac_c_preproc_warn_flag
11380   else
11381     ac_cpp_err=
11382   fi
11383 else
11384   ac_cpp_err=yes
11385 fi
11386 if test -z "$ac_cpp_err"; then
11387   eval "$as_ac_Header=yes"
11388 else
11389   echo "$as_me: failed program was:" >&5
11390   cat conftest.$ac_ext >&5
11391   eval "$as_ac_Header=no"
11392 fi
11393 rm -f conftest.err conftest.$ac_ext
11394 fi
11395 echo "$as_me:11395: result: `eval echo '${'$as_ac_Header'}'`" >&5
11396 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11397 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11398   cat >>confdefs.h <<EOF
11399 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11400 EOF
11401
11402 fi
11403 done
11404
11405 echo "$as_me:11405: checking if wchar.h can be used as is" >&5
11406 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11407 if test "${cf_cv_wchar_h_okay+set}" = set; then
11408   echo $ECHO_N "(cached) $ECHO_C" >&6
11409 else
11410
11411 cat >conftest.$ac_ext <<_ACEOF
11412 #line 11412 "configure"
11413 #include "confdefs.h"
11414
11415 #include <stdlib.h>
11416 #ifdef HAVE_WCHAR_H
11417 #include <wchar.h>
11418 #endif
11419 #ifdef HAVE_WCTYPE_H
11420 #include <wctype.h>
11421 #endif
11422
11423 int
11424 main (void)
11425 {
11426
11427         wint_t foo = 0;
11428         int bar = iswpunct(foo)
11429   ;
11430   return 0;
11431 }
11432 _ACEOF
11433 rm -f conftest.$ac_objext
11434 if { (eval echo "$as_me:11434: \"$ac_compile\"") >&5
11435   (eval $ac_compile) 2>&5
11436   ac_status=$?
11437   echo "$as_me:11437: \$? = $ac_status" >&5
11438   (exit $ac_status); } &&
11439          { ac_try='test -s conftest.$ac_objext'
11440   { (eval echo "$as_me:11440: \"$ac_try\"") >&5
11441   (eval $ac_try) 2>&5
11442   ac_status=$?
11443   echo "$as_me:11443: \$? = $ac_status" >&5
11444   (exit $ac_status); }; }; then
11445   cf_cv_wchar_h_okay=yes
11446 else
11447   echo "$as_me: failed program was:" >&5
11448 cat conftest.$ac_ext >&5
11449 cf_cv_wchar_h_okay=no
11450 fi
11451 rm -f conftest.$ac_objext conftest.$ac_ext
11452 fi
11453 echo "$as_me:11453: result: $cf_cv_wchar_h_okay" >&5
11454 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11455
11456 if test $cf_cv_wchar_h_okay = no
11457 then
11458
11459 echo "$as_me:11459: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11460 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11461 cat >conftest.$ac_ext <<_ACEOF
11462 #line 11462 "configure"
11463 #include "confdefs.h"
11464 #include <sys/types.h>
11465
11466 int
11467 main (void)
11468 {
11469
11470 #ifndef _XOPEN_SOURCE_EXTENDED
11471 make an error
11472 #endif
11473   ;
11474   return 0;
11475 }
11476 _ACEOF
11477 rm -f conftest.$ac_objext
11478 if { (eval echo "$as_me:11478: \"$ac_compile\"") >&5
11479   (eval $ac_compile) 2>&5
11480   ac_status=$?
11481   echo "$as_me:11481: \$? = $ac_status" >&5
11482   (exit $ac_status); } &&
11483          { ac_try='test -s conftest.$ac_objext'
11484   { (eval echo "$as_me:11484: \"$ac_try\"") >&5
11485   (eval $ac_try) 2>&5
11486   ac_status=$?
11487   echo "$as_me:11487: \$? = $ac_status" >&5
11488   (exit $ac_status); }; }; then
11489   cf_result=no
11490 else
11491   echo "$as_me: failed program was:" >&5
11492 cat conftest.$ac_ext >&5
11493 cf_result=yes
11494 fi
11495 rm -f conftest.$ac_objext conftest.$ac_ext
11496 echo "$as_me:11496: result: $cf_result" >&5
11497 echo "${ECHO_T}$cf_result" >&6
11498
11499 if test "$cf_result" = yes ; then
11500         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11501 elif test "x" != "x" ; then
11502         echo "$as_me:11502: checking checking for compatible value versus " >&5
11503 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11504         cat >conftest.$ac_ext <<_ACEOF
11505 #line 11505 "configure"
11506 #include "confdefs.h"
11507 #include <sys/types.h>
11508
11509 int
11510 main (void)
11511 {
11512
11513 #if _XOPEN_SOURCE_EXTENDED- < 0
11514 make an error
11515 #endif
11516   ;
11517   return 0;
11518 }
11519 _ACEOF
11520 rm -f conftest.$ac_objext
11521 if { (eval echo "$as_me:11521: \"$ac_compile\"") >&5
11522   (eval $ac_compile) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit $ac_status); } &&
11526          { ac_try='test -s conftest.$ac_objext'
11527   { (eval echo "$as_me:11527: \"$ac_try\"") >&5
11528   (eval $ac_try) 2>&5
11529   ac_status=$?
11530   echo "$as_me:11530: \$? = $ac_status" >&5
11531   (exit $ac_status); }; }; then
11532   cf_result=yes
11533 else
11534   echo "$as_me: failed program was:" >&5
11535 cat conftest.$ac_ext >&5
11536 cf_result=no
11537 fi
11538 rm -f conftest.$ac_objext conftest.$ac_ext
11539         echo "$as_me:11539: result: $cf_result" >&5
11540 echo "${ECHO_T}$cf_result" >&6
11541         if test "$cf_result" = no ; then
11542                 # perhaps we can override it - try...
11543                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11544         fi
11545 fi
11546
11547 fi
11548
11549 echo "$as_me:11549: checking if wcwidth agrees graphics are single-width" >&5
11550 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11551 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11552   echo $ECHO_N "(cached) $ECHO_C" >&6
11553 else
11554
11555 cat >conftest.in <<CF_EOF
11556 -       VT100 symbols
11557 0x250c  upper left corner
11558 0x2514  lower left corner
11559 0x2510  upper right corner
11560 0x2518  lower right corner
11561 0x251c  tee pointing left
11562 0x2524  tee pointing right
11563 0x2534  tee pointing up
11564 0x252c  tee pointing down
11565 0x2500  horizontal line
11566 0x2502  vertical line
11567 0x253c  large plus or crossover
11568 0x23ba  scan line 1
11569 0x23bd  scan line 9
11570 0x25c6  diamond
11571 0x2592  checker board (stipple)
11572 0x00b0  degree symbol
11573 0x00b1  plus/minus
11574 0x00b7  bullet
11575 -       Teletype 5410v1 symbols
11576 0x2190  arrow pointing left
11577 0x2192  arrow pointing right
11578 0x2193  arrow pointing down
11579 0x2191  arrow pointing up
11580 0x2592  board of squares
11581 0x2603  lantern symbol
11582 0x25ae  solid square block
11583 -       these defaults were invented for ncurses
11584 0x23bb  scan line 3
11585 0x23bc  scan line 7
11586 0x2264  less-than-or-equal-to
11587 0x2265  greater-than-or-equal-to
11588 0x03c0  greek pi
11589 0x2260  not-equal
11590 0x00a3  pound-sterling symbol
11591 -       thick-line-drawing
11592 0x250f  upper left corner
11593 0x2517  lower left corner
11594 0x2513  upper right corner
11595 0x251b  lower right corner
11596 0x2523  tee pointing left
11597 0x252b  tee pointing right
11598 0x253b  tee pointing up
11599 0x2533  tee pointing down
11600 0x2501  horizontal line
11601 0x2503  vertical line
11602 0x254b  large plus or crossover
11603 -       double-line-drawing
11604 0x2554  upper left corner
11605 0x255a  lower left corner
11606 0x2557  upper right corner
11607 0x255d  lower right corner
11608 0x2563  tee pointing left
11609 0x2560  tee pointing right
11610 0x2569  tee pointing up
11611 0x2566  tee pointing down
11612 0x2550  horizontal line
11613 0x2551  vertical line
11614 0x256c  large plus or crossover
11615 CF_EOF
11616 if test "$cross_compiling" = yes; then
11617   cf_cv_wcwidth_graphics=unknown
11618 else
11619   cat >conftest.$ac_ext <<_ACEOF
11620 #line 11620 "configure"
11621 #include "confdefs.h"
11622
11623 #include <locale.h>
11624 #include <stdio.h>
11625 #include <wchar.h>
11626
11627 #define MY_LEN 80
11628
11629 int
11630 main(void)
11631 {
11632         FILE *fp;
11633         int value;
11634         char buffer[MY_LEN + 1];
11635         char notes[MY_LEN + 1];
11636         int totals = 0;
11637         int passed = 0;
11638
11639         if (setlocale(LC_ALL, "en_US.UTF8") ||
11640                 setlocale(LC_ALL, "en_US.UTF-8") ||
11641                 setlocale(LC_ALL, "en_US.utf8") ||
11642                 setlocale(LC_ALL, "en_US.utf-8")) {
11643                 if ((fp = fopen("conftest.in", "r")) != 0) {
11644                         while (fgets(buffer, MY_LEN, fp) != 0) {
11645                                 if (*buffer == '-') {
11646                                         fprintf(stderr, "\t%s", buffer);
11647                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11648                                         ++totals;
11649                                         if (wcwidth(value) == 1)
11650                                                 ++passed;
11651                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11652                                 } else {
11653                                         fprintf(stderr, "?\t%s", buffer);
11654                                 }
11655                         }
11656                 }
11657         }
11658         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11659         return (totals == passed) ? 0 : 1;
11660 }
11661
11662 _ACEOF
11663 rm -f 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); } && { ac_try='./conftest$ac_exeext'
11669   { (eval echo "$as_me:11669: \"$ac_try\"") >&5
11670   (eval $ac_try) 2>&5
11671   ac_status=$?
11672   echo "$as_me:11672: \$? = $ac_status" >&5
11673   (exit $ac_status); }; }; then
11674   cf_cv_wcwidth_graphics=yes
11675 else
11676   echo "$as_me: program exited with status $ac_status" >&5
11677 echo "$as_me: failed program was:" >&5
11678 cat conftest.$ac_ext >&5
11679 cf_cv_wcwidth_graphics=no
11680 fi
11681 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11682 fi
11683
11684 fi
11685 echo "$as_me:11685: result: $cf_cv_wcwidth_graphics" >&5
11686 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11687
11688         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11689
11690         # with_overwrite=no
11691         NCURSES_CH_T=cchar_t
11692
11693 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11694 do
11695 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11696 echo "$as_me:11696: checking for $ac_func" >&5
11697 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11698 if eval "test \"\${$as_ac_var+set}\" = set"; then
11699   echo $ECHO_N "(cached) $ECHO_C" >&6
11700 else
11701   cat >conftest.$ac_ext <<_ACEOF
11702 #line 11702 "configure"
11703 #include "confdefs.h"
11704 #define $ac_func autoconf_temporary
11705 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11706 #undef $ac_func
11707
11708 #ifdef __cplusplus
11709 extern "C"
11710 #endif
11711
11712 /* We use char because int might match the return type of a gcc2
11713    builtin and then its argument prototype would still apply.  */
11714 char $ac_func (void);
11715
11716 int
11717 main (void)
11718 {
11719
11720 /* The GNU C library defines stubs for functions which it implements
11721     to always fail with ENOSYS.  Some functions are actually named
11722     something starting with __ and the normal name is an alias.  */
11723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11724 #error found stub for $ac_func
11725 #endif
11726
11727         return $ac_func ();
11728   ;
11729   return 0;
11730 }
11731 _ACEOF
11732 rm -f conftest.$ac_objext conftest$ac_exeext
11733 if { (eval echo "$as_me:11733: \"$ac_link\"") >&5
11734   (eval $ac_link) 2>&5
11735   ac_status=$?
11736   echo "$as_me:11736: \$? = $ac_status" >&5
11737   (exit $ac_status); } &&
11738          { ac_try='test -s conftest$ac_exeext'
11739   { (eval echo "$as_me:11739: \"$ac_try\"") >&5
11740   (eval $ac_try) 2>&5
11741   ac_status=$?
11742   echo "$as_me:11742: \$? = $ac_status" >&5
11743   (exit $ac_status); }; }; then
11744   eval "$as_ac_var=yes"
11745 else
11746   echo "$as_me: failed program was:" >&5
11747 cat conftest.$ac_ext >&5
11748 eval "$as_ac_var=no"
11749 fi
11750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11751 fi
11752 echo "$as_me:11752: result: `eval echo '${'$as_ac_var'}'`" >&5
11753 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11754 if test `eval echo '${'$as_ac_var'}'` = yes; then
11755   cat >>confdefs.h <<EOF
11756 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11757 EOF
11758
11759 fi
11760 done
11761
11762         if test "x$ac_cv_func_putwc" != xyes ; then
11763
11764 echo "$as_me:11764: checking for multibyte character support" >&5
11765 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11766 if test "${cf_cv_utf8_lib+set}" = set; then
11767   echo $ECHO_N "(cached) $ECHO_C" >&6
11768 else
11769
11770         cf_save_LIBS="$LIBS"
11771         cat >conftest.$ac_ext <<_ACEOF
11772 #line 11772 "configure"
11773 #include "confdefs.h"
11774
11775 #include <stdlib.h>
11776 int
11777 main (void)
11778 {
11779 putwc(0,0);
11780   ;
11781   return 0;
11782 }
11783 _ACEOF
11784 rm -f conftest.$ac_objext conftest$ac_exeext
11785 if { (eval echo "$as_me:11785: \"$ac_link\"") >&5
11786   (eval $ac_link) 2>&5
11787   ac_status=$?
11788   echo "$as_me:11788: \$? = $ac_status" >&5
11789   (exit $ac_status); } &&
11790          { ac_try='test -s conftest$ac_exeext'
11791   { (eval echo "$as_me:11791: \"$ac_try\"") >&5
11792   (eval $ac_try) 2>&5
11793   ac_status=$?
11794   echo "$as_me:11794: \$? = $ac_status" >&5
11795   (exit $ac_status); }; }; then
11796   cf_cv_utf8_lib=yes
11797 else
11798   echo "$as_me: failed program was:" >&5
11799 cat conftest.$ac_ext >&5
11800
11801 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11802 # will be set on completion of the AC_TRY_LINK below.
11803 cf_cv_header_path_utf8=
11804 cf_cv_library_path_utf8=
11805
11806 echo "${as_me:-configure}:11806: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11807
11808 cf_save_LIBS="$LIBS"
11809
11810 cat >conftest.$ac_ext <<_ACEOF
11811 #line 11811 "configure"
11812 #include "confdefs.h"
11813
11814 #include <libutf8.h>
11815 int
11816 main (void)
11817 {
11818 putwc(0,0);
11819   ;
11820   return 0;
11821 }
11822 _ACEOF
11823 rm -f conftest.$ac_objext conftest$ac_exeext
11824 if { (eval echo "$as_me:11824: \"$ac_link\"") >&5
11825   (eval $ac_link) 2>&5
11826   ac_status=$?
11827   echo "$as_me:11827: \$? = $ac_status" >&5
11828   (exit $ac_status); } &&
11829          { ac_try='test -s conftest$ac_exeext'
11830   { (eval echo "$as_me:11830: \"$ac_try\"") >&5
11831   (eval $ac_try) 2>&5
11832   ac_status=$?
11833   echo "$as_me:11833: \$? = $ac_status" >&5
11834   (exit $ac_status); }; }; then
11835
11836         cf_cv_find_linkage_utf8=yes
11837         cf_cv_header_path_utf8=/usr/include
11838         cf_cv_library_path_utf8=/usr/lib
11839
11840 else
11841   echo "$as_me: failed program was:" >&5
11842 cat conftest.$ac_ext >&5
11843
11844 LIBS="-lutf8  $cf_save_LIBS"
11845
11846 cat >conftest.$ac_ext <<_ACEOF
11847 #line 11847 "configure"
11848 #include "confdefs.h"
11849
11850 #include <libutf8.h>
11851 int
11852 main (void)
11853 {
11854 putwc(0,0);
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext conftest$ac_exeext
11860 if { (eval echo "$as_me:11860: \"$ac_link\"") >&5
11861   (eval $ac_link) 2>&5
11862   ac_status=$?
11863   echo "$as_me:11863: \$? = $ac_status" >&5
11864   (exit $ac_status); } &&
11865          { ac_try='test -s conftest$ac_exeext'
11866   { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867   (eval $ac_try) 2>&5
11868   ac_status=$?
11869   echo "$as_me:11869: \$? = $ac_status" >&5
11870   (exit $ac_status); }; }; then
11871
11872         cf_cv_find_linkage_utf8=yes
11873         cf_cv_header_path_utf8=/usr/include
11874         cf_cv_library_path_utf8=/usr/lib
11875         cf_cv_library_file_utf8="-lutf8"
11876
11877 else
11878   echo "$as_me: failed program was:" >&5
11879 cat conftest.$ac_ext >&5
11880
11881         cf_cv_find_linkage_utf8=no
11882         LIBS="$cf_save_LIBS"
11883
11884         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11885
11886 echo "${as_me:-configure}:11886: testing find linkage for utf8 library ..." 1>&5
11887
11888 echo "${as_me:-configure}:11888: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11889
11890         cf_save_CPPFLAGS="$CPPFLAGS"
11891         cf_test_CPPFLAGS="$CPPFLAGS"
11892
11893 cf_search=
11894
11895 # collect the current set of include-directories from compiler flags
11896 cf_header_path_list=""
11897 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11898         for cf_header_path in $CPPFLAGS $CFLAGS
11899         do
11900                 case $cf_header_path in
11901                 (-I*)
11902                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11903
11904 test "x$cf_header_path" != "xNONE" && \
11905 test -d "$cf_header_path" && \
11906  {
11907         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11908         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11909         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11910         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11911         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11912         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11913 }
11914
11915                         cf_header_path_list="$cf_header_path_list $cf_search"
11916                         ;;
11917                 esac
11918         done
11919 fi
11920
11921 # add the variations for the package we are looking for
11922
11923 cf_search=
11924
11925 test "x$prefix" != "xNONE" && \
11926 test -d "$prefix" && \
11927  {
11928         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11929         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11930         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11931         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11932         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11933         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11934 }
11935
11936 for cf_subdir_prefix in \
11937         /usr \
11938         /usr/local \
11939         /usr/pkg \
11940         /opt \
11941         /opt/local \
11942         $HOME
11943 do
11944
11945 test "x$cf_subdir_prefix" != "x$prefix" && \
11946 test -d "$cf_subdir_prefix" && \
11947 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11948         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11949         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11950         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11951         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11952         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11953         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11954 }
11955
11956 done
11957
11958 test "$includedir" != NONE && \
11959 test "$includedir" != "/usr/include" && \
11960 test -d "$includedir" && {
11961         test -d $includedir &&    cf_search="$cf_search $includedir"
11962         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11963 }
11964
11965 test "$oldincludedir" != NONE && \
11966 test "$oldincludedir" != "/usr/include" && \
11967 test -d "$oldincludedir" && {
11968         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11969         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11970 }
11971
11972 cf_search="$cf_search $cf_header_path_list"
11973
11974         for cf_cv_header_path_utf8 in $cf_search
11975         do
11976                 if test -d $cf_cv_header_path_utf8 ; then
11977                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11978
11979 echo "${as_me:-configure}:11979: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11980
11981                         CPPFLAGS="$cf_save_CPPFLAGS"
11982
11983         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11984         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11985
11986                         cat >conftest.$ac_ext <<_ACEOF
11987 #line 11987 "configure"
11988 #include "confdefs.h"
11989
11990 #include <libutf8.h>
11991 int
11992 main (void)
11993 {
11994 putwc(0,0);
11995   ;
11996   return 0;
11997 }
11998 _ACEOF
11999 rm -f conftest.$ac_objext
12000 if { (eval echo "$as_me:12000: \"$ac_compile\"") >&5
12001   (eval $ac_compile) 2>&5
12002   ac_status=$?
12003   echo "$as_me:12003: \$? = $ac_status" >&5
12004   (exit $ac_status); } &&
12005          { ac_try='test -s conftest.$ac_objext'
12006   { (eval echo "$as_me:12006: \"$ac_try\"") >&5
12007   (eval $ac_try) 2>&5
12008   ac_status=$?
12009   echo "$as_me:12009: \$? = $ac_status" >&5
12010   (exit $ac_status); }; }; then
12011
12012                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12013
12014 echo "${as_me:-configure}:12014: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12015
12016                                 cf_cv_find_linkage_utf8=maybe
12017                                 cf_test_CPPFLAGS="$CPPFLAGS"
12018                                 break
12019 else
12020   echo "$as_me: failed program was:" >&5
12021 cat conftest.$ac_ext >&5
12022
12023                                 CPPFLAGS="$cf_save_CPPFLAGS"
12024
12025 fi
12026 rm -f conftest.$ac_objext conftest.$ac_ext
12027                 fi
12028         done
12029
12030         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12031
12032 echo "${as_me:-configure}:12032: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12033
12034                 cf_save_LIBS="$LIBS"
12035                 cf_save_LDFLAGS="$LDFLAGS"
12036
12037                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12038
12039 cf_search=
12040 cf_library_path_list=""
12041 if test -n "${LDFLAGS}${LIBS}" ; then
12042         for cf_library_path in $LDFLAGS $LIBS
12043         do
12044                 case $cf_library_path in
12045                 (-L*)
12046                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12047
12048 test "x$cf_library_path" != "xNONE" && \
12049 test -d "$cf_library_path" && \
12050  {
12051         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12052         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12053         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12054         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12055         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12056         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12057 }
12058
12059                         cf_library_path_list="$cf_library_path_list $cf_search"
12060                         ;;
12061                 esac
12062         done
12063 fi
12064
12065 cf_search=
12066
12067 test "x$prefix" != "xNONE" && \
12068 test -d "$prefix" && \
12069  {
12070         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12071         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12072         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12073         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12074         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12075         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12076 }
12077
12078 for cf_subdir_prefix in \
12079         /usr \
12080         /usr/local \
12081         /usr/pkg \
12082         /opt \
12083         /opt/local \
12084         $HOME
12085 do
12086
12087 test "x$cf_subdir_prefix" != "x$prefix" && \
12088 test -d "$cf_subdir_prefix" && \
12089 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12090         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12091         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12092         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12093         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12094         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12095         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12096 }
12097
12098 done
12099
12100 cf_search="$cf_library_path_list $cf_search"
12101
12102                         for cf_cv_library_path_utf8 in $cf_search
12103                         do
12104                                 if test -d $cf_cv_library_path_utf8 ; then
12105                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12106
12107 echo "${as_me:-configure}:12107: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12108
12109                                         CPPFLAGS="$cf_test_CPPFLAGS"
12110                                         LIBS="-lutf8  $cf_save_LIBS"
12111                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12112                                         cat >conftest.$ac_ext <<_ACEOF
12113 #line 12113 "configure"
12114 #include "confdefs.h"
12115
12116 #include <libutf8.h>
12117 int
12118 main (void)
12119 {
12120 putwc(0,0);
12121   ;
12122   return 0;
12123 }
12124 _ACEOF
12125 rm -f conftest.$ac_objext conftest$ac_exeext
12126 if { (eval echo "$as_me:12126: \"$ac_link\"") >&5
12127   (eval $ac_link) 2>&5
12128   ac_status=$?
12129   echo "$as_me:12129: \$? = $ac_status" >&5
12130   (exit $ac_status); } &&
12131          { ac_try='test -s conftest$ac_exeext'
12132   { (eval echo "$as_me:12132: \"$ac_try\"") >&5
12133   (eval $ac_try) 2>&5
12134   ac_status=$?
12135   echo "$as_me:12135: \$? = $ac_status" >&5
12136   (exit $ac_status); }; }; then
12137
12138                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12139
12140 echo "${as_me:-configure}:12140: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12141
12142                                         cf_cv_find_linkage_utf8=yes
12143                                         cf_cv_library_file_utf8="-lutf8"
12144                                         break
12145 else
12146   echo "$as_me: failed program was:" >&5
12147 cat conftest.$ac_ext >&5
12148
12149                                         CPPFLAGS="$cf_save_CPPFLAGS"
12150                                         LIBS="$cf_save_LIBS"
12151                                         LDFLAGS="$cf_save_LDFLAGS"
12152
12153 fi
12154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12155                                 fi
12156                         done
12157                         CPPFLAGS="$cf_save_CPPFLAGS"
12158                         LDFLAGS="$cf_save_LDFLAGS"
12159                 fi
12160
12161         else
12162                 cf_cv_find_linkage_utf8=no
12163         fi
12164
12165 fi
12166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12167
12168 fi
12169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12170
12171 LIBS="$cf_save_LIBS"
12172
12173 if test "$cf_cv_find_linkage_utf8" = yes ; then
12174 cf_cv_utf8_lib=add-on
12175 else
12176 cf_cv_utf8_lib=no
12177 fi
12178
12179 fi
12180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12181 fi
12182 echo "$as_me:12182: result: $cf_cv_utf8_lib" >&5
12183 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12184
12185 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12186 # ncurses/ncursesw:
12187 if test "$cf_cv_utf8_lib" = "add-on" ; then
12188
12189 cat >>confdefs.h <<\EOF
12190 #define HAVE_LIBUTF8_H 1
12191 EOF
12192
12193 if test -n "$cf_cv_header_path_utf8" ; then
12194   for cf_add_incdir in $cf_cv_header_path_utf8
12195   do
12196         while test $cf_add_incdir != /usr/include
12197         do
12198           if test -d $cf_add_incdir
12199           then
12200                 cf_have_incdir=no
12201                 if test -n "$CFLAGS$CPPFLAGS" ; then
12202                   # a loop is needed to ensure we can add subdirs of existing dirs
12203                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12204                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12205                           cf_have_incdir=yes; break
12206                         fi
12207                   done
12208                 fi
12209
12210                 if test "$cf_have_incdir" = no ; then
12211                   if test "$cf_add_incdir" = /usr/local/include ; then
12212                         if test "$GCC" = yes
12213                         then
12214                           cf_save_CPPFLAGS=$CPPFLAGS
12215
12216         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12217         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12218
12219                           cat >conftest.$ac_ext <<_ACEOF
12220 #line 12220 "configure"
12221 #include "confdefs.h"
12222 #include <stdio.h>
12223 int
12224 main (void)
12225 {
12226 printf("Hello")
12227   ;
12228   return 0;
12229 }
12230 _ACEOF
12231 rm -f conftest.$ac_objext
12232 if { (eval echo "$as_me:12232: \"$ac_compile\"") >&5
12233   (eval $ac_compile) 2>&5
12234   ac_status=$?
12235   echo "$as_me:12235: \$? = $ac_status" >&5
12236   (exit $ac_status); } &&
12237          { ac_try='test -s conftest.$ac_objext'
12238   { (eval echo "$as_me:12238: \"$ac_try\"") >&5
12239   (eval $ac_try) 2>&5
12240   ac_status=$?
12241   echo "$as_me:12241: \$? = $ac_status" >&5
12242   (exit $ac_status); }; }; then
12243   :
12244 else
12245   echo "$as_me: failed program was:" >&5
12246 cat conftest.$ac_ext >&5
12247 cf_have_incdir=yes
12248 fi
12249 rm -f conftest.$ac_objext conftest.$ac_ext
12250                           CPPFLAGS=$cf_save_CPPFLAGS
12251                         fi
12252                   fi
12253                 fi
12254
12255                 if test "$cf_have_incdir" = no ; then
12256                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12257
12258 echo "${as_me:-configure}:12258: testing adding $cf_add_incdir to include-path ..." 1>&5
12259
12260                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12261
12262                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12263                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12264                   cf_add_incdir="$cf_top_incdir"
12265                 else
12266                   break
12267                 fi
12268           else
12269                 break
12270           fi
12271         done
12272   done
12273 fi
12274
12275 if test -n "$cf_cv_library_path_utf8" ; then
12276         for cf_add_libdir in $cf_cv_library_path_utf8
12277         do
12278                 if test $cf_add_libdir = /usr/lib ; then
12279                         :
12280                 elif test -d $cf_add_libdir
12281                 then
12282                         cf_have_libdir=no
12283                         if test -n "$LDFLAGS$LIBS" ; then
12284                                 # a loop is needed to ensure we can add subdirs of existing dirs
12285                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12286                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12287                                                 cf_have_libdir=yes; break
12288                                         fi
12289                                 done
12290                         fi
12291                         if test "$cf_have_libdir" = no ; then
12292                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12293
12294 echo "${as_me:-configure}:12294: testing adding $cf_add_libdir to library-path ..." 1>&5
12295
12296                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12297                         fi
12298                 fi
12299         done
12300 fi
12301
12302 cf_add_libs="$LIBS"
12303 # reverse order
12304 cf_add_0lib=
12305 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12306 # filter duplicates
12307 for cf_add_1lib in $cf_add_0lib; do
12308         for cf_add_2lib in $cf_add_libs; do
12309                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12310                         cf_add_1lib=
12311                         break
12312                 fi
12313         done
12314         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12315 done
12316 LIBS="$cf_add_libs"
12317
12318 fi
12319
12320                 if test "$cf_cv_utf8_lib" != no ; then
12321                         NCURSES_LIBUTF8=1
12322                 fi
12323         fi
12324
12325 # This is needed on Tru64 5.0 to declare mbstate_t
12326 echo "$as_me:12326: checking if we must include wchar.h to declare mbstate_t" >&5
12327 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12328 if test "${cf_cv_mbstate_t+set}" = set; then
12329   echo $ECHO_N "(cached) $ECHO_C" >&6
12330 else
12331
12332 cat >conftest.$ac_ext <<_ACEOF
12333 #line 12333 "configure"
12334 #include "confdefs.h"
12335
12336 #include <stdlib.h>
12337 #include <stdarg.h>
12338 #include <stdio.h>
12339 #ifdef HAVE_LIBUTF8_H
12340 #include <libutf8.h>
12341 #endif
12342 int
12343 main (void)
12344 {
12345 mbstate_t state
12346   ;
12347   return 0;
12348 }
12349 _ACEOF
12350 rm -f conftest.$ac_objext
12351 if { (eval echo "$as_me:12351: \"$ac_compile\"") >&5
12352   (eval $ac_compile) 2>&5
12353   ac_status=$?
12354   echo "$as_me:12354: \$? = $ac_status" >&5
12355   (exit $ac_status); } &&
12356          { ac_try='test -s conftest.$ac_objext'
12357   { (eval echo "$as_me:12357: \"$ac_try\"") >&5
12358   (eval $ac_try) 2>&5
12359   ac_status=$?
12360   echo "$as_me:12360: \$? = $ac_status" >&5
12361   (exit $ac_status); }; }; then
12362   cf_cv_mbstate_t=no
12363 else
12364   echo "$as_me: failed program was:" >&5
12365 cat conftest.$ac_ext >&5
12366 cat >conftest.$ac_ext <<_ACEOF
12367 #line 12367 "configure"
12368 #include "confdefs.h"
12369
12370 #include <stdlib.h>
12371 #include <stdarg.h>
12372 #include <stdio.h>
12373 #include <wchar.h>
12374 #ifdef HAVE_LIBUTF8_H
12375 #include <libutf8.h>
12376 #endif
12377 int
12378 main (void)
12379 {
12380 mbstate_t value
12381   ;
12382   return 0;
12383 }
12384 _ACEOF
12385 rm -f conftest.$ac_objext
12386 if { (eval echo "$as_me:12386: \"$ac_compile\"") >&5
12387   (eval $ac_compile) 2>&5
12388   ac_status=$?
12389   echo "$as_me:12389: \$? = $ac_status" >&5
12390   (exit $ac_status); } &&
12391          { ac_try='test -s conftest.$ac_objext'
12392   { (eval echo "$as_me:12392: \"$ac_try\"") >&5
12393   (eval $ac_try) 2>&5
12394   ac_status=$?
12395   echo "$as_me:12395: \$? = $ac_status" >&5
12396   (exit $ac_status); }; }; then
12397   cf_cv_mbstate_t=yes
12398 else
12399   echo "$as_me: failed program was:" >&5
12400 cat conftest.$ac_ext >&5
12401 cf_cv_mbstate_t=unknown
12402 fi
12403 rm -f conftest.$ac_objext conftest.$ac_ext
12404 fi
12405 rm -f conftest.$ac_objext conftest.$ac_ext
12406 fi
12407 echo "$as_me:12407: result: $cf_cv_mbstate_t" >&5
12408 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12409
12410 if test "$cf_cv_mbstate_t" = yes ; then
12411
12412 cat >>confdefs.h <<\EOF
12413 #define NEED_WCHAR_H 1
12414 EOF
12415
12416         NEED_WCHAR_H=1
12417 fi
12418
12419 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12420 if test "$cf_cv_mbstate_t" = unknown ; then
12421         NCURSES_MBSTATE_T=1
12422 fi
12423
12424 # This is needed on Tru64 5.0 to declare wchar_t
12425 echo "$as_me:12425: checking if we must include wchar.h to declare wchar_t" >&5
12426 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12427 if test "${cf_cv_wchar_t+set}" = set; then
12428   echo $ECHO_N "(cached) $ECHO_C" >&6
12429 else
12430
12431 cat >conftest.$ac_ext <<_ACEOF
12432 #line 12432 "configure"
12433 #include "confdefs.h"
12434
12435 #include <stdlib.h>
12436 #include <stdarg.h>
12437 #include <stdio.h>
12438 #ifdef HAVE_LIBUTF8_H
12439 #include <libutf8.h>
12440 #endif
12441 int
12442 main (void)
12443 {
12444 wchar_t state
12445   ;
12446   return 0;
12447 }
12448 _ACEOF
12449 rm -f conftest.$ac_objext
12450 if { (eval echo "$as_me:12450: \"$ac_compile\"") >&5
12451   (eval $ac_compile) 2>&5
12452   ac_status=$?
12453   echo "$as_me:12453: \$? = $ac_status" >&5
12454   (exit $ac_status); } &&
12455          { ac_try='test -s conftest.$ac_objext'
12456   { (eval echo "$as_me:12456: \"$ac_try\"") >&5
12457   (eval $ac_try) 2>&5
12458   ac_status=$?
12459   echo "$as_me:12459: \$? = $ac_status" >&5
12460   (exit $ac_status); }; }; then
12461   cf_cv_wchar_t=no
12462 else
12463   echo "$as_me: failed program was:" >&5
12464 cat conftest.$ac_ext >&5
12465 cat >conftest.$ac_ext <<_ACEOF
12466 #line 12466 "configure"
12467 #include "confdefs.h"
12468
12469 #include <stdlib.h>
12470 #include <stdarg.h>
12471 #include <stdio.h>
12472 #include <wchar.h>
12473 #ifdef HAVE_LIBUTF8_H
12474 #include <libutf8.h>
12475 #endif
12476 int
12477 main (void)
12478 {
12479 wchar_t value
12480   ;
12481   return 0;
12482 }
12483 _ACEOF
12484 rm -f conftest.$ac_objext
12485 if { (eval echo "$as_me:12485: \"$ac_compile\"") >&5
12486   (eval $ac_compile) 2>&5
12487   ac_status=$?
12488   echo "$as_me:12488: \$? = $ac_status" >&5
12489   (exit $ac_status); } &&
12490          { ac_try='test -s conftest.$ac_objext'
12491   { (eval echo "$as_me:12491: \"$ac_try\"") >&5
12492   (eval $ac_try) 2>&5
12493   ac_status=$?
12494   echo "$as_me:12494: \$? = $ac_status" >&5
12495   (exit $ac_status); }; }; then
12496   cf_cv_wchar_t=yes
12497 else
12498   echo "$as_me: failed program was:" >&5
12499 cat conftest.$ac_ext >&5
12500 cf_cv_wchar_t=unknown
12501 fi
12502 rm -f conftest.$ac_objext conftest.$ac_ext
12503 fi
12504 rm -f conftest.$ac_objext conftest.$ac_ext
12505 fi
12506 echo "$as_me:12506: result: $cf_cv_wchar_t" >&5
12507 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12508
12509 if test "$cf_cv_wchar_t" = yes ; then
12510
12511 cat >>confdefs.h <<\EOF
12512 #define NEED_WCHAR_H 1
12513 EOF
12514
12515         NEED_WCHAR_H=1
12516 fi
12517
12518 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12519 if test "$cf_cv_wchar_t" = unknown ; then
12520         NCURSES_WCHAR_T=1
12521 fi
12522
12523 # if we find wchar_t in either place, use substitution to provide a fallback.
12524 if test "$cf_cv_wchar_t" != unknown ; then
12525         NCURSES_OK_WCHAR_T=1
12526 fi
12527
12528 # This is needed on Tru64 5.0 to declare wint_t
12529 echo "$as_me:12529: checking if we must include wchar.h to declare wint_t" >&5
12530 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12531 if test "${cf_cv_wint_t+set}" = set; then
12532   echo $ECHO_N "(cached) $ECHO_C" >&6
12533 else
12534
12535 cat >conftest.$ac_ext <<_ACEOF
12536 #line 12536 "configure"
12537 #include "confdefs.h"
12538
12539 #include <stdlib.h>
12540 #include <stdarg.h>
12541 #include <stdio.h>
12542 #ifdef HAVE_LIBUTF8_H
12543 #include <libutf8.h>
12544 #endif
12545 int
12546 main (void)
12547 {
12548 wint_t state
12549   ;
12550   return 0;
12551 }
12552 _ACEOF
12553 rm -f conftest.$ac_objext
12554 if { (eval echo "$as_me:12554: \"$ac_compile\"") >&5
12555   (eval $ac_compile) 2>&5
12556   ac_status=$?
12557   echo "$as_me:12557: \$? = $ac_status" >&5
12558   (exit $ac_status); } &&
12559          { ac_try='test -s conftest.$ac_objext'
12560   { (eval echo "$as_me:12560: \"$ac_try\"") >&5
12561   (eval $ac_try) 2>&5
12562   ac_status=$?
12563   echo "$as_me:12563: \$? = $ac_status" >&5
12564   (exit $ac_status); }; }; then
12565   cf_cv_wint_t=no
12566 else
12567   echo "$as_me: failed program was:" >&5
12568 cat conftest.$ac_ext >&5
12569 cat >conftest.$ac_ext <<_ACEOF
12570 #line 12570 "configure"
12571 #include "confdefs.h"
12572
12573 #include <stdlib.h>
12574 #include <stdarg.h>
12575 #include <stdio.h>
12576 #include <wchar.h>
12577 #ifdef HAVE_LIBUTF8_H
12578 #include <libutf8.h>
12579 #endif
12580 int
12581 main (void)
12582 {
12583 wint_t value
12584   ;
12585   return 0;
12586 }
12587 _ACEOF
12588 rm -f conftest.$ac_objext
12589 if { (eval echo "$as_me:12589: \"$ac_compile\"") >&5
12590   (eval $ac_compile) 2>&5
12591   ac_status=$?
12592   echo "$as_me:12592: \$? = $ac_status" >&5
12593   (exit $ac_status); } &&
12594          { ac_try='test -s conftest.$ac_objext'
12595   { (eval echo "$as_me:12595: \"$ac_try\"") >&5
12596   (eval $ac_try) 2>&5
12597   ac_status=$?
12598   echo "$as_me:12598: \$? = $ac_status" >&5
12599   (exit $ac_status); }; }; then
12600   cf_cv_wint_t=yes
12601 else
12602   echo "$as_me: failed program was:" >&5
12603 cat conftest.$ac_ext >&5
12604 cf_cv_wint_t=unknown
12605 fi
12606 rm -f conftest.$ac_objext conftest.$ac_ext
12607 fi
12608 rm -f conftest.$ac_objext conftest.$ac_ext
12609 fi
12610 echo "$as_me:12610: result: $cf_cv_wint_t" >&5
12611 echo "${ECHO_T}$cf_cv_wint_t" >&6
12612
12613 if test "$cf_cv_wint_t" = yes ; then
12614
12615 cat >>confdefs.h <<\EOF
12616 #define NEED_WCHAR_H 1
12617 EOF
12618
12619         NEED_WCHAR_H=1
12620 fi
12621
12622 # if we do not find wint_t in either place, use substitution to provide a fallback.
12623 if test "$cf_cv_wint_t" = unknown ; then
12624         NCURSES_WINT_T=1
12625 fi
12626
12627 # if we find wint_t in either place, use substitution to provide a fallback.
12628 if test "$cf_cv_wint_t" != unknown ; then
12629         NCURSES_OK_WINT_T=1
12630 fi
12631
12632         if test "$NCURSES_MBSTATE_T" != 0; then
12633
12634 cat >>confdefs.h <<\EOF
12635 #define NEED_MBSTATE_T_DEF 1
12636 EOF
12637
12638         fi
12639 fi
12640
12641 ###   use option --disable-lp64 to allow long chtype
12642 echo "$as_me:12642: checking whether to enable _LP64 definition in curses.h" >&5
12643 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12644
12645 # Check whether --enable-lp64 or --disable-lp64 was given.
12646 if test "${enable_lp64+set}" = set; then
12647   enableval="$enable_lp64"
12648   with_lp64=$enableval
12649 else
12650   with_lp64=$cf_dft_with_lp64
12651 fi;
12652 echo "$as_me:12652: result: $with_lp64" >&5
12653 echo "${ECHO_T}$with_lp64" >&6
12654
12655 if test "x$with_lp64" = xyes ; then
12656         cf_cv_enable_lp64=1
12657 else
12658         cf_cv_enable_lp64=0
12659 fi
12660
12661 # Check whether --enable-largefile or --disable-largefile was given.
12662 if test "${enable_largefile+set}" = set; then
12663   enableval="$enable_largefile"
12664
12665 fi;
12666 if test "$enable_largefile" != no; then
12667
12668   echo "$as_me:12668: checking for special C compiler options needed for large files" >&5
12669 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12670 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12671   echo $ECHO_N "(cached) $ECHO_C" >&6
12672 else
12673   ac_cv_sys_largefile_CC=no
12674      if test "$GCC" != yes; then
12675        ac_save_CC=$CC
12676        while :; do
12677          # IRIX 6.2 and later do not support large files by default,
12678          # so use the C compiler's -n32 option if that helps.
12679          cat >conftest.$ac_ext <<_ACEOF
12680 #line 12680 "configure"
12681 #include "confdefs.h"
12682 #include <sys/types.h>
12683  /* Check that off_t can represent 2**63 - 1 correctly.
12684     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12685     since some C++ compilers masquerading as C compilers
12686     incorrectly reject 9223372036854775807.  */
12687 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12688   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12689                        && LARGE_OFF_T % 2147483647 == 1)
12690                       ? 1 : -1];
12691 int
12692 main (void)
12693 {
12694
12695   ;
12696   return 0;
12697 }
12698 _ACEOF
12699          rm -f conftest.$ac_objext
12700 if { (eval echo "$as_me:12700: \"$ac_compile\"") >&5
12701   (eval $ac_compile) 2>&5
12702   ac_status=$?
12703   echo "$as_me:12703: \$? = $ac_status" >&5
12704   (exit $ac_status); } &&
12705          { ac_try='test -s conftest.$ac_objext'
12706   { (eval echo "$as_me:12706: \"$ac_try\"") >&5
12707   (eval $ac_try) 2>&5
12708   ac_status=$?
12709   echo "$as_me:12709: \$? = $ac_status" >&5
12710   (exit $ac_status); }; }; then
12711   break
12712 else
12713   echo "$as_me: failed program was:" >&5
12714 cat conftest.$ac_ext >&5
12715 fi
12716 rm -f conftest.$ac_objext
12717          CC="$CC -n32"
12718          rm -f conftest.$ac_objext
12719 if { (eval echo "$as_me:12719: \"$ac_compile\"") >&5
12720   (eval $ac_compile) 2>&5
12721   ac_status=$?
12722   echo "$as_me:12722: \$? = $ac_status" >&5
12723   (exit $ac_status); } &&
12724          { ac_try='test -s conftest.$ac_objext'
12725   { (eval echo "$as_me:12725: \"$ac_try\"") >&5
12726   (eval $ac_try) 2>&5
12727   ac_status=$?
12728   echo "$as_me:12728: \$? = $ac_status" >&5
12729   (exit $ac_status); }; }; then
12730   ac_cv_sys_largefile_CC=' -n32'; break
12731 else
12732   echo "$as_me: failed program was:" >&5
12733 cat conftest.$ac_ext >&5
12734 fi
12735 rm -f conftest.$ac_objext
12736          break
12737        done
12738        CC=$ac_save_CC
12739        rm -f conftest.$ac_ext
12740     fi
12741 fi
12742 echo "$as_me:12742: result: $ac_cv_sys_largefile_CC" >&5
12743 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12744   if test "$ac_cv_sys_largefile_CC" != no; then
12745     CC=$CC$ac_cv_sys_largefile_CC
12746   fi
12747
12748   echo "$as_me:12748: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12749 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12750 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12751   echo $ECHO_N "(cached) $ECHO_C" >&6
12752 else
12753   while :; do
12754   ac_cv_sys_file_offset_bits=no
12755   cat >conftest.$ac_ext <<_ACEOF
12756 #line 12756 "configure"
12757 #include "confdefs.h"
12758 #include <sys/types.h>
12759  /* Check that off_t can represent 2**63 - 1 correctly.
12760     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12761     since some C++ compilers masquerading as C compilers
12762     incorrectly reject 9223372036854775807.  */
12763 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12764   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12765                        && LARGE_OFF_T % 2147483647 == 1)
12766                       ? 1 : -1];
12767 int
12768 main (void)
12769 {
12770
12771   ;
12772   return 0;
12773 }
12774 _ACEOF
12775 rm -f conftest.$ac_objext
12776 if { (eval echo "$as_me:12776: \"$ac_compile\"") >&5
12777   (eval $ac_compile) 2>&5
12778   ac_status=$?
12779   echo "$as_me:12779: \$? = $ac_status" >&5
12780   (exit $ac_status); } &&
12781          { ac_try='test -s conftest.$ac_objext'
12782   { (eval echo "$as_me:12782: \"$ac_try\"") >&5
12783   (eval $ac_try) 2>&5
12784   ac_status=$?
12785   echo "$as_me:12785: \$? = $ac_status" >&5
12786   (exit $ac_status); }; }; then
12787   break
12788 else
12789   echo "$as_me: failed program was:" >&5
12790 cat conftest.$ac_ext >&5
12791 fi
12792 rm -f conftest.$ac_objext conftest.$ac_ext
12793   cat >conftest.$ac_ext <<_ACEOF
12794 #line 12794 "configure"
12795 #include "confdefs.h"
12796 #define _FILE_OFFSET_BITS 64
12797 #include <sys/types.h>
12798  /* Check that off_t can represent 2**63 - 1 correctly.
12799     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12800     since some C++ compilers masquerading as C compilers
12801     incorrectly reject 9223372036854775807.  */
12802 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12803   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12804                        && LARGE_OFF_T % 2147483647 == 1)
12805                       ? 1 : -1];
12806 int
12807 main (void)
12808 {
12809
12810   ;
12811   return 0;
12812 }
12813 _ACEOF
12814 rm -f conftest.$ac_objext
12815 if { (eval echo "$as_me:12815: \"$ac_compile\"") >&5
12816   (eval $ac_compile) 2>&5
12817   ac_status=$?
12818   echo "$as_me:12818: \$? = $ac_status" >&5
12819   (exit $ac_status); } &&
12820          { ac_try='test -s conftest.$ac_objext'
12821   { (eval echo "$as_me:12821: \"$ac_try\"") >&5
12822   (eval $ac_try) 2>&5
12823   ac_status=$?
12824   echo "$as_me:12824: \$? = $ac_status" >&5
12825   (exit $ac_status); }; }; then
12826   ac_cv_sys_file_offset_bits=64; break
12827 else
12828   echo "$as_me: failed program was:" >&5
12829 cat conftest.$ac_ext >&5
12830 fi
12831 rm -f conftest.$ac_objext conftest.$ac_ext
12832   break
12833 done
12834 fi
12835 echo "$as_me:12835: result: $ac_cv_sys_file_offset_bits" >&5
12836 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12837 if test "$ac_cv_sys_file_offset_bits" != no; then
12838
12839 cat >>confdefs.h <<EOF
12840 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12841 EOF
12842
12843 fi
12844 rm -rf conftest*
12845   echo "$as_me:12845: checking for _LARGE_FILES value needed for large files" >&5
12846 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12847 if test "${ac_cv_sys_large_files+set}" = set; then
12848   echo $ECHO_N "(cached) $ECHO_C" >&6
12849 else
12850   while :; do
12851   ac_cv_sys_large_files=no
12852   cat >conftest.$ac_ext <<_ACEOF
12853 #line 12853 "configure"
12854 #include "confdefs.h"
12855 #include <sys/types.h>
12856  /* Check that off_t can represent 2**63 - 1 correctly.
12857     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12858     since some C++ compilers masquerading as C compilers
12859     incorrectly reject 9223372036854775807.  */
12860 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12861   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12862                        && LARGE_OFF_T % 2147483647 == 1)
12863                       ? 1 : -1];
12864 int
12865 main (void)
12866 {
12867
12868   ;
12869   return 0;
12870 }
12871 _ACEOF
12872 rm -f conftest.$ac_objext
12873 if { (eval echo "$as_me:12873: \"$ac_compile\"") >&5
12874   (eval $ac_compile) 2>&5
12875   ac_status=$?
12876   echo "$as_me:12876: \$? = $ac_status" >&5
12877   (exit $ac_status); } &&
12878          { ac_try='test -s conftest.$ac_objext'
12879   { (eval echo "$as_me:12879: \"$ac_try\"") >&5
12880   (eval $ac_try) 2>&5
12881   ac_status=$?
12882   echo "$as_me:12882: \$? = $ac_status" >&5
12883   (exit $ac_status); }; }; then
12884   break
12885 else
12886   echo "$as_me: failed program was:" >&5
12887 cat conftest.$ac_ext >&5
12888 fi
12889 rm -f conftest.$ac_objext conftest.$ac_ext
12890   cat >conftest.$ac_ext <<_ACEOF
12891 #line 12891 "configure"
12892 #include "confdefs.h"
12893 #define _LARGE_FILES 1
12894 #include <sys/types.h>
12895  /* Check that off_t can represent 2**63 - 1 correctly.
12896     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12897     since some C++ compilers masquerading as C compilers
12898     incorrectly reject 9223372036854775807.  */
12899 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12900   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12901                        && LARGE_OFF_T % 2147483647 == 1)
12902                       ? 1 : -1];
12903 int
12904 main (void)
12905 {
12906
12907   ;
12908   return 0;
12909 }
12910 _ACEOF
12911 rm -f conftest.$ac_objext
12912 if { (eval echo "$as_me:12912: \"$ac_compile\"") >&5
12913   (eval $ac_compile) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit $ac_status); } &&
12917          { ac_try='test -s conftest.$ac_objext'
12918   { (eval echo "$as_me:12918: \"$ac_try\"") >&5
12919   (eval $ac_try) 2>&5
12920   ac_status=$?
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); }; }; then
12923   ac_cv_sys_large_files=1; break
12924 else
12925   echo "$as_me: failed program was:" >&5
12926 cat conftest.$ac_ext >&5
12927 fi
12928 rm -f conftest.$ac_objext conftest.$ac_ext
12929   break
12930 done
12931 fi
12932 echo "$as_me:12932: result: $ac_cv_sys_large_files" >&5
12933 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12934 if test "$ac_cv_sys_large_files" != no; then
12935
12936 cat >>confdefs.h <<EOF
12937 #define _LARGE_FILES $ac_cv_sys_large_files
12938 EOF
12939
12940 fi
12941 rm -rf conftest*
12942 fi
12943
12944         if test "$enable_largefile" != no ; then
12945         echo "$as_me:12945: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12946 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12947 if test "${ac_cv_sys_largefile_source+set}" = set; then
12948   echo $ECHO_N "(cached) $ECHO_C" >&6
12949 else
12950   while :; do
12951   ac_cv_sys_largefile_source=no
12952   cat >conftest.$ac_ext <<_ACEOF
12953 #line 12953 "configure"
12954 #include "confdefs.h"
12955 #include <stdio.h>
12956 int
12957 main (void)
12958 {
12959 return !fseeko;
12960   ;
12961   return 0;
12962 }
12963 _ACEOF
12964 rm -f conftest.$ac_objext
12965 if { (eval echo "$as_me:12965: \"$ac_compile\"") >&5
12966   (eval $ac_compile) 2>&5
12967   ac_status=$?
12968   echo "$as_me:12968: \$? = $ac_status" >&5
12969   (exit $ac_status); } &&
12970          { ac_try='test -s conftest.$ac_objext'
12971   { (eval echo "$as_me:12971: \"$ac_try\"") >&5
12972   (eval $ac_try) 2>&5
12973   ac_status=$?
12974   echo "$as_me:12974: \$? = $ac_status" >&5
12975   (exit $ac_status); }; }; then
12976   break
12977 else
12978   echo "$as_me: failed program was:" >&5
12979 cat conftest.$ac_ext >&5
12980 fi
12981 rm -f conftest.$ac_objext conftest.$ac_ext
12982   cat >conftest.$ac_ext <<_ACEOF
12983 #line 12983 "configure"
12984 #include "confdefs.h"
12985 #define _LARGEFILE_SOURCE 1
12986 #include <stdio.h>
12987 int
12988 main (void)
12989 {
12990 return !fseeko;
12991   ;
12992   return 0;
12993 }
12994 _ACEOF
12995 rm -f conftest.$ac_objext
12996 if { (eval echo "$as_me:12996: \"$ac_compile\"") >&5
12997   (eval $ac_compile) 2>&5
12998   ac_status=$?
12999   echo "$as_me:12999: \$? = $ac_status" >&5
13000   (exit $ac_status); } &&
13001          { ac_try='test -s conftest.$ac_objext'
13002   { (eval echo "$as_me:13002: \"$ac_try\"") >&5
13003   (eval $ac_try) 2>&5
13004   ac_status=$?
13005   echo "$as_me:13005: \$? = $ac_status" >&5
13006   (exit $ac_status); }; }; then
13007   ac_cv_sys_largefile_source=1; break
13008 else
13009   echo "$as_me: failed program was:" >&5
13010 cat conftest.$ac_ext >&5
13011 fi
13012 rm -f conftest.$ac_objext conftest.$ac_ext
13013   break
13014 done
13015 fi
13016 echo "$as_me:13016: result: $ac_cv_sys_largefile_source" >&5
13017 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13018 if test "$ac_cv_sys_largefile_source" != no; then
13019
13020 cat >>confdefs.h <<EOF
13021 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13022 EOF
13023
13024 fi
13025 rm -rf conftest*
13026
13027 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13028 # in glibc 2.1.3, but that breaks too many other things.
13029 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13030 echo "$as_me:13030: checking for fseeko" >&5
13031 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13032 if test "${ac_cv_func_fseeko+set}" = set; then
13033   echo $ECHO_N "(cached) $ECHO_C" >&6
13034 else
13035   cat >conftest.$ac_ext <<_ACEOF
13036 #line 13036 "configure"
13037 #include "confdefs.h"
13038 #include <stdio.h>
13039 int
13040 main (void)
13041 {
13042 return fseeko && fseeko (stdin, 0, 0);
13043   ;
13044   return 0;
13045 }
13046 _ACEOF
13047 rm -f conftest.$ac_objext conftest$ac_exeext
13048 if { (eval echo "$as_me:13048: \"$ac_link\"") >&5
13049   (eval $ac_link) 2>&5
13050   ac_status=$?
13051   echo "$as_me:13051: \$? = $ac_status" >&5
13052   (exit $ac_status); } &&
13053          { ac_try='test -s conftest$ac_exeext'
13054   { (eval echo "$as_me:13054: \"$ac_try\"") >&5
13055   (eval $ac_try) 2>&5
13056   ac_status=$?
13057   echo "$as_me:13057: \$? = $ac_status" >&5
13058   (exit $ac_status); }; }; then
13059   ac_cv_func_fseeko=yes
13060 else
13061   echo "$as_me: failed program was:" >&5
13062 cat conftest.$ac_ext >&5
13063 ac_cv_func_fseeko=no
13064 fi
13065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13066 fi
13067 echo "$as_me:13067: result: $ac_cv_func_fseeko" >&5
13068 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13069 if test $ac_cv_func_fseeko = yes; then
13070
13071 cat >>confdefs.h <<\EOF
13072 #define HAVE_FSEEKO 1
13073 EOF
13074
13075 fi
13076
13077         # Normally we would collect these definitions in the config.h,
13078         # but (like _XOPEN_SOURCE), some environments rely on having these
13079         # defined before any of the system headers are included.  Another
13080         # case comes up with C++, e.g., on AIX the compiler compiles the
13081         # header files by themselves before looking at the body files it is
13082         # told to compile.  For ncurses, those header files do not include
13083         # the config.h
13084         if test "$ac_cv_sys_large_files" != no
13085         then
13086
13087         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13088         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13089
13090         fi
13091         if test "$ac_cv_sys_largefile_source" != no
13092         then
13093
13094         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13095         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13096
13097         fi
13098         if test "$ac_cv_sys_file_offset_bits" != no
13099         then
13100
13101         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13102         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13103
13104         fi
13105
13106         echo "$as_me:13106: checking whether to use struct dirent64" >&5
13107 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13108 if test "${cf_cv_struct_dirent64+set}" = set; then
13109   echo $ECHO_N "(cached) $ECHO_C" >&6
13110 else
13111
13112                 cat >conftest.$ac_ext <<_ACEOF
13113 #line 13113 "configure"
13114 #include "confdefs.h"
13115
13116 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13117 #include <sys/types.h>
13118 #include <dirent.h>
13119
13120 int
13121 main (void)
13122 {
13123
13124                 /* if transitional largefile support is setup, this is true */
13125                 extern struct dirent64 * readdir(DIR *);
13126                 struct dirent64 *x = readdir((DIR *)0);
13127                 struct dirent *y = readdir((DIR *)0);
13128                 int z = x - y;
13129                 (void)z;
13130
13131   ;
13132   return 0;
13133 }
13134 _ACEOF
13135 rm -f conftest.$ac_objext
13136 if { (eval echo "$as_me:13136: \"$ac_compile\"") >&5
13137   (eval $ac_compile) 2>&5
13138   ac_status=$?
13139   echo "$as_me:13139: \$? = $ac_status" >&5
13140   (exit $ac_status); } &&
13141          { ac_try='test -s conftest.$ac_objext'
13142   { (eval echo "$as_me:13142: \"$ac_try\"") >&5
13143   (eval $ac_try) 2>&5
13144   ac_status=$?
13145   echo "$as_me:13145: \$? = $ac_status" >&5
13146   (exit $ac_status); }; }; then
13147   cf_cv_struct_dirent64=yes
13148 else
13149   echo "$as_me: failed program was:" >&5
13150 cat conftest.$ac_ext >&5
13151 cf_cv_struct_dirent64=no
13152 fi
13153 rm -f conftest.$ac_objext conftest.$ac_ext
13154
13155 fi
13156 echo "$as_me:13156: result: $cf_cv_struct_dirent64" >&5
13157 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13158         test "$cf_cv_struct_dirent64" = yes &&
13159 cat >>confdefs.h <<\EOF
13160 #define HAVE_STRUCT_DIRENT64 1
13161 EOF
13162
13163         fi
13164
13165 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13166 echo "$as_me:13166: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13167 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13168
13169 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13170 if test "${enable_tparm_varargs+set}" = set; then
13171   enableval="$enable_tparm_varargs"
13172   with_tparm_varargs=$enableval
13173 else
13174   with_tparm_varargs=yes
13175 fi;
13176 echo "$as_me:13176: result: $with_tparm_varargs" >&5
13177 echo "${ECHO_T}$with_tparm_varargs" >&6
13178 NCURSES_TPARM_VARARGS=0
13179 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13180
13181 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13182 if test "$with_ticlib" != no ; then
13183 echo "$as_me:13183: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13184 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13185
13186 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13187 if test "${enable_tic_depends+set}" = set; then
13188   enableval="$enable_tic_depends"
13189   with_tic_depends=$enableval
13190 else
13191   with_tic_depends=yes
13192 fi;
13193 echo "$as_me:13193: result: $with_tic_depends" >&5
13194 echo "${ECHO_T}$with_tic_depends" >&6
13195 else
13196         with_tic_depends=no
13197 fi
13198
13199 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13200 echo "$as_me:13200: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13201 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13202
13203 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13204 if test "${enable_wattr_macros+set}" = set; then
13205   enableval="$enable_wattr_macros"
13206   with_wattr_macros=$enableval
13207 else
13208   with_wattr_macros=yes
13209 fi;
13210 if [ "x$with_wattr_macros" != xyes ]; then
13211         NCURSES_WATTR_MACROS=0
13212         echo "$as_me:13212: result: yes" >&5
13213 echo "${ECHO_T}yes" >&6
13214 else
13215         NCURSES_WATTR_MACROS=1
13216         echo "$as_me:13216: result: no" >&5
13217 echo "${ECHO_T}no" >&6
13218 fi
13219
13220 echo "$as_me:13220: checking for X11 rgb file" >&5
13221 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13222
13223 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13224 if test "${with_x11_rgb+set}" = set; then
13225   withval="$with_x11_rgb"
13226   RGB_PATH=$withval
13227 else
13228   RGB_PATH=auto
13229 fi;
13230
13231 if test "x$RGB_PATH" = xauto
13232 then
13233         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13234         for cf_path in \
13235                 /opt/local/share/X11/rgb.txt \
13236                 /opt/X11/share/X11/rgb.txt \
13237                 /usr/share/X11/rgb.txt \
13238                 /usr/X11/share/X11/rgb.txt \
13239                 /usr/X11/lib/X11/rgb.txt \
13240                 /usr/lib/X11/rgb.txt \
13241                 /etc/X11/rgb.txt \
13242                 /usr/pkg/lib/X11/rgb.txt \
13243                 /usr/X11R7/lib/X11/rgb.txt \
13244                 /usr/X11R6/lib/X11/rgb.txt \
13245                 /usr/X11R5/lib/X11/rgb.txt \
13246                 /usr/X11R4/lib/X11/rgb.txt \
13247                 /usr/local/lib/X11/rgb.txt \
13248                 /usr/local/share/X11/rgb.txt \
13249                 /usr/lib64/X11/rgb.txt
13250         do
13251                 if test -f "$cf_path" ; then
13252                         RGB_PATH="$cf_path"
13253                         break
13254                 fi
13255         done
13256 else
13257         cf_path=$RGB_PATH
13258
13259 if test "x$prefix" != xNONE; then
13260         cf_path_syntax="$prefix"
13261 else
13262         cf_path_syntax="$ac_default_prefix"
13263 fi
13264
13265 case ".$cf_path" in
13266 (.\$\(*\)*|.\'*\'*)
13267         ;;
13268 (..|./*|.\\*)
13269         ;;
13270 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13271         ;;
13272 (.\${*prefix}*|.\${*dir}*)
13273         eval cf_path="$cf_path"
13274         case ".$cf_path" in
13275         (.NONE/*)
13276                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13277                 ;;
13278         esac
13279         ;;
13280 (.no|.NONE/*)
13281         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13282         ;;
13283 (*)
13284         { { echo "$as_me:13284: error: expected a pathname, not \"$cf_path\"" >&5
13285 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13286    { (exit 1); exit 1; }; }
13287         ;;
13288 esac
13289
13290 fi
13291
13292 echo "$as_me:13292: result: $RGB_PATH" >&5
13293 echo "${ECHO_T}$RGB_PATH" >&6
13294
13295 cat >>confdefs.h <<EOF
13296 #define RGB_PATH "$cf_path"
13297 EOF
13298
13299 no_x11_rgb=
13300 if test "$RGB_PATH" = no
13301 then
13302         no_x11_rgb="#"
13303 fi
13304
13305 ###   use option --with-bool to override bool's type
13306 echo "$as_me:13306: checking for type of bool" >&5
13307 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13308
13309 # Check whether --with-bool or --without-bool was given.
13310 if test "${with_bool+set}" = set; then
13311   withval="$with_bool"
13312   NCURSES_BOOL="$withval"
13313 else
13314   NCURSES_BOOL=auto
13315 fi;
13316 echo "$as_me:13316: result: $NCURSES_BOOL" >&5
13317 echo "${ECHO_T}$NCURSES_BOOL" >&6
13318
13319 echo "$as_me:13319: checking for alternate terminal capabilities file" >&5
13320 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13321
13322 # Check whether --with-caps or --without-caps was given.
13323 if test "${with_caps+set}" = set; then
13324   withval="$with_caps"
13325   TERMINFO_CAPS=Caps.$withval
13326 else
13327   TERMINFO_CAPS=Caps
13328 fi;
13329 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13330 echo "$as_me:13330: result: $TERMINFO_CAPS" >&5
13331 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13332
13333 ###   use option --with-chtype to override chtype's type
13334 echo "$as_me:13334: checking for type of chtype" >&5
13335 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13336
13337 # Check whether --with-chtype or --without-chtype was given.
13338 if test "${with_chtype+set}" = set; then
13339   withval="$with_chtype"
13340   NCURSES_CHTYPE="$withval"
13341 else
13342   NCURSES_CHTYPE=$cf_dft_chtype
13343 fi;
13344 echo "$as_me:13344: result: $NCURSES_CHTYPE" >&5
13345 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13346
13347 ###   use option --with-ospeed to override ospeed's type
13348 echo "$as_me:13348: checking for type of ospeed" >&5
13349 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13350
13351 # Check whether --with-ospeed or --without-ospeed was given.
13352 if test "${with_ospeed+set}" = set; then
13353   withval="$with_ospeed"
13354   NCURSES_OSPEED="$withval"
13355 else
13356   NCURSES_OSPEED=short
13357 fi;
13358 echo "$as_me:13358: result: $NCURSES_OSPEED" >&5
13359 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13360
13361 ###   use option --with-mmask-t to override mmask_t's type
13362 echo "$as_me:13362: checking for type of mmask_t" >&5
13363 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13364
13365 # Check whether --with-mmask-t or --without-mmask-t was given.
13366 if test "${with_mmask_t+set}" = set; then
13367   withval="$with_mmask_t"
13368   NCURSES_MMASK_T="$withval"
13369 else
13370   NCURSES_MMASK_T=$cf_dft_mmask_t
13371 fi;
13372 echo "$as_me:13372: result: $NCURSES_MMASK_T" >&5
13373 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13374
13375 ###   use option --with-ccharw-max to override CCHARW_MAX size
13376 echo "$as_me:13376: checking for size CCHARW_MAX" >&5
13377 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13378
13379 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13380 if test "${with_ccharw_max+set}" = set; then
13381   withval="$with_ccharw_max"
13382   NCURSES_CCHARW_MAX="$withval"
13383 else
13384   NCURSES_CCHARW_MAX=5
13385 fi;
13386 echo "$as_me:13386: result: $NCURSES_CCHARW_MAX" >&5
13387 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13388
13389 echo "$as_me:13389: checking for ANSI C header files" >&5
13390 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13391 if test "${ac_cv_header_stdc+set}" = set; then
13392   echo $ECHO_N "(cached) $ECHO_C" >&6
13393 else
13394   cat >conftest.$ac_ext <<_ACEOF
13395 #line 13395 "configure"
13396 #include "confdefs.h"
13397 #include <stdlib.h>
13398 #include <stdarg.h>
13399 #include <string.h>
13400 #include <float.h>
13401
13402 _ACEOF
13403 if { (eval echo "$as_me:13403: \"$ac_cpp conftest.$ac_ext\"") >&5
13404   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13405   ac_status=$?
13406   egrep -v '^ *\+' conftest.er1 >conftest.err
13407   rm -f conftest.er1
13408   cat conftest.err >&5
13409   echo "$as_me:13409: \$? = $ac_status" >&5
13410   (exit $ac_status); } >/dev/null; then
13411   if test -s conftest.err; then
13412     ac_cpp_err=$ac_c_preproc_warn_flag
13413   else
13414     ac_cpp_err=
13415   fi
13416 else
13417   ac_cpp_err=yes
13418 fi
13419 if test -z "$ac_cpp_err"; then
13420   ac_cv_header_stdc=yes
13421 else
13422   echo "$as_me: failed program was:" >&5
13423   cat conftest.$ac_ext >&5
13424   ac_cv_header_stdc=no
13425 fi
13426 rm -f conftest.err conftest.$ac_ext
13427
13428 if test $ac_cv_header_stdc = yes; then
13429   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13430   cat >conftest.$ac_ext <<_ACEOF
13431 #line 13431 "configure"
13432 #include "confdefs.h"
13433 #include <string.h>
13434
13435 _ACEOF
13436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13437   egrep "memchr" >/dev/null 2>&1; then
13438   :
13439 else
13440   ac_cv_header_stdc=no
13441 fi
13442 rm -rf conftest*
13443
13444 fi
13445
13446 if test $ac_cv_header_stdc = yes; then
13447   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13448   cat >conftest.$ac_ext <<_ACEOF
13449 #line 13449 "configure"
13450 #include "confdefs.h"
13451 #include <stdlib.h>
13452
13453 _ACEOF
13454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13455   egrep "free" >/dev/null 2>&1; then
13456   :
13457 else
13458   ac_cv_header_stdc=no
13459 fi
13460 rm -rf conftest*
13461
13462 fi
13463
13464 if test $ac_cv_header_stdc = yes; then
13465   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13466   if test "$cross_compiling" = yes; then
13467   :
13468 else
13469   cat >conftest.$ac_ext <<_ACEOF
13470 #line 13470 "configure"
13471 #include "confdefs.h"
13472 #include <ctype.h>
13473 #if ((' ' & 0x0FF) == 0x020)
13474 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13475 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13476 #else
13477 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13478                      || ('j' <= (c) && (c) <= 'r') \
13479                      || ('s' <= (c) && (c) <= 'z'))
13480 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13481 #endif
13482
13483 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13484 int
13485 main (void)
13486 {
13487   int i;
13488   for (i = 0; i < 256; i++)
13489     if (XOR (islower (i), ISLOWER (i))
13490         || toupper (i) != TOUPPER (i))
13491       $ac_main_return(2);
13492   $ac_main_return (0);
13493 }
13494 _ACEOF
13495 rm -f conftest$ac_exeext
13496 if { (eval echo "$as_me:13496: \"$ac_link\"") >&5
13497   (eval $ac_link) 2>&5
13498   ac_status=$?
13499   echo "$as_me:13499: \$? = $ac_status" >&5
13500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13501   { (eval echo "$as_me:13501: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit $ac_status); }; }; then
13506   :
13507 else
13508   echo "$as_me: program exited with status $ac_status" >&5
13509 echo "$as_me: failed program was:" >&5
13510 cat conftest.$ac_ext >&5
13511 ac_cv_header_stdc=no
13512 fi
13513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13514 fi
13515 fi
13516 fi
13517 echo "$as_me:13517: result: $ac_cv_header_stdc" >&5
13518 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13519 if test $ac_cv_header_stdc = yes; then
13520
13521 cat >>confdefs.h <<\EOF
13522 #define STDC_HEADERS 1
13523 EOF
13524
13525 fi
13526
13527 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13528
13529 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13530                   inttypes.h stdint.h unistd.h
13531 do
13532 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13533 echo "$as_me:13533: checking for $ac_header" >&5
13534 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13535 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13536   echo $ECHO_N "(cached) $ECHO_C" >&6
13537 else
13538   cat >conftest.$ac_ext <<_ACEOF
13539 #line 13539 "configure"
13540 #include "confdefs.h"
13541 $ac_includes_default
13542 #include <$ac_header>
13543 _ACEOF
13544 rm -f conftest.$ac_objext
13545 if { (eval echo "$as_me:13545: \"$ac_compile\"") >&5
13546   (eval $ac_compile) 2>&5
13547   ac_status=$?
13548   echo "$as_me:13548: \$? = $ac_status" >&5
13549   (exit $ac_status); } &&
13550          { ac_try='test -s conftest.$ac_objext'
13551   { (eval echo "$as_me:13551: \"$ac_try\"") >&5
13552   (eval $ac_try) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit $ac_status); }; }; then
13556   eval "$as_ac_Header=yes"
13557 else
13558   echo "$as_me: failed program was:" >&5
13559 cat conftest.$ac_ext >&5
13560 eval "$as_ac_Header=no"
13561 fi
13562 rm -f conftest.$ac_objext conftest.$ac_ext
13563 fi
13564 echo "$as_me:13564: result: `eval echo '${'$as_ac_Header'}'`" >&5
13565 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13566 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13567   cat >>confdefs.h <<EOF
13568 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13569 EOF
13570
13571 fi
13572 done
13573
13574 echo "$as_me:13574: checking for signed char" >&5
13575 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13576 if test "${ac_cv_type_signed_char+set}" = set; then
13577   echo $ECHO_N "(cached) $ECHO_C" >&6
13578 else
13579   cat >conftest.$ac_ext <<_ACEOF
13580 #line 13580 "configure"
13581 #include "confdefs.h"
13582 $ac_includes_default
13583 int
13584 main (void)
13585 {
13586 if ((signed char *) 0)
13587   return 0;
13588 if (sizeof (signed char))
13589   return 0;
13590   ;
13591   return 0;
13592 }
13593 _ACEOF
13594 rm -f conftest.$ac_objext
13595 if { (eval echo "$as_me:13595: \"$ac_compile\"") >&5
13596   (eval $ac_compile) 2>&5
13597   ac_status=$?
13598   echo "$as_me:13598: \$? = $ac_status" >&5
13599   (exit $ac_status); } &&
13600          { ac_try='test -s conftest.$ac_objext'
13601   { (eval echo "$as_me:13601: \"$ac_try\"") >&5
13602   (eval $ac_try) 2>&5
13603   ac_status=$?
13604   echo "$as_me:13604: \$? = $ac_status" >&5
13605   (exit $ac_status); }; }; then
13606   ac_cv_type_signed_char=yes
13607 else
13608   echo "$as_me: failed program was:" >&5
13609 cat conftest.$ac_ext >&5
13610 ac_cv_type_signed_char=no
13611 fi
13612 rm -f conftest.$ac_objext conftest.$ac_ext
13613 fi
13614 echo "$as_me:13614: result: $ac_cv_type_signed_char" >&5
13615 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13616
13617 echo "$as_me:13617: checking size of signed char" >&5
13618 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13619 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13620   echo $ECHO_N "(cached) $ECHO_C" >&6
13621 else
13622   if test "$ac_cv_type_signed_char" = yes; then
13623   if test "$cross_compiling" = yes; then
13624   # Depending upon the size, compute the lo and hi bounds.
13625 cat >conftest.$ac_ext <<_ACEOF
13626 #line 13626 "configure"
13627 #include "confdefs.h"
13628 $ac_includes_default
13629 int
13630 main (void)
13631 {
13632 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13633   ;
13634   return 0;
13635 }
13636 _ACEOF
13637 rm -f conftest.$ac_objext
13638 if { (eval echo "$as_me:13638: \"$ac_compile\"") >&5
13639   (eval $ac_compile) 2>&5
13640   ac_status=$?
13641   echo "$as_me:13641: \$? = $ac_status" >&5
13642   (exit $ac_status); } &&
13643          { ac_try='test -s conftest.$ac_objext'
13644   { (eval echo "$as_me:13644: \"$ac_try\"") >&5
13645   (eval $ac_try) 2>&5
13646   ac_status=$?
13647   echo "$as_me:13647: \$? = $ac_status" >&5
13648   (exit $ac_status); }; }; then
13649   ac_lo=0 ac_mid=0
13650   while :; do
13651     cat >conftest.$ac_ext <<_ACEOF
13652 #line 13652 "configure"
13653 #include "confdefs.h"
13654 $ac_includes_default
13655 int
13656 main (void)
13657 {
13658 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13659   ;
13660   return 0;
13661 }
13662 _ACEOF
13663 rm -f conftest.$ac_objext
13664 if { (eval echo "$as_me:13664: \"$ac_compile\"") >&5
13665   (eval $ac_compile) 2>&5
13666   ac_status=$?
13667   echo "$as_me:13667: \$? = $ac_status" >&5
13668   (exit $ac_status); } &&
13669          { ac_try='test -s conftest.$ac_objext'
13670   { (eval echo "$as_me:13670: \"$ac_try\"") >&5
13671   (eval $ac_try) 2>&5
13672   ac_status=$?
13673   echo "$as_me:13673: \$? = $ac_status" >&5
13674   (exit $ac_status); }; }; then
13675   ac_hi=$ac_mid; break
13676 else
13677   echo "$as_me: failed program was:" >&5
13678 cat conftest.$ac_ext >&5
13679 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13680 fi
13681 rm -f conftest.$ac_objext conftest.$ac_ext
13682   done
13683 else
13684   echo "$as_me: failed program was:" >&5
13685 cat conftest.$ac_ext >&5
13686 ac_hi=-1 ac_mid=-1
13687   while :; do
13688     cat >conftest.$ac_ext <<_ACEOF
13689 #line 13689 "configure"
13690 #include "confdefs.h"
13691 $ac_includes_default
13692 int
13693 main (void)
13694 {
13695 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13696   ;
13697   return 0;
13698 }
13699 _ACEOF
13700 rm -f conftest.$ac_objext
13701 if { (eval echo "$as_me:13701: \"$ac_compile\"") >&5
13702   (eval $ac_compile) 2>&5
13703   ac_status=$?
13704   echo "$as_me:13704: \$? = $ac_status" >&5
13705   (exit $ac_status); } &&
13706          { ac_try='test -s conftest.$ac_objext'
13707   { (eval echo "$as_me:13707: \"$ac_try\"") >&5
13708   (eval $ac_try) 2>&5
13709   ac_status=$?
13710   echo "$as_me:13710: \$? = $ac_status" >&5
13711   (exit $ac_status); }; }; then
13712   ac_lo=$ac_mid; break
13713 else
13714   echo "$as_me: failed program was:" >&5
13715 cat conftest.$ac_ext >&5
13716 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13717 fi
13718 rm -f conftest.$ac_objext conftest.$ac_ext
13719   done
13720 fi
13721 rm -f conftest.$ac_objext conftest.$ac_ext
13722 # Binary search between lo and hi bounds.
13723 while test "x$ac_lo" != "x$ac_hi"; do
13724   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13725   cat >conftest.$ac_ext <<_ACEOF
13726 #line 13726 "configure"
13727 #include "confdefs.h"
13728 $ac_includes_default
13729 int
13730 main (void)
13731 {
13732 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 rm -f conftest.$ac_objext
13738 if { (eval echo "$as_me:13738: \"$ac_compile\"") >&5
13739   (eval $ac_compile) 2>&5
13740   ac_status=$?
13741   echo "$as_me:13741: \$? = $ac_status" >&5
13742   (exit $ac_status); } &&
13743          { ac_try='test -s conftest.$ac_objext'
13744   { (eval echo "$as_me:13744: \"$ac_try\"") >&5
13745   (eval $ac_try) 2>&5
13746   ac_status=$?
13747   echo "$as_me:13747: \$? = $ac_status" >&5
13748   (exit $ac_status); }; }; then
13749   ac_hi=$ac_mid
13750 else
13751   echo "$as_me: failed program was:" >&5
13752 cat conftest.$ac_ext >&5
13753 ac_lo=`expr $ac_mid + 1`
13754 fi
13755 rm -f conftest.$ac_objext conftest.$ac_ext
13756 done
13757 ac_cv_sizeof_signed_char=$ac_lo
13758 else
13759   if test "$cross_compiling" = yes; then
13760   { { echo "$as_me:13760: error: cannot run test program while cross compiling" >&5
13761 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13762    { (exit 1); exit 1; }; }
13763 else
13764   cat >conftest.$ac_ext <<_ACEOF
13765 #line 13765 "configure"
13766 #include "confdefs.h"
13767 $ac_includes_default
13768 int
13769 main (void)
13770 {
13771 FILE *f = fopen ("conftest.val", "w");
13772 if (!f)
13773   $ac_main_return (1);
13774 fprintf (f, "%d", (sizeof (signed char)));
13775 fclose (f);
13776   ;
13777   return 0;
13778 }
13779 _ACEOF
13780 rm -f conftest$ac_exeext
13781 if { (eval echo "$as_me:13781: \"$ac_link\"") >&5
13782   (eval $ac_link) 2>&5
13783   ac_status=$?
13784   echo "$as_me:13784: \$? = $ac_status" >&5
13785   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13786   { (eval echo "$as_me:13786: \"$ac_try\"") >&5
13787   (eval $ac_try) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit $ac_status); }; }; then
13791   ac_cv_sizeof_signed_char=`cat conftest.val`
13792 else
13793   echo "$as_me: program exited with status $ac_status" >&5
13794 echo "$as_me: failed program was:" >&5
13795 cat conftest.$ac_ext >&5
13796 fi
13797 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13798 fi
13799 fi
13800 rm -f conftest.val
13801 else
13802   ac_cv_sizeof_signed_char=0
13803 fi
13804 fi
13805 echo "$as_me:13805: result: $ac_cv_sizeof_signed_char" >&5
13806 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13807 cat >>confdefs.h <<EOF
13808 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13809 EOF
13810
13811 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13812         NCURSES_SBOOL="signed char"
13813 else
13814         NCURSES_SBOOL="char"
13815 fi
13816 echo "$as_me:13816: checking if you want to use signed Boolean array in term.h" >&5
13817 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13818
13819 # Check whether --enable-signed-char or --disable-signed-char was given.
13820 if test "${enable_signed_char+set}" = set; then
13821   enableval="$enable_signed_char"
13822   with_signed_char=$enableval
13823 else
13824   with_signed_char=no
13825 fi;
13826 echo "$as_me:13826: result: $with_signed_char" >&5
13827 echo "${ECHO_T}$with_signed_char" >&6
13828 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13829
13830 ###   use option --with-tparm-arg to override tparm's argument type
13831 echo "$as_me:13831: checking for type of tparm args" >&5
13832 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13833
13834 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13835 if test "${with_tparm_arg+set}" = set; then
13836   withval="$with_tparm_arg"
13837   NCURSES_TPARM_ARG="$withval"
13838 else
13839   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13840 fi;
13841 echo "$as_me:13841: result: $NCURSES_TPARM_ARG" >&5
13842 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13843
13844 ### Enable compiling-in rcs id's
13845 echo "$as_me:13845: checking if RCS identifiers should be compiled-in" >&5
13846 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13847
13848 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13849 if test "${with_rcs_ids+set}" = set; then
13850   withval="$with_rcs_ids"
13851   with_rcs_ids=$withval
13852 else
13853   with_rcs_ids=no
13854 fi;
13855 echo "$as_me:13855: result: $with_rcs_ids" >&5
13856 echo "${ECHO_T}$with_rcs_ids" >&6
13857 test "x$with_rcs_ids" = xyes &&
13858 cat >>confdefs.h <<\EOF
13859 #define USE_RCS_IDS 1
13860 EOF
13861
13862 ###############################################################################
13863
13864 echo "$as_me:13864: checking format of man-pages" >&5
13865 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13866
13867 # Check whether --with-manpage-format or --without-manpage-format was given.
13868 if test "${with_manpage_format+set}" = set; then
13869   withval="$with_manpage_format"
13870   MANPAGE_FORMAT=$withval
13871 else
13872   MANPAGE_FORMAT=unknown
13873 fi;
13874
13875 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13876 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13877
13878 cf_unknown=
13879
13880 case $MANPAGE_FORMAT in
13881 (unknown)
13882         if test -z "$MANPATH" ; then
13883                 MANPATH="/usr/man:/usr/share/man"
13884         fi
13885
13886         # look for the 'date' man-page (it's most likely to be installed!)
13887         MANPAGE_FORMAT=
13888         cf_preform=no
13889         cf_catonly=yes
13890         cf_example=date
13891
13892         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13893         for cf_dir in $MANPATH; do
13894                 test -z "$cf_dir" && cf_dir=/usr/man
13895                 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
13896                 do
13897                         cf_test=`echo $cf_name | sed -e 's/*//'`
13898                         if test "x$cf_test" = "x$cf_name" ; then
13899
13900                                 case "$cf_name" in
13901                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13902                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13903                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13904                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13905                                 esac
13906
13907                                 case "$cf_name" in
13908                                 ($cf_dir/man*)
13909                                         cf_catonly=no
13910                                         ;;
13911                                 ($cf_dir/cat*)
13912                                         cf_preform=yes
13913                                         ;;
13914                                 esac
13915                                 break
13916                         fi
13917
13918                         # if we found a match in either man* or cat*, stop looking
13919                         if test -n "$MANPAGE_FORMAT" ; then
13920                                 cf_found=no
13921                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13922                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13923                                 case "$cf_name" in
13924                                 ($cf_dir/cat*)
13925                                         cf_found=yes
13926                                         ;;
13927                                 esac
13928                                 test $cf_found=yes && break
13929                         fi
13930                 done
13931                 # only check the first directory in $MANPATH where we find manpages
13932                 if test -n "$MANPAGE_FORMAT" ; then
13933                         break
13934                 fi
13935         done
13936         # if we did not find the example, just assume it is normal
13937         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13938         IFS="$ac_save_ifs"
13939         ;;
13940 (*)
13941         for cf_option in $MANPAGE_FORMAT; do
13942         case $cf_option in
13943         (gzip|compress|BSDI|normal|formatted|catonly)
13944                 ;;
13945         (*)
13946                 cf_unknown="$cf_unknown $cf_option"
13947                 ;;
13948         esac
13949         done
13950         ;;
13951 esac
13952
13953 echo "$as_me:13953: result: $MANPAGE_FORMAT" >&5
13954 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13955 if test -n "$cf_unknown" ; then
13956         { echo "$as_me:13956: WARNING: Unexpected manpage-format $cf_unknown" >&5
13957 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13958 fi
13959
13960 echo "$as_me:13960: checking for manpage renaming" >&5
13961 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13962
13963 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13964 if test "${with_manpage_renames+set}" = set; then
13965   withval="$with_manpage_renames"
13966   MANPAGE_RENAMES=$withval
13967 else
13968   MANPAGE_RENAMES=yes
13969 fi;
13970
13971 case ".$MANPAGE_RENAMES" in
13972 (.no)
13973         ;;
13974 (.|.yes)
13975         # Debian 'man' program?
13976         if test -f /etc/debian_version ; then
13977                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13978         else
13979                 MANPAGE_RENAMES=no
13980         fi
13981         ;;
13982 esac
13983
13984 if test "$MANPAGE_RENAMES" != no ; then
13985         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13986                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13987         elif test ! -f $MANPAGE_RENAMES ; then
13988                 { { echo "$as_me:13988: error: not a filename: $MANPAGE_RENAMES" >&5
13989 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13990    { (exit 1); exit 1; }; }
13991         fi
13992
13993         test ! -d man && mkdir man
13994
13995         # Construct a sed-script to perform renaming within man-pages
13996         if test -n "$MANPAGE_RENAMES" ; then
13997                 test ! -d man && mkdir man
13998                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13999         fi
14000 fi
14001
14002 echo "$as_me:14002: result: $MANPAGE_RENAMES" >&5
14003 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14004
14005 echo "$as_me:14005: checking if manpage aliases will be installed" >&5
14006 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14007
14008 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14009 if test "${with_manpage_aliases+set}" = set; then
14010   withval="$with_manpage_aliases"
14011   MANPAGE_ALIASES=$withval
14012 else
14013   MANPAGE_ALIASES=yes
14014 fi;
14015
14016 echo "$as_me:14016: result: $MANPAGE_ALIASES" >&5
14017 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14018
14019 case "x$LN_S" in
14020 (xln*)
14021         cf_use_symlinks=yes
14022         ;;
14023 (*)
14024         cf_use_symlinks=no
14025         ;;
14026 esac
14027
14028 MANPAGE_SYMLINKS=no
14029 if test "$MANPAGE_ALIASES" = yes ; then
14030 echo "$as_me:14030: checking if manpage symlinks should be used" >&5
14031 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14032
14033 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14034 if test "${with_manpage_symlinks+set}" = set; then
14035   withval="$with_manpage_symlinks"
14036   MANPAGE_SYMLINKS=$withval
14037 else
14038   MANPAGE_SYMLINKS=$cf_use_symlinks
14039 fi;
14040
14041 if test "$$cf_use_symlinks" = no; then
14042 if test "$MANPAGE_SYMLINKS" = yes ; then
14043         { echo "$as_me:14043: WARNING: cannot make symlinks" >&5
14044 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14045         MANPAGE_SYMLINKS=no
14046 fi
14047 fi
14048
14049 echo "$as_me:14049: result: $MANPAGE_SYMLINKS" >&5
14050 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14051 fi
14052
14053 echo "$as_me:14053: checking for manpage tbl" >&5
14054 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14055
14056 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14057 if test "${with_manpage_tbl+set}" = set; then
14058   withval="$with_manpage_tbl"
14059   MANPAGE_TBL=$withval
14060 else
14061   MANPAGE_TBL=no
14062 fi;
14063
14064 echo "$as_me:14064: result: $MANPAGE_TBL" >&5
14065 echo "${ECHO_T}$MANPAGE_TBL" >&6
14066
14067 if test "$prefix" = "NONE" ; then
14068         cf_prefix="$ac_default_prefix"
14069 else
14070         cf_prefix="$prefix"
14071 fi
14072
14073 case "$MANPAGE_FORMAT" in
14074 (*catonly*)
14075         cf_format=yes
14076         cf_inboth=no
14077         ;;
14078 (*formatted*)
14079         cf_format=yes
14080         cf_inboth=yes
14081         ;;
14082 (*)
14083         cf_format=no
14084         cf_inboth=no
14085         ;;
14086 esac
14087
14088 test ! -d man && mkdir man
14089
14090 cf_so_strip=
14091 cf_compress=
14092 case "$MANPAGE_FORMAT" in
14093 (*compress*)
14094         cf_so_strip="Z"
14095         cf_compress=compress
14096         ;;
14097 (*gzip*)
14098         cf_so_strip="gz"
14099         cf_compress=gzip
14100         ;;
14101 esac
14102
14103 cf_edit_man=./edit_man.sh
14104 cf_man_alias=`pwd`/man_alias.sed
14105
14106 cat >$cf_edit_man <<CF_EOF
14107 #! $SHELL
14108 # this script is generated by the configure-script CF_MAN_PAGES macro.
14109
14110 prefix="$cf_prefix"
14111 datarootdir="$datarootdir"
14112 datadir="$datadir"
14113
14114 NCURSES_MAJOR="$NCURSES_MAJOR"
14115 NCURSES_MINOR="$NCURSES_MINOR"
14116 NCURSES_PATCH="$NCURSES_PATCH"
14117
14118 NCURSES_OSPEED="$NCURSES_OSPEED"
14119 TERMINFO="$TERMINFO"
14120
14121 INSTALL="$INSTALL"
14122 INSTALL_DATA="$INSTALL_DATA"
14123
14124 transform="$program_transform_name"
14125
14126 TMP=\${TMPDIR:=/tmp}/man\$\$
14127 trap "rm -f \$TMP" 0 1 2 3 15
14128
14129 form=\$1
14130 shift || exit 1
14131
14132 verb=\$1
14133 shift || exit 1
14134
14135 mandir=\$1
14136 shift || exit 1
14137
14138 srcdir=\$1
14139 top_srcdir=\$srcdir/..
14140 shift || exit 1
14141
14142 if test "\$form" = normal ; then
14143         if test "$cf_format" = yes ; then
14144         if test "$cf_inboth" = no ; then
14145                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14146                 exit $?
14147         fi
14148         fi
14149         cf_subdir=\$mandir/man
14150         cf_tables=$MANPAGE_TBL
14151 else
14152         cf_subdir=\$mandir/cat
14153         cf_tables=yes
14154 fi
14155
14156 # process the list of source-files
14157 for i in \$* ; do
14158 case \$i in
14159 (*.orig|*.rej) ;;
14160 (*.[0-9]*)
14161         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14162         if test \$verb = installing ; then
14163         if test ! -d \$cf_subdir\${section} ; then
14164                 mkdir -p \$cf_subdir\$section
14165         fi
14166         fi
14167
14168         # replace variables in man page
14169         if test ! -f $cf_man_alias ; then
14170 cat >>$cf_man_alias <<-CF_EOF2
14171                 s,@DATADIR@,\$datadir,g
14172                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14173                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14174                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14175                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14176                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14177                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14178 CF_EOF
14179
14180         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14181         do
14182                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14183                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14184 cat >>$cf_edit_man <<-CF_EOF
14185                 s,@$cf_NAME@,$cf_name,g
14186 CF_EOF
14187         done
14188
14189 cat >>$cf_edit_man <<CF_EOF
14190 CF_EOF2
14191                 echo "...made $cf_man_alias"
14192         fi
14193
14194         aliases=
14195         cf_source=\`basename \$i\`
14196         inalias=\$cf_source
14197         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14198         if test ! -f \$inalias ; then
14199                 echo .. skipped \$cf_source
14200                 continue
14201         fi
14202 CF_EOF
14203
14204 if test "$MANPAGE_ALIASES" != no ; then
14205 cat >>$cf_edit_man <<CF_EOF
14206         nCurses=ignore.3x
14207         test $with_curses_h = yes && nCurses=ncurses.3x
14208         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14209 CF_EOF
14210 fi
14211
14212 if test "$MANPAGE_RENAMES" = no ; then
14213 cat >>$cf_edit_man <<CF_EOF
14214         # perform program transformations for section 1 man pages
14215         if test \$section = 1 ; then
14216                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14217         else
14218                 cf_target=\$cf_subdir\${section}/\$cf_source
14219         fi
14220 CF_EOF
14221 else
14222 cat >>$cf_edit_man <<CF_EOF
14223         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14224         if test -z "\$cf_target" ; then
14225                 echo '? missing rename for '\$cf_source
14226                 cf_target="\$cf_source"
14227         fi
14228         cf_target="\$cf_subdir\${section}/\${cf_target}"
14229
14230 CF_EOF
14231 fi
14232
14233 cat >>$cf_edit_man <<CF_EOF
14234         sed     -f $cf_man_alias \\
14235 CF_EOF
14236
14237 if test -f $MANPAGE_RENAMES ; then
14238 cat >>$cf_edit_man <<CF_EOF
14239                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14240 CF_EOF
14241 else
14242 cat >>$cf_edit_man <<CF_EOF
14243                 < \$i >\$TMP
14244 CF_EOF
14245 fi
14246
14247 cat >>$cf_edit_man <<CF_EOF
14248 if test \$cf_tables = yes ; then
14249         tbl \$TMP >\$TMP.out
14250         mv \$TMP.out \$TMP
14251 fi
14252 CF_EOF
14253
14254 if test $with_overwrite != yes ; then
14255 cat >>$cf_edit_man <<CF_EOF
14256         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14257         mv \$TMP.out \$TMP
14258 CF_EOF
14259 fi
14260
14261 if test $with_curses_h != yes ; then
14262 cat >>$cf_edit_man <<CF_EOF
14263         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14264         mv \$TMP.out \$TMP
14265 CF_EOF
14266 fi
14267
14268 cat >>$cf_edit_man <<CF_EOF
14269         if test \$form = format ; then
14270                 nroff -man \$TMP >\$TMP.out
14271                 mv \$TMP.out \$TMP
14272         fi
14273 CF_EOF
14274
14275 if test -n "$cf_compress" ; then
14276 cat >>$cf_edit_man <<CF_EOF
14277         if test \$verb = installing ; then
14278         if ( $cf_compress -f \$TMP )
14279         then
14280                 mv \$TMP.$cf_so_strip \$TMP
14281         fi
14282         fi
14283         cf_target="\$cf_target.$cf_so_strip"
14284 CF_EOF
14285 fi
14286
14287 case "$MANPAGE_FORMAT" in
14288 (*BSDI*)
14289 cat >>$cf_edit_man <<CF_EOF
14290         if test \$form = format ; then
14291                 # BSDI installs only .0 suffixes in the cat directories
14292                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14293         fi
14294 CF_EOF
14295   ;;
14296 esac
14297
14298 cat >>$cf_edit_man <<CF_EOF
14299         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14300         if test \$verb = installing ; then
14301                 echo \$verb \$cf_target
14302                 \$INSTALL_DATA \$TMP \$cf_target
14303                 test -d \$cf_subdir\${section} &&
14304                 test -n "\$aliases" && (
14305                         cd \$cf_subdir\${section} && (
14306                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14307                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14308                                 cf_target=\`basename \$cf_target\`
14309                                 for cf_alias in \$aliases
14310                                 do
14311                                         if test \$section = 1 ; then
14312                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14313                                         fi
14314
14315                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14316                                                 if test -f \$cf_alias\${suffix} ; then
14317                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14318                                                         then
14319                                                                 continue
14320                                                         fi
14321                                                 fi
14322                                                 echo .. \$verb alias \$cf_alias\${suffix}
14323 CF_EOF
14324 case "x$LN_S" in
14325 (*-f)
14326 cat >>$cf_edit_man <<CF_EOF
14327                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14328 CF_EOF
14329         ;;
14330 (*)
14331 cat >>$cf_edit_man <<CF_EOF
14332                                                 rm -f \$cf_alias\${suffix}
14333                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14334 CF_EOF
14335         ;;
14336 esac
14337 cat >>$cf_edit_man <<CF_EOF
14338                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14339                                                 echo ".so \$cf_source" >\$TMP
14340 CF_EOF
14341 if test -n "$cf_compress" ; then
14342 cat >>$cf_edit_man <<CF_EOF
14343                                                 if test -n "$cf_so_strip" ; then
14344                                                         $cf_compress -f \$TMP
14345                                                         mv \$TMP.$cf_so_strip \$TMP
14346                                                 fi
14347 CF_EOF
14348 fi
14349 cat >>$cf_edit_man <<CF_EOF
14350                                                 echo .. \$verb alias \$cf_alias\${suffix}
14351                                                 rm -f \$cf_alias\${suffix}
14352                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14353                                         fi
14354                                 done
14355                         )
14356                 )
14357         elif test \$verb = removing ; then
14358                 test -f \$cf_target && (
14359                         echo \$verb \$cf_target
14360                         rm -f \$cf_target
14361                 )
14362                 test -d \$cf_subdir\${section} &&
14363                 test -n "\$aliases" && (
14364                         cd \$cf_subdir\${section} && (
14365                                 for cf_alias in \$aliases
14366                                 do
14367                                         if test \$section = 1 ; then
14368                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14369                                         fi
14370
14371                                         echo .. \$verb alias \$cf_alias\${suffix}
14372                                         rm -f \$cf_alias\${suffix}
14373                                 done
14374                         )
14375                 )
14376         else
14377 #               echo ".hy 0"
14378                 cat \$TMP
14379         fi
14380         ;;
14381 esac
14382 done
14383
14384 if test $cf_inboth = yes ; then
14385 if test \$form != format ; then
14386         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14387 fi
14388 fi
14389
14390 exit 0
14391 CF_EOF
14392 chmod 755 $cf_edit_man
14393
14394 ###############################################################################
14395
14396 ### Note that some functions (such as const) are normally disabled anyway.
14397 echo "$as_me:14397: checking if you want to build with function extensions" >&5
14398 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14399
14400 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14401 if test "${enable_ext_funcs+set}" = set; then
14402   enableval="$enable_ext_funcs"
14403   with_ext_funcs=$enableval
14404 else
14405   with_ext_funcs=yes
14406 fi;
14407 echo "$as_me:14407: result: $with_ext_funcs" >&5
14408 echo "${ECHO_T}$with_ext_funcs" >&6
14409 if test "x$with_ext_funcs" = xyes ; then
14410         NCURSES_EXT_FUNCS=1
14411
14412 cat >>confdefs.h <<\EOF
14413 #define NCURSES_EXT_FUNCS 1
14414 EOF
14415
14416 cat >>confdefs.h <<\EOF
14417 #define HAVE_ASSUME_DEFAULT_COLORS 1
14418 EOF
14419
14420 cat >>confdefs.h <<\EOF
14421 #define HAVE_CURSES_VERSION 1
14422 EOF
14423
14424 cat >>confdefs.h <<\EOF
14425 #define HAVE_HAS_KEY 1
14426 EOF
14427
14428 cat >>confdefs.h <<\EOF
14429 #define HAVE_RESIZETERM 1
14430 EOF
14431
14432 cat >>confdefs.h <<\EOF
14433 #define HAVE_RESIZE_TERM 1
14434 EOF
14435
14436 cat >>confdefs.h <<\EOF
14437 #define HAVE_TERM_ENTRY_H 1
14438 EOF
14439
14440 cat >>confdefs.h <<\EOF
14441 #define HAVE_USE_DEFAULT_COLORS 1
14442 EOF
14443
14444 cat >>confdefs.h <<\EOF
14445 #define HAVE_USE_EXTENDED_NAMES 1
14446 EOF
14447
14448 cat >>confdefs.h <<\EOF
14449 #define HAVE_USE_SCREEN 1
14450 EOF
14451
14452 cat >>confdefs.h <<\EOF
14453 #define HAVE_USE_WINDOW 1
14454 EOF
14455
14456 cat >>confdefs.h <<\EOF
14457 #define HAVE_WRESIZE 1
14458 EOF
14459
14460         GENERATED_EXT_FUNCS=generated
14461         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14462 else
14463         NCURSES_EXT_FUNCS=0
14464         GENERATED_EXT_FUNCS=
14465 fi
14466
14467 echo "$as_me:14467: checking if you want to build with SCREEN extensions" >&5
14468 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14469
14470 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14471 if test "${enable_sp_funcs+set}" = set; then
14472   enableval="$enable_sp_funcs"
14473   with_sp_funcs=$enableval
14474 else
14475   with_sp_funcs=$cf_dft_ext_spfuncs
14476 fi;
14477 echo "$as_me:14477: result: $with_sp_funcs" >&5
14478 echo "${ECHO_T}$with_sp_funcs" >&6
14479 if test "x$with_sp_funcs" = xyes ; then
14480         NCURSES_SP_FUNCS=1
14481
14482 cat >>confdefs.h <<\EOF
14483 #define NCURSES_SP_FUNCS 1
14484 EOF
14485
14486 cat >>confdefs.h <<\EOF
14487 #define HAVE_TPUTS_SP 1
14488 EOF
14489
14490         GENERATED_SP_FUNCS=generated
14491 else
14492         NCURSES_SP_FUNCS=0
14493         GENERATED_SP_FUNCS=
14494 fi
14495
14496 echo "$as_me:14496: checking if you want to build with terminal-driver" >&5
14497 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14498
14499 # Check whether --enable-term-driver or --disable-term-driver was given.
14500 if test "${enable_term_driver+set}" = set; then
14501   enableval="$enable_term_driver"
14502   with_term_driver=$enableval
14503 else
14504   with_term_driver=no
14505 fi;
14506 echo "$as_me:14506: result: $with_term_driver" >&5
14507 echo "${ECHO_T}$with_term_driver" >&6
14508 if test "x$with_term_driver" = xyes ; then
14509
14510 cat >>confdefs.h <<\EOF
14511 #define USE_TERM_DRIVER 1
14512 EOF
14513
14514         if test "x$with_termlib" != xno ; then
14515                 { { echo "$as_me:14515: error: The term-driver option conflicts with the termlib option" >&5
14516 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14517    { (exit 1); exit 1; }; }
14518         fi
14519         if test "x$with_sp_funcs" != xyes ; then
14520                 { { echo "$as_me:14520: error: The term-driver option relies upon sp-funcs" >&5
14521 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14522    { (exit 1); exit 1; }; }
14523         fi
14524 fi
14525
14526 ###   use option --enable-const to turn on use of const beyond that in XSI.
14527 echo "$as_me:14527: checking for extended use of const keyword" >&5
14528 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14529
14530 # Check whether --enable-const or --disable-const was given.
14531 if test "${enable_const+set}" = set; then
14532   enableval="$enable_const"
14533   with_ext_const=$enableval
14534 else
14535   with_ext_const=$cf_dft_ext_const
14536 fi;
14537 echo "$as_me:14537: result: $with_ext_const" >&5
14538 echo "${ECHO_T}$with_ext_const" >&6
14539 NCURSES_CONST='/*nothing*/'
14540 if test "x$with_ext_const" = xyes ; then
14541         NCURSES_CONST=const
14542 fi
14543
14544 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14545 echo "$as_me:14545: checking if you want to use extended colors" >&5
14546 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14547
14548 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14549 if test "${enable_ext_colors+set}" = set; then
14550   enableval="$enable_ext_colors"
14551   with_ext_colors=$enableval
14552 else
14553   with_ext_colors=$cf_dft_ext_colors
14554 fi;
14555 echo "$as_me:14555: result: $with_ext_colors" >&5
14556 echo "${ECHO_T}$with_ext_colors" >&6
14557 NCURSES_EXT_COLORS=0
14558 if test "x$with_ext_colors" = xyes ; then
14559         if test "x$with_widec" != xyes ; then
14560                 { echo "$as_me:14560: WARNING: This option applies only to wide-character library" >&5
14561 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14562         else
14563                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14564
14565 if test "${with_abi_version+set}" != set; then
14566         case $cf_cv_rel_version in
14567         (5.*)
14568                 cf_cv_rel_version=6.0
14569                 cf_cv_abi_version=6
14570                 { echo "$as_me:14570: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14571 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14572                 ;;
14573         esac
14574 fi
14575
14576                 NCURSES_EXT_COLORS=1
14577
14578 cat >>confdefs.h <<\EOF
14579 #define NCURSES_EXT_COLORS 1
14580 EOF
14581
14582 cat >>confdefs.h <<\EOF
14583 #define HAVE_ALLOC_PAIR 1
14584 EOF
14585
14586 cat >>confdefs.h <<\EOF
14587 #define HAVE_INIT_EXTENDED_COLOR 1
14588 EOF
14589
14590 cat >>confdefs.h <<\EOF
14591 #define HAVE_RESET_COLOR_PAIRS 1
14592 EOF
14593
14594         fi
14595 fi
14596
14597 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14598 echo "$as_me:14598: checking if you want to use extended mouse encoding" >&5
14599 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14600
14601 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14602 if test "${enable_ext_mouse+set}" = set; then
14603   enableval="$enable_ext_mouse"
14604   with_ext_mouse=$enableval
14605 else
14606   with_ext_mouse=$cf_dft_ext_mouse
14607 fi;
14608 echo "$as_me:14608: result: $with_ext_mouse" >&5
14609 echo "${ECHO_T}$with_ext_mouse" >&6
14610 NCURSES_MOUSE_VERSION=1
14611 if test "x$with_ext_mouse" = xyes ; then
14612         NCURSES_MOUSE_VERSION=2
14613
14614 if test "${with_abi_version+set}" != set; then
14615         case $cf_cv_rel_version in
14616         (5.*)
14617                 cf_cv_rel_version=6.0
14618                 cf_cv_abi_version=6
14619                 { echo "$as_me:14619: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14620 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14621                 ;;
14622         esac
14623 fi
14624
14625 fi
14626
14627 ###   use option --enable-ext-putwin to turn on extended screendumps
14628 echo "$as_me:14628: checking if you want to use extended putwin/screendump" >&5
14629 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14630
14631 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14632 if test "${enable_ext_putwin+set}" = set; then
14633   enableval="$enable_ext_putwin"
14634   with_ext_putwin=$enableval
14635 else
14636   with_ext_putwin=$cf_dft_ext_putwin
14637 fi;
14638 echo "$as_me:14638: result: $with_ext_putwin" >&5
14639 echo "${ECHO_T}$with_ext_putwin" >&6
14640 if test "x$with_ext_putwin" = xyes ; then
14641
14642 cat >>confdefs.h <<\EOF
14643 #define NCURSES_EXT_PUTWIN 1
14644 EOF
14645
14646 fi
14647
14648 echo "$as_me:14648: checking if you want \$NCURSES_NO_PADDING code" >&5
14649 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14650
14651 # Check whether --enable-no-padding or --disable-no-padding was given.
14652 if test "${enable_no_padding+set}" = set; then
14653   enableval="$enable_no_padding"
14654   with_no_padding=$enableval
14655 else
14656   with_no_padding=$with_ext_funcs
14657 fi;
14658 echo "$as_me:14658: result: $with_no_padding" >&5
14659 echo "${ECHO_T}$with_no_padding" >&6
14660 test "x$with_no_padding" = xyes &&
14661 cat >>confdefs.h <<\EOF
14662 #define NCURSES_NO_PADDING 1
14663 EOF
14664
14665 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14666 echo "$as_me:14666: checking if you want SIGWINCH handler" >&5
14667 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14668
14669 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14670 if test "${enable_sigwinch+set}" = set; then
14671   enableval="$enable_sigwinch"
14672   with_sigwinch=$enableval
14673 else
14674   with_sigwinch=$with_ext_funcs
14675 fi;
14676 echo "$as_me:14676: result: $with_sigwinch" >&5
14677 echo "${ECHO_T}$with_sigwinch" >&6
14678 test "x$with_sigwinch" = xyes &&
14679 cat >>confdefs.h <<\EOF
14680 #define USE_SIGWINCH 1
14681 EOF
14682
14683 ###   use option --enable-tcap-names to allow user to define new capabilities
14684 echo "$as_me:14684: checking if you want user-definable terminal capabilities like termcap" >&5
14685 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14686
14687 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14688 if test "${enable_tcap_names+set}" = set; then
14689   enableval="$enable_tcap_names"
14690   with_tcap_names=$enableval
14691 else
14692   with_tcap_names=$with_ext_funcs
14693 fi;
14694 echo "$as_me:14694: result: $with_tcap_names" >&5
14695 echo "${ECHO_T}$with_tcap_names" >&6
14696 NCURSES_XNAMES=0
14697 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14698
14699 ##############################################################################
14700
14701 echo "$as_me:14701: checking if you want to link with the pthread library" >&5
14702 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14703
14704 # Check whether --with-pthread or --without-pthread was given.
14705 if test "${with_pthread+set}" = set; then
14706   withval="$with_pthread"
14707   with_pthread=$withval
14708 else
14709   with_pthread=no
14710 fi;
14711 echo "$as_me:14711: result: $with_pthread" >&5
14712 echo "${ECHO_T}$with_pthread" >&6
14713
14714 if test "$with_pthread" != no ; then
14715         echo "$as_me:14715: checking for pthread.h" >&5
14716 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14717 if test "${ac_cv_header_pthread_h+set}" = set; then
14718   echo $ECHO_N "(cached) $ECHO_C" >&6
14719 else
14720   cat >conftest.$ac_ext <<_ACEOF
14721 #line 14721 "configure"
14722 #include "confdefs.h"
14723 #include <pthread.h>
14724 _ACEOF
14725 if { (eval echo "$as_me:14725: \"$ac_cpp conftest.$ac_ext\"") >&5
14726   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14727   ac_status=$?
14728   egrep -v '^ *\+' conftest.er1 >conftest.err
14729   rm -f conftest.er1
14730   cat conftest.err >&5
14731   echo "$as_me:14731: \$? = $ac_status" >&5
14732   (exit $ac_status); } >/dev/null; then
14733   if test -s conftest.err; then
14734     ac_cpp_err=$ac_c_preproc_warn_flag
14735   else
14736     ac_cpp_err=
14737   fi
14738 else
14739   ac_cpp_err=yes
14740 fi
14741 if test -z "$ac_cpp_err"; then
14742   ac_cv_header_pthread_h=yes
14743 else
14744   echo "$as_me: failed program was:" >&5
14745   cat conftest.$ac_ext >&5
14746   ac_cv_header_pthread_h=no
14747 fi
14748 rm -f conftest.err conftest.$ac_ext
14749 fi
14750 echo "$as_me:14750: result: $ac_cv_header_pthread_h" >&5
14751 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14752 if test $ac_cv_header_pthread_h = yes; then
14753
14754 cat >>confdefs.h <<\EOF
14755 #define HAVE_PTHREADS_H 1
14756 EOF
14757
14758         for cf_lib_pthread in pthread c_r
14759         do
14760             echo "$as_me:14760: checking if we can link with the $cf_lib_pthread library" >&5
14761 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14762             cf_save_LIBS="$LIBS"
14763
14764 cf_add_libs="$LIBS"
14765 # reverse order
14766 cf_add_0lib=
14767 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14768 # filter duplicates
14769 for cf_add_1lib in $cf_add_0lib; do
14770         for cf_add_2lib in $cf_add_libs; do
14771                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14772                         cf_add_1lib=
14773                         break
14774                 fi
14775         done
14776         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14777 done
14778 LIBS="$cf_add_libs"
14779
14780             cat >conftest.$ac_ext <<_ACEOF
14781 #line 14781 "configure"
14782 #include "confdefs.h"
14783
14784 #include <pthread.h>
14785
14786 int
14787 main (void)
14788 {
14789
14790                 int rc = pthread_create(0,0,0,0);
14791                 int r2 = pthread_mutexattr_settype(0, 0);
14792
14793   ;
14794   return 0;
14795 }
14796 _ACEOF
14797 rm -f conftest.$ac_objext conftest$ac_exeext
14798 if { (eval echo "$as_me:14798: \"$ac_link\"") >&5
14799   (eval $ac_link) 2>&5
14800   ac_status=$?
14801   echo "$as_me:14801: \$? = $ac_status" >&5
14802   (exit $ac_status); } &&
14803          { ac_try='test -s conftest$ac_exeext'
14804   { (eval echo "$as_me:14804: \"$ac_try\"") >&5
14805   (eval $ac_try) 2>&5
14806   ac_status=$?
14807   echo "$as_me:14807: \$? = $ac_status" >&5
14808   (exit $ac_status); }; }; then
14809   with_pthread=yes
14810 else
14811   echo "$as_me: failed program was:" >&5
14812 cat conftest.$ac_ext >&5
14813 with_pthread=no
14814 fi
14815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14816             LIBS="$cf_save_LIBS"
14817             echo "$as_me:14817: result: $with_pthread" >&5
14818 echo "${ECHO_T}$with_pthread" >&6
14819             test "$with_pthread" = yes && break
14820         done
14821
14822         if test "$with_pthread" = yes ; then
14823
14824 cf_add_libs="$LIBS"
14825 # reverse order
14826 cf_add_0lib=
14827 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14828 # filter duplicates
14829 for cf_add_1lib in $cf_add_0lib; do
14830         for cf_add_2lib in $cf_add_libs; do
14831                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14832                         cf_add_1lib=
14833                         break
14834                 fi
14835         done
14836         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14837 done
14838 LIBS="$cf_add_libs"
14839
14840 cat >>confdefs.h <<\EOF
14841 #define HAVE_LIBPTHREADS 1
14842 EOF
14843
14844         else
14845             { { echo "$as_me:14845: error: Cannot link with pthread library" >&5
14846 echo "$as_me: error: Cannot link with pthread library" >&2;}
14847    { (exit 1); exit 1; }; }
14848         fi
14849
14850 fi
14851
14852 fi
14853
14854 if test "x$with_pthread" != xno; then
14855         echo "$as_me:14855: checking for pthread_kill" >&5
14856 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14857 if test "${ac_cv_func_pthread_kill+set}" = set; then
14858   echo $ECHO_N "(cached) $ECHO_C" >&6
14859 else
14860   cat >conftest.$ac_ext <<_ACEOF
14861 #line 14861 "configure"
14862 #include "confdefs.h"
14863 #define pthread_kill autoconf_temporary
14864 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14865 #undef pthread_kill
14866
14867 #ifdef __cplusplus
14868 extern "C"
14869 #endif
14870
14871 /* We use char because int might match the return type of a gcc2
14872    builtin and then its argument prototype would still apply.  */
14873 char pthread_kill (void);
14874
14875 int
14876 main (void)
14877 {
14878
14879 /* The GNU C library defines stubs for functions which it implements
14880     to always fail with ENOSYS.  Some functions are actually named
14881     something starting with __ and the normal name is an alias.  */
14882 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14883 #error found stub for pthread_kill
14884 #endif
14885
14886         return pthread_kill ();
14887   ;
14888   return 0;
14889 }
14890 _ACEOF
14891 rm -f conftest.$ac_objext conftest$ac_exeext
14892 if { (eval echo "$as_me:14892: \"$ac_link\"") >&5
14893   (eval $ac_link) 2>&5
14894   ac_status=$?
14895   echo "$as_me:14895: \$? = $ac_status" >&5
14896   (exit $ac_status); } &&
14897          { ac_try='test -s conftest$ac_exeext'
14898   { (eval echo "$as_me:14898: \"$ac_try\"") >&5
14899   (eval $ac_try) 2>&5
14900   ac_status=$?
14901   echo "$as_me:14901: \$? = $ac_status" >&5
14902   (exit $ac_status); }; }; then
14903   ac_cv_func_pthread_kill=yes
14904 else
14905   echo "$as_me: failed program was:" >&5
14906 cat conftest.$ac_ext >&5
14907 ac_cv_func_pthread_kill=no
14908 fi
14909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14910 fi
14911 echo "$as_me:14911: result: $ac_cv_func_pthread_kill" >&5
14912 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14913 if test $ac_cv_func_pthread_kill = yes; then
14914
14915                 echo "$as_me:14915: checking if you want to allow EINTR in wgetch with pthreads" >&5
14916 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14917
14918 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14919 if test "${enable_pthreads_eintr+set}" = set; then
14920   enableval="$enable_pthreads_eintr"
14921   use_pthreads_eintr=$enableval
14922 else
14923   use_pthreads_eintr=no
14924 fi;
14925                 echo "$as_me:14925: result: $use_pthreads_eintr" >&5
14926 echo "${ECHO_T}$use_pthreads_eintr" >&6
14927                 if test "x$use_pthreads_eintr" = xyes ; then
14928
14929 cat >>confdefs.h <<\EOF
14930 #define USE_PTHREADS_EINTR 1
14931 EOF
14932
14933                 fi
14934 fi
14935
14936         echo "$as_me:14936: checking if you want to use weak-symbols for pthreads" >&5
14937 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14938
14939 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14940 if test "${enable_weak_symbols+set}" = set; then
14941   enableval="$enable_weak_symbols"
14942   use_weak_symbols=$enableval
14943 else
14944   use_weak_symbols=no
14945 fi;
14946         echo "$as_me:14946: result: $use_weak_symbols" >&5
14947 echo "${ECHO_T}$use_weak_symbols" >&6
14948         if test "x$use_weak_symbols" = xyes ; then
14949
14950 echo "$as_me:14950: checking if $CC supports weak symbols" >&5
14951 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14952 if test "${cf_cv_weak_symbols+set}" = set; then
14953   echo $ECHO_N "(cached) $ECHO_C" >&6
14954 else
14955
14956 cat >conftest.$ac_ext <<_ACEOF
14957 #line 14957 "configure"
14958 #include "confdefs.h"
14959
14960 #include <stdio.h>
14961 int
14962 main (void)
14963 {
14964
14965 #if defined(__GNUC__)
14966 #  if defined __USE_ISOC99
14967 #    define _cat_pragma(exp)    _Pragma(#exp)
14968 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14969 #  else
14970 #    define _weak_pragma(exp)
14971 #  endif
14972 #  define _declare(name)        __extension__ extern __typeof__(name) name
14973 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14974 #endif
14975
14976 weak_symbol(fopen);
14977
14978   ;
14979   return 0;
14980 }
14981 _ACEOF
14982 rm -f conftest.$ac_objext
14983 if { (eval echo "$as_me:14983: \"$ac_compile\"") >&5
14984   (eval $ac_compile) 2>&5
14985   ac_status=$?
14986   echo "$as_me:14986: \$? = $ac_status" >&5
14987   (exit $ac_status); } &&
14988          { ac_try='test -s conftest.$ac_objext'
14989   { (eval echo "$as_me:14989: \"$ac_try\"") >&5
14990   (eval $ac_try) 2>&5
14991   ac_status=$?
14992   echo "$as_me:14992: \$? = $ac_status" >&5
14993   (exit $ac_status); }; }; then
14994   cf_cv_weak_symbols=yes
14995 else
14996   echo "$as_me: failed program was:" >&5
14997 cat conftest.$ac_ext >&5
14998 cf_cv_weak_symbols=no
14999 fi
15000 rm -f conftest.$ac_objext conftest.$ac_ext
15001
15002 fi
15003 echo "$as_me:15003: result: $cf_cv_weak_symbols" >&5
15004 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15005
15006         else
15007                 cf_cv_weak_symbols=no
15008         fi
15009
15010         if test "x$cf_cv_weak_symbols" = xyes ; then
15011
15012 cat >>confdefs.h <<\EOF
15013 #define USE_WEAK_SYMBOLS 1
15014 EOF
15015
15016         fi
15017 fi
15018
15019 PTHREAD=
15020 if test "x$with_pthread" = "xyes" ; then
15021
15022 cat >>confdefs.h <<\EOF
15023 #define USE_PTHREADS 1
15024 EOF
15025
15026         enable_reentrant=yes
15027         if test "x$cf_cv_weak_symbols" = xyes ; then
15028                 PTHREAD=-lpthread
15029
15030 cf_add_libs="$PRIVATE_LIBS"
15031 # reverse order
15032 cf_add_0lib=
15033 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15034 # filter duplicates
15035 for cf_add_1lib in $cf_add_0lib; do
15036         for cf_add_2lib in $cf_add_libs; do
15037                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15038                         cf_add_1lib=
15039                         break
15040                 fi
15041         done
15042         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15043 done
15044 PRIVATE_LIBS="$cf_add_libs"
15045
15046         fi
15047 fi
15048
15049 # Reentrant code has to be opaque; there's little advantage to making ncurses
15050 # opaque outside of that, so there is no --enable-opaque option.  We can use
15051 # this option without --with-pthreads, but this will be always set for
15052 # pthreads.
15053 echo "$as_me:15053: checking if you want reentrant code" >&5
15054 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15055
15056 # Check whether --enable-reentrant or --disable-reentrant was given.
15057 if test "${enable_reentrant+set}" = set; then
15058   enableval="$enable_reentrant"
15059   with_reentrant=$enableval
15060 else
15061   with_reentrant=no
15062 fi;
15063 echo "$as_me:15063: result: $with_reentrant" >&5
15064 echo "${ECHO_T}$with_reentrant" >&6
15065 if test "x$with_reentrant" = xyes ; then
15066         cf_cv_enable_reentrant=1
15067         cf_cv_enable_opaque="NCURSES_INTERNALS"
15068         NCURSES_SIZE_T=int
15069         if test "x$cf_cv_weak_symbols" = xyes ; then
15070
15071 # remove pthread library from $LIBS
15072 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15073
15074 cf_add_libs="$TEST_LIBS"
15075 # reverse order
15076 cf_add_0lib=
15077 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15078 # filter duplicates
15079 for cf_add_1lib in $cf_add_0lib; do
15080         for cf_add_2lib in $cf_add_libs; do
15081                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15082                         cf_add_1lib=
15083                         break
15084                 fi
15085         done
15086         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15087 done
15088 TEST_LIBS="$cf_add_libs"
15089
15090 cf_add_libs="$TEST_LIBS2"
15091 # reverse order
15092 cf_add_0lib=
15093 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15094 # filter duplicates
15095 for cf_add_1lib in $cf_add_0lib; do
15096         for cf_add_2lib in $cf_add_libs; do
15097                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15098                         cf_add_1lib=
15099                         break
15100                 fi
15101         done
15102         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15103 done
15104 TEST_LIBS2="$cf_add_libs"
15105
15106 cf_add_libs="$PRIVATE_LIBS"
15107 # reverse order
15108 cf_add_0lib=
15109 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15110 # filter duplicates
15111 for cf_add_1lib in $cf_add_0lib; do
15112         for cf_add_2lib in $cf_add_libs; do
15113                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15114                         cf_add_1lib=
15115                         break
15116                 fi
15117         done
15118         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15119 done
15120 PRIVATE_LIBS="$cf_add_libs"
15121
15122         else
15123                 # when not using weak symbols but with_reentrant,
15124                 # add 't' to the library suffix on all platforms
15125                 # except cygwin, where we only do that if ALSO
15126                 # compiling with full thread support.
15127                 case "$host" in
15128                 (*cygwin* | *msys*)
15129                         if test "$with_pthread" = "yes" ; then
15130                                 if test "x$disable_lib_suffixes" = "xno" ; then
15131                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15132                                 fi
15133                         fi ;;
15134                 (*)
15135                         if test "x$disable_lib_suffixes" = "xno" ; then
15136                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15137                         fi
15138                         ;;
15139                 esac
15140         fi
15141
15142 cat >>confdefs.h <<\EOF
15143 #define USE_REENTRANT 1
15144 EOF
15145
15146 if test "${with_abi_version+set}" != set; then
15147         case $cf_cv_rel_version in
15148         (5.*)
15149                 cf_cv_rel_version=6.0
15150                 cf_cv_abi_version=6
15151                 { echo "$as_me:15151: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15152 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15153                 ;;
15154         esac
15155 fi
15156
15157 else
15158         cf_cv_enable_reentrant=0
15159         cf_cv_enable_opaque="NCURSES_OPAQUE"
15160         NCURSES_SIZE_T=short
15161 fi
15162
15163 echo "$as_me:15163: checking if you want opaque curses-library structures" >&5
15164 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15165
15166 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15167 if test "${enable_opaque_curses+set}" = set; then
15168   enableval="$enable_opaque_curses"
15169   test "$enableval" != yes && enableval=no
15170         if test "$enableval" != "no" ; then
15171     enable_opaque_curses=yes
15172         else
15173
15174          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15175          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15176
15177         fi
15178 else
15179   enableval=no
15180
15181          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15182          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15183
15184 fi;
15185 echo "$as_me:15185: result: $enable_opaque_curses" >&5
15186 echo "${ECHO_T}$enable_opaque_curses" >&6
15187
15188 test "$cf_cv_enable_reentrant" = 1 && \
15189 test "$enable_opaque_curses" = no && \
15190 { { echo "$as_me:15190: error: reentrant configuration requires opaque library" >&5
15191 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15192    { (exit 1); exit 1; }; }
15193
15194 echo "$as_me:15194: checking if you want opaque form-library structures" >&5
15195 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15196
15197 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15198 if test "${enable_opaque_form+set}" = set; then
15199   enableval="$enable_opaque_form"
15200   enable_opaque_form=yes
15201 else
15202   enable_opaque_form=no
15203 fi;
15204 echo "$as_me:15204: result: $enable_opaque_form" >&5
15205 echo "${ECHO_T}$enable_opaque_form" >&6
15206
15207 echo "$as_me:15207: checking if you want opaque menu-library structures" >&5
15208 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15209
15210 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15211 if test "${enable_opaque_menu+set}" = set; then
15212   enableval="$enable_opaque_menu"
15213   enable_opaque_menu=yes
15214 else
15215   enable_opaque_menu=no
15216 fi;
15217 echo "$as_me:15217: result: $enable_opaque_menu" >&5
15218 echo "${ECHO_T}$enable_opaque_menu" >&6
15219
15220 echo "$as_me:15220: checking if you want opaque panel-library structures" >&5
15221 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15222
15223 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15224 if test "${enable_opaque_panel+set}" = set; then
15225   enableval="$enable_opaque_panel"
15226   enable_opaque_panel=yes
15227 else
15228   enable_opaque_panel=no
15229 fi;
15230 echo "$as_me:15230: result: $enable_opaque_panel" >&5
15231 echo "${ECHO_T}$enable_opaque_panel" >&6
15232
15233 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15234 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15235 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15236 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15237
15238 ### Allow using a different wrap-prefix
15239 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15240         echo "$as_me:15240: checking for prefix used to wrap public variables" >&5
15241 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15242
15243 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15244 if test "${with_wrap_prefix+set}" = set; then
15245   withval="$with_wrap_prefix"
15246   NCURSES_WRAP_PREFIX=$withval
15247 else
15248   NCURSES_WRAP_PREFIX=_nc_
15249 fi;
15250         echo "$as_me:15250: result: $NCURSES_WRAP_PREFIX" >&5
15251 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15252 else
15253         NCURSES_WRAP_PREFIX=_nc_
15254 fi
15255
15256 cat >>confdefs.h <<EOF
15257 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15258 EOF
15259
15260 ###############################################################################
15261 # These options are relatively safe to experiment with.
15262
15263 echo "$as_me:15263: checking if you want all development code" >&5
15264 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15265
15266 # Check whether --with-develop or --without-develop was given.
15267 if test "${with_develop+set}" = set; then
15268   withval="$with_develop"
15269   with_develop=$withval
15270 else
15271   with_develop=no
15272 fi;
15273 echo "$as_me:15273: result: $with_develop" >&5
15274 echo "${ECHO_T}$with_develop" >&6
15275
15276 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15277 echo "$as_me:15277: checking if you want hard-tabs code" >&5
15278 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15279
15280 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15281 if test "${enable_hard_tabs+set}" = set; then
15282   enableval="$enable_hard_tabs"
15283
15284 else
15285   enable_hard_tabs=$with_develop
15286 fi;
15287 echo "$as_me:15287: result: $enable_hard_tabs" >&5
15288 echo "${ECHO_T}$enable_hard_tabs" >&6
15289 test "x$enable_hard_tabs" = xyes &&
15290 cat >>confdefs.h <<\EOF
15291 #define USE_HARD_TABS 1
15292 EOF
15293
15294 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15295 echo "$as_me:15295: checking if you want limited support for xmc" >&5
15296 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15297
15298 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15299 if test "${enable_xmc_glitch+set}" = set; then
15300   enableval="$enable_xmc_glitch"
15301
15302 else
15303   enable_xmc_glitch=$with_develop
15304 fi;
15305 echo "$as_me:15305: result: $enable_xmc_glitch" >&5
15306 echo "${ECHO_T}$enable_xmc_glitch" >&6
15307 test "x$enable_xmc_glitch" = xyes &&
15308 cat >>confdefs.h <<\EOF
15309 #define USE_XMC_SUPPORT 1
15310 EOF
15311
15312 ###############################################################################
15313 # These are just experimental, probably should not be in a package:
15314
15315 echo "$as_me:15315: checking if you do not want to assume colors are white-on-black" >&5
15316 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15317
15318 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15319 if test "${enable_assumed_color+set}" = set; then
15320   enableval="$enable_assumed_color"
15321   with_assumed_color=$enableval
15322 else
15323   with_assumed_color=yes
15324 fi;
15325 echo "$as_me:15325: result: $with_assumed_color" >&5
15326 echo "${ECHO_T}$with_assumed_color" >&6
15327 test "x$with_assumed_color" = xyes &&
15328 cat >>confdefs.h <<\EOF
15329 #define USE_ASSUMED_COLOR 1
15330 EOF
15331
15332 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15333 echo "$as_me:15333: checking if you want hashmap scrolling-optimization code" >&5
15334 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15335
15336 # Check whether --enable-hashmap or --disable-hashmap was given.
15337 if test "${enable_hashmap+set}" = set; then
15338   enableval="$enable_hashmap"
15339   with_hashmap=$enableval
15340 else
15341   with_hashmap=yes
15342 fi;
15343 echo "$as_me:15343: result: $with_hashmap" >&5
15344 echo "${ECHO_T}$with_hashmap" >&6
15345 test "x$with_hashmap" = xyes &&
15346 cat >>confdefs.h <<\EOF
15347 #define USE_HASHMAP 1
15348 EOF
15349
15350 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15351 echo "$as_me:15351: checking if you want colorfgbg code" >&5
15352 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15353
15354 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15355 if test "${enable_colorfgbg+set}" = set; then
15356   enableval="$enable_colorfgbg"
15357   with_colorfgbg=$enableval
15358 else
15359   with_colorfgbg=no
15360 fi;
15361 echo "$as_me:15361: result: $with_colorfgbg" >&5
15362 echo "${ECHO_T}$with_colorfgbg" >&6
15363 test "x$with_colorfgbg" = xyes &&
15364 cat >>confdefs.h <<\EOF
15365 #define USE_COLORFGBG 1
15366 EOF
15367
15368 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15369 echo "$as_me:15369: checking if you want to use gcc -fvisibility option" >&5
15370 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15371
15372 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15373 if test "${enable_fvisibility+set}" = set; then
15374   enableval="$enable_fvisibility"
15375   cf_with_fvisibility=$enableval
15376 else
15377   cf_with_fvisibility=no
15378 fi;
15379 echo "$as_me:15379: result: $cf_with_fvisibility" >&5
15380 echo "${ECHO_T}$cf_with_fvisibility" >&6
15381
15382 NCURSES_IMPEXP=
15383 NCURSES_CXX_IMPEXP=
15384 if test "x$cf_with_fvisibility" = xyes; then
15385
15386 echo "$as_me:15386: checking if $CC -fvisibility=hidden option works" >&5
15387 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15388 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15389   echo $ECHO_N "(cached) $ECHO_C" >&6
15390 else
15391
15392     cf_save_cflags="$CFLAGS"
15393     CFLAGS="$CFLAGS -fvisibility=hidden"
15394     cat >conftest.$ac_ext <<_ACEOF
15395 #line 15395 "configure"
15396 #include "confdefs.h"
15397
15398 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15399
15400 int
15401 main (void)
15402 {
15403
15404         if (somefunc()) return 1;
15405
15406   ;
15407   return 0;
15408 }
15409 _ACEOF
15410 rm -f conftest.$ac_objext conftest$ac_exeext
15411 if { (eval echo "$as_me:15411: \"$ac_link\"") >&5
15412   (eval $ac_link) 2>&5
15413   ac_status=$?
15414   echo "$as_me:15414: \$? = $ac_status" >&5
15415   (exit $ac_status); } &&
15416          { ac_try='test -s conftest$ac_exeext'
15417   { (eval echo "$as_me:15417: \"$ac_try\"") >&5
15418   (eval $ac_try) 2>&5
15419   ac_status=$?
15420   echo "$as_me:15420: \$? = $ac_status" >&5
15421   (exit $ac_status); }; }; then
15422   cf_cv_fvisibility_hidden=yes
15423 else
15424   echo "$as_me: failed program was:" >&5
15425 cat conftest.$ac_ext >&5
15426 cf_cv_fvisibility_hidden=no
15427 fi
15428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15429     CFLAGS=$cf_save_cflags
15430
15431 fi
15432 echo "$as_me:15432: result: $cf_cv_fvisibility_hidden" >&5
15433 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15434
15435         if test "x$cf_cv_fvisibility_hidden" = xyes
15436         then
15437
15438 cf_fix_cppflags=no
15439 cf_new_cflags=
15440 cf_new_cppflags=
15441 cf_new_extra_cppflags=
15442
15443 for cf_add_cflags in -fvisibility=hidden
15444 do
15445 case $cf_fix_cppflags in
15446 (no)
15447         case $cf_add_cflags in
15448         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15449                 case $cf_add_cflags in
15450                 (-D*)
15451                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15452
15453                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15454                                 && test -z "${cf_tst_cflags}" \
15455                                 && cf_fix_cppflags=yes
15456
15457                         if test $cf_fix_cppflags = yes ; then
15458
15459         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15460         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15461
15462                                 continue
15463                         elif test "${cf_tst_cflags}" = "\"'" ; then
15464
15465         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15466         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15467
15468                                 continue
15469                         fi
15470                         ;;
15471                 esac
15472                 case "$CPPFLAGS" in
15473                 (*$cf_add_cflags)
15474                         ;;
15475                 (*)
15476                         case $cf_add_cflags in
15477                         (-D*)
15478                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15479
15480 CPPFLAGS=`echo "$CPPFLAGS" | \
15481         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15482                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15483
15484                                 ;;
15485                         esac
15486
15487         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15488         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15489
15490                         ;;
15491                 esac
15492                 ;;
15493         (*)
15494
15495         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15496         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15497
15498                 ;;
15499         esac
15500         ;;
15501 (yes)
15502
15503         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15504         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15505
15506         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15507
15508         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15509                 && test -z "${cf_tst_cflags}" \
15510                 && cf_fix_cppflags=no
15511         ;;
15512 esac
15513 done
15514
15515 if test -n "$cf_new_cflags" ; then
15516
15517         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15518         CFLAGS="${CFLAGS}$cf_new_cflags"
15519
15520 fi
15521
15522 if test -n "$cf_new_cppflags" ; then
15523
15524         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15525         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15526
15527 fi
15528
15529 if test -n "$cf_new_extra_cppflags" ; then
15530
15531         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15532         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15533
15534 fi
15535
15536                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15537         fi
15538         if test -n "$CXX"
15539         then
15540                 ac_ext=cc
15541 ac_cpp='$CXXCPP $CPPFLAGS'
15542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15545 ac_main_return=return
15546
15547 echo "$as_me:15547: checking if $CXX -fvisibility=hidden option works" >&5
15548 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15549 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15550   echo $ECHO_N "(cached) $ECHO_C" >&6
15551 else
15552
15553     cf_save_cflags="$CXXFLAGS"
15554     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15555     cat >conftest.$ac_ext <<_ACEOF
15556 #line 15556 "configure"
15557 #include "confdefs.h"
15558
15559 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15560
15561 int
15562 main (void)
15563 {
15564
15565         if (somefunc()) return 1;
15566
15567   ;
15568   return 0;
15569 }
15570 _ACEOF
15571 rm -f conftest.$ac_objext conftest$ac_exeext
15572 if { (eval echo "$as_me:15572: \"$ac_link\"") >&5
15573   (eval $ac_link) 2>&5
15574   ac_status=$?
15575   echo "$as_me:15575: \$? = $ac_status" >&5
15576   (exit $ac_status); } &&
15577          { ac_try='test -s conftest$ac_exeext'
15578   { (eval echo "$as_me:15578: \"$ac_try\"") >&5
15579   (eval $ac_try) 2>&5
15580   ac_status=$?
15581   echo "$as_me:15581: \$? = $ac_status" >&5
15582   (exit $ac_status); }; }; then
15583   cf_cv_fvisibility_hidden2=yes
15584 else
15585   echo "$as_me: failed program was:" >&5
15586 cat conftest.$ac_ext >&5
15587 cf_cv_fvisibility_hidden2=no
15588 fi
15589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15590     CXXFLAGS=$cf_save_cflags
15591
15592 fi
15593 echo "$as_me:15593: result: $cf_cv_fvisibility_hidden2" >&5
15594 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15595
15596                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15597                 then
15598
15599 cf_save_CXXFLAGS="$CFLAGS"
15600 CFLAGS="$CXXFLAGS"
15601
15602 cf_fix_cppflags=no
15603 cf_new_cflags=
15604 cf_new_cppflags=
15605 cf_new_extra_cppflags=
15606
15607 for cf_add_cflags in -fvisibility=hidden
15608 do
15609 case $cf_fix_cppflags in
15610 (no)
15611         case $cf_add_cflags in
15612         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15613                 case $cf_add_cflags in
15614                 (-D*)
15615                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15616
15617                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15618                                 && test -z "${cf_tst_cflags}" \
15619                                 && cf_fix_cppflags=yes
15620
15621                         if test $cf_fix_cppflags = yes ; then
15622
15623         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15624         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15625
15626                                 continue
15627                         elif test "${cf_tst_cflags}" = "\"'" ; then
15628
15629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15631
15632                                 continue
15633                         fi
15634                         ;;
15635                 esac
15636                 case "$CPPFLAGS" in
15637                 (*$cf_add_cflags)
15638                         ;;
15639                 (*)
15640                         case $cf_add_cflags in
15641                         (-D*)
15642                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15643
15644 CPPFLAGS=`echo "$CPPFLAGS" | \
15645         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15646                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15647
15648                                 ;;
15649                         esac
15650
15651         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15652         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15653
15654                         ;;
15655                 esac
15656                 ;;
15657         (*)
15658
15659         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15660         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15661
15662                 ;;
15663         esac
15664         ;;
15665 (yes)
15666
15667         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15668         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15669
15670         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15671
15672         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15673                 && test -z "${cf_tst_cflags}" \
15674                 && cf_fix_cppflags=no
15675         ;;
15676 esac
15677 done
15678
15679 if test -n "$cf_new_cflags" ; then
15680
15681         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15682         CFLAGS="${CFLAGS}$cf_new_cflags"
15683
15684 fi
15685
15686 if test -n "$cf_new_cppflags" ; then
15687
15688         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15689         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15690
15691 fi
15692
15693 if test -n "$cf_new_extra_cppflags" ; then
15694
15695         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15696         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15697
15698 fi
15699
15700 CXXFLAGS="$CFLAGS"
15701 CFLAGS="$cf_save_CXXFLAGS"
15702
15703                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15704                 fi
15705                 ac_ext=c
15706 ac_cpp='$CPP $CPPFLAGS'
15707 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15708 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15709 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15710 ac_main_return=return
15711
15712         fi
15713 fi
15714
15715 ###   use option --enable-interop to turn on use of bindings used for interop
15716 echo "$as_me:15716: checking if you want interop bindings" >&5
15717 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15718
15719 # Check whether --enable-interop or --disable-interop was given.
15720 if test "${enable_interop+set}" = set; then
15721   enableval="$enable_interop"
15722   with_exp_interop=$enableval
15723 else
15724   with_exp_interop=$cf_dft_interop
15725 fi;
15726 echo "$as_me:15726: result: $with_exp_interop" >&5
15727 echo "${ECHO_T}$with_exp_interop" >&6
15728
15729 NCURSES_INTEROP_FUNCS=0
15730 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15731
15732 echo "$as_me:15732: checking if you want experimental safe-sprintf code" >&5
15733 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15734
15735 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15736 if test "${enable_safe_sprintf+set}" = set; then
15737   enableval="$enable_safe_sprintf"
15738   with_safe_sprintf=$enableval
15739 else
15740   with_safe_sprintf=no
15741 fi;
15742 echo "$as_me:15742: result: $with_safe_sprintf" >&5
15743 echo "${ECHO_T}$with_safe_sprintf" >&6
15744
15745 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15746 # when hashmap is used scroll hints are useless
15747 if test "$with_hashmap" = no ; then
15748 echo "$as_me:15748: checking if you want to experiment without scrolling-hints code" >&5
15749 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15750
15751 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15752 if test "${enable_scroll_hints+set}" = set; then
15753   enableval="$enable_scroll_hints"
15754   with_scroll_hints=$enableval
15755 else
15756   with_scroll_hints=yes
15757 fi;
15758 echo "$as_me:15758: result: $with_scroll_hints" >&5
15759 echo "${ECHO_T}$with_scroll_hints" >&6
15760 test "x$with_scroll_hints" = xyes &&
15761 cat >>confdefs.h <<\EOF
15762 #define USE_SCROLL_HINTS 1
15763 EOF
15764
15765 fi
15766
15767 echo "$as_me:15767: checking if you want wgetch-events code" >&5
15768 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15769
15770 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15771 if test "${enable_wgetch_events+set}" = set; then
15772   enableval="$enable_wgetch_events"
15773   with_wgetch_events=$enableval
15774 else
15775   with_wgetch_events=no
15776 fi;
15777 echo "$as_me:15777: result: $with_wgetch_events" >&5
15778 echo "${ECHO_T}$with_wgetch_events" >&6
15779 test "x$with_wgetch_events" = xyes &&
15780 cat >>confdefs.h <<\EOF
15781 #define NCURSES_WGETCH_EVENTS 1
15782 EOF
15783
15784 ###############################################################################
15785
15786 ###     use option --disable-echo to suppress full display compiling commands
15787
15788 echo "$as_me:15788: checking if you want to see long compiling messages" >&5
15789 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15790
15791 # Check whether --enable-echo or --disable-echo was given.
15792 if test "${enable_echo+set}" = set; then
15793   enableval="$enable_echo"
15794   test "$enableval" != no && enableval=yes
15795         if test "$enableval" != "yes" ; then
15796
15797         ECHO_LT='--silent'
15798         ECHO_LD='@echo linking $@;'
15799         RULE_CC='@echo compiling $<'
15800         SHOW_CC='@echo compiling $@'
15801         ECHO_CC='@'
15802
15803         else
15804
15805         ECHO_LT=''
15806         ECHO_LD=''
15807         RULE_CC=''
15808         SHOW_CC=''
15809         ECHO_CC=''
15810
15811         fi
15812 else
15813   enableval=yes
15814
15815         ECHO_LT=''
15816         ECHO_LD=''
15817         RULE_CC=''
15818         SHOW_CC=''
15819         ECHO_CC=''
15820
15821 fi;
15822 echo "$as_me:15822: result: $enableval" >&5
15823 echo "${ECHO_T}$enableval" >&6
15824
15825 if test "x$enable_echo" = xyes; then
15826         ECHO_LINK=
15827 else
15828         ECHO_LINK='@ echo linking $@ ... ;'
15829         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15830         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15831 fi
15832
15833 # --disable-stripping is used for debugging
15834
15835 echo "$as_me:15835: checking if you want to install stripped executables" >&5
15836 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15837
15838 # Check whether --enable-stripping or --disable-stripping was given.
15839 if test "${enable_stripping+set}" = set; then
15840   enableval="$enable_stripping"
15841   test "$enableval" != no && enableval=yes
15842         if test "$enableval" != "yes" ; then
15843     with_stripping=no
15844         else
15845                 with_stripping=yes
15846         fi
15847 else
15848   enableval=yes
15849         with_stripping=yes
15850
15851 fi;
15852 echo "$as_me:15852: result: $with_stripping" >&5
15853 echo "${ECHO_T}$with_stripping" >&6
15854
15855 if test "$with_stripping" = yes
15856 then
15857         INSTALL_OPT_S="-s"
15858 else
15859         INSTALL_OPT_S=
15860 fi
15861
15862 : ${INSTALL:=install}
15863 echo "$as_me:15863: checking if install accepts -p option" >&5
15864 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15865 if test "${cf_cv_install_p+set}" = set; then
15866   echo $ECHO_N "(cached) $ECHO_C" >&6
15867 else
15868
15869         rm -rf conftest*
15870         date >conftest.in
15871         mkdir conftest.out
15872         sleep 3
15873         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15874         then
15875                 if test -f conftest.out/conftest.in
15876                 then
15877                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15878                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15879                         if test -s conftest.err
15880                         then
15881                                 cf_cv_install_p=no
15882                         else
15883                                 cf_cv_install_p=yes
15884                         fi
15885                 else
15886                         cf_cv_install_p=no
15887                 fi
15888         else
15889                 cf_cv_install_p=no
15890         fi
15891         rm -rf conftest*
15892
15893 fi
15894 echo "$as_me:15894: result: $cf_cv_install_p" >&5
15895 echo "${ECHO_T}$cf_cv_install_p" >&6
15896
15897 echo "$as_me:15897: checking if install needs to be told about ownership" >&5
15898 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15899 case `$ac_config_guess` in
15900 (*minix)
15901         with_install_o=yes
15902         ;;
15903 (*)
15904         with_install_o=no
15905         ;;
15906 esac
15907
15908 echo "$as_me:15908: result: $with_install_o" >&5
15909 echo "${ECHO_T}$with_install_o" >&6
15910 if test "x$with_install_o" = xyes
15911 then
15912         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'`
15913 else
15914         INSTALL_OPT_O=
15915 fi
15916
15917 # If we're avoiding relinking of shared libraries during install, that is to
15918 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15919 # the install program has "-p" (for preserving timestamps).
15920 cf_cv_do_reranlib=yes
15921 if test "x$cf_cv_install_p" = xyes
15922 then
15923         if test "x$cf_cv_do_relink" != xyes
15924         then
15925                 cf_cv_do_reranlib=no
15926                 INSTALL_OPT_P="-p"
15927                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15928         fi
15929 fi
15930
15931 ###     use option --enable-warnings to turn on all gcc warnings
15932 echo "$as_me:15932: checking if you want to see compiler warnings" >&5
15933 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15934
15935 # Check whether --enable-warnings or --disable-warnings was given.
15936 if test "${enable_warnings+set}" = set; then
15937   enableval="$enable_warnings"
15938   with_warnings=$enableval
15939 fi;
15940 echo "$as_me:15940: result: $with_warnings" >&5
15941 echo "${ECHO_T}$with_warnings" >&6
15942
15943 if test "x$with_warnings" = "xyes"; then
15944
15945         ADAFLAGS="$ADAFLAGS -gnatg"
15946
15947 if test "x$have_x" = xyes; then
15948
15949 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15950 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15951 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15952 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15953 for cf_X_CFLAGS in $X_CFLAGS
15954 do
15955         case "x$cf_X_CFLAGS" in
15956         x-[IUD]*)
15957                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15958                 ;;
15959         *)
15960                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15961                 ;;
15962         esac
15963 done
15964
15965 cat >conftest.$ac_ext <<_ACEOF
15966 #line 15966 "configure"
15967 #include "confdefs.h"
15968
15969 #include <stdlib.h>
15970 #include <X11/Intrinsic.h>
15971
15972 int
15973 main (void)
15974 {
15975 String foo = malloc(1); (void)foo
15976   ;
15977   return 0;
15978 }
15979 _ACEOF
15980 rm -f conftest.$ac_objext
15981 if { (eval echo "$as_me:15981: \"$ac_compile\"") >&5
15982   (eval $ac_compile) 2>&5
15983   ac_status=$?
15984   echo "$as_me:15984: \$? = $ac_status" >&5
15985   (exit $ac_status); } &&
15986          { ac_try='test -s conftest.$ac_objext'
15987   { (eval echo "$as_me:15987: \"$ac_try\"") >&5
15988   (eval $ac_try) 2>&5
15989   ac_status=$?
15990   echo "$as_me:15990: \$? = $ac_status" >&5
15991   (exit $ac_status); }; }; then
15992
15993 echo "$as_me:15993: checking for X11/Xt const-feature" >&5
15994 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15995 if test "${cf_cv_const_x_string+set}" = set; then
15996   echo $ECHO_N "(cached) $ECHO_C" >&6
15997 else
15998
15999         cat >conftest.$ac_ext <<_ACEOF
16000 #line 16000 "configure"
16001 #include "confdefs.h"
16002
16003 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16004 #undef  XTSTRINGDEFINES /* X11R5 and later */
16005 #include <stdlib.h>
16006 #include <X11/Intrinsic.h>
16007
16008 int
16009 main (void)
16010 {
16011 String foo = malloc(1); *foo = 0
16012   ;
16013   return 0;
16014 }
16015 _ACEOF
16016 rm -f conftest.$ac_objext
16017 if { (eval echo "$as_me:16017: \"$ac_compile\"") >&5
16018   (eval $ac_compile) 2>&5
16019   ac_status=$?
16020   echo "$as_me:16020: \$? = $ac_status" >&5
16021   (exit $ac_status); } &&
16022          { ac_try='test -s conftest.$ac_objext'
16023   { (eval echo "$as_me:16023: \"$ac_try\"") >&5
16024   (eval $ac_try) 2>&5
16025   ac_status=$?
16026   echo "$as_me:16026: \$? = $ac_status" >&5
16027   (exit $ac_status); }; }; then
16028
16029                         cf_cv_const_x_string=no
16030
16031 else
16032   echo "$as_me: failed program was:" >&5
16033 cat conftest.$ac_ext >&5
16034
16035                         cf_cv_const_x_string=yes
16036
16037 fi
16038 rm -f conftest.$ac_objext conftest.$ac_ext
16039
16040 fi
16041 echo "$as_me:16041: result: $cf_cv_const_x_string" >&5
16042 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16043
16044 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16045 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16046 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16047
16048 case $cf_cv_const_x_string in
16049 (no)
16050
16051         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16052         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16053
16054         ;;
16055 (*)
16056
16057         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16058         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16059
16060         ;;
16061 esac
16062
16063 else
16064   echo "$as_me: failed program was:" >&5
16065 cat conftest.$ac_ext >&5
16066 fi
16067 rm -f conftest.$ac_objext conftest.$ac_ext
16068  fi
16069 cat > conftest.$ac_ext <<EOF
16070 #line 16070 "${as_me:-configure}"
16071 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16072 EOF
16073 if test "$INTEL_COMPILER" = yes
16074 then
16075 # The "-wdXXX" options suppress warnings:
16076 # remark #1419: external declaration in primary source file
16077 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16078 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16079 # remark #193: zero used for undefined preprocessing identifier
16080 # remark #593: variable "curs_sb_left_arrow" was set but never used
16081 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16082 # remark #869: parameter "tw" was never referenced
16083 # remark #981: operands are evaluated in unspecified order
16084 # warning #279: controlling expression is constant
16085
16086         { echo "$as_me:16086: checking for $CC warning options..." >&5
16087 echo "$as_me: checking for $CC warning options..." >&6;}
16088         cf_save_CFLAGS="$CFLAGS"
16089         EXTRA_CFLAGS="-Wall"
16090         for cf_opt in \
16091                 wd1419 \
16092                 wd1683 \
16093                 wd1684 \
16094                 wd193 \
16095                 wd593 \
16096                 wd279 \
16097                 wd810 \
16098                 wd869 \
16099                 wd981
16100         do
16101                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16102                 if { (eval echo "$as_me:16102: \"$ac_compile\"") >&5
16103   (eval $ac_compile) 2>&5
16104   ac_status=$?
16105   echo "$as_me:16105: \$? = $ac_status" >&5
16106   (exit $ac_status); }; then
16107                         test -n "$verbose" && echo "$as_me:16107: result: ... -$cf_opt" >&5
16108 echo "${ECHO_T}... -$cf_opt" >&6
16109                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16110                 fi
16111         done
16112         CFLAGS="$cf_save_CFLAGS"
16113 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16114 then
16115         { echo "$as_me:16115: checking for $CC warning options..." >&5
16116 echo "$as_me: checking for $CC warning options..." >&6;}
16117         cf_save_CFLAGS="$CFLAGS"
16118         EXTRA_CFLAGS=
16119         cf_warn_CONST=""
16120         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16121         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16122         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16123         for cf_opt in W Wall \
16124                 Wbad-function-cast \
16125                 Wcast-align \
16126                 Wcast-qual \
16127                 Wdeclaration-after-statement \
16128                 Wextra \
16129                 Winline \
16130                 Wmissing-declarations \
16131                 Wmissing-prototypes \
16132                 Wnested-externs \
16133                 Wpointer-arith \
16134                 Wshadow \
16135                 Wstrict-prototypes \
16136                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16137         do
16138                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16139                 if { (eval echo "$as_me:16139: \"$ac_compile\"") >&5
16140   (eval $ac_compile) 2>&5
16141   ac_status=$?
16142   echo "$as_me:16142: \$? = $ac_status" >&5
16143   (exit $ac_status); }; then
16144                         test -n "$verbose" && echo "$as_me:16144: result: ... -$cf_opt" >&5
16145 echo "${ECHO_T}... -$cf_opt" >&6
16146                         case $cf_opt in
16147                         (Winline)
16148                                 case $GCC_VERSION in
16149                                 ([34].*)
16150                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16151
16152 echo "${as_me:-configure}:16152: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16153
16154                                         continue;;
16155                                 esac
16156                                 ;;
16157                         (Wpointer-arith)
16158                                 case $GCC_VERSION in
16159                                 ([12].*)
16160                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16161
16162 echo "${as_me:-configure}:16162: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16163
16164                                         continue;;
16165                                 esac
16166                                 ;;
16167                         esac
16168                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16169                 fi
16170         done
16171         CFLAGS="$cf_save_CFLAGS"
16172 fi
16173 rm -rf conftest*
16174
16175         if test "x$cf_with_cxx" = xyes ; then
16176
16177 INTEL_CPLUSPLUS=no
16178
16179 if test "$GCC" = yes ; then
16180         case $host_os in
16181         (linux*|gnu*)
16182                 echo "$as_me:16182: checking if this is really Intel C++ compiler" >&5
16183 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16184                 cf_save_CFLAGS="$CXXFLAGS"
16185                 CXXFLAGS="$CXXFLAGS -no-gcc"
16186                 cat >conftest.$ac_ext <<_ACEOF
16187 #line 16187 "configure"
16188 #include "confdefs.h"
16189
16190 int
16191 main (void)
16192 {
16193
16194 #ifdef __INTEL_COMPILER
16195 #else
16196 make an error
16197 #endif
16198
16199   ;
16200   return 0;
16201 }
16202 _ACEOF
16203 rm -f conftest.$ac_objext
16204 if { (eval echo "$as_me:16204: \"$ac_compile\"") >&5
16205   (eval $ac_compile) 2>&5
16206   ac_status=$?
16207   echo "$as_me:16207: \$? = $ac_status" >&5
16208   (exit $ac_status); } &&
16209          { ac_try='test -s conftest.$ac_objext'
16210   { (eval echo "$as_me:16210: \"$ac_try\"") >&5
16211   (eval $ac_try) 2>&5
16212   ac_status=$?
16213   echo "$as_me:16213: \$? = $ac_status" >&5
16214   (exit $ac_status); }; }; then
16215   INTEL_CPLUSPLUS=yes
16216 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16217
16218 else
16219   echo "$as_me: failed program was:" >&5
16220 cat conftest.$ac_ext >&5
16221 fi
16222 rm -f conftest.$ac_objext conftest.$ac_ext
16223                 CXXFLAGS="$cf_save_CFLAGS"
16224                 echo "$as_me:16224: result: $INTEL_CPLUSPLUS" >&5
16225 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16226                 ;;
16227         esac
16228 fi
16229
16230 CLANG_CPLUSPLUS=no
16231
16232 if test "$GCC" = yes ; then
16233         echo "$as_me:16233: checking if this is really Clang C++ compiler" >&5
16234 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16235         cf_save_CFLAGS="$CXXFLAGS"
16236         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16237         cat >conftest.$ac_ext <<_ACEOF
16238 #line 16238 "configure"
16239 #include "confdefs.h"
16240
16241 int
16242 main (void)
16243 {
16244
16245 #ifdef __clang__
16246 #else
16247 make an error
16248 #endif
16249
16250   ;
16251   return 0;
16252 }
16253 _ACEOF
16254 rm -f conftest.$ac_objext
16255 if { (eval echo "$as_me:16255: \"$ac_compile\"") >&5
16256   (eval $ac_compile) 2>&5
16257   ac_status=$?
16258   echo "$as_me:16258: \$? = $ac_status" >&5
16259   (exit $ac_status); } &&
16260          { ac_try='test -s conftest.$ac_objext'
16261   { (eval echo "$as_me:16261: \"$ac_try\"") >&5
16262   (eval $ac_try) 2>&5
16263   ac_status=$?
16264   echo "$as_me:16264: \$? = $ac_status" >&5
16265   (exit $ac_status); }; }; then
16266   CLANG_CPLUSPLUS=yes
16267 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16268
16269 else
16270   echo "$as_me: failed program was:" >&5
16271 cat conftest.$ac_ext >&5
16272 fi
16273 rm -f conftest.$ac_objext conftest.$ac_ext
16274         CXXFLAGS="$cf_save_CFLAGS"
16275         echo "$as_me:16275: result: $CLANG_CPLUSPLUS" >&5
16276 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16277 fi
16278
16279 ac_ext=cc
16280 ac_cpp='$CXXCPP $CPPFLAGS'
16281 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16282 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16283 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16284 ac_main_return=return
16285
16286 cat > conftest.$ac_ext <<EOF
16287 #line 16287 "configure"
16288 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16289 EOF
16290
16291 if test "$INTEL_CPLUSPLUS" = yes
16292 then
16293 # The "-wdXXX" options suppress warnings:
16294 # remark #1419: external declaration in primary source file
16295 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16296 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16297 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16298 # remark #193: zero used for undefined preprocessing identifier
16299 # remark #593: variable "curs_sb_left_arrow" was set but never used
16300 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16301 # remark #869: parameter "tw" was never referenced
16302 # remark #981: operands are evaluated in unspecified order
16303 # warning #269: invalid format string conversion
16304
16305         { echo "$as_me:16305: checking for $CC warning options..." >&5
16306 echo "$as_me: checking for $CC warning options..." >&6;}
16307         cf_save_CXXFLAGS="$CXXFLAGS"
16308         EXTRA_CXXFLAGS="-Wall"
16309         for cf_opt in \
16310                 wd1419 \
16311                 wd1682 \
16312                 wd1683 \
16313                 wd1684 \
16314                 wd193 \
16315                 wd279 \
16316                 wd593 \
16317                 wd810 \
16318                 wd869 \
16319                 wd981
16320         do
16321                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16322                 if { (eval echo "$as_me:16322: \"$ac_compile\"") >&5
16323   (eval $ac_compile) 2>&5
16324   ac_status=$?
16325   echo "$as_me:16325: \$? = $ac_status" >&5
16326   (exit $ac_status); }; then
16327                         test -n "$verbose" && echo "$as_me:16327: result: ... -$cf_opt" >&5
16328 echo "${ECHO_T}... -$cf_opt" >&6
16329                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16330                 fi
16331         done
16332         CXXFLAGS="$cf_save_CXXFLAGS"
16333
16334 elif test "$GXX" = yes
16335 then
16336         { echo "$as_me:16336: checking for $CXX warning options..." >&5
16337 echo "$as_me: checking for $CXX warning options..." >&6;}
16338         cf_save_CXXFLAGS="$CXXFLAGS"
16339         EXTRA_CXXFLAGS="-W -Wall"
16340         cf_gxx_extra_warnings=""
16341         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16342         case "$GCC_VERSION" in
16343         ([1-2].*)
16344                 ;;
16345         (*)
16346                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16347                 ;;
16348         esac
16349         for cf_opt in \
16350                 Wabi \
16351                 fabi-version=0 \
16352                 Wextra \
16353                 Wignored-qualifiers \
16354                 Wlogical-op \
16355                 Woverloaded-virtual \
16356                 Wsign-promo \
16357                 Wsynth \
16358                 Wold-style-cast \
16359                 Wcast-align \
16360                 Wcast-qual \
16361                 Wpointer-arith \
16362                 Wshadow \
16363                 Wundef $cf_gxx_extra_warnings Wno-unused
16364         do
16365                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16366                 if { (eval echo "$as_me:16366: \"$ac_compile\"") >&5
16367   (eval $ac_compile) 2>&5
16368   ac_status=$?
16369   echo "$as_me:16369: \$? = $ac_status" >&5
16370   (exit $ac_status); }; then
16371                         test -n "$verbose" && echo "$as_me:16371: result: ... -$cf_opt" >&5
16372 echo "${ECHO_T}... -$cf_opt" >&6
16373                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16374                 else
16375                         test -n "$verbose" && echo "$as_me:16375: result: ... no -$cf_opt" >&5
16376 echo "${ECHO_T}... no -$cf_opt" >&6
16377                 fi
16378         done
16379         CXXFLAGS="$cf_save_CXXFLAGS"
16380 fi
16381
16382 rm -rf conftest*
16383 ac_ext=c
16384 ac_cpp='$CPP $CPPFLAGS'
16385 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16386 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16387 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16388 ac_main_return=return
16389
16390         fi
16391 fi
16392
16393 if test "$GCC" = yes
16394 then
16395 cat > conftest.i <<EOF
16396 #ifndef GCC_PRINTF
16397 #define GCC_PRINTF 0
16398 #endif
16399 #ifndef GCC_SCANF
16400 #define GCC_SCANF 0
16401 #endif
16402 #ifndef GCC_NORETURN
16403 #define GCC_NORETURN /* nothing */
16404 #endif
16405 #ifndef GCC_UNUSED
16406 #define GCC_UNUSED /* nothing */
16407 #endif
16408 EOF
16409 if test "$GCC" = yes
16410 then
16411         { echo "$as_me:16411: checking for $CC __attribute__ directives..." >&5
16412 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16413 cat > conftest.$ac_ext <<EOF
16414 #line 16414 "${as_me:-configure}"
16415 #include "confdefs.h"
16416 #include "conftest.h"
16417 #include "conftest.i"
16418 #if     GCC_PRINTF
16419 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16420 #else
16421 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16422 #endif
16423 #if     GCC_SCANF
16424 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16425 #else
16426 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16427 #endif
16428 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16429 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16430 extern void foo(void) GCC_NORETURN;
16431 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16432 EOF
16433         cf_printf_attribute=no
16434         cf_scanf_attribute=no
16435         for cf_attribute in scanf printf unused noreturn
16436         do
16437
16438 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16439
16440                 cf_directive="__attribute__(($cf_attribute))"
16441                 echo "checking for $CC $cf_directive" 1>&5
16442
16443                 case $cf_attribute in
16444                 (printf)
16445                         cf_printf_attribute=yes
16446                         cat >conftest.h <<EOF
16447 #define GCC_$cf_ATTRIBUTE 1
16448 EOF
16449                         ;;
16450                 (scanf)
16451                         cf_scanf_attribute=yes
16452                         cat >conftest.h <<EOF
16453 #define GCC_$cf_ATTRIBUTE 1
16454 EOF
16455                         ;;
16456                 (*)
16457                         cat >conftest.h <<EOF
16458 #define GCC_$cf_ATTRIBUTE $cf_directive
16459 EOF
16460                         ;;
16461                 esac
16462
16463                 if { (eval echo "$as_me:16463: \"$ac_compile\"") >&5
16464   (eval $ac_compile) 2>&5
16465   ac_status=$?
16466   echo "$as_me:16466: \$? = $ac_status" >&5
16467   (exit $ac_status); }; then
16468                         test -n "$verbose" && echo "$as_me:16468: result: ... $cf_attribute" >&5
16469 echo "${ECHO_T}... $cf_attribute" >&6
16470                         cat conftest.h >>confdefs.h
16471                         case $cf_attribute in
16472                         (noreturn)
16473
16474 cat >>confdefs.h <<EOF
16475 #define GCC_NORETURN $cf_directive
16476 EOF
16477
16478                                 ;;
16479                         (printf)
16480                                 cf_value='/* nothing */'
16481                                 if test "$cf_printf_attribute" != no ; then
16482                                         cf_value='__attribute__((format(printf,fmt,var)))'
16483
16484 cat >>confdefs.h <<\EOF
16485 #define GCC_PRINTF 1
16486 EOF
16487
16488                                 fi
16489
16490 cat >>confdefs.h <<EOF
16491 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16492 EOF
16493
16494                                 ;;
16495                         (scanf)
16496                                 cf_value='/* nothing */'
16497                                 if test "$cf_scanf_attribute" != no ; then
16498                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16499
16500 cat >>confdefs.h <<\EOF
16501 #define GCC_SCANF 1
16502 EOF
16503
16504                                 fi
16505
16506 cat >>confdefs.h <<EOF
16507 #define GCC_SCANFLIKE(fmt,var) $cf_value
16508 EOF
16509
16510                                 ;;
16511                         (unused)
16512
16513 cat >>confdefs.h <<EOF
16514 #define GCC_UNUSED $cf_directive
16515 EOF
16516
16517                                 ;;
16518                         esac
16519                 fi
16520         done
16521 else
16522         fgrep define conftest.i >>confdefs.h
16523 fi
16524 rm -rf conftest*
16525 fi
16526
16527 echo "$as_me:16527: checking if you want to work around bogus compiler/loader warnings" >&5
16528 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16529
16530 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16531 if test "${enable_string_hacks+set}" = set; then
16532   enableval="$enable_string_hacks"
16533   with_string_hacks=$enableval
16534 else
16535   with_string_hacks=no
16536 fi;
16537 echo "$as_me:16537: result: $with_string_hacks" >&5
16538 echo "${ECHO_T}$with_string_hacks" >&6
16539
16540 if test "x$with_string_hacks" = "xyes"; then
16541
16542 cat >>confdefs.h <<\EOF
16543 #define USE_STRING_HACKS 1
16544 EOF
16545
16546         { echo "$as_me:16546: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16547 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16548         echo "$as_me:16548: checking for strlcat" >&5
16549 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16550 if test "${ac_cv_func_strlcat+set}" = set; then
16551   echo $ECHO_N "(cached) $ECHO_C" >&6
16552 else
16553   cat >conftest.$ac_ext <<_ACEOF
16554 #line 16554 "configure"
16555 #include "confdefs.h"
16556 #define strlcat autoconf_temporary
16557 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16558 #undef strlcat
16559
16560 #ifdef __cplusplus
16561 extern "C"
16562 #endif
16563
16564 /* We use char because int might match the return type of a gcc2
16565    builtin and then its argument prototype would still apply.  */
16566 char strlcat (void);
16567
16568 int
16569 main (void)
16570 {
16571
16572 /* The GNU C library defines stubs for functions which it implements
16573     to always fail with ENOSYS.  Some functions are actually named
16574     something starting with __ and the normal name is an alias.  */
16575 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16576 #error found stub for strlcat
16577 #endif
16578
16579         return strlcat ();
16580   ;
16581   return 0;
16582 }
16583 _ACEOF
16584 rm -f conftest.$ac_objext conftest$ac_exeext
16585 if { (eval echo "$as_me:16585: \"$ac_link\"") >&5
16586   (eval $ac_link) 2>&5
16587   ac_status=$?
16588   echo "$as_me:16588: \$? = $ac_status" >&5
16589   (exit $ac_status); } &&
16590          { ac_try='test -s conftest$ac_exeext'
16591   { (eval echo "$as_me:16591: \"$ac_try\"") >&5
16592   (eval $ac_try) 2>&5
16593   ac_status=$?
16594   echo "$as_me:16594: \$? = $ac_status" >&5
16595   (exit $ac_status); }; }; then
16596   ac_cv_func_strlcat=yes
16597 else
16598   echo "$as_me: failed program was:" >&5
16599 cat conftest.$ac_ext >&5
16600 ac_cv_func_strlcat=no
16601 fi
16602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16603 fi
16604 echo "$as_me:16604: result: $ac_cv_func_strlcat" >&5
16605 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16606 if test $ac_cv_func_strlcat = yes; then
16607
16608 cat >>confdefs.h <<\EOF
16609 #define HAVE_STRLCAT 1
16610 EOF
16611
16612 else
16613
16614                 echo "$as_me:16614: checking for strlcat in -lbsd" >&5
16615 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16616 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16617   echo $ECHO_N "(cached) $ECHO_C" >&6
16618 else
16619   ac_check_lib_save_LIBS=$LIBS
16620 LIBS="-lbsd  $LIBS"
16621 cat >conftest.$ac_ext <<_ACEOF
16622 #line 16622 "configure"
16623 #include "confdefs.h"
16624
16625 /* Override any gcc2 internal prototype to avoid an error.  */
16626 #ifdef __cplusplus
16627 extern "C"
16628 #endif
16629 /* We use char because int might match the return type of a gcc2
16630    builtin and then its argument prototype would still apply.  */
16631 char strlcat ();
16632 int
16633 main (void)
16634 {
16635 strlcat ();
16636   ;
16637   return 0;
16638 }
16639 _ACEOF
16640 rm -f conftest.$ac_objext conftest$ac_exeext
16641 if { (eval echo "$as_me:16641: \"$ac_link\"") >&5
16642   (eval $ac_link) 2>&5
16643   ac_status=$?
16644   echo "$as_me:16644: \$? = $ac_status" >&5
16645   (exit $ac_status); } &&
16646          { ac_try='test -s conftest$ac_exeext'
16647   { (eval echo "$as_me:16647: \"$ac_try\"") >&5
16648   (eval $ac_try) 2>&5
16649   ac_status=$?
16650   echo "$as_me:16650: \$? = $ac_status" >&5
16651   (exit $ac_status); }; }; then
16652   ac_cv_lib_bsd_strlcat=yes
16653 else
16654   echo "$as_me: failed program was:" >&5
16655 cat conftest.$ac_ext >&5
16656 ac_cv_lib_bsd_strlcat=no
16657 fi
16658 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16659 LIBS=$ac_check_lib_save_LIBS
16660 fi
16661 echo "$as_me:16661: result: $ac_cv_lib_bsd_strlcat" >&5
16662 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16663 if test $ac_cv_lib_bsd_strlcat = yes; then
16664
16665 cf_add_libs="$LIBS"
16666 # reverse order
16667 cf_add_0lib=
16668 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16669 # filter duplicates
16670 for cf_add_1lib in $cf_add_0lib; do
16671         for cf_add_2lib in $cf_add_libs; do
16672                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16673                         cf_add_1lib=
16674                         break
16675                 fi
16676         done
16677         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16678 done
16679 LIBS="$cf_add_libs"
16680
16681 for ac_header in bsd/string.h
16682 do
16683 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16684 echo "$as_me:16684: checking for $ac_header" >&5
16685 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16686 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16687   echo $ECHO_N "(cached) $ECHO_C" >&6
16688 else
16689   cat >conftest.$ac_ext <<_ACEOF
16690 #line 16690 "configure"
16691 #include "confdefs.h"
16692 #include <$ac_header>
16693 _ACEOF
16694 if { (eval echo "$as_me:16694: \"$ac_cpp conftest.$ac_ext\"") >&5
16695   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16696   ac_status=$?
16697   egrep -v '^ *\+' conftest.er1 >conftest.err
16698   rm -f conftest.er1
16699   cat conftest.err >&5
16700   echo "$as_me:16700: \$? = $ac_status" >&5
16701   (exit $ac_status); } >/dev/null; then
16702   if test -s conftest.err; then
16703     ac_cpp_err=$ac_c_preproc_warn_flag
16704   else
16705     ac_cpp_err=
16706   fi
16707 else
16708   ac_cpp_err=yes
16709 fi
16710 if test -z "$ac_cpp_err"; then
16711   eval "$as_ac_Header=yes"
16712 else
16713   echo "$as_me: failed program was:" >&5
16714   cat conftest.$ac_ext >&5
16715   eval "$as_ac_Header=no"
16716 fi
16717 rm -f conftest.err conftest.$ac_ext
16718 fi
16719 echo "$as_me:16719: result: `eval echo '${'$as_ac_Header'}'`" >&5
16720 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16721 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16722   cat >>confdefs.h <<EOF
16723 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16724 EOF
16725
16726 fi
16727 done
16728
16729 cat >>confdefs.h <<\EOF
16730 #define HAVE_STRLCAT 1
16731 EOF
16732
16733 fi
16734
16735 fi
16736
16737 for ac_func in strlcpy snprintf
16738 do
16739 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16740 echo "$as_me:16740: checking for $ac_func" >&5
16741 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16742 if eval "test \"\${$as_ac_var+set}\" = set"; then
16743   echo $ECHO_N "(cached) $ECHO_C" >&6
16744 else
16745   cat >conftest.$ac_ext <<_ACEOF
16746 #line 16746 "configure"
16747 #include "confdefs.h"
16748 #define $ac_func autoconf_temporary
16749 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16750 #undef $ac_func
16751
16752 #ifdef __cplusplus
16753 extern "C"
16754 #endif
16755
16756 /* We use char because int might match the return type of a gcc2
16757    builtin and then its argument prototype would still apply.  */
16758 char $ac_func (void);
16759
16760 int
16761 main (void)
16762 {
16763
16764 /* The GNU C library defines stubs for functions which it implements
16765     to always fail with ENOSYS.  Some functions are actually named
16766     something starting with __ and the normal name is an alias.  */
16767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16768 #error found stub for $ac_func
16769 #endif
16770
16771         return $ac_func ();
16772   ;
16773   return 0;
16774 }
16775 _ACEOF
16776 rm -f conftest.$ac_objext conftest$ac_exeext
16777 if { (eval echo "$as_me:16777: \"$ac_link\"") >&5
16778   (eval $ac_link) 2>&5
16779   ac_status=$?
16780   echo "$as_me:16780: \$? = $ac_status" >&5
16781   (exit $ac_status); } &&
16782          { ac_try='test -s conftest$ac_exeext'
16783   { (eval echo "$as_me:16783: \"$ac_try\"") >&5
16784   (eval $ac_try) 2>&5
16785   ac_status=$?
16786   echo "$as_me:16786: \$? = $ac_status" >&5
16787   (exit $ac_status); }; }; then
16788   eval "$as_ac_var=yes"
16789 else
16790   echo "$as_me: failed program was:" >&5
16791 cat conftest.$ac_ext >&5
16792 eval "$as_ac_var=no"
16793 fi
16794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16795 fi
16796 echo "$as_me:16796: result: `eval echo '${'$as_ac_var'}'`" >&5
16797 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16798 if test `eval echo '${'$as_ac_var'}'` = yes; then
16799   cat >>confdefs.h <<EOF
16800 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16801 EOF
16802
16803 fi
16804 done
16805
16806 fi
16807
16808 ###     use option --enable-assertions to turn on generation of assertion code
16809 echo "$as_me:16809: checking if you want to enable runtime assertions" >&5
16810 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16811
16812 # Check whether --enable-assertions or --disable-assertions was given.
16813 if test "${enable_assertions+set}" = set; then
16814   enableval="$enable_assertions"
16815   with_assertions=$enableval
16816 else
16817   with_assertions=no
16818 fi;
16819 echo "$as_me:16819: result: $with_assertions" >&5
16820 echo "${ECHO_T}$with_assertions" >&6
16821 if test -n "$GCC"
16822 then
16823         if test "$with_assertions" = no
16824         then
16825                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16826         else
16827
16828         ADAFLAGS="$ADAFLAGS -gnata"
16829
16830         fi
16831 fi
16832
16833 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16834
16835 echo "$as_me:16835: checking if you want to use dmalloc for testing" >&5
16836 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16837
16838 # Check whether --with-dmalloc or --without-dmalloc was given.
16839 if test "${with_dmalloc+set}" = set; then
16840   withval="$with_dmalloc"
16841
16842 cat >>confdefs.h <<EOF
16843 #define USE_DMALLOC 1
16844 EOF
16845
16846         : ${with_cflags:=-g}
16847         : ${with_no_leaks:=yes}
16848          with_dmalloc=yes
16849 else
16850   with_dmalloc=
16851 fi;
16852 echo "$as_me:16852: result: ${with_dmalloc:-no}" >&5
16853 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16854
16855 case .$with_cflags in
16856 (.*-g*)
16857         case .$CFLAGS in
16858         (.*-g*)
16859                 ;;
16860         (*)
16861
16862 cf_fix_cppflags=no
16863 cf_new_cflags=
16864 cf_new_cppflags=
16865 cf_new_extra_cppflags=
16866
16867 for cf_add_cflags in -g
16868 do
16869 case $cf_fix_cppflags in
16870 (no)
16871         case $cf_add_cflags in
16872         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16873                 case $cf_add_cflags in
16874                 (-D*)
16875                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16876
16877                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16878                                 && test -z "${cf_tst_cflags}" \
16879                                 && cf_fix_cppflags=yes
16880
16881                         if test $cf_fix_cppflags = yes ; then
16882
16883         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16884         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16885
16886                                 continue
16887                         elif test "${cf_tst_cflags}" = "\"'" ; then
16888
16889         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16890         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16891
16892                                 continue
16893                         fi
16894                         ;;
16895                 esac
16896                 case "$CPPFLAGS" in
16897                 (*$cf_add_cflags)
16898                         ;;
16899                 (*)
16900                         case $cf_add_cflags in
16901                         (-D*)
16902                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16903
16904 CPPFLAGS=`echo "$CPPFLAGS" | \
16905         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16906                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16907
16908                                 ;;
16909                         esac
16910
16911         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16912         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16913
16914                         ;;
16915                 esac
16916                 ;;
16917         (*)
16918
16919         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16920         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16921
16922                 ;;
16923         esac
16924         ;;
16925 (yes)
16926
16927         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16928         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16929
16930         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16931
16932         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16933                 && test -z "${cf_tst_cflags}" \
16934                 && cf_fix_cppflags=no
16935         ;;
16936 esac
16937 done
16938
16939 if test -n "$cf_new_cflags" ; then
16940
16941         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16942         CFLAGS="${CFLAGS}$cf_new_cflags"
16943
16944 fi
16945
16946 if test -n "$cf_new_cppflags" ; then
16947
16948         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16949         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16950
16951 fi
16952
16953 if test -n "$cf_new_extra_cppflags" ; then
16954
16955         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16956         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16957
16958 fi
16959
16960                 ;;
16961         esac
16962         ;;
16963 esac
16964
16965 if test "$with_dmalloc" = yes ; then
16966         echo "$as_me:16966: checking for dmalloc.h" >&5
16967 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16968 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16969   echo $ECHO_N "(cached) $ECHO_C" >&6
16970 else
16971   cat >conftest.$ac_ext <<_ACEOF
16972 #line 16972 "configure"
16973 #include "confdefs.h"
16974 #include <dmalloc.h>
16975 _ACEOF
16976 if { (eval echo "$as_me:16976: \"$ac_cpp conftest.$ac_ext\"") >&5
16977   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16978   ac_status=$?
16979   egrep -v '^ *\+' conftest.er1 >conftest.err
16980   rm -f conftest.er1
16981   cat conftest.err >&5
16982   echo "$as_me:16982: \$? = $ac_status" >&5
16983   (exit $ac_status); } >/dev/null; then
16984   if test -s conftest.err; then
16985     ac_cpp_err=$ac_c_preproc_warn_flag
16986   else
16987     ac_cpp_err=
16988   fi
16989 else
16990   ac_cpp_err=yes
16991 fi
16992 if test -z "$ac_cpp_err"; then
16993   ac_cv_header_dmalloc_h=yes
16994 else
16995   echo "$as_me: failed program was:" >&5
16996   cat conftest.$ac_ext >&5
16997   ac_cv_header_dmalloc_h=no
16998 fi
16999 rm -f conftest.err conftest.$ac_ext
17000 fi
17001 echo "$as_me:17001: result: $ac_cv_header_dmalloc_h" >&5
17002 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17003 if test $ac_cv_header_dmalloc_h = yes; then
17004
17005 echo "$as_me:17005: checking for dmalloc_debug in -ldmalloc" >&5
17006 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17007 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17008   echo $ECHO_N "(cached) $ECHO_C" >&6
17009 else
17010   ac_check_lib_save_LIBS=$LIBS
17011 LIBS="-ldmalloc  $LIBS"
17012 cat >conftest.$ac_ext <<_ACEOF
17013 #line 17013 "configure"
17014 #include "confdefs.h"
17015
17016 /* Override any gcc2 internal prototype to avoid an error.  */
17017 #ifdef __cplusplus
17018 extern "C"
17019 #endif
17020 /* We use char because int might match the return type of a gcc2
17021    builtin and then its argument prototype would still apply.  */
17022 char dmalloc_debug ();
17023 int
17024 main (void)
17025 {
17026 dmalloc_debug ();
17027   ;
17028   return 0;
17029 }
17030 _ACEOF
17031 rm -f conftest.$ac_objext conftest$ac_exeext
17032 if { (eval echo "$as_me:17032: \"$ac_link\"") >&5
17033   (eval $ac_link) 2>&5
17034   ac_status=$?
17035   echo "$as_me:17035: \$? = $ac_status" >&5
17036   (exit $ac_status); } &&
17037          { ac_try='test -s conftest$ac_exeext'
17038   { (eval echo "$as_me:17038: \"$ac_try\"") >&5
17039   (eval $ac_try) 2>&5
17040   ac_status=$?
17041   echo "$as_me:17041: \$? = $ac_status" >&5
17042   (exit $ac_status); }; }; then
17043   ac_cv_lib_dmalloc_dmalloc_debug=yes
17044 else
17045   echo "$as_me: failed program was:" >&5
17046 cat conftest.$ac_ext >&5
17047 ac_cv_lib_dmalloc_dmalloc_debug=no
17048 fi
17049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17050 LIBS=$ac_check_lib_save_LIBS
17051 fi
17052 echo "$as_me:17052: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17053 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17054 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17055   cat >>confdefs.h <<EOF
17056 #define HAVE_LIBDMALLOC 1
17057 EOF
17058
17059   LIBS="-ldmalloc $LIBS"
17060
17061 fi
17062
17063 fi
17064
17065 fi
17066
17067 echo "$as_me:17067: checking if you want to use dbmalloc for testing" >&5
17068 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17069
17070 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17071 if test "${with_dbmalloc+set}" = set; then
17072   withval="$with_dbmalloc"
17073
17074 cat >>confdefs.h <<EOF
17075 #define USE_DBMALLOC 1
17076 EOF
17077
17078         : ${with_cflags:=-g}
17079         : ${with_no_leaks:=yes}
17080          with_dbmalloc=yes
17081 else
17082   with_dbmalloc=
17083 fi;
17084 echo "$as_me:17084: result: ${with_dbmalloc:-no}" >&5
17085 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17086
17087 case .$with_cflags in
17088 (.*-g*)
17089         case .$CFLAGS in
17090         (.*-g*)
17091                 ;;
17092         (*)
17093
17094 cf_fix_cppflags=no
17095 cf_new_cflags=
17096 cf_new_cppflags=
17097 cf_new_extra_cppflags=
17098
17099 for cf_add_cflags in -g
17100 do
17101 case $cf_fix_cppflags in
17102 (no)
17103         case $cf_add_cflags in
17104         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17105                 case $cf_add_cflags in
17106                 (-D*)
17107                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17108
17109                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17110                                 && test -z "${cf_tst_cflags}" \
17111                                 && cf_fix_cppflags=yes
17112
17113                         if test $cf_fix_cppflags = yes ; then
17114
17115         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17116         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17117
17118                                 continue
17119                         elif test "${cf_tst_cflags}" = "\"'" ; then
17120
17121         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17122         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17123
17124                                 continue
17125                         fi
17126                         ;;
17127                 esac
17128                 case "$CPPFLAGS" in
17129                 (*$cf_add_cflags)
17130                         ;;
17131                 (*)
17132                         case $cf_add_cflags in
17133                         (-D*)
17134                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17135
17136 CPPFLAGS=`echo "$CPPFLAGS" | \
17137         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17138                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17139
17140                                 ;;
17141                         esac
17142
17143         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17144         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17145
17146                         ;;
17147                 esac
17148                 ;;
17149         (*)
17150
17151         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17152         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17153
17154                 ;;
17155         esac
17156         ;;
17157 (yes)
17158
17159         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17160         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17161
17162         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17163
17164         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17165                 && test -z "${cf_tst_cflags}" \
17166                 && cf_fix_cppflags=no
17167         ;;
17168 esac
17169 done
17170
17171 if test -n "$cf_new_cflags" ; then
17172
17173         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17174         CFLAGS="${CFLAGS}$cf_new_cflags"
17175
17176 fi
17177
17178 if test -n "$cf_new_cppflags" ; then
17179
17180         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17181         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17182
17183 fi
17184
17185 if test -n "$cf_new_extra_cppflags" ; then
17186
17187         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17188         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17189
17190 fi
17191
17192                 ;;
17193         esac
17194         ;;
17195 esac
17196
17197 if test "$with_dbmalloc" = yes ; then
17198         echo "$as_me:17198: checking for dbmalloc.h" >&5
17199 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17200 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17201   echo $ECHO_N "(cached) $ECHO_C" >&6
17202 else
17203   cat >conftest.$ac_ext <<_ACEOF
17204 #line 17204 "configure"
17205 #include "confdefs.h"
17206 #include <dbmalloc.h>
17207 _ACEOF
17208 if { (eval echo "$as_me:17208: \"$ac_cpp conftest.$ac_ext\"") >&5
17209   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17210   ac_status=$?
17211   egrep -v '^ *\+' conftest.er1 >conftest.err
17212   rm -f conftest.er1
17213   cat conftest.err >&5
17214   echo "$as_me:17214: \$? = $ac_status" >&5
17215   (exit $ac_status); } >/dev/null; then
17216   if test -s conftest.err; then
17217     ac_cpp_err=$ac_c_preproc_warn_flag
17218   else
17219     ac_cpp_err=
17220   fi
17221 else
17222   ac_cpp_err=yes
17223 fi
17224 if test -z "$ac_cpp_err"; then
17225   ac_cv_header_dbmalloc_h=yes
17226 else
17227   echo "$as_me: failed program was:" >&5
17228   cat conftest.$ac_ext >&5
17229   ac_cv_header_dbmalloc_h=no
17230 fi
17231 rm -f conftest.err conftest.$ac_ext
17232 fi
17233 echo "$as_me:17233: result: $ac_cv_header_dbmalloc_h" >&5
17234 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17235 if test $ac_cv_header_dbmalloc_h = yes; then
17236
17237 echo "$as_me:17237: checking for debug_malloc in -ldbmalloc" >&5
17238 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17239 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17240   echo $ECHO_N "(cached) $ECHO_C" >&6
17241 else
17242   ac_check_lib_save_LIBS=$LIBS
17243 LIBS="-ldbmalloc  $LIBS"
17244 cat >conftest.$ac_ext <<_ACEOF
17245 #line 17245 "configure"
17246 #include "confdefs.h"
17247
17248 /* Override any gcc2 internal prototype to avoid an error.  */
17249 #ifdef __cplusplus
17250 extern "C"
17251 #endif
17252 /* We use char because int might match the return type of a gcc2
17253    builtin and then its argument prototype would still apply.  */
17254 char debug_malloc ();
17255 int
17256 main (void)
17257 {
17258 debug_malloc ();
17259   ;
17260   return 0;
17261 }
17262 _ACEOF
17263 rm -f conftest.$ac_objext conftest$ac_exeext
17264 if { (eval echo "$as_me:17264: \"$ac_link\"") >&5
17265   (eval $ac_link) 2>&5
17266   ac_status=$?
17267   echo "$as_me:17267: \$? = $ac_status" >&5
17268   (exit $ac_status); } &&
17269          { ac_try='test -s conftest$ac_exeext'
17270   { (eval echo "$as_me:17270: \"$ac_try\"") >&5
17271   (eval $ac_try) 2>&5
17272   ac_status=$?
17273   echo "$as_me:17273: \$? = $ac_status" >&5
17274   (exit $ac_status); }; }; then
17275   ac_cv_lib_dbmalloc_debug_malloc=yes
17276 else
17277   echo "$as_me: failed program was:" >&5
17278 cat conftest.$ac_ext >&5
17279 ac_cv_lib_dbmalloc_debug_malloc=no
17280 fi
17281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17282 LIBS=$ac_check_lib_save_LIBS
17283 fi
17284 echo "$as_me:17284: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17285 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17286 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17287   cat >>confdefs.h <<EOF
17288 #define HAVE_LIBDBMALLOC 1
17289 EOF
17290
17291   LIBS="-ldbmalloc $LIBS"
17292
17293 fi
17294
17295 fi
17296
17297 fi
17298
17299 echo "$as_me:17299: checking if you want to use valgrind for testing" >&5
17300 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17301
17302 # Check whether --with-valgrind or --without-valgrind was given.
17303 if test "${with_valgrind+set}" = set; then
17304   withval="$with_valgrind"
17305
17306 cat >>confdefs.h <<EOF
17307 #define USE_VALGRIND 1
17308 EOF
17309
17310         : ${with_cflags:=-g}
17311         : ${with_no_leaks:=yes}
17312          with_valgrind=yes
17313 else
17314   with_valgrind=
17315 fi;
17316 echo "$as_me:17316: result: ${with_valgrind:-no}" >&5
17317 echo "${ECHO_T}${with_valgrind:-no}" >&6
17318
17319 case .$with_cflags in
17320 (.*-g*)
17321         case .$CFLAGS in
17322         (.*-g*)
17323                 ;;
17324         (*)
17325
17326 cf_fix_cppflags=no
17327 cf_new_cflags=
17328 cf_new_cppflags=
17329 cf_new_extra_cppflags=
17330
17331 for cf_add_cflags in -g
17332 do
17333 case $cf_fix_cppflags in
17334 (no)
17335         case $cf_add_cflags in
17336         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17337                 case $cf_add_cflags in
17338                 (-D*)
17339                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17340
17341                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17342                                 && test -z "${cf_tst_cflags}" \
17343                                 && cf_fix_cppflags=yes
17344
17345                         if test $cf_fix_cppflags = yes ; then
17346
17347         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17348         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17349
17350                                 continue
17351                         elif test "${cf_tst_cflags}" = "\"'" ; then
17352
17353         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17354         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17355
17356                                 continue
17357                         fi
17358                         ;;
17359                 esac
17360                 case "$CPPFLAGS" in
17361                 (*$cf_add_cflags)
17362                         ;;
17363                 (*)
17364                         case $cf_add_cflags in
17365                         (-D*)
17366                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17367
17368 CPPFLAGS=`echo "$CPPFLAGS" | \
17369         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17370                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17371
17372                                 ;;
17373                         esac
17374
17375         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17376         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17377
17378                         ;;
17379                 esac
17380                 ;;
17381         (*)
17382
17383         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17384         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17385
17386                 ;;
17387         esac
17388         ;;
17389 (yes)
17390
17391         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17392         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17393
17394         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17395
17396         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17397                 && test -z "${cf_tst_cflags}" \
17398                 && cf_fix_cppflags=no
17399         ;;
17400 esac
17401 done
17402
17403 if test -n "$cf_new_cflags" ; then
17404
17405         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17406         CFLAGS="${CFLAGS}$cf_new_cflags"
17407
17408 fi
17409
17410 if test -n "$cf_new_cppflags" ; then
17411
17412         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17413         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17414
17415 fi
17416
17417 if test -n "$cf_new_extra_cppflags" ; then
17418
17419         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17420         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17421
17422 fi
17423
17424                 ;;
17425         esac
17426         ;;
17427 esac
17428
17429 echo "$as_me:17429: checking if you want to perform memory-leak testing" >&5
17430 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17431
17432 # Check whether --enable-leaks or --disable-leaks was given.
17433 if test "${enable_leaks+set}" = set; then
17434   enableval="$enable_leaks"
17435   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17436 else
17437   : ${with_no_leaks:=no}
17438 fi;
17439 echo "$as_me:17439: result: $with_no_leaks" >&5
17440 echo "${ECHO_T}$with_no_leaks" >&6
17441
17442 if test "$with_no_leaks" = yes ; then
17443
17444 cat >>confdefs.h <<\EOF
17445 #define NO_LEAKS 1
17446 EOF
17447
17448 cat >>confdefs.h <<\EOF
17449 #define YY_NO_LEAKS 1
17450 EOF
17451
17452 fi
17453
17454 cat >>confdefs.h <<\EOF
17455 #define HAVE_NC_ALLOC_H 1
17456 EOF
17457
17458 ###     use option --enable-expanded to generate certain macros as functions
17459
17460 # Check whether --enable-expanded or --disable-expanded was given.
17461 if test "${enable_expanded+set}" = set; then
17462   enableval="$enable_expanded"
17463   test "x$enableval" = xyes &&
17464 cat >>confdefs.h <<\EOF
17465 #define NCURSES_EXPANDED 1
17466 EOF
17467
17468 fi;
17469
17470 ###     use option --disable-macros to suppress macros in favor of functions
17471
17472 # Check whether --enable-macros or --disable-macros was given.
17473 if test "${enable_macros+set}" = set; then
17474   enableval="$enable_macros"
17475   test "$enableval" = no &&
17476 cat >>confdefs.h <<\EOF
17477 #define NCURSES_NOMACROS 1
17478 EOF
17479
17480 fi;
17481
17482 # Normally we only add trace() to the debug-library.  Allow this to be
17483 # extended to all models of the ncurses library:
17484 cf_all_traces=no
17485 case "$CFLAGS $CPPFLAGS" in
17486 (*-DTRACE*)
17487         cf_all_traces=yes
17488         ;;
17489 esac
17490
17491 echo "$as_me:17491: checking whether to add trace feature to all models" >&5
17492 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17493
17494 # Check whether --with-trace or --without-trace was given.
17495 if test "${with_trace+set}" = set; then
17496   withval="$with_trace"
17497   cf_with_trace=$withval
17498 else
17499   cf_with_trace=$cf_all_traces
17500 fi;
17501 echo "$as_me:17501: result: $cf_with_trace" >&5
17502 echo "${ECHO_T}$cf_with_trace" >&6
17503
17504 if test "x$cf_with_trace" = xyes ; then
17505         LIB_TRACING=all
17506         ADA_TRACE=TRUE
17507
17508 cf_fix_cppflags=no
17509 cf_new_cflags=
17510 cf_new_cppflags=
17511 cf_new_extra_cppflags=
17512
17513 for cf_add_cflags in -DTRACE
17514 do
17515 case $cf_fix_cppflags in
17516 (no)
17517         case $cf_add_cflags in
17518         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17519                 case $cf_add_cflags in
17520                 (-D*)
17521                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17522
17523                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17524                                 && test -z "${cf_tst_cflags}" \
17525                                 && cf_fix_cppflags=yes
17526
17527                         if test $cf_fix_cppflags = yes ; then
17528
17529         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17530         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17531
17532                                 continue
17533                         elif test "${cf_tst_cflags}" = "\"'" ; then
17534
17535         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17536         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17537
17538                                 continue
17539                         fi
17540                         ;;
17541                 esac
17542                 case "$CPPFLAGS" in
17543                 (*$cf_add_cflags)
17544                         ;;
17545                 (*)
17546                         case $cf_add_cflags in
17547                         (-D*)
17548                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17549
17550 CPPFLAGS=`echo "$CPPFLAGS" | \
17551         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17552                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17553
17554                                 ;;
17555                         esac
17556
17557         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17558         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17559
17560                         ;;
17561                 esac
17562                 ;;
17563         (*)
17564
17565         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17566         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17567
17568                 ;;
17569         esac
17570         ;;
17571 (yes)
17572
17573         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17574         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17575
17576         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17577
17578         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17579                 && test -z "${cf_tst_cflags}" \
17580                 && cf_fix_cppflags=no
17581         ;;
17582 esac
17583 done
17584
17585 if test -n "$cf_new_cflags" ; then
17586
17587         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17588         CFLAGS="${CFLAGS}$cf_new_cflags"
17589
17590 fi
17591
17592 if test -n "$cf_new_cppflags" ; then
17593
17594         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17595         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17596
17597 fi
17598
17599 if test -n "$cf_new_extra_cppflags" ; then
17600
17601         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17602         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17603
17604 fi
17605
17606 cat >>confdefs.h <<\EOF
17607 #define HAVE__TRACEF 1
17608 EOF
17609
17610 else
17611         LIB_TRACING=DEBUG
17612         ADA_TRACE=FALSE
17613 fi
17614
17615 echo "$as_me:17615: checking if we want to use GNAT projects" >&5
17616 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17617
17618 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17619 if test "${enable_gnat_projects+set}" = set; then
17620   enableval="$enable_gnat_projects"
17621   test "$enableval" != no && enableval=yes
17622         if test "$enableval" != "yes" ; then
17623     enable_gnat_projects=no
17624         else
17625                 enable_gnat_projects=yes
17626         fi
17627 else
17628   enableval=yes
17629         enable_gnat_projects=yes
17630
17631 fi;
17632 echo "$as_me:17632: result: $enable_gnat_projects" >&5
17633 echo "${ECHO_T}$enable_gnat_projects" >&6
17634
17635 ###     Checks for libraries.
17636 case $cf_cv_system_name in
17637 (*mingw32*|*mingw64*)
17638         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17639         # Note: WINVER may be a problem with Windows 10
17640         ;;
17641 (*)
17642 echo "$as_me:17642: checking for gettimeofday" >&5
17643 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17644 if test "${ac_cv_func_gettimeofday+set}" = set; then
17645   echo $ECHO_N "(cached) $ECHO_C" >&6
17646 else
17647   cat >conftest.$ac_ext <<_ACEOF
17648 #line 17648 "configure"
17649 #include "confdefs.h"
17650 #define gettimeofday autoconf_temporary
17651 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17652 #undef gettimeofday
17653
17654 #ifdef __cplusplus
17655 extern "C"
17656 #endif
17657
17658 /* We use char because int might match the return type of a gcc2
17659    builtin and then its argument prototype would still apply.  */
17660 char gettimeofday (void);
17661
17662 int
17663 main (void)
17664 {
17665
17666 /* The GNU C library defines stubs for functions which it implements
17667     to always fail with ENOSYS.  Some functions are actually named
17668     something starting with __ and the normal name is an alias.  */
17669 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17670 #error found stub for gettimeofday
17671 #endif
17672
17673         return gettimeofday ();
17674   ;
17675   return 0;
17676 }
17677 _ACEOF
17678 rm -f conftest.$ac_objext conftest$ac_exeext
17679 if { (eval echo "$as_me:17679: \"$ac_link\"") >&5
17680   (eval $ac_link) 2>&5
17681   ac_status=$?
17682   echo "$as_me:17682: \$? = $ac_status" >&5
17683   (exit $ac_status); } &&
17684          { ac_try='test -s conftest$ac_exeext'
17685   { (eval echo "$as_me:17685: \"$ac_try\"") >&5
17686   (eval $ac_try) 2>&5
17687   ac_status=$?
17688   echo "$as_me:17688: \$? = $ac_status" >&5
17689   (exit $ac_status); }; }; then
17690   ac_cv_func_gettimeofday=yes
17691 else
17692   echo "$as_me: failed program was:" >&5
17693 cat conftest.$ac_ext >&5
17694 ac_cv_func_gettimeofday=no
17695 fi
17696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17697 fi
17698 echo "$as_me:17698: result: $ac_cv_func_gettimeofday" >&5
17699 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17700 if test $ac_cv_func_gettimeofday = yes; then
17701
17702 cat >>confdefs.h <<\EOF
17703 #define HAVE_GETTIMEOFDAY 1
17704 EOF
17705
17706 else
17707
17708 echo "$as_me:17708: checking for gettimeofday in -lbsd" >&5
17709 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17710 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17711   echo $ECHO_N "(cached) $ECHO_C" >&6
17712 else
17713   ac_check_lib_save_LIBS=$LIBS
17714 LIBS="-lbsd  $LIBS"
17715 cat >conftest.$ac_ext <<_ACEOF
17716 #line 17716 "configure"
17717 #include "confdefs.h"
17718
17719 /* Override any gcc2 internal prototype to avoid an error.  */
17720 #ifdef __cplusplus
17721 extern "C"
17722 #endif
17723 /* We use char because int might match the return type of a gcc2
17724    builtin and then its argument prototype would still apply.  */
17725 char gettimeofday ();
17726 int
17727 main (void)
17728 {
17729 gettimeofday ();
17730   ;
17731   return 0;
17732 }
17733 _ACEOF
17734 rm -f conftest.$ac_objext conftest$ac_exeext
17735 if { (eval echo "$as_me:17735: \"$ac_link\"") >&5
17736   (eval $ac_link) 2>&5
17737   ac_status=$?
17738   echo "$as_me:17738: \$? = $ac_status" >&5
17739   (exit $ac_status); } &&
17740          { ac_try='test -s conftest$ac_exeext'
17741   { (eval echo "$as_me:17741: \"$ac_try\"") >&5
17742   (eval $ac_try) 2>&5
17743   ac_status=$?
17744   echo "$as_me:17744: \$? = $ac_status" >&5
17745   (exit $ac_status); }; }; then
17746   ac_cv_lib_bsd_gettimeofday=yes
17747 else
17748   echo "$as_me: failed program was:" >&5
17749 cat conftest.$ac_ext >&5
17750 ac_cv_lib_bsd_gettimeofday=no
17751 fi
17752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17753 LIBS=$ac_check_lib_save_LIBS
17754 fi
17755 echo "$as_me:17755: result: $ac_cv_lib_bsd_gettimeofday" >&5
17756 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17757 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17758
17759 cat >>confdefs.h <<\EOF
17760 #define HAVE_GETTIMEOFDAY 1
17761 EOF
17762
17763 cf_add_libs="$LIBS"
17764 # reverse order
17765 cf_add_0lib=
17766 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17767 # filter duplicates
17768 for cf_add_1lib in $cf_add_0lib; do
17769         for cf_add_2lib in $cf_add_libs; do
17770                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17771                         cf_add_1lib=
17772                         break
17773                 fi
17774         done
17775         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17776 done
17777 LIBS="$cf_add_libs"
17778
17779 fi
17780
17781 fi
17782         ;;
17783 esac
17784
17785 echo "$as_me:17785: checking if -lm needed for math functions" >&5
17786 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17787 if test "${cf_cv_need_libm+set}" = set; then
17788   echo $ECHO_N "(cached) $ECHO_C" >&6
17789 else
17790
17791         cat >conftest.$ac_ext <<_ACEOF
17792 #line 17792 "configure"
17793 #include "confdefs.h"
17794
17795         #include <stdio.h>
17796         #include <stdlib.h>
17797         #include <math.h>
17798
17799 int
17800 main (void)
17801 {
17802 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17803   ;
17804   return 0;
17805 }
17806 _ACEOF
17807 rm -f conftest.$ac_objext conftest$ac_exeext
17808 if { (eval echo "$as_me:17808: \"$ac_link\"") >&5
17809   (eval $ac_link) 2>&5
17810   ac_status=$?
17811   echo "$as_me:17811: \$? = $ac_status" >&5
17812   (exit $ac_status); } &&
17813          { ac_try='test -s conftest$ac_exeext'
17814   { (eval echo "$as_me:17814: \"$ac_try\"") >&5
17815   (eval $ac_try) 2>&5
17816   ac_status=$?
17817   echo "$as_me:17817: \$? = $ac_status" >&5
17818   (exit $ac_status); }; }; then
17819   cf_cv_need_libm=no
17820 else
17821   echo "$as_me: failed program was:" >&5
17822 cat conftest.$ac_ext >&5
17823 cf_cv_need_libm=yes
17824 fi
17825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17826 fi
17827 echo "$as_me:17827: result: $cf_cv_need_libm" >&5
17828 echo "${ECHO_T}$cf_cv_need_libm" >&6
17829 if test "$cf_cv_need_libm" = yes
17830 then
17831 MATH_LIB=-lm
17832 fi
17833
17834 ###     Checks for header files.
17835 echo "$as_me:17835: checking for ANSI C header files" >&5
17836 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17837 if test "${ac_cv_header_stdc+set}" = set; then
17838   echo $ECHO_N "(cached) $ECHO_C" >&6
17839 else
17840   cat >conftest.$ac_ext <<_ACEOF
17841 #line 17841 "configure"
17842 #include "confdefs.h"
17843 #include <stdlib.h>
17844 #include <stdarg.h>
17845 #include <string.h>
17846 #include <float.h>
17847
17848 _ACEOF
17849 if { (eval echo "$as_me:17849: \"$ac_cpp conftest.$ac_ext\"") >&5
17850   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17851   ac_status=$?
17852   egrep -v '^ *\+' conftest.er1 >conftest.err
17853   rm -f conftest.er1
17854   cat conftest.err >&5
17855   echo "$as_me:17855: \$? = $ac_status" >&5
17856   (exit $ac_status); } >/dev/null; then
17857   if test -s conftest.err; then
17858     ac_cpp_err=$ac_c_preproc_warn_flag
17859   else
17860     ac_cpp_err=
17861   fi
17862 else
17863   ac_cpp_err=yes
17864 fi
17865 if test -z "$ac_cpp_err"; then
17866   ac_cv_header_stdc=yes
17867 else
17868   echo "$as_me: failed program was:" >&5
17869   cat conftest.$ac_ext >&5
17870   ac_cv_header_stdc=no
17871 fi
17872 rm -f conftest.err conftest.$ac_ext
17873
17874 if test $ac_cv_header_stdc = yes; then
17875   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17876   cat >conftest.$ac_ext <<_ACEOF
17877 #line 17877 "configure"
17878 #include "confdefs.h"
17879 #include <string.h>
17880
17881 _ACEOF
17882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17883   egrep "memchr" >/dev/null 2>&1; then
17884   :
17885 else
17886   ac_cv_header_stdc=no
17887 fi
17888 rm -rf conftest*
17889
17890 fi
17891
17892 if test $ac_cv_header_stdc = yes; then
17893   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17894   cat >conftest.$ac_ext <<_ACEOF
17895 #line 17895 "configure"
17896 #include "confdefs.h"
17897 #include <stdlib.h>
17898
17899 _ACEOF
17900 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17901   egrep "free" >/dev/null 2>&1; then
17902   :
17903 else
17904   ac_cv_header_stdc=no
17905 fi
17906 rm -rf conftest*
17907
17908 fi
17909
17910 if test $ac_cv_header_stdc = yes; then
17911   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17912   if test "$cross_compiling" = yes; then
17913   :
17914 else
17915   cat >conftest.$ac_ext <<_ACEOF
17916 #line 17916 "configure"
17917 #include "confdefs.h"
17918 #include <ctype.h>
17919 #if ((' ' & 0x0FF) == 0x020)
17920 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17921 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17922 #else
17923 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17924                      || ('j' <= (c) && (c) <= 'r') \
17925                      || ('s' <= (c) && (c) <= 'z'))
17926 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17927 #endif
17928
17929 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17930 int
17931 main (void)
17932 {
17933   int i;
17934   for (i = 0; i < 256; i++)
17935     if (XOR (islower (i), ISLOWER (i))
17936         || toupper (i) != TOUPPER (i))
17937       $ac_main_return(2);
17938   $ac_main_return (0);
17939 }
17940 _ACEOF
17941 rm -f conftest$ac_exeext
17942 if { (eval echo "$as_me:17942: \"$ac_link\"") >&5
17943   (eval $ac_link) 2>&5
17944   ac_status=$?
17945   echo "$as_me:17945: \$? = $ac_status" >&5
17946   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17947   { (eval echo "$as_me:17947: \"$ac_try\"") >&5
17948   (eval $ac_try) 2>&5
17949   ac_status=$?
17950   echo "$as_me:17950: \$? = $ac_status" >&5
17951   (exit $ac_status); }; }; then
17952   :
17953 else
17954   echo "$as_me: program exited with status $ac_status" >&5
17955 echo "$as_me: failed program was:" >&5
17956 cat conftest.$ac_ext >&5
17957 ac_cv_header_stdc=no
17958 fi
17959 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17960 fi
17961 fi
17962 fi
17963 echo "$as_me:17963: result: $ac_cv_header_stdc" >&5
17964 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17965 if test $ac_cv_header_stdc = yes; then
17966
17967 cat >>confdefs.h <<\EOF
17968 #define STDC_HEADERS 1
17969 EOF
17970
17971 fi
17972
17973 ac_header_dirent=no
17974 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17975   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17976 echo "$as_me:17976: checking for $ac_hdr that defines DIR" >&5
17977 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17978 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17979   echo $ECHO_N "(cached) $ECHO_C" >&6
17980 else
17981   cat >conftest.$ac_ext <<_ACEOF
17982 #line 17982 "configure"
17983 #include "confdefs.h"
17984 #include <sys/types.h>
17985 #include <$ac_hdr>
17986
17987 int
17988 main (void)
17989 {
17990 if ((DIR *) 0)
17991 return 0;
17992   ;
17993   return 0;
17994 }
17995 _ACEOF
17996 rm -f conftest.$ac_objext
17997 if { (eval echo "$as_me:17997: \"$ac_compile\"") >&5
17998   (eval $ac_compile) 2>&5
17999   ac_status=$?
18000   echo "$as_me:18000: \$? = $ac_status" >&5
18001   (exit $ac_status); } &&
18002          { ac_try='test -s conftest.$ac_objext'
18003   { (eval echo "$as_me:18003: \"$ac_try\"") >&5
18004   (eval $ac_try) 2>&5
18005   ac_status=$?
18006   echo "$as_me:18006: \$? = $ac_status" >&5
18007   (exit $ac_status); }; }; then
18008   eval "$as_ac_Header=yes"
18009 else
18010   echo "$as_me: failed program was:" >&5
18011 cat conftest.$ac_ext >&5
18012 eval "$as_ac_Header=no"
18013 fi
18014 rm -f conftest.$ac_objext conftest.$ac_ext
18015 fi
18016 echo "$as_me:18016: result: `eval echo '${'$as_ac_Header'}'`" >&5
18017 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18018 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18019   cat >>confdefs.h <<EOF
18020 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18021 EOF
18022
18023 ac_header_dirent=$ac_hdr; break
18024 fi
18025
18026 done
18027 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18028 if test $ac_header_dirent = dirent.h; then
18029   echo "$as_me:18029: checking for opendir in -ldir" >&5
18030 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18031 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18032   echo $ECHO_N "(cached) $ECHO_C" >&6
18033 else
18034   ac_check_lib_save_LIBS=$LIBS
18035 LIBS="-ldir  $LIBS"
18036 cat >conftest.$ac_ext <<_ACEOF
18037 #line 18037 "configure"
18038 #include "confdefs.h"
18039
18040 /* Override any gcc2 internal prototype to avoid an error.  */
18041 #ifdef __cplusplus
18042 extern "C"
18043 #endif
18044 /* We use char because int might match the return type of a gcc2
18045    builtin and then its argument prototype would still apply.  */
18046 char opendir ();
18047 int
18048 main (void)
18049 {
18050 opendir ();
18051   ;
18052   return 0;
18053 }
18054 _ACEOF
18055 rm -f conftest.$ac_objext conftest$ac_exeext
18056 if { (eval echo "$as_me:18056: \"$ac_link\"") >&5
18057   (eval $ac_link) 2>&5
18058   ac_status=$?
18059   echo "$as_me:18059: \$? = $ac_status" >&5
18060   (exit $ac_status); } &&
18061          { ac_try='test -s conftest$ac_exeext'
18062   { (eval echo "$as_me:18062: \"$ac_try\"") >&5
18063   (eval $ac_try) 2>&5
18064   ac_status=$?
18065   echo "$as_me:18065: \$? = $ac_status" >&5
18066   (exit $ac_status); }; }; then
18067   ac_cv_lib_dir_opendir=yes
18068 else
18069   echo "$as_me: failed program was:" >&5
18070 cat conftest.$ac_ext >&5
18071 ac_cv_lib_dir_opendir=no
18072 fi
18073 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18074 LIBS=$ac_check_lib_save_LIBS
18075 fi
18076 echo "$as_me:18076: result: $ac_cv_lib_dir_opendir" >&5
18077 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18078 if test $ac_cv_lib_dir_opendir = yes; then
18079   LIBS="$LIBS -ldir"
18080 fi
18081
18082 else
18083   echo "$as_me:18083: checking for opendir in -lx" >&5
18084 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18085 if test "${ac_cv_lib_x_opendir+set}" = set; then
18086   echo $ECHO_N "(cached) $ECHO_C" >&6
18087 else
18088   ac_check_lib_save_LIBS=$LIBS
18089 LIBS="-lx  $LIBS"
18090 cat >conftest.$ac_ext <<_ACEOF
18091 #line 18091 "configure"
18092 #include "confdefs.h"
18093
18094 /* Override any gcc2 internal prototype to avoid an error.  */
18095 #ifdef __cplusplus
18096 extern "C"
18097 #endif
18098 /* We use char because int might match the return type of a gcc2
18099    builtin and then its argument prototype would still apply.  */
18100 char opendir ();
18101 int
18102 main (void)
18103 {
18104 opendir ();
18105   ;
18106   return 0;
18107 }
18108 _ACEOF
18109 rm -f conftest.$ac_objext conftest$ac_exeext
18110 if { (eval echo "$as_me:18110: \"$ac_link\"") >&5
18111   (eval $ac_link) 2>&5
18112   ac_status=$?
18113   echo "$as_me:18113: \$? = $ac_status" >&5
18114   (exit $ac_status); } &&
18115          { ac_try='test -s conftest$ac_exeext'
18116   { (eval echo "$as_me:18116: \"$ac_try\"") >&5
18117   (eval $ac_try) 2>&5
18118   ac_status=$?
18119   echo "$as_me:18119: \$? = $ac_status" >&5
18120   (exit $ac_status); }; }; then
18121   ac_cv_lib_x_opendir=yes
18122 else
18123   echo "$as_me: failed program was:" >&5
18124 cat conftest.$ac_ext >&5
18125 ac_cv_lib_x_opendir=no
18126 fi
18127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18128 LIBS=$ac_check_lib_save_LIBS
18129 fi
18130 echo "$as_me:18130: result: $ac_cv_lib_x_opendir" >&5
18131 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18132 if test $ac_cv_lib_x_opendir = yes; then
18133   LIBS="$LIBS -lx"
18134 fi
18135
18136 fi
18137
18138 echo "$as_me:18138: checking whether time.h and sys/time.h may both be included" >&5
18139 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18140 if test "${ac_cv_header_time+set}" = set; then
18141   echo $ECHO_N "(cached) $ECHO_C" >&6
18142 else
18143   cat >conftest.$ac_ext <<_ACEOF
18144 #line 18144 "configure"
18145 #include "confdefs.h"
18146 #include <sys/types.h>
18147 #include <sys/time.h>
18148 #include <time.h>
18149
18150 int
18151 main (void)
18152 {
18153 if ((struct tm *) 0)
18154 return 0;
18155   ;
18156   return 0;
18157 }
18158 _ACEOF
18159 rm -f conftest.$ac_objext
18160 if { (eval echo "$as_me:18160: \"$ac_compile\"") >&5
18161   (eval $ac_compile) 2>&5
18162   ac_status=$?
18163   echo "$as_me:18163: \$? = $ac_status" >&5
18164   (exit $ac_status); } &&
18165          { ac_try='test -s conftest.$ac_objext'
18166   { (eval echo "$as_me:18166: \"$ac_try\"") >&5
18167   (eval $ac_try) 2>&5
18168   ac_status=$?
18169   echo "$as_me:18169: \$? = $ac_status" >&5
18170   (exit $ac_status); }; }; then
18171   ac_cv_header_time=yes
18172 else
18173   echo "$as_me: failed program was:" >&5
18174 cat conftest.$ac_ext >&5
18175 ac_cv_header_time=no
18176 fi
18177 rm -f conftest.$ac_objext conftest.$ac_ext
18178 fi
18179 echo "$as_me:18179: result: $ac_cv_header_time" >&5
18180 echo "${ECHO_T}$ac_cv_header_time" >&6
18181 if test $ac_cv_header_time = yes; then
18182
18183 cat >>confdefs.h <<\EOF
18184 #define TIME_WITH_SYS_TIME 1
18185 EOF
18186
18187 fi
18188
18189 cf_regex_func=no
18190
18191 cf_regex_libs="regex re"
18192 case $host_os in
18193 (mingw*)
18194         cf_regex_libs="systre gnurx $cf_regex_libs"
18195         ;;
18196 esac
18197
18198 echo "$as_me:18198: checking for regcomp" >&5
18199 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18200 if test "${ac_cv_func_regcomp+set}" = set; then
18201   echo $ECHO_N "(cached) $ECHO_C" >&6
18202 else
18203   cat >conftest.$ac_ext <<_ACEOF
18204 #line 18204 "configure"
18205 #include "confdefs.h"
18206 #define regcomp autoconf_temporary
18207 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18208 #undef regcomp
18209
18210 #ifdef __cplusplus
18211 extern "C"
18212 #endif
18213
18214 /* We use char because int might match the return type of a gcc2
18215    builtin and then its argument prototype would still apply.  */
18216 char regcomp (void);
18217
18218 int
18219 main (void)
18220 {
18221
18222 /* The GNU C library defines stubs for functions which it implements
18223     to always fail with ENOSYS.  Some functions are actually named
18224     something starting with __ and the normal name is an alias.  */
18225 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18226 #error found stub for regcomp
18227 #endif
18228
18229         return regcomp ();
18230   ;
18231   return 0;
18232 }
18233 _ACEOF
18234 rm -f conftest.$ac_objext conftest$ac_exeext
18235 if { (eval echo "$as_me:18235: \"$ac_link\"") >&5
18236   (eval $ac_link) 2>&5
18237   ac_status=$?
18238   echo "$as_me:18238: \$? = $ac_status" >&5
18239   (exit $ac_status); } &&
18240          { ac_try='test -s conftest$ac_exeext'
18241   { (eval echo "$as_me:18241: \"$ac_try\"") >&5
18242   (eval $ac_try) 2>&5
18243   ac_status=$?
18244   echo "$as_me:18244: \$? = $ac_status" >&5
18245   (exit $ac_status); }; }; then
18246   ac_cv_func_regcomp=yes
18247 else
18248   echo "$as_me: failed program was:" >&5
18249 cat conftest.$ac_ext >&5
18250 ac_cv_func_regcomp=no
18251 fi
18252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18253 fi
18254 echo "$as_me:18254: result: $ac_cv_func_regcomp" >&5
18255 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18256 if test $ac_cv_func_regcomp = yes; then
18257   cf_regex_func=regcomp
18258 else
18259
18260         for cf_regex_lib in $cf_regex_libs
18261         do
18262                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18263 echo "$as_me:18263: checking for regcomp in -l$cf_regex_lib" >&5
18264 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18265 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18266   echo $ECHO_N "(cached) $ECHO_C" >&6
18267 else
18268   ac_check_lib_save_LIBS=$LIBS
18269 LIBS="-l$cf_regex_lib  $LIBS"
18270 cat >conftest.$ac_ext <<_ACEOF
18271 #line 18271 "configure"
18272 #include "confdefs.h"
18273
18274 /* Override any gcc2 internal prototype to avoid an error.  */
18275 #ifdef __cplusplus
18276 extern "C"
18277 #endif
18278 /* We use char because int might match the return type of a gcc2
18279    builtin and then its argument prototype would still apply.  */
18280 char regcomp ();
18281 int
18282 main (void)
18283 {
18284 regcomp ();
18285   ;
18286   return 0;
18287 }
18288 _ACEOF
18289 rm -f conftest.$ac_objext conftest$ac_exeext
18290 if { (eval echo "$as_me:18290: \"$ac_link\"") >&5
18291   (eval $ac_link) 2>&5
18292   ac_status=$?
18293   echo "$as_me:18293: \$? = $ac_status" >&5
18294   (exit $ac_status); } &&
18295          { ac_try='test -s conftest$ac_exeext'
18296   { (eval echo "$as_me:18296: \"$ac_try\"") >&5
18297   (eval $ac_try) 2>&5
18298   ac_status=$?
18299   echo "$as_me:18299: \$? = $ac_status" >&5
18300   (exit $ac_status); }; }; then
18301   eval "$as_ac_Lib=yes"
18302 else
18303   echo "$as_me: failed program was:" >&5
18304 cat conftest.$ac_ext >&5
18305 eval "$as_ac_Lib=no"
18306 fi
18307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18308 LIBS=$ac_check_lib_save_LIBS
18309 fi
18310 echo "$as_me:18310: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18311 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18312 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18313
18314 cf_add_libs="$LIBS"
18315 # reverse order
18316 cf_add_0lib=
18317 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18318 # filter duplicates
18319 for cf_add_1lib in $cf_add_0lib; do
18320         for cf_add_2lib in $cf_add_libs; do
18321                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18322                         cf_add_1lib=
18323                         break
18324                 fi
18325         done
18326         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18327 done
18328 LIBS="$cf_add_libs"
18329
18330                                 cf_regex_func=regcomp
18331                                 break
18332 fi
18333
18334         done
18335
18336 fi
18337
18338 if test "$cf_regex_func" = no ; then
18339         echo "$as_me:18339: checking for compile" >&5
18340 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18341 if test "${ac_cv_func_compile+set}" = set; then
18342   echo $ECHO_N "(cached) $ECHO_C" >&6
18343 else
18344   cat >conftest.$ac_ext <<_ACEOF
18345 #line 18345 "configure"
18346 #include "confdefs.h"
18347 #define compile autoconf_temporary
18348 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18349 #undef compile
18350
18351 #ifdef __cplusplus
18352 extern "C"
18353 #endif
18354
18355 /* We use char because int might match the return type of a gcc2
18356    builtin and then its argument prototype would still apply.  */
18357 char compile (void);
18358
18359 int
18360 main (void)
18361 {
18362
18363 /* The GNU C library defines stubs for functions which it implements
18364     to always fail with ENOSYS.  Some functions are actually named
18365     something starting with __ and the normal name is an alias.  */
18366 #if defined (__stub_compile) || defined (__stub___compile)
18367 #error found stub for compile
18368 #endif
18369
18370         return compile ();
18371   ;
18372   return 0;
18373 }
18374 _ACEOF
18375 rm -f conftest.$ac_objext conftest$ac_exeext
18376 if { (eval echo "$as_me:18376: \"$ac_link\"") >&5
18377   (eval $ac_link) 2>&5
18378   ac_status=$?
18379   echo "$as_me:18379: \$? = $ac_status" >&5
18380   (exit $ac_status); } &&
18381          { ac_try='test -s conftest$ac_exeext'
18382   { (eval echo "$as_me:18382: \"$ac_try\"") >&5
18383   (eval $ac_try) 2>&5
18384   ac_status=$?
18385   echo "$as_me:18385: \$? = $ac_status" >&5
18386   (exit $ac_status); }; }; then
18387   ac_cv_func_compile=yes
18388 else
18389   echo "$as_me: failed program was:" >&5
18390 cat conftest.$ac_ext >&5
18391 ac_cv_func_compile=no
18392 fi
18393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18394 fi
18395 echo "$as_me:18395: result: $ac_cv_func_compile" >&5
18396 echo "${ECHO_T}$ac_cv_func_compile" >&6
18397 if test $ac_cv_func_compile = yes; then
18398   cf_regex_func=compile
18399 else
18400
18401                 echo "$as_me:18401: checking for compile in -lgen" >&5
18402 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18403 if test "${ac_cv_lib_gen_compile+set}" = set; then
18404   echo $ECHO_N "(cached) $ECHO_C" >&6
18405 else
18406   ac_check_lib_save_LIBS=$LIBS
18407 LIBS="-lgen  $LIBS"
18408 cat >conftest.$ac_ext <<_ACEOF
18409 #line 18409 "configure"
18410 #include "confdefs.h"
18411
18412 /* Override any gcc2 internal prototype to avoid an error.  */
18413 #ifdef __cplusplus
18414 extern "C"
18415 #endif
18416 /* We use char because int might match the return type of a gcc2
18417    builtin and then its argument prototype would still apply.  */
18418 char compile ();
18419 int
18420 main (void)
18421 {
18422 compile ();
18423   ;
18424   return 0;
18425 }
18426 _ACEOF
18427 rm -f conftest.$ac_objext conftest$ac_exeext
18428 if { (eval echo "$as_me:18428: \"$ac_link\"") >&5
18429   (eval $ac_link) 2>&5
18430   ac_status=$?
18431   echo "$as_me:18431: \$? = $ac_status" >&5
18432   (exit $ac_status); } &&
18433          { ac_try='test -s conftest$ac_exeext'
18434   { (eval echo "$as_me:18434: \"$ac_try\"") >&5
18435   (eval $ac_try) 2>&5
18436   ac_status=$?
18437   echo "$as_me:18437: \$? = $ac_status" >&5
18438   (exit $ac_status); }; }; then
18439   ac_cv_lib_gen_compile=yes
18440 else
18441   echo "$as_me: failed program was:" >&5
18442 cat conftest.$ac_ext >&5
18443 ac_cv_lib_gen_compile=no
18444 fi
18445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18446 LIBS=$ac_check_lib_save_LIBS
18447 fi
18448 echo "$as_me:18448: result: $ac_cv_lib_gen_compile" >&5
18449 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18450 if test $ac_cv_lib_gen_compile = yes; then
18451
18452 cf_add_libs="$LIBS"
18453 # reverse order
18454 cf_add_0lib=
18455 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18456 # filter duplicates
18457 for cf_add_1lib in $cf_add_0lib; do
18458         for cf_add_2lib in $cf_add_libs; do
18459                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18460                         cf_add_1lib=
18461                         break
18462                 fi
18463         done
18464         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18465 done
18466 LIBS="$cf_add_libs"
18467
18468                                 cf_regex_func=compile
18469 fi
18470
18471 fi
18472
18473 fi
18474
18475 if test "$cf_regex_func" = no ; then
18476         { echo "$as_me:18476: WARNING: cannot find regular expression library" >&5
18477 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18478 fi
18479
18480 echo "$as_me:18480: checking for regular-expression headers" >&5
18481 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18482 if test "${cf_cv_regex_hdrs+set}" = set; then
18483   echo $ECHO_N "(cached) $ECHO_C" >&6
18484 else
18485
18486 cf_cv_regex_hdrs=no
18487 case $cf_regex_func in
18488 (compile)
18489         for cf_regex_hdr in regexp.h regexpr.h
18490         do
18491                 cat >conftest.$ac_ext <<_ACEOF
18492 #line 18492 "configure"
18493 #include "confdefs.h"
18494 #include <$cf_regex_hdr>
18495 int
18496 main (void)
18497 {
18498
18499                         char *p = compile("", "", "", 0);
18500                         int x = step("", "");
18501                         (void)p;
18502                         (void)x;
18503
18504   ;
18505   return 0;
18506 }
18507 _ACEOF
18508 rm -f conftest.$ac_objext conftest$ac_exeext
18509 if { (eval echo "$as_me:18509: \"$ac_link\"") >&5
18510   (eval $ac_link) 2>&5
18511   ac_status=$?
18512   echo "$as_me:18512: \$? = $ac_status" >&5
18513   (exit $ac_status); } &&
18514          { ac_try='test -s conftest$ac_exeext'
18515   { (eval echo "$as_me:18515: \"$ac_try\"") >&5
18516   (eval $ac_try) 2>&5
18517   ac_status=$?
18518   echo "$as_me:18518: \$? = $ac_status" >&5
18519   (exit $ac_status); }; }; then
18520
18521                         cf_cv_regex_hdrs=$cf_regex_hdr
18522                         break
18523
18524 else
18525   echo "$as_me: failed program was:" >&5
18526 cat conftest.$ac_ext >&5
18527 fi
18528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18529         done
18530         ;;
18531 (*)
18532         for cf_regex_hdr in regex.h
18533         do
18534                 cat >conftest.$ac_ext <<_ACEOF
18535 #line 18535 "configure"
18536 #include "confdefs.h"
18537 #include <sys/types.h>
18538 #include <$cf_regex_hdr>
18539 int
18540 main (void)
18541 {
18542
18543                         regex_t *p = 0;
18544                         int x = regcomp(p, "", 0);
18545                         int y = regexec(p, "", 0, 0, 0);
18546                         (void)x;
18547                         (void)y;
18548                         regfree(p);
18549
18550   ;
18551   return 0;
18552 }
18553 _ACEOF
18554 rm -f conftest.$ac_objext conftest$ac_exeext
18555 if { (eval echo "$as_me:18555: \"$ac_link\"") >&5
18556   (eval $ac_link) 2>&5
18557   ac_status=$?
18558   echo "$as_me:18558: \$? = $ac_status" >&5
18559   (exit $ac_status); } &&
18560          { ac_try='test -s conftest$ac_exeext'
18561   { (eval echo "$as_me:18561: \"$ac_try\"") >&5
18562   (eval $ac_try) 2>&5
18563   ac_status=$?
18564   echo "$as_me:18564: \$? = $ac_status" >&5
18565   (exit $ac_status); }; }; then
18566
18567                         cf_cv_regex_hdrs=$cf_regex_hdr
18568                         break
18569
18570 else
18571   echo "$as_me: failed program was:" >&5
18572 cat conftest.$ac_ext >&5
18573 fi
18574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18575         done
18576         ;;
18577 esac
18578
18579 fi
18580 echo "$as_me:18580: result: $cf_cv_regex_hdrs" >&5
18581 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18582
18583 case $cf_cv_regex_hdrs in
18584         (no)            { echo "$as_me:18584: WARNING: no regular expression header found" >&5
18585 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18586         (regex.h)
18587 cat >>confdefs.h <<\EOF
18588 #define HAVE_REGEX_H_FUNCS 1
18589 EOF
18590  ;;
18591         (regexp.h)
18592 cat >>confdefs.h <<\EOF
18593 #define HAVE_REGEXP_H_FUNCS 1
18594 EOF
18595  ;;
18596         (regexpr.h)
18597 cat >>confdefs.h <<\EOF
18598 #define HAVE_REGEXPR_H_FUNCS 1
18599 EOF
18600  ;;
18601 esac
18602
18603 for ac_header in \
18604 fcntl.h \
18605 getopt.h \
18606 limits.h \
18607 locale.h \
18608 math.h \
18609 poll.h \
18610 sys/bsdtypes.h \
18611 sys/ioctl.h \
18612 sys/param.h \
18613 sys/poll.h \
18614 sys/select.h \
18615 sys/time.h \
18616 sys/times.h \
18617 ttyent.h \
18618 unistd.h \
18619 wctype.h \
18620
18621 do
18622 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18623 echo "$as_me:18623: checking for $ac_header" >&5
18624 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18626   echo $ECHO_N "(cached) $ECHO_C" >&6
18627 else
18628   cat >conftest.$ac_ext <<_ACEOF
18629 #line 18629 "configure"
18630 #include "confdefs.h"
18631 #include <$ac_header>
18632 _ACEOF
18633 if { (eval echo "$as_me:18633: \"$ac_cpp conftest.$ac_ext\"") >&5
18634   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18635   ac_status=$?
18636   egrep -v '^ *\+' conftest.er1 >conftest.err
18637   rm -f conftest.er1
18638   cat conftest.err >&5
18639   echo "$as_me:18639: \$? = $ac_status" >&5
18640   (exit $ac_status); } >/dev/null; then
18641   if test -s conftest.err; then
18642     ac_cpp_err=$ac_c_preproc_warn_flag
18643   else
18644     ac_cpp_err=
18645   fi
18646 else
18647   ac_cpp_err=yes
18648 fi
18649 if test -z "$ac_cpp_err"; then
18650   eval "$as_ac_Header=yes"
18651 else
18652   echo "$as_me: failed program was:" >&5
18653   cat conftest.$ac_ext >&5
18654   eval "$as_ac_Header=no"
18655 fi
18656 rm -f conftest.err conftest.$ac_ext
18657 fi
18658 echo "$as_me:18658: result: `eval echo '${'$as_ac_Header'}'`" >&5
18659 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18660 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18661   cat >>confdefs.h <<EOF
18662 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18663 EOF
18664
18665 fi
18666 done
18667
18668 for ac_header in unistd.h getopt.h
18669 do
18670 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18671 echo "$as_me:18671: checking for $ac_header" >&5
18672 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18673 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18674   echo $ECHO_N "(cached) $ECHO_C" >&6
18675 else
18676   cat >conftest.$ac_ext <<_ACEOF
18677 #line 18677 "configure"
18678 #include "confdefs.h"
18679 #include <$ac_header>
18680 _ACEOF
18681 if { (eval echo "$as_me:18681: \"$ac_cpp conftest.$ac_ext\"") >&5
18682   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18683   ac_status=$?
18684   egrep -v '^ *\+' conftest.er1 >conftest.err
18685   rm -f conftest.er1
18686   cat conftest.err >&5
18687   echo "$as_me:18687: \$? = $ac_status" >&5
18688   (exit $ac_status); } >/dev/null; then
18689   if test -s conftest.err; then
18690     ac_cpp_err=$ac_c_preproc_warn_flag
18691   else
18692     ac_cpp_err=
18693   fi
18694 else
18695   ac_cpp_err=yes
18696 fi
18697 if test -z "$ac_cpp_err"; then
18698   eval "$as_ac_Header=yes"
18699 else
18700   echo "$as_me: failed program was:" >&5
18701   cat conftest.$ac_ext >&5
18702   eval "$as_ac_Header=no"
18703 fi
18704 rm -f conftest.err conftest.$ac_ext
18705 fi
18706 echo "$as_me:18706: result: `eval echo '${'$as_ac_Header'}'`" >&5
18707 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18708 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18709   cat >>confdefs.h <<EOF
18710 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18711 EOF
18712
18713 fi
18714 done
18715
18716 echo "$as_me:18716: checking for header declaring getopt variables" >&5
18717 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18718 if test "${cf_cv_getopt_header+set}" = set; then
18719   echo $ECHO_N "(cached) $ECHO_C" >&6
18720 else
18721
18722 cf_cv_getopt_header=none
18723 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18724 do
18725 cat >conftest.$ac_ext <<_ACEOF
18726 #line 18726 "configure"
18727 #include "confdefs.h"
18728
18729 #include <$cf_header>
18730 int
18731 main (void)
18732 {
18733 int x = optind; char *y = optarg
18734   ;
18735   return 0;
18736 }
18737 _ACEOF
18738 rm -f conftest.$ac_objext
18739 if { (eval echo "$as_me:18739: \"$ac_compile\"") >&5
18740   (eval $ac_compile) 2>&5
18741   ac_status=$?
18742   echo "$as_me:18742: \$? = $ac_status" >&5
18743   (exit $ac_status); } &&
18744          { ac_try='test -s conftest.$ac_objext'
18745   { (eval echo "$as_me:18745: \"$ac_try\"") >&5
18746   (eval $ac_try) 2>&5
18747   ac_status=$?
18748   echo "$as_me:18748: \$? = $ac_status" >&5
18749   (exit $ac_status); }; }; then
18750   cf_cv_getopt_header=$cf_header
18751  break
18752 else
18753   echo "$as_me: failed program was:" >&5
18754 cat conftest.$ac_ext >&5
18755 fi
18756 rm -f conftest.$ac_objext conftest.$ac_ext
18757 done
18758
18759 fi
18760 echo "$as_me:18760: result: $cf_cv_getopt_header" >&5
18761 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18762 if test $cf_cv_getopt_header != none ; then
18763
18764 cat >>confdefs.h <<\EOF
18765 #define HAVE_GETOPT_HEADER 1
18766 EOF
18767
18768 fi
18769 if test $cf_cv_getopt_header = getopt.h ; then
18770
18771 cat >>confdefs.h <<\EOF
18772 #define NEED_GETOPT_H 1
18773 EOF
18774
18775 fi
18776
18777 echo "$as_me:18777: checking if external environ is declared" >&5
18778 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18779 if test "${cf_cv_dcl_environ+set}" = set; then
18780   echo $ECHO_N "(cached) $ECHO_C" >&6
18781 else
18782
18783     cat >conftest.$ac_ext <<_ACEOF
18784 #line 18784 "configure"
18785 #include "confdefs.h"
18786
18787 #ifdef HAVE_STDLIB_H
18788 #include <stdlib.h>
18789 #endif
18790 #include <unistd.h>
18791 int
18792 main (void)
18793 {
18794 int x = (int) environ
18795   ;
18796   return 0;
18797 }
18798 _ACEOF
18799 rm -f conftest.$ac_objext
18800 if { (eval echo "$as_me:18800: \"$ac_compile\"") >&5
18801   (eval $ac_compile) 2>&5
18802   ac_status=$?
18803   echo "$as_me:18803: \$? = $ac_status" >&5
18804   (exit $ac_status); } &&
18805          { ac_try='test -s conftest.$ac_objext'
18806   { (eval echo "$as_me:18806: \"$ac_try\"") >&5
18807   (eval $ac_try) 2>&5
18808   ac_status=$?
18809   echo "$as_me:18809: \$? = $ac_status" >&5
18810   (exit $ac_status); }; }; then
18811   cf_cv_dcl_environ=yes
18812 else
18813   echo "$as_me: failed program was:" >&5
18814 cat conftest.$ac_ext >&5
18815 cf_cv_dcl_environ=no
18816 fi
18817 rm -f conftest.$ac_objext conftest.$ac_ext
18818
18819 fi
18820 echo "$as_me:18820: result: $cf_cv_dcl_environ" >&5
18821 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18822
18823 if test "$cf_cv_dcl_environ" = no ; then
18824
18825 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18826
18827     cat >>confdefs.h <<EOF
18828 #define $cf_result 1
18829 EOF
18830
18831 fi
18832
18833 # It's possible (for near-UNIX clones) that the data doesn't exist
18834
18835 echo "$as_me:18835: checking if external environ exists" >&5
18836 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18837 if test "${cf_cv_have_environ+set}" = set; then
18838   echo $ECHO_N "(cached) $ECHO_C" >&6
18839 else
18840
18841         cat >conftest.$ac_ext <<_ACEOF
18842 #line 18842 "configure"
18843 #include "confdefs.h"
18844
18845 #undef environ
18846 extern int environ;
18847
18848 int
18849 main (void)
18850 {
18851 environ = 2
18852   ;
18853   return 0;
18854 }
18855 _ACEOF
18856 rm -f conftest.$ac_objext conftest$ac_exeext
18857 if { (eval echo "$as_me:18857: \"$ac_link\"") >&5
18858   (eval $ac_link) 2>&5
18859   ac_status=$?
18860   echo "$as_me:18860: \$? = $ac_status" >&5
18861   (exit $ac_status); } &&
18862          { ac_try='test -s conftest$ac_exeext'
18863   { (eval echo "$as_me:18863: \"$ac_try\"") >&5
18864   (eval $ac_try) 2>&5
18865   ac_status=$?
18866   echo "$as_me:18866: \$? = $ac_status" >&5
18867   (exit $ac_status); }; }; then
18868   cf_cv_have_environ=yes
18869 else
18870   echo "$as_me: failed program was:" >&5
18871 cat conftest.$ac_ext >&5
18872 cf_cv_have_environ=no
18873 fi
18874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18875
18876 fi
18877 echo "$as_me:18877: result: $cf_cv_have_environ" >&5
18878 echo "${ECHO_T}$cf_cv_have_environ" >&6
18879
18880 if test "$cf_cv_have_environ" = yes ; then
18881
18882 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18883
18884         cat >>confdefs.h <<EOF
18885 #define $cf_result 1
18886 EOF
18887
18888 fi
18889
18890 echo "$as_me:18890: checking for getenv" >&5
18891 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18892 if test "${ac_cv_func_getenv+set}" = set; then
18893   echo $ECHO_N "(cached) $ECHO_C" >&6
18894 else
18895   cat >conftest.$ac_ext <<_ACEOF
18896 #line 18896 "configure"
18897 #include "confdefs.h"
18898 #define getenv autoconf_temporary
18899 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18900 #undef getenv
18901
18902 #ifdef __cplusplus
18903 extern "C"
18904 #endif
18905
18906 /* We use char because int might match the return type of a gcc2
18907    builtin and then its argument prototype would still apply.  */
18908 char getenv (void);
18909
18910 int
18911 main (void)
18912 {
18913
18914 /* The GNU C library defines stubs for functions which it implements
18915     to always fail with ENOSYS.  Some functions are actually named
18916     something starting with __ and the normal name is an alias.  */
18917 #if defined (__stub_getenv) || defined (__stub___getenv)
18918 #error found stub for getenv
18919 #endif
18920
18921         return getenv ();
18922   ;
18923   return 0;
18924 }
18925 _ACEOF
18926 rm -f conftest.$ac_objext conftest$ac_exeext
18927 if { (eval echo "$as_me:18927: \"$ac_link\"") >&5
18928   (eval $ac_link) 2>&5
18929   ac_status=$?
18930   echo "$as_me:18930: \$? = $ac_status" >&5
18931   (exit $ac_status); } &&
18932          { ac_try='test -s conftest$ac_exeext'
18933   { (eval echo "$as_me:18933: \"$ac_try\"") >&5
18934   (eval $ac_try) 2>&5
18935   ac_status=$?
18936   echo "$as_me:18936: \$? = $ac_status" >&5
18937   (exit $ac_status); }; }; then
18938   ac_cv_func_getenv=yes
18939 else
18940   echo "$as_me: failed program was:" >&5
18941 cat conftest.$ac_ext >&5
18942 ac_cv_func_getenv=no
18943 fi
18944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18945 fi
18946 echo "$as_me:18946: result: $ac_cv_func_getenv" >&5
18947 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18948
18949 for ac_func in putenv setenv strdup
18950 do
18951 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18952 echo "$as_me:18952: checking for $ac_func" >&5
18953 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18954 if eval "test \"\${$as_ac_var+set}\" = set"; then
18955   echo $ECHO_N "(cached) $ECHO_C" >&6
18956 else
18957   cat >conftest.$ac_ext <<_ACEOF
18958 #line 18958 "configure"
18959 #include "confdefs.h"
18960 #define $ac_func autoconf_temporary
18961 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18962 #undef $ac_func
18963
18964 #ifdef __cplusplus
18965 extern "C"
18966 #endif
18967
18968 /* We use char because int might match the return type of a gcc2
18969    builtin and then its argument prototype would still apply.  */
18970 char $ac_func (void);
18971
18972 int
18973 main (void)
18974 {
18975
18976 /* The GNU C library defines stubs for functions which it implements
18977     to always fail with ENOSYS.  Some functions are actually named
18978     something starting with __ and the normal name is an alias.  */
18979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18980 #error found stub for $ac_func
18981 #endif
18982
18983         return $ac_func ();
18984   ;
18985   return 0;
18986 }
18987 _ACEOF
18988 rm -f conftest.$ac_objext conftest$ac_exeext
18989 if { (eval echo "$as_me:18989: \"$ac_link\"") >&5
18990   (eval $ac_link) 2>&5
18991   ac_status=$?
18992   echo "$as_me:18992: \$? = $ac_status" >&5
18993   (exit $ac_status); } &&
18994          { ac_try='test -s conftest$ac_exeext'
18995   { (eval echo "$as_me:18995: \"$ac_try\"") >&5
18996   (eval $ac_try) 2>&5
18997   ac_status=$?
18998   echo "$as_me:18998: \$? = $ac_status" >&5
18999   (exit $ac_status); }; }; then
19000   eval "$as_ac_var=yes"
19001 else
19002   echo "$as_me: failed program was:" >&5
19003 cat conftest.$ac_ext >&5
19004 eval "$as_ac_var=no"
19005 fi
19006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19007 fi
19008 echo "$as_me:19008: result: `eval echo '${'$as_ac_var'}'`" >&5
19009 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19010 if test `eval echo '${'$as_ac_var'}'` = yes; then
19011   cat >>confdefs.h <<EOF
19012 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19013 EOF
19014
19015 fi
19016 done
19017
19018 echo "$as_me:19018: checking if getenv returns consistent values" >&5
19019 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19020 if test "${cf_cv_consistent_getenv+set}" = set; then
19021   echo $ECHO_N "(cached) $ECHO_C" >&6
19022 else
19023
19024 if test "$cross_compiling" = yes; then
19025   cf_cv_consistent_getenv=unknown
19026 else
19027   cat >conftest.$ac_ext <<_ACEOF
19028 #line 19028 "configure"
19029 #include "confdefs.h"
19030
19031 #include <stdlib.h>
19032 #include <unistd.h>
19033 #include <stdio.h>
19034 #include <string.h>
19035 #include <sys/types.h>
19036
19037 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19038 extern char **environ;  /* POSIX, but some systems are not... */
19039 #endif
19040
19041 #if defined(HAVE_STRDUP)
19042 #define str_alloc(s) strdup(s)
19043 #else
19044 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19045 #endif
19046
19047 static void set_value(const char *name, const char *value)
19048 {
19049 #if defined(HAVE_SETENV)
19050         setenv(name, value, 1);
19051 #elif defined(HAVE_PUTENV)
19052         char buffer[1024];
19053         sprintf(buffer, "%s=%s", name, value);
19054         putenv(str_alloc(buffer));
19055 #else
19056 #error neither putenv/setenv found
19057 #endif
19058 }
19059 int main(void)
19060 {
19061         int pass;
19062         size_t numenv, limit, j;
19063         char **mynames;
19064         char **myvalues;
19065         char **mypointer;
19066         char *equals;
19067         for (numenv = 0; environ[numenv]; ++numenv) ;
19068         limit = numenv + 10;
19069         mynames = (char **) calloc(limit + 1, sizeof(char *));
19070         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19071         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19072 #if defined(HAVE_ENVIRON)
19073         for (j = 0; environ[j]; ++j) {
19074                 mynames[j] = str_alloc(environ[j]);
19075                 equals = strchr(mynames[j], '=');
19076                 if (equals != 0) {
19077                         *equals++ = '\0';
19078                         myvalues[j] = str_alloc(equals);
19079                 } else {
19080                         myvalues[j] = str_alloc("");
19081                 }
19082         }
19083 #endif
19084         for (j = numenv; j < limit; ++j) {
19085                 char name[80];
19086                 char value[80];
19087                 size_t found;
19088                 size_t k = 0;
19089                 do {
19090                         size_t jk;
19091                         found = 0;
19092                         sprintf(name, "TERM%lu", (unsigned long) k);
19093                         for (jk = 0; jk < j; ++jk) {
19094                                 if (!strcmp(name, mynames[jk])) {
19095                                         found = 1;
19096                                         ++k;
19097                                         break;
19098                                 }
19099                         }
19100                 } while (found);
19101                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19102                 set_value(name, value);
19103                 mynames[j] = str_alloc(name);
19104                 myvalues[j] = str_alloc(value);
19105         }
19106         for (pass = 0; pass < 3; ++pass) {
19107                 for (j = 0; j < limit; ++j) {
19108                         char *value = getenv(mynames[j]);
19109                         if (pass) {
19110                                 if (value == 0) {
19111                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19112                                         ${cf_cv_main_return:-return}(1);
19113                                 } else if (value != mypointer[j]) {
19114                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19115                                         ${cf_cv_main_return:-return}(1);
19116                                 } else if (strcmp(value, myvalues[j])) {
19117                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19118                                         ${cf_cv_main_return:-return}(1);
19119                                 }
19120                         } else {
19121                                 size_t k;
19122                                 mypointer[j] = value;
19123                                 for (k = 0; k < j; ++k) {
19124                                         if (mypointer[j] == mypointer[k]) {
19125                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19126                                                 ${cf_cv_main_return:-return}(1);
19127                                         }
19128                                 }
19129                         }
19130                 }
19131         }
19132         ${cf_cv_main_return:-return}(0);
19133 }
19134
19135 _ACEOF
19136 rm -f conftest$ac_exeext
19137 if { (eval echo "$as_me:19137: \"$ac_link\"") >&5
19138   (eval $ac_link) 2>&5
19139   ac_status=$?
19140   echo "$as_me:19140: \$? = $ac_status" >&5
19141   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19142   { (eval echo "$as_me:19142: \"$ac_try\"") >&5
19143   (eval $ac_try) 2>&5
19144   ac_status=$?
19145   echo "$as_me:19145: \$? = $ac_status" >&5
19146   (exit $ac_status); }; }; then
19147   cf_cv_consistent_getenv=yes
19148 else
19149   echo "$as_me: program exited with status $ac_status" >&5
19150 echo "$as_me: failed program was:" >&5
19151 cat conftest.$ac_ext >&5
19152 cf_cv_consistent_getenv=no
19153 fi
19154 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19155 fi
19156
19157 fi
19158 echo "$as_me:19158: result: $cf_cv_consistent_getenv" >&5
19159 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19160
19161 if test "x$cf_cv_consistent_getenv" = xno
19162 then
19163
19164 cat >>confdefs.h <<\EOF
19165 #define HAVE_CONSISTENT_GETENV 1
19166 EOF
19167
19168 fi
19169
19170 if test "x$cf_cv_consistent_getenv" = xno && \
19171         test "x$cf_with_trace" = xyes
19172 then
19173         { echo "$as_me:19173: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19174 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19175 fi
19176
19177 # check for ISC (this may also define _POSIX_SOURCE)
19178 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
19179 if test "x$ISC" = xyes ; then
19180
19181 echo "$as_me:19181: checking for main in -lcposix" >&5
19182 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
19183 if test "${ac_cv_lib_cposix_main+set}" = set; then
19184   echo $ECHO_N "(cached) $ECHO_C" >&6
19185 else
19186   ac_check_lib_save_LIBS=$LIBS
19187 LIBS="-lcposix  $LIBS"
19188 cat >conftest.$ac_ext <<_ACEOF
19189 #line 19189 "configure"
19190 #include "confdefs.h"
19191
19192 int
19193 main (void)
19194 {
19195 main ();
19196   ;
19197   return 0;
19198 }
19199 _ACEOF
19200 rm -f conftest.$ac_objext conftest$ac_exeext
19201 if { (eval echo "$as_me:19201: \"$ac_link\"") >&5
19202   (eval $ac_link) 2>&5
19203   ac_status=$?
19204   echo "$as_me:19204: \$? = $ac_status" >&5
19205   (exit $ac_status); } &&
19206          { ac_try='test -s conftest$ac_exeext'
19207   { (eval echo "$as_me:19207: \"$ac_try\"") >&5
19208   (eval $ac_try) 2>&5
19209   ac_status=$?
19210   echo "$as_me:19210: \$? = $ac_status" >&5
19211   (exit $ac_status); }; }; then
19212   ac_cv_lib_cposix_main=yes
19213 else
19214   echo "$as_me: failed program was:" >&5
19215 cat conftest.$ac_ext >&5
19216 ac_cv_lib_cposix_main=no
19217 fi
19218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19219 LIBS=$ac_check_lib_save_LIBS
19220 fi
19221 echo "$as_me:19221: result: $ac_cv_lib_cposix_main" >&5
19222 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
19223 if test $ac_cv_lib_cposix_main = yes; then
19224   cat >>confdefs.h <<EOF
19225 #define HAVE_LIBCPOSIX 1
19226 EOF
19227
19228   LIBS="-lcposix $LIBS"
19229
19230 fi
19231
19232         echo "$as_me:19232: checking for bzero in -linet" >&5
19233 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
19234 if test "${ac_cv_lib_inet_bzero+set}" = set; then
19235   echo $ECHO_N "(cached) $ECHO_C" >&6
19236 else
19237   ac_check_lib_save_LIBS=$LIBS
19238 LIBS="-linet  $LIBS"
19239 cat >conftest.$ac_ext <<_ACEOF
19240 #line 19240 "configure"
19241 #include "confdefs.h"
19242
19243 /* Override any gcc2 internal prototype to avoid an error.  */
19244 #ifdef __cplusplus
19245 extern "C"
19246 #endif
19247 /* We use char because int might match the return type of a gcc2
19248    builtin and then its argument prototype would still apply.  */
19249 char bzero ();
19250 int
19251 main (void)
19252 {
19253 bzero ();
19254   ;
19255   return 0;
19256 }
19257 _ACEOF
19258 rm -f conftest.$ac_objext conftest$ac_exeext
19259 if { (eval echo "$as_me:19259: \"$ac_link\"") >&5
19260   (eval $ac_link) 2>&5
19261   ac_status=$?
19262   echo "$as_me:19262: \$? = $ac_status" >&5
19263   (exit $ac_status); } &&
19264          { ac_try='test -s conftest$ac_exeext'
19265   { (eval echo "$as_me:19265: \"$ac_try\"") >&5
19266   (eval $ac_try) 2>&5
19267   ac_status=$?
19268   echo "$as_me:19268: \$? = $ac_status" >&5
19269   (exit $ac_status); }; }; then
19270   ac_cv_lib_inet_bzero=yes
19271 else
19272   echo "$as_me: failed program was:" >&5
19273 cat conftest.$ac_ext >&5
19274 ac_cv_lib_inet_bzero=no
19275 fi
19276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19277 LIBS=$ac_check_lib_save_LIBS
19278 fi
19279 echo "$as_me:19279: result: $ac_cv_lib_inet_bzero" >&5
19280 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
19281 if test $ac_cv_lib_inet_bzero = yes; then
19282
19283 cf_add_libs="$LIBS"
19284 # reverse order
19285 cf_add_0lib=
19286 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19287 # filter duplicates
19288 for cf_add_1lib in $cf_add_0lib; do
19289         for cf_add_2lib in $cf_add_libs; do
19290                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19291                         cf_add_1lib=
19292                         break
19293                 fi
19294         done
19295         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19296 done
19297 LIBS="$cf_add_libs"
19298
19299 fi
19300 fi
19301
19302 echo "$as_me:19302: checking if sys/time.h works with sys/select.h" >&5
19303 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19304 if test "${cf_cv_sys_time_select+set}" = set; then
19305   echo $ECHO_N "(cached) $ECHO_C" >&6
19306 else
19307
19308 cat >conftest.$ac_ext <<_ACEOF
19309 #line 19309 "configure"
19310 #include "confdefs.h"
19311
19312 #include <sys/types.h>
19313 #ifdef HAVE_SYS_TIME_H
19314 #include <sys/time.h>
19315 #endif
19316 #ifdef HAVE_SYS_SELECT_H
19317 #include <sys/select.h>
19318 #endif
19319
19320 int
19321 main (void)
19322 {
19323
19324   ;
19325   return 0;
19326 }
19327 _ACEOF
19328 rm -f conftest.$ac_objext
19329 if { (eval echo "$as_me:19329: \"$ac_compile\"") >&5
19330   (eval $ac_compile) 2>&5
19331   ac_status=$?
19332   echo "$as_me:19332: \$? = $ac_status" >&5
19333   (exit $ac_status); } &&
19334          { ac_try='test -s conftest.$ac_objext'
19335   { (eval echo "$as_me:19335: \"$ac_try\"") >&5
19336   (eval $ac_try) 2>&5
19337   ac_status=$?
19338   echo "$as_me:19338: \$? = $ac_status" >&5
19339   (exit $ac_status); }; }; then
19340   cf_cv_sys_time_select=yes
19341 else
19342   echo "$as_me: failed program was:" >&5
19343 cat conftest.$ac_ext >&5
19344 cf_cv_sys_time_select=no
19345 fi
19346 rm -f conftest.$ac_objext conftest.$ac_ext
19347
19348 fi
19349
19350 echo "$as_me:19350: result: $cf_cv_sys_time_select" >&5
19351 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19352 test "$cf_cv_sys_time_select" = yes &&
19353 cat >>confdefs.h <<\EOF
19354 #define HAVE_SYS_TIME_SELECT 1
19355 EOF
19356
19357 ###     checks for compiler characteristics
19358 ac_ext=c
19359 ac_cpp='$CPP $CPPFLAGS'
19360 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19361 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19363 ac_main_return=return
19364
19365 echo "$as_me:19365: checking for an ANSI C-conforming const" >&5
19366 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19367 if test "${ac_cv_c_const+set}" = set; then
19368   echo $ECHO_N "(cached) $ECHO_C" >&6
19369 else
19370   cat >conftest.$ac_ext <<_ACEOF
19371 #line 19371 "configure"
19372 #include "confdefs.h"
19373
19374 int
19375 main (void)
19376 {
19377 /* FIXME: Include the comments suggested by Paul. */
19378 #ifndef __cplusplus
19379   /* Ultrix mips cc rejects this.  */
19380   typedef int charset[2];
19381   const charset x;
19382   /* SunOS 4.1.1 cc rejects this.  */
19383   char const *const *ccp;
19384   char **p;
19385   /* NEC SVR4.0.2 mips cc rejects this.  */
19386   struct point {int x, y;};
19387   static struct point const zero = {0,0};
19388   /* AIX XL C 1.02.0.0 rejects this.
19389      It does not let you subtract one const X* pointer from another in
19390      an arm of an if-expression whose if-part is not a constant
19391      expression */
19392   const char *g = "string";
19393   ccp = &g + (g ? g-g : 0);
19394   /* HPUX 7.0 cc rejects these. */
19395   ++ccp;
19396   p = (char**) ccp;
19397   ccp = (char const *const *) p;
19398   { /* SCO 3.2v4 cc rejects this.  */
19399     char *t;
19400     char const *s = 0 ? (char *) 0 : (char const *) 0;
19401
19402     *t++ = 0;
19403   }
19404   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19405     int x[] = {25, 17};
19406     const int *foo = &x[0];
19407     ++foo;
19408   }
19409   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19410     typedef const int *iptr;
19411     iptr p = 0;
19412     ++p;
19413   }
19414   { /* AIX XL C 1.02.0.0 rejects this saying
19415        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19416     struct s { int j; const int *ap[3]; };
19417     struct s *b; b->j = 5;
19418   }
19419   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19420     const int foo = 10;
19421   }
19422 #endif
19423
19424   ;
19425   return 0;
19426 }
19427 _ACEOF
19428 rm -f conftest.$ac_objext
19429 if { (eval echo "$as_me:19429: \"$ac_compile\"") >&5
19430   (eval $ac_compile) 2>&5
19431   ac_status=$?
19432   echo "$as_me:19432: \$? = $ac_status" >&5
19433   (exit $ac_status); } &&
19434          { ac_try='test -s conftest.$ac_objext'
19435   { (eval echo "$as_me:19435: \"$ac_try\"") >&5
19436   (eval $ac_try) 2>&5
19437   ac_status=$?
19438   echo "$as_me:19438: \$? = $ac_status" >&5
19439   (exit $ac_status); }; }; then
19440   ac_cv_c_const=yes
19441 else
19442   echo "$as_me: failed program was:" >&5
19443 cat conftest.$ac_ext >&5
19444 ac_cv_c_const=no
19445 fi
19446 rm -f conftest.$ac_objext conftest.$ac_ext
19447 fi
19448 echo "$as_me:19448: result: $ac_cv_c_const" >&5
19449 echo "${ECHO_T}$ac_cv_c_const" >&6
19450 if test $ac_cv_c_const = no; then
19451
19452 cat >>confdefs.h <<\EOF
19453 #define const
19454 EOF
19455
19456 fi
19457
19458 echo "$as_me:19458: checking for inline" >&5
19459 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19460 if test "${ac_cv_c_inline+set}" = set; then
19461   echo $ECHO_N "(cached) $ECHO_C" >&6
19462 else
19463   ac_cv_c_inline=no
19464 for ac_kw in inline __inline__ __inline; do
19465   cat >conftest.$ac_ext <<_ACEOF
19466 #line 19466 "configure"
19467 #include "confdefs.h"
19468 #ifndef __cplusplus
19469 static $ac_kw int static_foo () {return 0; }
19470 $ac_kw int foo () {return 0; }
19471 #endif
19472
19473 _ACEOF
19474 rm -f conftest.$ac_objext
19475 if { (eval echo "$as_me:19475: \"$ac_compile\"") >&5
19476   (eval $ac_compile) 2>&5
19477   ac_status=$?
19478   echo "$as_me:19478: \$? = $ac_status" >&5
19479   (exit $ac_status); } &&
19480          { ac_try='test -s conftest.$ac_objext'
19481   { (eval echo "$as_me:19481: \"$ac_try\"") >&5
19482   (eval $ac_try) 2>&5
19483   ac_status=$?
19484   echo "$as_me:19484: \$? = $ac_status" >&5
19485   (exit $ac_status); }; }; then
19486   ac_cv_c_inline=$ac_kw; break
19487 else
19488   echo "$as_me: failed program was:" >&5
19489 cat conftest.$ac_ext >&5
19490 fi
19491 rm -f conftest.$ac_objext conftest.$ac_ext
19492 done
19493
19494 fi
19495 echo "$as_me:19495: result: $ac_cv_c_inline" >&5
19496 echo "${ECHO_T}$ac_cv_c_inline" >&6
19497 case $ac_cv_c_inline in
19498   inline | yes) ;;
19499   no)
19500 cat >>confdefs.h <<\EOF
19501 #define inline
19502 EOF
19503  ;;
19504   *)  cat >>confdefs.h <<EOF
19505 #define inline $ac_cv_c_inline
19506 EOF
19507  ;;
19508 esac
19509
19510 NCURSES_INLINE=
19511 if test "$ac_cv_c_inline" != no ; then
19512         NCURSES_INLINE=inline
19513         if test "$INTEL_COMPILER" = yes
19514         then
19515                 :
19516         elif test "$CLANG_COMPILER" = yes
19517         then
19518                 :
19519         elif test "$GCC" = yes
19520         then
19521                 echo "$as_me:19521: checking if $CC supports options to tune inlining" >&5
19522 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19523 if test "${cf_cv_gcc_inline+set}" = set; then
19524   echo $ECHO_N "(cached) $ECHO_C" >&6
19525 else
19526
19527                 cf_save_CFLAGS=$CFLAGS
19528                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19529                 cat >conftest.$ac_ext <<_ACEOF
19530 #line 19530 "configure"
19531 #include "confdefs.h"
19532 inline int foo(void) { return 1; }
19533 int
19534 main (void)
19535 {
19536 ${cf_cv_main_return:-return} foo()
19537   ;
19538   return 0;
19539 }
19540 _ACEOF
19541 rm -f conftest.$ac_objext
19542 if { (eval echo "$as_me:19542: \"$ac_compile\"") >&5
19543   (eval $ac_compile) 2>&5
19544   ac_status=$?
19545   echo "$as_me:19545: \$? = $ac_status" >&5
19546   (exit $ac_status); } &&
19547          { ac_try='test -s conftest.$ac_objext'
19548   { (eval echo "$as_me:19548: \"$ac_try\"") >&5
19549   (eval $ac_try) 2>&5
19550   ac_status=$?
19551   echo "$as_me:19551: \$? = $ac_status" >&5
19552   (exit $ac_status); }; }; then
19553   cf_cv_gcc_inline=yes
19554 else
19555   echo "$as_me: failed program was:" >&5
19556 cat conftest.$ac_ext >&5
19557 cf_cv_gcc_inline=no
19558 fi
19559 rm -f conftest.$ac_objext conftest.$ac_ext
19560                 CFLAGS=$cf_save_CFLAGS
19561
19562 fi
19563 echo "$as_me:19563: result: $cf_cv_gcc_inline" >&5
19564 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19565                 if test "$cf_cv_gcc_inline" = yes ; then
19566
19567 cf_fix_cppflags=no
19568 cf_new_cflags=
19569 cf_new_cppflags=
19570 cf_new_extra_cppflags=
19571
19572 for cf_add_cflags in --param max-inline-insns-single=1200
19573 do
19574 case $cf_fix_cppflags in
19575 (no)
19576         case $cf_add_cflags in
19577         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19578                 case $cf_add_cflags in
19579                 (-D*)
19580                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19581
19582                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19583                                 && test -z "${cf_tst_cflags}" \
19584                                 && cf_fix_cppflags=yes
19585
19586                         if test $cf_fix_cppflags = yes ; then
19587
19588         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19589         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19590
19591                                 continue
19592                         elif test "${cf_tst_cflags}" = "\"'" ; then
19593
19594         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19595         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19596
19597                                 continue
19598                         fi
19599                         ;;
19600                 esac
19601                 case "$CPPFLAGS" in
19602                 (*$cf_add_cflags)
19603                         ;;
19604                 (*)
19605                         case $cf_add_cflags in
19606                         (-D*)
19607                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19608
19609 CPPFLAGS=`echo "$CPPFLAGS" | \
19610         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19611                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19612
19613                                 ;;
19614                         esac
19615
19616         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19617         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19618
19619                         ;;
19620                 esac
19621                 ;;
19622         (*)
19623
19624         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19625         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19626
19627                 ;;
19628         esac
19629         ;;
19630 (yes)
19631
19632         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19633         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19634
19635         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19636
19637         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19638                 && test -z "${cf_tst_cflags}" \
19639                 && cf_fix_cppflags=no
19640         ;;
19641 esac
19642 done
19643
19644 if test -n "$cf_new_cflags" ; then
19645
19646         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19647         CFLAGS="${CFLAGS}$cf_new_cflags"
19648
19649 fi
19650
19651 if test -n "$cf_new_cppflags" ; then
19652
19653         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19654         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19655
19656 fi
19657
19658 if test -n "$cf_new_extra_cppflags" ; then
19659
19660         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19661         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19662
19663 fi
19664
19665                 fi
19666         fi
19667 fi
19668
19669 echo "$as_me:19669: checking for signal global datatype" >&5
19670 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19671 if test "${cf_cv_sig_atomic_t+set}" = set; then
19672   echo $ECHO_N "(cached) $ECHO_C" >&6
19673 else
19674
19675         for cf_type in \
19676                 "volatile sig_atomic_t" \
19677                 "sig_atomic_t" \
19678                 "int"
19679         do
19680         cat >conftest.$ac_ext <<_ACEOF
19681 #line 19681 "configure"
19682 #include "confdefs.h"
19683
19684 #include <sys/types.h>
19685 #include <signal.h>
19686 #include <stdio.h>
19687
19688 extern $cf_type x;
19689 $cf_type x;
19690 static void handler(int sig)
19691 {
19692         (void)sig;
19693         x = 5;
19694 }
19695 int
19696 main (void)
19697 {
19698 signal(SIGINT, handler);
19699                  x = 1
19700   ;
19701   return 0;
19702 }
19703 _ACEOF
19704 rm -f conftest.$ac_objext
19705 if { (eval echo "$as_me:19705: \"$ac_compile\"") >&5
19706   (eval $ac_compile) 2>&5
19707   ac_status=$?
19708   echo "$as_me:19708: \$? = $ac_status" >&5
19709   (exit $ac_status); } &&
19710          { ac_try='test -s conftest.$ac_objext'
19711   { (eval echo "$as_me:19711: \"$ac_try\"") >&5
19712   (eval $ac_try) 2>&5
19713   ac_status=$?
19714   echo "$as_me:19714: \$? = $ac_status" >&5
19715   (exit $ac_status); }; }; then
19716   cf_cv_sig_atomic_t=$cf_type
19717 else
19718   echo "$as_me: failed program was:" >&5
19719 cat conftest.$ac_ext >&5
19720 cf_cv_sig_atomic_t=no
19721 fi
19722 rm -f conftest.$ac_objext conftest.$ac_ext
19723                 test "$cf_cv_sig_atomic_t" != no && break
19724         done
19725
19726 fi
19727
19728 echo "$as_me:19728: result: $cf_cv_sig_atomic_t" >&5
19729 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19730 test "$cf_cv_sig_atomic_t" != no &&
19731 cat >>confdefs.h <<EOF
19732 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19733 EOF
19734
19735 if test $NCURSES_CHTYPE = auto ; then
19736
19737 echo "$as_me:19737: checking for type of chtype" >&5
19738 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19739 if test "${cf_cv_typeof_chtype+set}" = set; then
19740   echo $ECHO_N "(cached) $ECHO_C" >&6
19741 else
19742
19743                 if test "$cross_compiling" = yes; then
19744   cf_cv_typeof_chtype=long
19745 else
19746   cat >conftest.$ac_ext <<_ACEOF
19747 #line 19747 "configure"
19748 #include "confdefs.h"
19749
19750 #define WANT_BITS 31
19751 #include <stdio.h>
19752 int main(void)
19753 {
19754         FILE *fp = fopen("cf_test.out", "w");
19755         if (fp != 0) {
19756                 char *result = "long";
19757                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19758                         int n;
19759                         unsigned int x, y;
19760                         for (n = 0; n < WANT_BITS; n++) {
19761                                 x = (1 << n);
19762                                 y = (x >> n);
19763                                 if (y != 1 || x == 0) {
19764                                         x = 0;
19765                                         break;
19766                                 }
19767                         }
19768                         /*
19769                          * If x is nonzero, an int is big enough for the bits
19770                          * that we want.
19771                          */
19772                         result = (x != 0) ? "int" : "long";
19773                 }
19774                 fputs(result, fp);
19775                 fclose(fp);
19776         }
19777         ${cf_cv_main_return:-return}(0);
19778 }
19779
19780 _ACEOF
19781 rm -f conftest$ac_exeext
19782 if { (eval echo "$as_me:19782: \"$ac_link\"") >&5
19783   (eval $ac_link) 2>&5
19784   ac_status=$?
19785   echo "$as_me:19785: \$? = $ac_status" >&5
19786   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19787   { (eval echo "$as_me:19787: \"$ac_try\"") >&5
19788   (eval $ac_try) 2>&5
19789   ac_status=$?
19790   echo "$as_me:19790: \$? = $ac_status" >&5
19791   (exit $ac_status); }; }; then
19792   cf_cv_typeof_chtype=`cat cf_test.out`
19793 else
19794   echo "$as_me: program exited with status $ac_status" >&5
19795 echo "$as_me: failed program was:" >&5
19796 cat conftest.$ac_ext >&5
19797 cf_cv_typeof_chtype=long
19798 fi
19799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19800 fi
19801                 rm -f cf_test.out
19802
19803 fi
19804
19805 echo "$as_me:19805: result: $cf_cv_typeof_chtype" >&5
19806 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19807
19808 cat >>confdefs.h <<EOF
19809 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19810 EOF
19811
19812 else
19813         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19814 fi
19815 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19816
19817 echo "$as_me:19817: checking if unsigned literals are legal" >&5
19818 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19819 if test "${cf_cv_unsigned_literals+set}" = set; then
19820   echo $ECHO_N "(cached) $ECHO_C" >&6
19821 else
19822
19823         cat >conftest.$ac_ext <<_ACEOF
19824 #line 19824 "configure"
19825 #include "confdefs.h"
19826
19827 int
19828 main (void)
19829 {
19830 long x = 1L + 1UL + 1U + 1
19831   ;
19832   return 0;
19833 }
19834 _ACEOF
19835 rm -f conftest.$ac_objext
19836 if { (eval echo "$as_me:19836: \"$ac_compile\"") >&5
19837   (eval $ac_compile) 2>&5
19838   ac_status=$?
19839   echo "$as_me:19839: \$? = $ac_status" >&5
19840   (exit $ac_status); } &&
19841          { ac_try='test -s conftest.$ac_objext'
19842   { (eval echo "$as_me:19842: \"$ac_try\"") >&5
19843   (eval $ac_try) 2>&5
19844   ac_status=$?
19845   echo "$as_me:19845: \$? = $ac_status" >&5
19846   (exit $ac_status); }; }; then
19847   cf_cv_unsigned_literals=yes
19848 else
19849   echo "$as_me: failed program was:" >&5
19850 cat conftest.$ac_ext >&5
19851 cf_cv_unsigned_literals=no
19852 fi
19853 rm -f conftest.$ac_objext conftest.$ac_ext
19854
19855 fi
19856
19857 echo "$as_me:19857: result: $cf_cv_unsigned_literals" >&5
19858 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19859
19860 cf_cv_1UL="1"
19861 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19862 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19863
19864 if test $NCURSES_MMASK_T = auto ; then
19865         cf_cv_typeof_mmask_t=long
19866 else
19867         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19868 fi
19869 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19870
19871 ###     Checks for external-data
19872
19873 echo "$as_me:19873: checking if external errno is declared" >&5
19874 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19875 if test "${cf_cv_dcl_errno+set}" = set; then
19876   echo $ECHO_N "(cached) $ECHO_C" >&6
19877 else
19878
19879         cat >conftest.$ac_ext <<_ACEOF
19880 #line 19880 "configure"
19881 #include "confdefs.h"
19882
19883 #ifdef HAVE_STDLIB_H
19884 #include <stdlib.h>
19885 #endif
19886 #include <stdio.h>
19887 #include <sys/types.h>
19888 #include <errno.h>
19889 int
19890 main (void)
19891 {
19892 int x = (int) errno; (void)x
19893   ;
19894   return 0;
19895 }
19896 _ACEOF
19897 rm -f conftest.$ac_objext
19898 if { (eval echo "$as_me:19898: \"$ac_compile\"") >&5
19899   (eval $ac_compile) 2>&5
19900   ac_status=$?
19901   echo "$as_me:19901: \$? = $ac_status" >&5
19902   (exit $ac_status); } &&
19903          { ac_try='test -s conftest.$ac_objext'
19904   { (eval echo "$as_me:19904: \"$ac_try\"") >&5
19905   (eval $ac_try) 2>&5
19906   ac_status=$?
19907   echo "$as_me:19907: \$? = $ac_status" >&5
19908   (exit $ac_status); }; }; then
19909   cf_cv_dcl_errno=yes
19910 else
19911   echo "$as_me: failed program was:" >&5
19912 cat conftest.$ac_ext >&5
19913 cf_cv_dcl_errno=no
19914 fi
19915 rm -f conftest.$ac_objext conftest.$ac_ext
19916
19917 fi
19918 echo "$as_me:19918: result: $cf_cv_dcl_errno" >&5
19919 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19920
19921 if test "$cf_cv_dcl_errno" = no ; then
19922
19923 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19924
19925         cat >>confdefs.h <<EOF
19926 #define $cf_result 1
19927 EOF
19928
19929 fi
19930
19931 # It's possible (for near-UNIX clones) that the data doesn't exist
19932
19933 echo "$as_me:19933: checking if external errno exists" >&5
19934 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19935 if test "${cf_cv_have_errno+set}" = set; then
19936   echo $ECHO_N "(cached) $ECHO_C" >&6
19937 else
19938
19939         cat >conftest.$ac_ext <<_ACEOF
19940 #line 19940 "configure"
19941 #include "confdefs.h"
19942
19943 #undef errno
19944 extern int errno;
19945
19946 int
19947 main (void)
19948 {
19949 errno = 2
19950   ;
19951   return 0;
19952 }
19953 _ACEOF
19954 rm -f conftest.$ac_objext conftest$ac_exeext
19955 if { (eval echo "$as_me:19955: \"$ac_link\"") >&5
19956   (eval $ac_link) 2>&5
19957   ac_status=$?
19958   echo "$as_me:19958: \$? = $ac_status" >&5
19959   (exit $ac_status); } &&
19960          { ac_try='test -s conftest$ac_exeext'
19961   { (eval echo "$as_me:19961: \"$ac_try\"") >&5
19962   (eval $ac_try) 2>&5
19963   ac_status=$?
19964   echo "$as_me:19964: \$? = $ac_status" >&5
19965   (exit $ac_status); }; }; then
19966   cf_cv_have_errno=yes
19967 else
19968   echo "$as_me: failed program was:" >&5
19969 cat conftest.$ac_ext >&5
19970 cf_cv_have_errno=no
19971 fi
19972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19973
19974 fi
19975 echo "$as_me:19975: result: $cf_cv_have_errno" >&5
19976 echo "${ECHO_T}$cf_cv_have_errno" >&6
19977
19978 if test "$cf_cv_have_errno" = yes ; then
19979
19980 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19981
19982         cat >>confdefs.h <<EOF
19983 #define $cf_result 1
19984 EOF
19985
19986 fi
19987
19988 echo "$as_me:19988: checking if data-only library module links" >&5
19989 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19990 if test "${cf_cv_link_dataonly+set}" = set; then
19991   echo $ECHO_N "(cached) $ECHO_C" >&6
19992 else
19993
19994         rm -f conftest.a
19995         cat >conftest.$ac_ext <<EOF
19996 #line 19996 "configure"
19997 int     testdata[3] = { 123, 456, 789 };
19998 EOF
19999         if { (eval echo "$as_me:19999: \"$ac_compile\"") >&5
20000   (eval $ac_compile) 2>&5
20001   ac_status=$?
20002   echo "$as_me:20002: \$? = $ac_status" >&5
20003   (exit $ac_status); } ; then
20004                 mv conftest.o data.o && \
20005                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20006         fi
20007         rm -f conftest.$ac_ext data.o
20008         cat >conftest.$ac_ext <<EOF
20009 #line 20009 "configure"
20010 int     testfunc(void)
20011 {
20012 #if defined(NeXT)
20013         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20014 #else
20015         extern int testdata[3];
20016         return testdata[0] == 123
20017            &&  testdata[1] == 456
20018            &&  testdata[2] == 789;
20019 #endif
20020 }
20021 EOF
20022         if { (eval echo "$as_me:20022: \"$ac_compile\"") >&5
20023   (eval $ac_compile) 2>&5
20024   ac_status=$?
20025   echo "$as_me:20025: \$? = $ac_status" >&5
20026   (exit $ac_status); }; then
20027                 mv conftest.o func.o && \
20028                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20029         fi
20030         rm -f conftest.$ac_ext func.o
20031         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20032         cf_saveLIBS="$LIBS"
20033         LIBS="conftest.a $LIBS"
20034         if test "$cross_compiling" = yes; then
20035   cf_cv_link_dataonly=unknown
20036 else
20037   cat >conftest.$ac_ext <<_ACEOF
20038 #line 20038 "configure"
20039 #include "confdefs.h"
20040
20041         int main(void)
20042         {
20043                 extern int testfunc();
20044                 ${cf_cv_main_return:-return} (!testfunc());
20045         }
20046
20047 _ACEOF
20048 rm -f conftest$ac_exeext
20049 if { (eval echo "$as_me:20049: \"$ac_link\"") >&5
20050   (eval $ac_link) 2>&5
20051   ac_status=$?
20052   echo "$as_me:20052: \$? = $ac_status" >&5
20053   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20054   { (eval echo "$as_me:20054: \"$ac_try\"") >&5
20055   (eval $ac_try) 2>&5
20056   ac_status=$?
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit $ac_status); }; }; then
20059   cf_cv_link_dataonly=yes
20060 else
20061   echo "$as_me: program exited with status $ac_status" >&5
20062 echo "$as_me: failed program was:" >&5
20063 cat conftest.$ac_ext >&5
20064 cf_cv_link_dataonly=no
20065 fi
20066 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20067 fi
20068         LIBS="$cf_saveLIBS"
20069
20070 fi
20071
20072 echo "$as_me:20072: result: $cf_cv_link_dataonly" >&5
20073 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20074
20075 if test "$cf_cv_link_dataonly" = no ; then
20076
20077 cat >>confdefs.h <<\EOF
20078 #define BROKEN_LINKER 1
20079 EOF
20080
20081         BROKEN_LINKER=1
20082 fi
20083
20084 ###     Checks for library functions.
20085
20086 for ac_func in \
20087 getcwd \
20088 getegid \
20089 geteuid \
20090 getopt \
20091 getttynam \
20092 issetugid \
20093 localeconv \
20094 poll \
20095 putenv \
20096 remove \
20097 select \
20098 setbuf \
20099 setbuffer \
20100 setenv \
20101 setvbuf \
20102 sigaction \
20103 sigvec \
20104 snprintf \
20105 strdup \
20106 strstr \
20107 sysconf \
20108 tcgetpgrp \
20109 times \
20110 tsearch \
20111 vsnprintf \
20112
20113 do
20114 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20115 echo "$as_me:20115: checking for $ac_func" >&5
20116 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20117 if eval "test \"\${$as_ac_var+set}\" = set"; then
20118   echo $ECHO_N "(cached) $ECHO_C" >&6
20119 else
20120   cat >conftest.$ac_ext <<_ACEOF
20121 #line 20121 "configure"
20122 #include "confdefs.h"
20123 #define $ac_func autoconf_temporary
20124 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20125 #undef $ac_func
20126
20127 #ifdef __cplusplus
20128 extern "C"
20129 #endif
20130
20131 /* We use char because int might match the return type of a gcc2
20132    builtin and then its argument prototype would still apply.  */
20133 char $ac_func (void);
20134
20135 int
20136 main (void)
20137 {
20138
20139 /* The GNU C library defines stubs for functions which it implements
20140     to always fail with ENOSYS.  Some functions are actually named
20141     something starting with __ and the normal name is an alias.  */
20142 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20143 #error found stub for $ac_func
20144 #endif
20145
20146         return $ac_func ();
20147   ;
20148   return 0;
20149 }
20150 _ACEOF
20151 rm -f conftest.$ac_objext conftest$ac_exeext
20152 if { (eval echo "$as_me:20152: \"$ac_link\"") >&5
20153   (eval $ac_link) 2>&5
20154   ac_status=$?
20155   echo "$as_me:20155: \$? = $ac_status" >&5
20156   (exit $ac_status); } &&
20157          { ac_try='test -s conftest$ac_exeext'
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   eval "$as_ac_var=yes"
20164 else
20165   echo "$as_me: failed program was:" >&5
20166 cat conftest.$ac_ext >&5
20167 eval "$as_ac_var=no"
20168 fi
20169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20170 fi
20171 echo "$as_me:20171: result: `eval echo '${'$as_ac_var'}'`" >&5
20172 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20173 if test `eval echo '${'$as_ac_var'}'` = yes; then
20174   cat >>confdefs.h <<EOF
20175 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20176 EOF
20177
20178 fi
20179 done
20180
20181 if test "x$ac_cv_func_getopt" = xno && \
20182    test "x$cf_with_progs$cf_with_tests" != xnono; then
20183         { { echo "$as_me:20183: error: getopt is required for building programs" >&5
20184 echo "$as_me: error: getopt is required for building programs" >&2;}
20185    { (exit 1); exit 1; }; }
20186 fi
20187
20188 if test "x$with_safe_sprintf" = xyes
20189 then
20190         if test "x$ac_cv_func_vsnprintf" = xyes
20191         then
20192                 { echo "$as_me:20192: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20193 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20194         else
20195
20196 cat >>confdefs.h <<\EOF
20197 #define USE_SAFE_SPRINTF 1
20198 EOF
20199
20200         fi
20201 fi
20202
20203 if test "x$with_getcap" = "xyes" ; then
20204
20205 echo "$as_me:20205: checking for terminal-capability database functions" >&5
20206 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20207 if test "${cf_cv_cgetent+set}" = set; then
20208   echo $ECHO_N "(cached) $ECHO_C" >&6
20209 else
20210
20211 cat >conftest.$ac_ext <<_ACEOF
20212 #line 20212 "configure"
20213 #include "confdefs.h"
20214
20215 #include <stdlib.h>
20216 int
20217 main (void)
20218 {
20219
20220         char temp[128];
20221         char *buf = temp;
20222         char *db_array = temp;
20223         cgetent(&buf, &db_array, "vt100");
20224         cgetcap(buf, "tc", '=');
20225         cgetmatch(buf, "tc");
20226
20227   ;
20228   return 0;
20229 }
20230 _ACEOF
20231 rm -f conftest.$ac_objext conftest$ac_exeext
20232 if { (eval echo "$as_me:20232: \"$ac_link\"") >&5
20233   (eval $ac_link) 2>&5
20234   ac_status=$?
20235   echo "$as_me:20235: \$? = $ac_status" >&5
20236   (exit $ac_status); } &&
20237          { ac_try='test -s conftest$ac_exeext'
20238   { (eval echo "$as_me:20238: \"$ac_try\"") >&5
20239   (eval $ac_try) 2>&5
20240   ac_status=$?
20241   echo "$as_me:20241: \$? = $ac_status" >&5
20242   (exit $ac_status); }; }; then
20243   cf_cv_cgetent=yes
20244 else
20245   echo "$as_me: failed program was:" >&5
20246 cat conftest.$ac_ext >&5
20247 cf_cv_cgetent=no
20248 fi
20249 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20250
20251 fi
20252 echo "$as_me:20252: result: $cf_cv_cgetent" >&5
20253 echo "${ECHO_T}$cf_cv_cgetent" >&6
20254
20255 if test "$cf_cv_cgetent" = yes
20256 then
20257
20258 cat >>confdefs.h <<\EOF
20259 #define HAVE_BSD_CGETENT 1
20260 EOF
20261
20262 echo "$as_me:20262: checking if cgetent uses const parameter" >&5
20263 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20264 if test "${cf_cv_cgetent_const+set}" = set; then
20265   echo $ECHO_N "(cached) $ECHO_C" >&6
20266 else
20267
20268 cat >conftest.$ac_ext <<_ACEOF
20269 #line 20269 "configure"
20270 #include "confdefs.h"
20271
20272 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20273 #include <stdlib.h>
20274 int
20275 main (void)
20276 {
20277
20278         char temp[128];
20279         char *buf = temp;
20280 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20281         const char *db_array = temp;
20282         cgetent(&buf, &db_array, "vt100");
20283 #endif
20284         cgetcap(buf, "tc", '=');
20285         cgetmatch(buf, "tc");
20286
20287   ;
20288   return 0;
20289 }
20290 _ACEOF
20291 rm -f conftest.$ac_objext conftest$ac_exeext
20292 if { (eval echo "$as_me:20292: \"$ac_link\"") >&5
20293   (eval $ac_link) 2>&5
20294   ac_status=$?
20295   echo "$as_me:20295: \$? = $ac_status" >&5
20296   (exit $ac_status); } &&
20297          { ac_try='test -s conftest$ac_exeext'
20298   { (eval echo "$as_me:20298: \"$ac_try\"") >&5
20299   (eval $ac_try) 2>&5
20300   ac_status=$?
20301   echo "$as_me:20301: \$? = $ac_status" >&5
20302   (exit $ac_status); }; }; then
20303   cf_cv_cgetent_const=yes
20304 else
20305   echo "$as_me: failed program was:" >&5
20306 cat conftest.$ac_ext >&5
20307 cf_cv_cgetent_const=no
20308 fi
20309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20310
20311 fi
20312 echo "$as_me:20312: result: $cf_cv_cgetent_const" >&5
20313 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20314         if test "$cf_cv_cgetent_const" = yes
20315         then
20316
20317 cat >>confdefs.h <<EOF
20318 #define CGETENT_CONST const
20319 EOF
20320
20321         fi
20322 fi
20323
20324 fi
20325
20326 echo "$as_me:20326: checking for isascii" >&5
20327 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20328 if test "${cf_cv_have_isascii+set}" = set; then
20329   echo $ECHO_N "(cached) $ECHO_C" >&6
20330 else
20331
20332         cat >conftest.$ac_ext <<_ACEOF
20333 #line 20333 "configure"
20334 #include "confdefs.h"
20335 #include <ctype.h>
20336 int
20337 main (void)
20338 {
20339 int x = isascii(' ')
20340   ;
20341   return 0;
20342 }
20343 _ACEOF
20344 rm -f conftest.$ac_objext conftest$ac_exeext
20345 if { (eval echo "$as_me:20345: \"$ac_link\"") >&5
20346   (eval $ac_link) 2>&5
20347   ac_status=$?
20348   echo "$as_me:20348: \$? = $ac_status" >&5
20349   (exit $ac_status); } &&
20350          { ac_try='test -s conftest$ac_exeext'
20351   { (eval echo "$as_me:20351: \"$ac_try\"") >&5
20352   (eval $ac_try) 2>&5
20353   ac_status=$?
20354   echo "$as_me:20354: \$? = $ac_status" >&5
20355   (exit $ac_status); }; }; then
20356   cf_cv_have_isascii=yes
20357 else
20358   echo "$as_me: failed program was:" >&5
20359 cat conftest.$ac_ext >&5
20360 cf_cv_have_isascii=no
20361 fi
20362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20363
20364 fi
20365 echo "$as_me:20365: result: $cf_cv_have_isascii" >&5
20366 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20367 test "$cf_cv_have_isascii" = yes &&
20368 cat >>confdefs.h <<\EOF
20369 #define HAVE_ISASCII 1
20370 EOF
20371
20372 if test "$ac_cv_func_sigaction" = yes; then
20373 echo "$as_me:20373: checking whether sigaction needs _POSIX_SOURCE" >&5
20374 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20375 cat >conftest.$ac_ext <<_ACEOF
20376 #line 20376 "configure"
20377 #include "confdefs.h"
20378
20379 #include <sys/types.h>
20380 #include <signal.h>
20381 int
20382 main (void)
20383 {
20384 struct sigaction act
20385   ;
20386   return 0;
20387 }
20388 _ACEOF
20389 rm -f conftest.$ac_objext
20390 if { (eval echo "$as_me:20390: \"$ac_compile\"") >&5
20391   (eval $ac_compile) 2>&5
20392   ac_status=$?
20393   echo "$as_me:20393: \$? = $ac_status" >&5
20394   (exit $ac_status); } &&
20395          { ac_try='test -s conftest.$ac_objext'
20396   { (eval echo "$as_me:20396: \"$ac_try\"") >&5
20397   (eval $ac_try) 2>&5
20398   ac_status=$?
20399   echo "$as_me:20399: \$? = $ac_status" >&5
20400   (exit $ac_status); }; }; then
20401   sigact_bad=no
20402 else
20403   echo "$as_me: failed program was:" >&5
20404 cat conftest.$ac_ext >&5
20405
20406 cat >conftest.$ac_ext <<_ACEOF
20407 #line 20407 "configure"
20408 #include "confdefs.h"
20409
20410 #define _POSIX_SOURCE
20411 #include <sys/types.h>
20412 #include <signal.h>
20413 int
20414 main (void)
20415 {
20416 struct sigaction act
20417   ;
20418   return 0;
20419 }
20420 _ACEOF
20421 rm -f conftest.$ac_objext
20422 if { (eval echo "$as_me:20422: \"$ac_compile\"") >&5
20423   (eval $ac_compile) 2>&5
20424   ac_status=$?
20425   echo "$as_me:20425: \$? = $ac_status" >&5
20426   (exit $ac_status); } &&
20427          { ac_try='test -s conftest.$ac_objext'
20428   { (eval echo "$as_me:20428: \"$ac_try\"") >&5
20429   (eval $ac_try) 2>&5
20430   ac_status=$?
20431   echo "$as_me:20431: \$? = $ac_status" >&5
20432   (exit $ac_status); }; }; then
20433   sigact_bad=yes
20434
20435 cat >>confdefs.h <<\EOF
20436 #define _POSIX_SOURCE 1
20437 EOF
20438
20439 else
20440   echo "$as_me: failed program was:" >&5
20441 cat conftest.$ac_ext >&5
20442 sigact_bad=unknown
20443 fi
20444 rm -f conftest.$ac_objext conftest.$ac_ext
20445 fi
20446 rm -f conftest.$ac_objext conftest.$ac_ext
20447 echo "$as_me:20447: result: $sigact_bad" >&5
20448 echo "${ECHO_T}$sigact_bad" >&6
20449 fi
20450
20451 echo "$as_me:20451: checking if nanosleep really works" >&5
20452 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20453 if test "${cf_cv_func_nanosleep+set}" = set; then
20454   echo $ECHO_N "(cached) $ECHO_C" >&6
20455 else
20456
20457 if test "$cross_compiling" = yes; then
20458   cf_cv_func_nanosleep=unknown
20459 else
20460   cat >conftest.$ac_ext <<_ACEOF
20461 #line 20461 "configure"
20462 #include "confdefs.h"
20463
20464 #include <stdio.h>
20465 #include <errno.h>
20466 #include <time.h>
20467
20468 #ifdef HAVE_SYS_TIME_H
20469 #include <sys/time.h>
20470 #endif
20471
20472 int main(void) {
20473         struct timespec ts1, ts2;
20474         int code;
20475         ts1.tv_sec  = 0;
20476         ts1.tv_nsec = 750000000;
20477         ts2.tv_sec  = 0;
20478         ts2.tv_nsec = 0;
20479         errno = 0;
20480         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20481         ${cf_cv_main_return:-return}(code != 0);
20482 }
20483
20484 _ACEOF
20485 rm -f conftest$ac_exeext
20486 if { (eval echo "$as_me:20486: \"$ac_link\"") >&5
20487   (eval $ac_link) 2>&5
20488   ac_status=$?
20489   echo "$as_me:20489: \$? = $ac_status" >&5
20490   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20491   { (eval echo "$as_me:20491: \"$ac_try\"") >&5
20492   (eval $ac_try) 2>&5
20493   ac_status=$?
20494   echo "$as_me:20494: \$? = $ac_status" >&5
20495   (exit $ac_status); }; }; then
20496   cf_cv_func_nanosleep=yes
20497 else
20498   echo "$as_me: program exited with status $ac_status" >&5
20499 echo "$as_me: failed program was:" >&5
20500 cat conftest.$ac_ext >&5
20501 cf_cv_func_nanosleep=no
20502 fi
20503 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20504 fi
20505 fi
20506 echo "$as_me:20506: result: $cf_cv_func_nanosleep" >&5
20507 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20508
20509 test "$cf_cv_func_nanosleep" = "yes" &&
20510 cat >>confdefs.h <<\EOF
20511 #define HAVE_NANOSLEEP 1
20512 EOF
20513
20514 for ac_header in \
20515 termio.h \
20516 termios.h \
20517 unistd.h \
20518 sys/ioctl.h \
20519 sys/termio.h \
20520
20521 do
20522 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20523 echo "$as_me:20523: checking for $ac_header" >&5
20524 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20525 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20526   echo $ECHO_N "(cached) $ECHO_C" >&6
20527 else
20528   cat >conftest.$ac_ext <<_ACEOF
20529 #line 20529 "configure"
20530 #include "confdefs.h"
20531 #include <$ac_header>
20532 _ACEOF
20533 if { (eval echo "$as_me:20533: \"$ac_cpp conftest.$ac_ext\"") >&5
20534   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20535   ac_status=$?
20536   egrep -v '^ *\+' conftest.er1 >conftest.err
20537   rm -f conftest.er1
20538   cat conftest.err >&5
20539   echo "$as_me:20539: \$? = $ac_status" >&5
20540   (exit $ac_status); } >/dev/null; then
20541   if test -s conftest.err; then
20542     ac_cpp_err=$ac_c_preproc_warn_flag
20543   else
20544     ac_cpp_err=
20545   fi
20546 else
20547   ac_cpp_err=yes
20548 fi
20549 if test -z "$ac_cpp_err"; then
20550   eval "$as_ac_Header=yes"
20551 else
20552   echo "$as_me: failed program was:" >&5
20553   cat conftest.$ac_ext >&5
20554   eval "$as_ac_Header=no"
20555 fi
20556 rm -f conftest.err conftest.$ac_ext
20557 fi
20558 echo "$as_me:20558: result: `eval echo '${'$as_ac_Header'}'`" >&5
20559 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20560 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20561   cat >>confdefs.h <<EOF
20562 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20563 EOF
20564
20565 fi
20566 done
20567
20568 if test "$ac_cv_header_termios_h" = yes ; then
20569         case "$CFLAGS $CPPFLAGS" in
20570         (*-D_POSIX_SOURCE*)
20571                 termios_bad=dunno ;;
20572         (*)     termios_bad=maybe ;;
20573         esac
20574         if test "$termios_bad" = maybe ; then
20575         echo "$as_me:20575: checking whether termios.h needs _POSIX_SOURCE" >&5
20576 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20577         cat >conftest.$ac_ext <<_ACEOF
20578 #line 20578 "configure"
20579 #include "confdefs.h"
20580 #include <termios.h>
20581 int
20582 main (void)
20583 {
20584 struct termios foo; int x = foo.c_iflag = 1; (void)x
20585   ;
20586   return 0;
20587 }
20588 _ACEOF
20589 rm -f conftest.$ac_objext
20590 if { (eval echo "$as_me:20590: \"$ac_compile\"") >&5
20591   (eval $ac_compile) 2>&5
20592   ac_status=$?
20593   echo "$as_me:20593: \$? = $ac_status" >&5
20594   (exit $ac_status); } &&
20595          { ac_try='test -s conftest.$ac_objext'
20596   { (eval echo "$as_me:20596: \"$ac_try\"") >&5
20597   (eval $ac_try) 2>&5
20598   ac_status=$?
20599   echo "$as_me:20599: \$? = $ac_status" >&5
20600   (exit $ac_status); }; }; then
20601   termios_bad=no
20602 else
20603   echo "$as_me: failed program was:" >&5
20604 cat conftest.$ac_ext >&5
20605
20606                 cat >conftest.$ac_ext <<_ACEOF
20607 #line 20607 "configure"
20608 #include "confdefs.h"
20609
20610 #define _POSIX_SOURCE
20611 #include <termios.h>
20612 int
20613 main (void)
20614 {
20615 struct termios foo; int x = foo.c_iflag = 2; (void)x
20616   ;
20617   return 0;
20618 }
20619 _ACEOF
20620 rm -f conftest.$ac_objext
20621 if { (eval echo "$as_me:20621: \"$ac_compile\"") >&5
20622   (eval $ac_compile) 2>&5
20623   ac_status=$?
20624   echo "$as_me:20624: \$? = $ac_status" >&5
20625   (exit $ac_status); } &&
20626          { ac_try='test -s conftest.$ac_objext'
20627   { (eval echo "$as_me:20627: \"$ac_try\"") >&5
20628   (eval $ac_try) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit $ac_status); }; }; then
20632   termios_bad=unknown
20633 else
20634   echo "$as_me: failed program was:" >&5
20635 cat conftest.$ac_ext >&5
20636 termios_bad=yes
20637 cat >>confdefs.h <<\EOF
20638 #define _POSIX_SOURCE 1
20639 EOF
20640
20641 fi
20642 rm -f conftest.$ac_objext conftest.$ac_ext
20643
20644 fi
20645 rm -f conftest.$ac_objext conftest.$ac_ext
20646         echo "$as_me:20646: result: $termios_bad" >&5
20647 echo "${ECHO_T}$termios_bad" >&6
20648         fi
20649 fi
20650
20651 echo "$as_me:20651: checking for tcgetattr" >&5
20652 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20653 if test "${cf_cv_have_tcgetattr+set}" = set; then
20654   echo $ECHO_N "(cached) $ECHO_C" >&6
20655 else
20656
20657 cat >conftest.$ac_ext <<_ACEOF
20658 #line 20658 "configure"
20659 #include "confdefs.h"
20660
20661 #include <sys/types.h>
20662 #ifdef HAVE_UNISTD_H
20663 #include <unistd.h>
20664 #endif
20665 #ifdef HAVE_TERMIOS_H
20666 #include <termios.h>
20667 #define TTY struct termios
20668 #else
20669 #ifdef HAVE_TERMIO_H
20670 #include <termio.h>
20671 #define TTY struct termio
20672 #endif
20673 #endif
20674
20675 int
20676 main (void)
20677 {
20678
20679 TTY foo;
20680 tcgetattr(1, &foo);
20681   ;
20682   return 0;
20683 }
20684 _ACEOF
20685 rm -f conftest.$ac_objext conftest$ac_exeext
20686 if { (eval echo "$as_me:20686: \"$ac_link\"") >&5
20687   (eval $ac_link) 2>&5
20688   ac_status=$?
20689   echo "$as_me:20689: \$? = $ac_status" >&5
20690   (exit $ac_status); } &&
20691          { ac_try='test -s conftest$ac_exeext'
20692   { (eval echo "$as_me:20692: \"$ac_try\"") >&5
20693   (eval $ac_try) 2>&5
20694   ac_status=$?
20695   echo "$as_me:20695: \$? = $ac_status" >&5
20696   (exit $ac_status); }; }; then
20697   cf_cv_have_tcgetattr=yes
20698 else
20699   echo "$as_me: failed program was:" >&5
20700 cat conftest.$ac_ext >&5
20701 cf_cv_have_tcgetattr=no
20702 fi
20703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20704 fi
20705 echo "$as_me:20705: result: $cf_cv_have_tcgetattr" >&5
20706 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20707 test "$cf_cv_have_tcgetattr" = yes &&
20708 cat >>confdefs.h <<\EOF
20709 #define HAVE_TCGETATTR 1
20710 EOF
20711
20712 echo "$as_me:20712: checking for vsscanf function or workaround" >&5
20713 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20714 if test "${cf_cv_func_vsscanf+set}" = set; then
20715   echo $ECHO_N "(cached) $ECHO_C" >&6
20716 else
20717
20718 cat >conftest.$ac_ext <<_ACEOF
20719 #line 20719 "configure"
20720 #include "confdefs.h"
20721
20722 #include <stdarg.h>
20723 #include <stdio.h>
20724 int
20725 main (void)
20726 {
20727
20728         va_list ap;
20729         vsscanf("from", "%d", ap)
20730   ;
20731   return 0;
20732 }
20733 _ACEOF
20734 rm -f conftest.$ac_objext conftest$ac_exeext
20735 if { (eval echo "$as_me:20735: \"$ac_link\"") >&5
20736   (eval $ac_link) 2>&5
20737   ac_status=$?
20738   echo "$as_me:20738: \$? = $ac_status" >&5
20739   (exit $ac_status); } &&
20740          { ac_try='test -s conftest$ac_exeext'
20741   { (eval echo "$as_me:20741: \"$ac_try\"") >&5
20742   (eval $ac_try) 2>&5
20743   ac_status=$?
20744   echo "$as_me:20744: \$? = $ac_status" >&5
20745   (exit $ac_status); }; }; then
20746   cf_cv_func_vsscanf=vsscanf
20747 else
20748   echo "$as_me: failed program was:" >&5
20749 cat conftest.$ac_ext >&5
20750
20751 cat >conftest.$ac_ext <<_ACEOF
20752 #line 20752 "configure"
20753 #include "confdefs.h"
20754
20755 #include <stdarg.h>
20756 #include <stdio.h>
20757 int
20758 main (void)
20759 {
20760
20761         FILE strbuf;
20762         char *str = "from";
20763
20764         strbuf._flag = _IOREAD;
20765         strbuf._ptr = strbuf._base = (unsigned char *) str;
20766         strbuf._cnt = strlen(str);
20767         strbuf._file = _NFILE;
20768         return (vfscanf(&strbuf, "%d", ap))
20769   ;
20770   return 0;
20771 }
20772 _ACEOF
20773 rm -f conftest.$ac_objext conftest$ac_exeext
20774 if { (eval echo "$as_me:20774: \"$ac_link\"") >&5
20775   (eval $ac_link) 2>&5
20776   ac_status=$?
20777   echo "$as_me:20777: \$? = $ac_status" >&5
20778   (exit $ac_status); } &&
20779          { ac_try='test -s conftest$ac_exeext'
20780   { (eval echo "$as_me:20780: \"$ac_try\"") >&5
20781   (eval $ac_try) 2>&5
20782   ac_status=$?
20783   echo "$as_me:20783: \$? = $ac_status" >&5
20784   (exit $ac_status); }; }; then
20785   cf_cv_func_vsscanf=vfscanf
20786 else
20787   echo "$as_me: failed program was:" >&5
20788 cat conftest.$ac_ext >&5
20789
20790 cat >conftest.$ac_ext <<_ACEOF
20791 #line 20791 "configure"
20792 #include "confdefs.h"
20793
20794 #include <stdarg.h>
20795 #include <stdio.h>
20796 int
20797 main (void)
20798 {
20799
20800         FILE strbuf;
20801         char *str = "from";
20802
20803         strbuf._flag = _IOREAD;
20804         strbuf._ptr = strbuf._base = (unsigned char *) str;
20805         strbuf._cnt = strlen(str);
20806         strbuf._file = _NFILE;
20807         return (_doscan(&strbuf, "%d", ap))
20808   ;
20809   return 0;
20810 }
20811 _ACEOF
20812 rm -f conftest.$ac_objext conftest$ac_exeext
20813 if { (eval echo "$as_me:20813: \"$ac_link\"") >&5
20814   (eval $ac_link) 2>&5
20815   ac_status=$?
20816   echo "$as_me:20816: \$? = $ac_status" >&5
20817   (exit $ac_status); } &&
20818          { ac_try='test -s conftest$ac_exeext'
20819   { (eval echo "$as_me:20819: \"$ac_try\"") >&5
20820   (eval $ac_try) 2>&5
20821   ac_status=$?
20822   echo "$as_me:20822: \$? = $ac_status" >&5
20823   (exit $ac_status); }; }; then
20824   cf_cv_func_vsscanf=_doscan
20825 else
20826   echo "$as_me: failed program was:" >&5
20827 cat conftest.$ac_ext >&5
20828
20829 cf_cv_func_vsscanf=no
20830 fi
20831 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20832 fi
20833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20834 fi
20835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20836 fi
20837 echo "$as_me:20837: result: $cf_cv_func_vsscanf" >&5
20838 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20839
20840 case $cf_cv_func_vsscanf in
20841 (vsscanf)
20842 cat >>confdefs.h <<\EOF
20843 #define HAVE_VSSCANF 1
20844 EOF
20845 ;;
20846 (vfscanf)
20847 cat >>confdefs.h <<\EOF
20848 #define HAVE_VFSCANF 1
20849 EOF
20850 ;;
20851 (_doscan)
20852 cat >>confdefs.h <<\EOF
20853 #define HAVE__DOSCAN 1
20854 EOF
20855 ;;
20856 esac
20857
20858 for ac_header in \
20859 unistd.h \
20860
20861 do
20862 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20863 echo "$as_me:20863: checking for $ac_header" >&5
20864 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20865 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20866   echo $ECHO_N "(cached) $ECHO_C" >&6
20867 else
20868   cat >conftest.$ac_ext <<_ACEOF
20869 #line 20869 "configure"
20870 #include "confdefs.h"
20871 #include <$ac_header>
20872 _ACEOF
20873 if { (eval echo "$as_me:20873: \"$ac_cpp conftest.$ac_ext\"") >&5
20874   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20875   ac_status=$?
20876   egrep -v '^ *\+' conftest.er1 >conftest.err
20877   rm -f conftest.er1
20878   cat conftest.err >&5
20879   echo "$as_me:20879: \$? = $ac_status" >&5
20880   (exit $ac_status); } >/dev/null; then
20881   if test -s conftest.err; then
20882     ac_cpp_err=$ac_c_preproc_warn_flag
20883   else
20884     ac_cpp_err=
20885   fi
20886 else
20887   ac_cpp_err=yes
20888 fi
20889 if test -z "$ac_cpp_err"; then
20890   eval "$as_ac_Header=yes"
20891 else
20892   echo "$as_me: failed program was:" >&5
20893   cat conftest.$ac_ext >&5
20894   eval "$as_ac_Header=no"
20895 fi
20896 rm -f conftest.err conftest.$ac_ext
20897 fi
20898 echo "$as_me:20898: result: `eval echo '${'$as_ac_Header'}'`" >&5
20899 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20900 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20901   cat >>confdefs.h <<EOF
20902 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20903 EOF
20904
20905 fi
20906 done
20907
20908 echo "$as_me:20908: checking for working mkstemp" >&5
20909 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20910 if test "${cf_cv_func_mkstemp+set}" = set; then
20911   echo $ECHO_N "(cached) $ECHO_C" >&6
20912 else
20913
20914 rm -rf conftest*
20915 if test "$cross_compiling" = yes; then
20916   cf_cv_func_mkstemp=maybe
20917 else
20918   cat >conftest.$ac_ext <<_ACEOF
20919 #line 20919 "configure"
20920 #include "confdefs.h"
20921
20922 #include <sys/types.h>
20923 #ifdef HAVE_UNISTD_H
20924 #include <unistd.h>
20925 #endif
20926 #include <stdlib.h>
20927 #include <stdio.h>
20928 #include <string.h>
20929 #include <sys/stat.h>
20930 int main(void)
20931 {
20932         char *tmpl = "conftestXXXXXX";
20933         char name[2][80];
20934         int n;
20935         int result = 0;
20936         int fd;
20937         struct stat sb;
20938
20939         umask(077);
20940         for (n = 0; n < 2; ++n) {
20941                 strcpy(name[n], tmpl);
20942                 if ((fd = mkstemp(name[n])) >= 0) {
20943                         if (!strcmp(name[n], tmpl)
20944                          || stat(name[n], &sb) != 0
20945                          || (sb.st_mode & S_IFMT) != S_IFREG
20946                          || (sb.st_mode & 077) != 0) {
20947                                 result = 1;
20948                         }
20949                         close(fd);
20950                 }
20951         }
20952         if (result == 0
20953          && !strcmp(name[0], name[1]))
20954                 result = 1;
20955         ${cf_cv_main_return:-return}(result);
20956 }
20957
20958 _ACEOF
20959 rm -f conftest$ac_exeext
20960 if { (eval echo "$as_me:20960: \"$ac_link\"") >&5
20961   (eval $ac_link) 2>&5
20962   ac_status=$?
20963   echo "$as_me:20963: \$? = $ac_status" >&5
20964   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20965   { (eval echo "$as_me:20965: \"$ac_try\"") >&5
20966   (eval $ac_try) 2>&5
20967   ac_status=$?
20968   echo "$as_me:20968: \$? = $ac_status" >&5
20969   (exit $ac_status); }; }; then
20970   cf_cv_func_mkstemp=yes
20971
20972 else
20973   echo "$as_me: program exited with status $ac_status" >&5
20974 echo "$as_me: failed program was:" >&5
20975 cat conftest.$ac_ext >&5
20976 cf_cv_func_mkstemp=no
20977
20978 fi
20979 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20980 fi
20981
20982 fi
20983 echo "$as_me:20983: result: $cf_cv_func_mkstemp" >&5
20984 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20985 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20986         echo "$as_me:20986: checking for mkstemp" >&5
20987 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20988 if test "${ac_cv_func_mkstemp+set}" = set; then
20989   echo $ECHO_N "(cached) $ECHO_C" >&6
20990 else
20991   cat >conftest.$ac_ext <<_ACEOF
20992 #line 20992 "configure"
20993 #include "confdefs.h"
20994 #define mkstemp autoconf_temporary
20995 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20996 #undef mkstemp
20997
20998 #ifdef __cplusplus
20999 extern "C"
21000 #endif
21001
21002 /* We use char because int might match the return type of a gcc2
21003    builtin and then its argument prototype would still apply.  */
21004 char mkstemp (void);
21005
21006 int
21007 main (void)
21008 {
21009
21010 /* The GNU C library defines stubs for functions which it implements
21011     to always fail with ENOSYS.  Some functions are actually named
21012     something starting with __ and the normal name is an alias.  */
21013 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21014 #error found stub for mkstemp
21015 #endif
21016
21017         return mkstemp ();
21018   ;
21019   return 0;
21020 }
21021 _ACEOF
21022 rm -f conftest.$ac_objext conftest$ac_exeext
21023 if { (eval echo "$as_me:21023: \"$ac_link\"") >&5
21024   (eval $ac_link) 2>&5
21025   ac_status=$?
21026   echo "$as_me:21026: \$? = $ac_status" >&5
21027   (exit $ac_status); } &&
21028          { ac_try='test -s conftest$ac_exeext'
21029   { (eval echo "$as_me:21029: \"$ac_try\"") >&5
21030   (eval $ac_try) 2>&5
21031   ac_status=$?
21032   echo "$as_me:21032: \$? = $ac_status" >&5
21033   (exit $ac_status); }; }; then
21034   ac_cv_func_mkstemp=yes
21035 else
21036   echo "$as_me: failed program was:" >&5
21037 cat conftest.$ac_ext >&5
21038 ac_cv_func_mkstemp=no
21039 fi
21040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21041 fi
21042 echo "$as_me:21042: result: $ac_cv_func_mkstemp" >&5
21043 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21044
21045 fi
21046 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21047
21048 cat >>confdefs.h <<\EOF
21049 #define HAVE_MKSTEMP 1
21050 EOF
21051
21052 fi
21053
21054 # setup for prototype of fallback for vsscanf()
21055
21056 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21057         HAVE_VSSCANF=1
21058 else
21059         HAVE_VSSCANF=0
21060 fi
21061
21062 if test "x$cross_compiling" = xyes ; then
21063         { echo "$as_me:21063: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21064 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21065 else
21066         echo "$as_me:21066: checking whether setvbuf arguments are reversed" >&5
21067 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21068 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21069   echo $ECHO_N "(cached) $ECHO_C" >&6
21070 else
21071   if test "$cross_compiling" = yes; then
21072   { { echo "$as_me:21072: error: cannot run test program while cross compiling" >&5
21073 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21074    { (exit 1); exit 1; }; }
21075 else
21076   cat >conftest.$ac_ext <<_ACEOF
21077 #line 21077 "configure"
21078 #include "confdefs.h"
21079 #include <stdio.h>
21080 /* If setvbuf has the reversed format, exit 0. */
21081 int
21082 main (void)
21083 {
21084   /* This call has the arguments reversed.
21085      A reversed system may check and see that the address of main
21086      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21087   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21088     $ac_main_return(1);
21089   putc('\r', stdout);
21090   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21091 }
21092 _ACEOF
21093 rm -f conftest$ac_exeext
21094 if { (eval echo "$as_me:21094: \"$ac_link\"") >&5
21095   (eval $ac_link) 2>&5
21096   ac_status=$?
21097   echo "$as_me:21097: \$? = $ac_status" >&5
21098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21099   { (eval echo "$as_me:21099: \"$ac_try\"") >&5
21100   (eval $ac_try) 2>&5
21101   ac_status=$?
21102   echo "$as_me:21102: \$? = $ac_status" >&5
21103   (exit $ac_status); }; }; then
21104   ac_cv_func_setvbuf_reversed=yes
21105 else
21106   echo "$as_me: program exited with status $ac_status" >&5
21107 echo "$as_me: failed program was:" >&5
21108 cat conftest.$ac_ext >&5
21109 ac_cv_func_setvbuf_reversed=no
21110 fi
21111 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21112 fi
21113 rm -f core core.* *.core
21114 fi
21115 echo "$as_me:21115: result: $ac_cv_func_setvbuf_reversed" >&5
21116 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21117 if test $ac_cv_func_setvbuf_reversed = yes; then
21118
21119 cat >>confdefs.h <<\EOF
21120 #define SETVBUF_REVERSED 1
21121 EOF
21122
21123 fi
21124
21125 fi
21126 echo "$as_me:21126: checking for intptr_t" >&5
21127 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21128 if test "${ac_cv_type_intptr_t+set}" = set; then
21129   echo $ECHO_N "(cached) $ECHO_C" >&6
21130 else
21131   cat >conftest.$ac_ext <<_ACEOF
21132 #line 21132 "configure"
21133 #include "confdefs.h"
21134 $ac_includes_default
21135 int
21136 main (void)
21137 {
21138 if ((intptr_t *) 0)
21139   return 0;
21140 if (sizeof (intptr_t))
21141   return 0;
21142   ;
21143   return 0;
21144 }
21145 _ACEOF
21146 rm -f conftest.$ac_objext
21147 if { (eval echo "$as_me:21147: \"$ac_compile\"") >&5
21148   (eval $ac_compile) 2>&5
21149   ac_status=$?
21150   echo "$as_me:21150: \$? = $ac_status" >&5
21151   (exit $ac_status); } &&
21152          { ac_try='test -s conftest.$ac_objext'
21153   { (eval echo "$as_me:21153: \"$ac_try\"") >&5
21154   (eval $ac_try) 2>&5
21155   ac_status=$?
21156   echo "$as_me:21156: \$? = $ac_status" >&5
21157   (exit $ac_status); }; }; then
21158   ac_cv_type_intptr_t=yes
21159 else
21160   echo "$as_me: failed program was:" >&5
21161 cat conftest.$ac_ext >&5
21162 ac_cv_type_intptr_t=no
21163 fi
21164 rm -f conftest.$ac_objext conftest.$ac_ext
21165 fi
21166 echo "$as_me:21166: result: $ac_cv_type_intptr_t" >&5
21167 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21168 if test $ac_cv_type_intptr_t = yes; then
21169   :
21170 else
21171
21172 cat >>confdefs.h <<EOF
21173 #define intptr_t long
21174 EOF
21175
21176 fi
21177
21178 echo "$as_me:21178: checking for ssize_t" >&5
21179 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21180 if test "${ac_cv_type_ssize_t+set}" = set; then
21181   echo $ECHO_N "(cached) $ECHO_C" >&6
21182 else
21183   cat >conftest.$ac_ext <<_ACEOF
21184 #line 21184 "configure"
21185 #include "confdefs.h"
21186 $ac_includes_default
21187 int
21188 main (void)
21189 {
21190 if ((ssize_t *) 0)
21191   return 0;
21192 if (sizeof (ssize_t))
21193   return 0;
21194   ;
21195   return 0;
21196 }
21197 _ACEOF
21198 rm -f conftest.$ac_objext
21199 if { (eval echo "$as_me:21199: \"$ac_compile\"") >&5
21200   (eval $ac_compile) 2>&5
21201   ac_status=$?
21202   echo "$as_me:21202: \$? = $ac_status" >&5
21203   (exit $ac_status); } &&
21204          { ac_try='test -s conftest.$ac_objext'
21205   { (eval echo "$as_me:21205: \"$ac_try\"") >&5
21206   (eval $ac_try) 2>&5
21207   ac_status=$?
21208   echo "$as_me:21208: \$? = $ac_status" >&5
21209   (exit $ac_status); }; }; then
21210   ac_cv_type_ssize_t=yes
21211 else
21212   echo "$as_me: failed program was:" >&5
21213 cat conftest.$ac_ext >&5
21214 ac_cv_type_ssize_t=no
21215 fi
21216 rm -f conftest.$ac_objext conftest.$ac_ext
21217 fi
21218 echo "$as_me:21218: result: $ac_cv_type_ssize_t" >&5
21219 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21220 if test $ac_cv_type_ssize_t = yes; then
21221   :
21222 else
21223
21224 cat >>confdefs.h <<EOF
21225 #define ssize_t int
21226 EOF
21227
21228 fi
21229
21230 echo "$as_me:21230: checking for type sigaction_t" >&5
21231 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21232 if test "${cf_cv_type_sigaction+set}" = set; then
21233   echo $ECHO_N "(cached) $ECHO_C" >&6
21234 else
21235
21236         cat >conftest.$ac_ext <<_ACEOF
21237 #line 21237 "configure"
21238 #include "confdefs.h"
21239
21240 #include <signal.h>
21241 int
21242 main (void)
21243 {
21244 sigaction_t x
21245   ;
21246   return 0;
21247 }
21248 _ACEOF
21249 rm -f conftest.$ac_objext
21250 if { (eval echo "$as_me:21250: \"$ac_compile\"") >&5
21251   (eval $ac_compile) 2>&5
21252   ac_status=$?
21253   echo "$as_me:21253: \$? = $ac_status" >&5
21254   (exit $ac_status); } &&
21255          { ac_try='test -s conftest.$ac_objext'
21256   { (eval echo "$as_me:21256: \"$ac_try\"") >&5
21257   (eval $ac_try) 2>&5
21258   ac_status=$?
21259   echo "$as_me:21259: \$? = $ac_status" >&5
21260   (exit $ac_status); }; }; then
21261   cf_cv_type_sigaction=yes
21262 else
21263   echo "$as_me: failed program was:" >&5
21264 cat conftest.$ac_ext >&5
21265 cf_cv_type_sigaction=no
21266 fi
21267 rm -f conftest.$ac_objext conftest.$ac_ext
21268 fi
21269
21270 echo "$as_me:21270: result: $cf_cv_type_sigaction" >&5
21271 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21272 test "$cf_cv_type_sigaction" = yes &&
21273 cat >>confdefs.h <<\EOF
21274 #define HAVE_TYPE_SIGACTION 1
21275 EOF
21276
21277 echo "$as_me:21277: checking declaration of size-change" >&5
21278 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21279 if test "${cf_cv_sizechange+set}" = set; then
21280   echo $ECHO_N "(cached) $ECHO_C" >&6
21281 else
21282
21283         cf_cv_sizechange=unknown
21284         cf_save_CPPFLAGS="$CPPFLAGS"
21285
21286 for cf_opts in "" "NEED_PTEM_H"
21287 do
21288
21289         CPPFLAGS="$cf_save_CPPFLAGS"
21290         if test -n "$cf_opts"
21291         then
21292
21293         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21294         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21295
21296         fi
21297         cat >conftest.$ac_ext <<_ACEOF
21298 #line 21298 "configure"
21299 #include "confdefs.h"
21300 #include <sys/types.h>
21301 #ifdef HAVE_TERMIOS_H
21302 #include <termios.h>
21303 #else
21304 #ifdef HAVE_TERMIO_H
21305 #include <termio.h>
21306 #endif
21307 #endif
21308
21309 #ifdef NEED_PTEM_H
21310 /* This is a workaround for SCO:  they neglected to define struct winsize in
21311  * termios.h -- it's only in termio.h and ptem.h
21312  */
21313 #include <sys/stream.h>
21314 #include <sys/ptem.h>
21315 #endif
21316
21317 #ifdef HAVE_SYS_IOCTL_H
21318 #include <sys/ioctl.h>
21319 #endif
21320
21321 int
21322 main (void)
21323 {
21324
21325 #ifdef TIOCGSIZE
21326         struct ttysize win;     /* SunOS 3.0... */
21327         int y = win.ts_lines = 2;
21328         int x = win.ts_cols = 1;
21329         (void)y;
21330         (void)x;
21331 #else
21332 #ifdef TIOCGWINSZ
21333         struct winsize win;     /* everything else */
21334         int y = win.ws_row = 2;
21335         int x = win.ws_col = 1;
21336         (void)y;
21337         (void)x;
21338 #else
21339         no TIOCGSIZE or TIOCGWINSZ
21340 #endif /* TIOCGWINSZ */
21341 #endif /* TIOCGSIZE */
21342
21343   ;
21344   return 0;
21345 }
21346 _ACEOF
21347 rm -f conftest.$ac_objext
21348 if { (eval echo "$as_me:21348: \"$ac_compile\"") >&5
21349   (eval $ac_compile) 2>&5
21350   ac_status=$?
21351   echo "$as_me:21351: \$? = $ac_status" >&5
21352   (exit $ac_status); } &&
21353          { ac_try='test -s conftest.$ac_objext'
21354   { (eval echo "$as_me:21354: \"$ac_try\"") >&5
21355   (eval $ac_try) 2>&5
21356   ac_status=$?
21357   echo "$as_me:21357: \$? = $ac_status" >&5
21358   (exit $ac_status); }; }; then
21359   cf_cv_sizechange=yes
21360 else
21361   echo "$as_me: failed program was:" >&5
21362 cat conftest.$ac_ext >&5
21363 cf_cv_sizechange=no
21364 fi
21365 rm -f conftest.$ac_objext conftest.$ac_ext
21366
21367         CPPFLAGS="$cf_save_CPPFLAGS"
21368         if test "$cf_cv_sizechange" = yes ; then
21369                 echo "size-change succeeded ($cf_opts)" >&5
21370                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21371                 break
21372         fi
21373 done
21374
21375 fi
21376 echo "$as_me:21376: result: $cf_cv_sizechange" >&5
21377 echo "${ECHO_T}$cf_cv_sizechange" >&6
21378 if test "$cf_cv_sizechange" != no ; then
21379
21380 cat >>confdefs.h <<\EOF
21381 #define HAVE_SIZECHANGE 1
21382 EOF
21383
21384         case $cf_cv_sizechange in
21385         (NEED*)
21386                 cat >>confdefs.h <<EOF
21387 #define $cf_cv_sizechange  1
21388 EOF
21389
21390                 ;;
21391         esac
21392 fi
21393
21394 echo "$as_me:21394: checking for memmove" >&5
21395 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21396 if test "${ac_cv_func_memmove+set}" = set; then
21397   echo $ECHO_N "(cached) $ECHO_C" >&6
21398 else
21399   cat >conftest.$ac_ext <<_ACEOF
21400 #line 21400 "configure"
21401 #include "confdefs.h"
21402 #define memmove autoconf_temporary
21403 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21404 #undef memmove
21405
21406 #ifdef __cplusplus
21407 extern "C"
21408 #endif
21409
21410 /* We use char because int might match the return type of a gcc2
21411    builtin and then its argument prototype would still apply.  */
21412 char memmove (void);
21413
21414 int
21415 main (void)
21416 {
21417
21418 /* The GNU C library defines stubs for functions which it implements
21419     to always fail with ENOSYS.  Some functions are actually named
21420     something starting with __ and the normal name is an alias.  */
21421 #if defined (__stub_memmove) || defined (__stub___memmove)
21422 #error found stub for memmove
21423 #endif
21424
21425         return memmove ();
21426   ;
21427   return 0;
21428 }
21429 _ACEOF
21430 rm -f conftest.$ac_objext conftest$ac_exeext
21431 if { (eval echo "$as_me:21431: \"$ac_link\"") >&5
21432   (eval $ac_link) 2>&5
21433   ac_status=$?
21434   echo "$as_me:21434: \$? = $ac_status" >&5
21435   (exit $ac_status); } &&
21436          { ac_try='test -s conftest$ac_exeext'
21437   { (eval echo "$as_me:21437: \"$ac_try\"") >&5
21438   (eval $ac_try) 2>&5
21439   ac_status=$?
21440   echo "$as_me:21440: \$? = $ac_status" >&5
21441   (exit $ac_status); }; }; then
21442   ac_cv_func_memmove=yes
21443 else
21444   echo "$as_me: failed program was:" >&5
21445 cat conftest.$ac_ext >&5
21446 ac_cv_func_memmove=no
21447 fi
21448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21449 fi
21450 echo "$as_me:21450: result: $ac_cv_func_memmove" >&5
21451 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21452 if test $ac_cv_func_memmove = yes; then
21453   :
21454 else
21455
21456 echo "$as_me:21456: checking for bcopy" >&5
21457 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21458 if test "${ac_cv_func_bcopy+set}" = set; then
21459   echo $ECHO_N "(cached) $ECHO_C" >&6
21460 else
21461   cat >conftest.$ac_ext <<_ACEOF
21462 #line 21462 "configure"
21463 #include "confdefs.h"
21464 #define bcopy autoconf_temporary
21465 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21466 #undef bcopy
21467
21468 #ifdef __cplusplus
21469 extern "C"
21470 #endif
21471
21472 /* We use char because int might match the return type of a gcc2
21473    builtin and then its argument prototype would still apply.  */
21474 char bcopy (void);
21475
21476 int
21477 main (void)
21478 {
21479
21480 /* The GNU C library defines stubs for functions which it implements
21481     to always fail with ENOSYS.  Some functions are actually named
21482     something starting with __ and the normal name is an alias.  */
21483 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21484 #error found stub for bcopy
21485 #endif
21486
21487         return bcopy ();
21488   ;
21489   return 0;
21490 }
21491 _ACEOF
21492 rm -f conftest.$ac_objext conftest$ac_exeext
21493 if { (eval echo "$as_me:21493: \"$ac_link\"") >&5
21494   (eval $ac_link) 2>&5
21495   ac_status=$?
21496   echo "$as_me:21496: \$? = $ac_status" >&5
21497   (exit $ac_status); } &&
21498          { ac_try='test -s conftest$ac_exeext'
21499   { (eval echo "$as_me:21499: \"$ac_try\"") >&5
21500   (eval $ac_try) 2>&5
21501   ac_status=$?
21502   echo "$as_me:21502: \$? = $ac_status" >&5
21503   (exit $ac_status); }; }; then
21504   ac_cv_func_bcopy=yes
21505 else
21506   echo "$as_me: failed program was:" >&5
21507 cat conftest.$ac_ext >&5
21508 ac_cv_func_bcopy=no
21509 fi
21510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21511 fi
21512 echo "$as_me:21512: result: $ac_cv_func_bcopy" >&5
21513 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21514 if test $ac_cv_func_bcopy = yes; then
21515
21516         echo "$as_me:21516: checking if bcopy does overlapping moves" >&5
21517 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21518 if test "${cf_cv_good_bcopy+set}" = set; then
21519   echo $ECHO_N "(cached) $ECHO_C" >&6
21520 else
21521
21522                 if test "$cross_compiling" = yes; then
21523   cf_cv_good_bcopy=unknown
21524 else
21525   cat >conftest.$ac_ext <<_ACEOF
21526 #line 21526 "configure"
21527 #include "confdefs.h"
21528
21529 int main(void) {
21530         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21531         char temp[40];
21532         bcopy(data, temp, sizeof(data));
21533         bcopy(temp+10, temp, 15);
21534         bcopy(temp+5, temp+15, 10);
21535         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21536 }
21537
21538 _ACEOF
21539 rm -f conftest$ac_exeext
21540 if { (eval echo "$as_me:21540: \"$ac_link\"") >&5
21541   (eval $ac_link) 2>&5
21542   ac_status=$?
21543   echo "$as_me:21543: \$? = $ac_status" >&5
21544   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21545   { (eval echo "$as_me:21545: \"$ac_try\"") >&5
21546   (eval $ac_try) 2>&5
21547   ac_status=$?
21548   echo "$as_me:21548: \$? = $ac_status" >&5
21549   (exit $ac_status); }; }; then
21550   cf_cv_good_bcopy=yes
21551 else
21552   echo "$as_me: program exited with status $ac_status" >&5
21553 echo "$as_me: failed program was:" >&5
21554 cat conftest.$ac_ext >&5
21555 cf_cv_good_bcopy=no
21556 fi
21557 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21558 fi
21559
21560 fi
21561 echo "$as_me:21561: result: $cf_cv_good_bcopy" >&5
21562 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21563
21564 else
21565   cf_cv_good_bcopy=no
21566 fi
21567
21568         if test "$cf_cv_good_bcopy" = yes ; then
21569
21570 cat >>confdefs.h <<\EOF
21571 #define USE_OK_BCOPY 1
21572 EOF
21573
21574         else
21575
21576 cat >>confdefs.h <<\EOF
21577 #define USE_MY_MEMMOVE 1
21578 EOF
21579
21580         fi
21581
21582 fi
21583
21584 tty 2>&1 >/dev/null || {
21585 for ac_func in posix_openpt
21586 do
21587 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21588 echo "$as_me:21588: checking for $ac_func" >&5
21589 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21590 if eval "test \"\${$as_ac_var+set}\" = set"; then
21591   echo $ECHO_N "(cached) $ECHO_C" >&6
21592 else
21593   cat >conftest.$ac_ext <<_ACEOF
21594 #line 21594 "configure"
21595 #include "confdefs.h"
21596 #define $ac_func autoconf_temporary
21597 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21598 #undef $ac_func
21599
21600 #ifdef __cplusplus
21601 extern "C"
21602 #endif
21603
21604 /* We use char because int might match the return type of a gcc2
21605    builtin and then its argument prototype would still apply.  */
21606 char $ac_func (void);
21607
21608 int
21609 main (void)
21610 {
21611
21612 /* The GNU C library defines stubs for functions which it implements
21613     to always fail with ENOSYS.  Some functions are actually named
21614     something starting with __ and the normal name is an alias.  */
21615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21616 #error found stub for $ac_func
21617 #endif
21618
21619         return $ac_func ();
21620   ;
21621   return 0;
21622 }
21623 _ACEOF
21624 rm -f conftest.$ac_objext conftest$ac_exeext
21625 if { (eval echo "$as_me:21625: \"$ac_link\"") >&5
21626   (eval $ac_link) 2>&5
21627   ac_status=$?
21628   echo "$as_me:21628: \$? = $ac_status" >&5
21629   (exit $ac_status); } &&
21630          { ac_try='test -s conftest$ac_exeext'
21631   { (eval echo "$as_me:21631: \"$ac_try\"") >&5
21632   (eval $ac_try) 2>&5
21633   ac_status=$?
21634   echo "$as_me:21634: \$? = $ac_status" >&5
21635   (exit $ac_status); }; }; then
21636   eval "$as_ac_var=yes"
21637 else
21638   echo "$as_me: failed program was:" >&5
21639 cat conftest.$ac_ext >&5
21640 eval "$as_ac_var=no"
21641 fi
21642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21643 fi
21644 echo "$as_me:21644: result: `eval echo '${'$as_ac_var'}'`" >&5
21645 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21646 if test `eval echo '${'$as_ac_var'}'` = yes; then
21647   cat >>confdefs.h <<EOF
21648 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21649 EOF
21650
21651 fi
21652 done
21653  }
21654 echo "$as_me:21654: checking if poll really works" >&5
21655 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21656 if test "${cf_cv_working_poll+set}" = set; then
21657   echo $ECHO_N "(cached) $ECHO_C" >&6
21658 else
21659
21660 if test "$cross_compiling" = yes; then
21661   cf_cv_working_poll=unknown
21662 else
21663   cat >conftest.$ac_ext <<_ACEOF
21664 #line 21664 "configure"
21665 #include "confdefs.h"
21666
21667 #include <stdlib.h>
21668 #include <stdio.h>
21669 #include <unistd.h>
21670 #include <fcntl.h>
21671 #ifdef HAVE_POLL_H
21672 #include <poll.h>
21673 #else
21674 #include <sys/poll.h>
21675 #endif
21676 int main(void) {
21677         struct pollfd myfds;
21678         int ret;
21679
21680         /* check for Darwin bug with respect to "devices" */
21681         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21682         if (myfds.fd < 0)
21683                 myfds.fd = 0;
21684         myfds.events = POLLIN;
21685         myfds.revents = 0;
21686
21687         ret = poll(&myfds, 1, 100);
21688
21689         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21690                 ret = -1;
21691         } else {
21692                 int fd = 0;
21693                 if (!isatty(fd)) {
21694                         fd = open("/dev/tty", 2);       /* O_RDWR */
21695                 }
21696 #ifdef HAVE_POSIX_OPENPT
21697                 if (fd < 0) {
21698                         fd = posix_openpt(O_RDWR);
21699                 }
21700 #endif
21701
21702                 if (fd >= 0) {
21703                         /* also check with standard input */
21704                         myfds.fd = fd;
21705                         myfds.events = POLLIN;
21706                         myfds.revents = 0;
21707                         ret = poll(&myfds, 1, 100);
21708                 } else {
21709                         ret = -1;
21710                 }
21711         }
21712         ${cf_cv_main_return:-return}(ret < 0);
21713 }
21714 _ACEOF
21715 rm -f conftest$ac_exeext
21716 if { (eval echo "$as_me:21716: \"$ac_link\"") >&5
21717   (eval $ac_link) 2>&5
21718   ac_status=$?
21719   echo "$as_me:21719: \$? = $ac_status" >&5
21720   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21721   { (eval echo "$as_me:21721: \"$ac_try\"") >&5
21722   (eval $ac_try) 2>&5
21723   ac_status=$?
21724   echo "$as_me:21724: \$? = $ac_status" >&5
21725   (exit $ac_status); }; }; then
21726   cf_cv_working_poll=yes
21727 else
21728   echo "$as_me: program exited with status $ac_status" >&5
21729 echo "$as_me: failed program was:" >&5
21730 cat conftest.$ac_ext >&5
21731 cf_cv_working_poll=no
21732 fi
21733 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21734 fi
21735 fi
21736 echo "$as_me:21736: result: $cf_cv_working_poll" >&5
21737 echo "${ECHO_T}$cf_cv_working_poll" >&6
21738 test "$cf_cv_working_poll" = "yes" &&
21739 cat >>confdefs.h <<\EOF
21740 #define HAVE_WORKING_POLL 1
21741 EOF
21742
21743 echo "$as_me:21743: checking for va_copy" >&5
21744 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21745 if test "${cf_cv_have_va_copy+set}" = set; then
21746   echo $ECHO_N "(cached) $ECHO_C" >&6
21747 else
21748
21749 cat >conftest.$ac_ext <<_ACEOF
21750 #line 21750 "configure"
21751 #include "confdefs.h"
21752
21753 #include <stdarg.h>
21754
21755 int
21756 main (void)
21757 {
21758
21759         static va_list dst;
21760         static va_list src;
21761         va_copy(dst, src)
21762   ;
21763   return 0;
21764 }
21765 _ACEOF
21766 rm -f conftest.$ac_objext conftest$ac_exeext
21767 if { (eval echo "$as_me:21767: \"$ac_link\"") >&5
21768   (eval $ac_link) 2>&5
21769   ac_status=$?
21770   echo "$as_me:21770: \$? = $ac_status" >&5
21771   (exit $ac_status); } &&
21772          { ac_try='test -s conftest$ac_exeext'
21773   { (eval echo "$as_me:21773: \"$ac_try\"") >&5
21774   (eval $ac_try) 2>&5
21775   ac_status=$?
21776   echo "$as_me:21776: \$? = $ac_status" >&5
21777   (exit $ac_status); }; }; then
21778   cf_cv_have_va_copy=yes
21779 else
21780   echo "$as_me: failed program was:" >&5
21781 cat conftest.$ac_ext >&5
21782 cf_cv_have_va_copy=no
21783 fi
21784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21785 fi
21786 echo "$as_me:21786: result: $cf_cv_have_va_copy" >&5
21787 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21788
21789 if test "$cf_cv_have_va_copy" = yes;
21790 then
21791
21792 cat >>confdefs.h <<\EOF
21793 #define HAVE_VA_COPY 1
21794 EOF
21795
21796 else # !cf_cv_have_va_copy
21797
21798 echo "$as_me:21798: checking for __va_copy" >&5
21799 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21800 if test "${cf_cv_have___va_copy+set}" = set; then
21801   echo $ECHO_N "(cached) $ECHO_C" >&6
21802 else
21803
21804 cat >conftest.$ac_ext <<_ACEOF
21805 #line 21805 "configure"
21806 #include "confdefs.h"
21807
21808 #include <stdarg.h>
21809
21810 int
21811 main (void)
21812 {
21813
21814         static va_list dst;
21815         static va_list src;
21816         __va_copy(dst, src)
21817   ;
21818   return 0;
21819 }
21820 _ACEOF
21821 rm -f conftest.$ac_objext conftest$ac_exeext
21822 if { (eval echo "$as_me:21822: \"$ac_link\"") >&5
21823   (eval $ac_link) 2>&5
21824   ac_status=$?
21825   echo "$as_me:21825: \$? = $ac_status" >&5
21826   (exit $ac_status); } &&
21827          { ac_try='test -s conftest$ac_exeext'
21828   { (eval echo "$as_me:21828: \"$ac_try\"") >&5
21829   (eval $ac_try) 2>&5
21830   ac_status=$?
21831   echo "$as_me:21831: \$? = $ac_status" >&5
21832   (exit $ac_status); }; }; then
21833   cf_cv_have___va_copy=yes
21834 else
21835   echo "$as_me: failed program was:" >&5
21836 cat conftest.$ac_ext >&5
21837 cf_cv_have___va_copy=no
21838 fi
21839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21840 fi
21841 echo "$as_me:21841: result: $cf_cv_have___va_copy" >&5
21842 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21843
21844 if test "$cf_cv_have___va_copy" = yes
21845 then
21846
21847 cat >>confdefs.h <<\EOF
21848 #define HAVE___VA_COPY 1
21849 EOF
21850
21851 else # !cf_cv_have___va_copy
21852
21853 echo "$as_me:21853: checking for __builtin_va_copy" >&5
21854 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21855 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21856   echo $ECHO_N "(cached) $ECHO_C" >&6
21857 else
21858
21859 cat >conftest.$ac_ext <<_ACEOF
21860 #line 21860 "configure"
21861 #include "confdefs.h"
21862
21863 #include <stdarg.h>
21864
21865 int
21866 main (void)
21867 {
21868
21869         static va_list dst;
21870         static va_list src;
21871         __builtin_va_copy(dst, src)
21872   ;
21873   return 0;
21874 }
21875 _ACEOF
21876 rm -f conftest.$ac_objext conftest$ac_exeext
21877 if { (eval echo "$as_me:21877: \"$ac_link\"") >&5
21878   (eval $ac_link) 2>&5
21879   ac_status=$?
21880   echo "$as_me:21880: \$? = $ac_status" >&5
21881   (exit $ac_status); } &&
21882          { ac_try='test -s conftest$ac_exeext'
21883   { (eval echo "$as_me:21883: \"$ac_try\"") >&5
21884   (eval $ac_try) 2>&5
21885   ac_status=$?
21886   echo "$as_me:21886: \$? = $ac_status" >&5
21887   (exit $ac_status); }; }; then
21888   cf_cv_have___builtin_va_copy=yes
21889 else
21890   echo "$as_me: failed program was:" >&5
21891 cat conftest.$ac_ext >&5
21892 cf_cv_have___builtin_va_copy=no
21893 fi
21894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21895 fi
21896 echo "$as_me:21896: result: $cf_cv_have___builtin_va_copy" >&5
21897 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21898
21899 test "$cf_cv_have___builtin_va_copy" = yes &&
21900
21901 cat >>confdefs.h <<\EOF
21902 #define HAVE___BUILTIN_VA_COPY 1
21903 EOF
21904
21905 fi # cf_cv_have___va_copy
21906
21907 fi # cf_cv_have_va_copy
21908
21909 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21910 (*yes*)
21911         ;;
21912
21913 (*)
21914         echo "$as_me:21914: checking if we can simply copy va_list" >&5
21915 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21916 if test "${cf_cv_pointer_va_list+set}" = set; then
21917   echo $ECHO_N "(cached) $ECHO_C" >&6
21918 else
21919
21920 cat >conftest.$ac_ext <<_ACEOF
21921 #line 21921 "configure"
21922 #include "confdefs.h"
21923
21924 #include <stdarg.h>
21925
21926 int
21927 main (void)
21928 {
21929
21930         va_list dst;
21931         va_list src;
21932         dst = src
21933   ;
21934   return 0;
21935 }
21936 _ACEOF
21937 rm -f conftest.$ac_objext conftest$ac_exeext
21938 if { (eval echo "$as_me:21938: \"$ac_link\"") >&5
21939   (eval $ac_link) 2>&5
21940   ac_status=$?
21941   echo "$as_me:21941: \$? = $ac_status" >&5
21942   (exit $ac_status); } &&
21943          { ac_try='test -s conftest$ac_exeext'
21944   { (eval echo "$as_me:21944: \"$ac_try\"") >&5
21945   (eval $ac_try) 2>&5
21946   ac_status=$?
21947   echo "$as_me:21947: \$? = $ac_status" >&5
21948   (exit $ac_status); }; }; then
21949   cf_cv_pointer_va_list=yes
21950 else
21951   echo "$as_me: failed program was:" >&5
21952 cat conftest.$ac_ext >&5
21953 cf_cv_pointer_va_list=no
21954 fi
21955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21956 fi
21957 echo "$as_me:21957: result: $cf_cv_pointer_va_list" >&5
21958 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21959
21960         if test "$cf_cv_pointer_va_list" = no
21961         then
21962                 echo "$as_me:21962: checking if we can copy va_list indirectly" >&5
21963 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21964 if test "${cf_cv_array_va_list+set}" = set; then
21965   echo $ECHO_N "(cached) $ECHO_C" >&6
21966 else
21967
21968 cat >conftest.$ac_ext <<_ACEOF
21969 #line 21969 "configure"
21970 #include "confdefs.h"
21971
21972 #include <stdarg.h>
21973
21974 int
21975 main (void)
21976 {
21977
21978         va_list dst;
21979         va_list src;
21980         *dst = *src
21981   ;
21982   return 0;
21983 }
21984 _ACEOF
21985 rm -f conftest.$ac_objext conftest$ac_exeext
21986 if { (eval echo "$as_me:21986: \"$ac_link\"") >&5
21987   (eval $ac_link) 2>&5
21988   ac_status=$?
21989   echo "$as_me:21989: \$? = $ac_status" >&5
21990   (exit $ac_status); } &&
21991          { ac_try='test -s conftest$ac_exeext'
21992   { (eval echo "$as_me:21992: \"$ac_try\"") >&5
21993   (eval $ac_try) 2>&5
21994   ac_status=$?
21995   echo "$as_me:21995: \$? = $ac_status" >&5
21996   (exit $ac_status); }; }; then
21997   cf_cv_array_va_list=yes
21998 else
21999   echo "$as_me: failed program was:" >&5
22000 cat conftest.$ac_ext >&5
22001 cf_cv_array_va_list=no
22002 fi
22003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22004 fi
22005 echo "$as_me:22005: result: $cf_cv_array_va_list" >&5
22006 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22007                 test "$cf_cv_array_va_list" = yes &&
22008 cat >>confdefs.h <<\EOF
22009 #define ARRAY_VA_LIST 1
22010 EOF
22011
22012         fi
22013         ;;
22014 esac
22015
22016 echo "$as_me:22016: checking for pid_t" >&5
22017 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22018 if test "${ac_cv_type_pid_t+set}" = set; then
22019   echo $ECHO_N "(cached) $ECHO_C" >&6
22020 else
22021   cat >conftest.$ac_ext <<_ACEOF
22022 #line 22022 "configure"
22023 #include "confdefs.h"
22024 $ac_includes_default
22025 int
22026 main (void)
22027 {
22028 if ((pid_t *) 0)
22029   return 0;
22030 if (sizeof (pid_t))
22031   return 0;
22032   ;
22033   return 0;
22034 }
22035 _ACEOF
22036 rm -f conftest.$ac_objext
22037 if { (eval echo "$as_me:22037: \"$ac_compile\"") >&5
22038   (eval $ac_compile) 2>&5
22039   ac_status=$?
22040   echo "$as_me:22040: \$? = $ac_status" >&5
22041   (exit $ac_status); } &&
22042          { ac_try='test -s conftest.$ac_objext'
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_type_pid_t=yes
22049 else
22050   echo "$as_me: failed program was:" >&5
22051 cat conftest.$ac_ext >&5
22052 ac_cv_type_pid_t=no
22053 fi
22054 rm -f conftest.$ac_objext conftest.$ac_ext
22055 fi
22056 echo "$as_me:22056: result: $ac_cv_type_pid_t" >&5
22057 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22058 if test $ac_cv_type_pid_t = yes; then
22059   :
22060 else
22061
22062 cat >>confdefs.h <<EOF
22063 #define pid_t int
22064 EOF
22065
22066 fi
22067
22068 for ac_header in unistd.h vfork.h
22069 do
22070 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22071 echo "$as_me:22071: checking for $ac_header" >&5
22072 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22073 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22074   echo $ECHO_N "(cached) $ECHO_C" >&6
22075 else
22076   cat >conftest.$ac_ext <<_ACEOF
22077 #line 22077 "configure"
22078 #include "confdefs.h"
22079 #include <$ac_header>
22080 _ACEOF
22081 if { (eval echo "$as_me:22081: \"$ac_cpp conftest.$ac_ext\"") >&5
22082   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22083   ac_status=$?
22084   egrep -v '^ *\+' conftest.er1 >conftest.err
22085   rm -f conftest.er1
22086   cat conftest.err >&5
22087   echo "$as_me:22087: \$? = $ac_status" >&5
22088   (exit $ac_status); } >/dev/null; then
22089   if test -s conftest.err; then
22090     ac_cpp_err=$ac_c_preproc_warn_flag
22091   else
22092     ac_cpp_err=
22093   fi
22094 else
22095   ac_cpp_err=yes
22096 fi
22097 if test -z "$ac_cpp_err"; then
22098   eval "$as_ac_Header=yes"
22099 else
22100   echo "$as_me: failed program was:" >&5
22101   cat conftest.$ac_ext >&5
22102   eval "$as_ac_Header=no"
22103 fi
22104 rm -f conftest.err conftest.$ac_ext
22105 fi
22106 echo "$as_me:22106: result: `eval echo '${'$as_ac_Header'}'`" >&5
22107 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22108 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22109   cat >>confdefs.h <<EOF
22110 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22111 EOF
22112
22113 fi
22114 done
22115
22116 for ac_func in fork vfork
22117 do
22118 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22119 echo "$as_me:22119: checking for $ac_func" >&5
22120 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22121 if eval "test \"\${$as_ac_var+set}\" = set"; then
22122   echo $ECHO_N "(cached) $ECHO_C" >&6
22123 else
22124   cat >conftest.$ac_ext <<_ACEOF
22125 #line 22125 "configure"
22126 #include "confdefs.h"
22127 #define $ac_func autoconf_temporary
22128 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22129 #undef $ac_func
22130
22131 #ifdef __cplusplus
22132 extern "C"
22133 #endif
22134
22135 /* We use char because int might match the return type of a gcc2
22136    builtin and then its argument prototype would still apply.  */
22137 char $ac_func (void);
22138
22139 int
22140 main (void)
22141 {
22142
22143 /* The GNU C library defines stubs for functions which it implements
22144     to always fail with ENOSYS.  Some functions are actually named
22145     something starting with __ and the normal name is an alias.  */
22146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22147 #error found stub for $ac_func
22148 #endif
22149
22150         return $ac_func ();
22151   ;
22152   return 0;
22153 }
22154 _ACEOF
22155 rm -f conftest.$ac_objext conftest$ac_exeext
22156 if { (eval echo "$as_me:22156: \"$ac_link\"") >&5
22157   (eval $ac_link) 2>&5
22158   ac_status=$?
22159   echo "$as_me:22159: \$? = $ac_status" >&5
22160   (exit $ac_status); } &&
22161          { ac_try='test -s conftest$ac_exeext'
22162   { (eval echo "$as_me:22162: \"$ac_try\"") >&5
22163   (eval $ac_try) 2>&5
22164   ac_status=$?
22165   echo "$as_me:22165: \$? = $ac_status" >&5
22166   (exit $ac_status); }; }; then
22167   eval "$as_ac_var=yes"
22168 else
22169   echo "$as_me: failed program was:" >&5
22170 cat conftest.$ac_ext >&5
22171 eval "$as_ac_var=no"
22172 fi
22173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22174 fi
22175 echo "$as_me:22175: result: `eval echo '${'$as_ac_var'}'`" >&5
22176 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22177 if test `eval echo '${'$as_ac_var'}'` = yes; then
22178   cat >>confdefs.h <<EOF
22179 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22180 EOF
22181
22182 fi
22183 done
22184
22185 ac_cv_func_fork_works=$ac_cv_func_fork
22186 if test "x$ac_cv_func_fork" = xyes; then
22187   echo "$as_me:22187: checking for working fork" >&5
22188 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22189 if test "${ac_cv_func_fork_works+set}" = set; then
22190   echo $ECHO_N "(cached) $ECHO_C" >&6
22191 else
22192   if test "$cross_compiling" = yes; then
22193   ac_cv_func_fork_works=cross
22194 else
22195   cat >conftest.$ac_ext <<_ACEOF
22196 /* By Rüdiger Kuhlmann. */
22197       #include <sys/types.h>
22198       #if HAVE_UNISTD_H
22199       # include <unistd.h>
22200       #endif
22201       /* Some systems only have a dummy stub for fork() */
22202       int main (void)
22203       {
22204         if (fork() < 0)
22205           $ac_main_return (1);
22206         $ac_main_return (0);
22207       }
22208 _ACEOF
22209 rm -f conftest$ac_exeext
22210 if { (eval echo "$as_me:22210: \"$ac_link\"") >&5
22211   (eval $ac_link) 2>&5
22212   ac_status=$?
22213   echo "$as_me:22213: \$? = $ac_status" >&5
22214   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22215   { (eval echo "$as_me:22215: \"$ac_try\"") >&5
22216   (eval $ac_try) 2>&5
22217   ac_status=$?
22218   echo "$as_me:22218: \$? = $ac_status" >&5
22219   (exit $ac_status); }; }; then
22220   ac_cv_func_fork_works=yes
22221 else
22222   echo "$as_me: program exited with status $ac_status" >&5
22223 echo "$as_me: failed program was:" >&5
22224 cat conftest.$ac_ext >&5
22225 ac_cv_func_fork_works=no
22226 fi
22227 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22228 fi
22229 fi
22230 echo "$as_me:22230: result: $ac_cv_func_fork_works" >&5
22231 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22232
22233 fi
22234 if test "x$ac_cv_func_fork_works" = xcross; then
22235   case $host in
22236     *-*-amigaos* | *-*-msdosdjgpp*)
22237       # Override, as these systems have only a dummy fork() stub
22238       ac_cv_func_fork_works=no
22239       ;;
22240     *)
22241       ac_cv_func_fork_works=yes
22242       ;;
22243   esac
22244   { echo "$as_me:22244: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22245 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22246 fi
22247 ac_cv_func_vfork_works=$ac_cv_func_vfork
22248 if test "x$ac_cv_func_vfork" = xyes; then
22249   echo "$as_me:22249: checking for working vfork" >&5
22250 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22251 if test "${ac_cv_func_vfork_works+set}" = set; then
22252   echo $ECHO_N "(cached) $ECHO_C" >&6
22253 else
22254   if test "$cross_compiling" = yes; then
22255   ac_cv_func_vfork_works=cross
22256 else
22257   cat >conftest.$ac_ext <<_ACEOF
22258 #line 22258 "configure"
22259 #include "confdefs.h"
22260 /* Thanks to Paul Eggert for this test.  */
22261 #include <stdio.h>
22262 #include <sys/types.h>
22263 #include <sys/stat.h>
22264 #if HAVE_UNISTD_H
22265 # include <unistd.h>
22266 #endif
22267 #if HAVE_VFORK_H
22268 # include <vfork.h>
22269 #endif
22270 /* On some sparc systems, changes by the child to local and incoming
22271    argument registers are propagated back to the parent.  The compiler
22272    is told about this with #include <vfork.h>, but some compilers
22273    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22274    static variable whose address is put into a register that is
22275    clobbered by the vfork.  */
22276 static
22277 #ifdef __cplusplus
22278 sparc_address_test (int arg)
22279 # else
22280 sparc_address_test (arg) int arg;
22281 #endif
22282 {
22283   static pid_t child;
22284   if (!child) {
22285     child = vfork ();
22286     if (child < 0) {
22287       perror ("vfork");
22288       _exit(2);
22289     }
22290     if (!child) {
22291       arg = getpid();
22292       write(-1, "", 0);
22293       _exit (arg);
22294     }
22295   }
22296 }
22297
22298 int
22299 main (void)
22300 {
22301   pid_t parent = getpid ();
22302   pid_t child;
22303
22304   sparc_address_test ();
22305
22306   child = vfork ();
22307
22308   if (child == 0) {
22309     /* Here is another test for sparc vfork register problems.  This
22310        test uses lots of local variables, at least as many local
22311        variables as main has allocated so far including compiler
22312        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22313        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22314        reuse the register of parent for one of the local variables,
22315        since it will think that parent can't possibly be used any more
22316        in this routine.  Assigning to the local variable will thus
22317        munge parent in the parent process.  */
22318     pid_t
22319       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22320       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22321     /* Convince the compiler that p..p7 are live; otherwise, it might
22322        use the same hardware register for all 8 local variables.  */
22323     if (p != p1 || p != p2 || p != p3 || p != p4
22324         || p != p5 || p != p6 || p != p7)
22325       _exit(1);
22326
22327     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22328        from child file descriptors.  If the child closes a descriptor
22329        before it execs or exits, this munges the parent's descriptor
22330        as well.  Test for this by closing stdout in the child.  */
22331     _exit(close(fileno(stdout)) != 0);
22332   } else {
22333     int status;
22334     struct stat st;
22335
22336     while (wait(&status) != child)
22337       ;
22338     $ac_main_return(
22339          /* Was there some problem with vforking?  */
22340          child < 0
22341
22342          /* Did the child fail?  (This shouldn't happen.)  */
22343          || status
22344
22345          /* Did the vfork/compiler bug occur?  */
22346          || parent != getpid()
22347
22348          /* Did the file descriptor bug occur?  */
22349          || fstat(fileno(stdout), &st) != 0
22350          );
22351   }
22352 }
22353 _ACEOF
22354 rm -f conftest$ac_exeext
22355 if { (eval echo "$as_me:22355: \"$ac_link\"") >&5
22356   (eval $ac_link) 2>&5
22357   ac_status=$?
22358   echo "$as_me:22358: \$? = $ac_status" >&5
22359   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22360   { (eval echo "$as_me:22360: \"$ac_try\"") >&5
22361   (eval $ac_try) 2>&5
22362   ac_status=$?
22363   echo "$as_me:22363: \$? = $ac_status" >&5
22364   (exit $ac_status); }; }; then
22365   ac_cv_func_vfork_works=yes
22366 else
22367   echo "$as_me: program exited with status $ac_status" >&5
22368 echo "$as_me: failed program was:" >&5
22369 cat conftest.$ac_ext >&5
22370 ac_cv_func_vfork_works=no
22371 fi
22372 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22373 fi
22374 fi
22375 echo "$as_me:22375: result: $ac_cv_func_vfork_works" >&5
22376 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22377
22378 fi;
22379 if test "x$ac_cv_func_fork_works" = xcross; then
22380   ac_cv_func_vfork_works=ac_cv_func_vfork
22381   { echo "$as_me:22381: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22382 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22383 fi
22384
22385 if test "x$ac_cv_func_vfork_works" = xyes; then
22386
22387 cat >>confdefs.h <<\EOF
22388 #define HAVE_WORKING_VFORK 1
22389 EOF
22390
22391 else
22392
22393 cat >>confdefs.h <<\EOF
22394 #define vfork fork
22395 EOF
22396
22397 fi
22398 if test "x$ac_cv_func_fork_works" = xyes; then
22399
22400 cat >>confdefs.h <<\EOF
22401 #define HAVE_WORKING_FORK 1
22402 EOF
22403
22404 fi
22405
22406 echo "$as_me:22406: checking if fopen accepts explicit binary mode" >&5
22407 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22408 if test "${cf_cv_fopen_bin_r+set}" = set; then
22409   echo $ECHO_N "(cached) $ECHO_C" >&6
22410 else
22411
22412         if test "$cross_compiling" = yes; then
22413   cf_cv_fopen_bin_r=unknown
22414 else
22415   cat >conftest.$ac_ext <<_ACEOF
22416 #line 22416 "configure"
22417 #include "confdefs.h"
22418
22419 #include <stdio.h>
22420 int main(void) {
22421         FILE *fp = fopen("conftest.tmp", "wb");
22422         int rc = 0;
22423         if (fp != 0) {
22424                 int p, q;
22425                 for (p = 0; p < 256; ++p) {
22426                         fputc(p, fp);
22427                 }
22428                 fclose(fp);
22429                 fp = fopen("conftest.tmp", "rb");
22430                 if (fp != 0) {
22431                         for (p = 0; p < 256; ++p) {
22432                                 q = fgetc(fp);
22433                                 if (q != p) {
22434                                         rc = 1;
22435                                         break;
22436                                 }
22437                         }
22438                 } else {
22439                         rc = 1;
22440                 }
22441         } else {
22442                 rc = 1;
22443         }
22444         ${cf_cv_main_return:-return} (rc);
22445 }
22446
22447 _ACEOF
22448 rm -f conftest$ac_exeext
22449 if { (eval echo "$as_me:22449: \"$ac_link\"") >&5
22450   (eval $ac_link) 2>&5
22451   ac_status=$?
22452   echo "$as_me:22452: \$? = $ac_status" >&5
22453   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22454   { (eval echo "$as_me:22454: \"$ac_try\"") >&5
22455   (eval $ac_try) 2>&5
22456   ac_status=$?
22457   echo "$as_me:22457: \$? = $ac_status" >&5
22458   (exit $ac_status); }; }; then
22459   cf_cv_fopen_bin_r=yes
22460 else
22461   echo "$as_me: program exited with status $ac_status" >&5
22462 echo "$as_me: failed program was:" >&5
22463 cat conftest.$ac_ext >&5
22464 cf_cv_fopen_bin_r=no
22465 fi
22466 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22467 fi
22468
22469 fi
22470 echo "$as_me:22470: result: $cf_cv_fopen_bin_r" >&5
22471 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22472 test "x$cf_cv_fopen_bin_r" != xno &&
22473 cat >>confdefs.h <<\EOF
22474 #define USE_FOPEN_BIN_R 1
22475 EOF
22476
22477 # special check for test/ditto.c
22478
22479 echo "$as_me:22479: checking for openpty in -lutil" >&5
22480 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22481 if test "${ac_cv_lib_util_openpty+set}" = set; then
22482   echo $ECHO_N "(cached) $ECHO_C" >&6
22483 else
22484   ac_check_lib_save_LIBS=$LIBS
22485 LIBS="-lutil  $LIBS"
22486 cat >conftest.$ac_ext <<_ACEOF
22487 #line 22487 "configure"
22488 #include "confdefs.h"
22489
22490 /* Override any gcc2 internal prototype to avoid an error.  */
22491 #ifdef __cplusplus
22492 extern "C"
22493 #endif
22494 /* We use char because int might match the return type of a gcc2
22495    builtin and then its argument prototype would still apply.  */
22496 char openpty ();
22497 int
22498 main (void)
22499 {
22500 openpty ();
22501   ;
22502   return 0;
22503 }
22504 _ACEOF
22505 rm -f conftest.$ac_objext conftest$ac_exeext
22506 if { (eval echo "$as_me:22506: \"$ac_link\"") >&5
22507   (eval $ac_link) 2>&5
22508   ac_status=$?
22509   echo "$as_me:22509: \$? = $ac_status" >&5
22510   (exit $ac_status); } &&
22511          { ac_try='test -s conftest$ac_exeext'
22512   { (eval echo "$as_me:22512: \"$ac_try\"") >&5
22513   (eval $ac_try) 2>&5
22514   ac_status=$?
22515   echo "$as_me:22515: \$? = $ac_status" >&5
22516   (exit $ac_status); }; }; then
22517   ac_cv_lib_util_openpty=yes
22518 else
22519   echo "$as_me: failed program was:" >&5
22520 cat conftest.$ac_ext >&5
22521 ac_cv_lib_util_openpty=no
22522 fi
22523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22524 LIBS=$ac_check_lib_save_LIBS
22525 fi
22526 echo "$as_me:22526: result: $ac_cv_lib_util_openpty" >&5
22527 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22528 if test $ac_cv_lib_util_openpty = yes; then
22529   cf_cv_lib_util=yes
22530 else
22531   cf_cv_lib_util=no
22532 fi
22533
22534 echo "$as_me:22534: checking for openpty header" >&5
22535 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22536 if test "${cf_cv_func_openpty+set}" = set; then
22537   echo $ECHO_N "(cached) $ECHO_C" >&6
22538 else
22539
22540         cf_save_LIBS="$LIBS"
22541         test $cf_cv_lib_util = yes && {
22542 cf_add_libs="$LIBS"
22543 # reverse order
22544 cf_add_0lib=
22545 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22546 # filter duplicates
22547 for cf_add_1lib in $cf_add_0lib; do
22548         for cf_add_2lib in $cf_add_libs; do
22549                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22550                         cf_add_1lib=
22551                         break
22552                 fi
22553         done
22554         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22555 done
22556 LIBS="$cf_add_libs"
22557  }
22558         for cf_header in pty.h libutil.h util.h
22559         do
22560         cat >conftest.$ac_ext <<_ACEOF
22561 #line 22561 "configure"
22562 #include "confdefs.h"
22563
22564 #include <$cf_header>
22565
22566 int
22567 main (void)
22568 {
22569
22570         int x = openpty((int *)0, (int *)0, (char *)0,
22571                                    (struct termios *)0, (struct winsize *)0);
22572
22573   ;
22574   return 0;
22575 }
22576 _ACEOF
22577 rm -f conftest.$ac_objext conftest$ac_exeext
22578 if { (eval echo "$as_me:22578: \"$ac_link\"") >&5
22579   (eval $ac_link) 2>&5
22580   ac_status=$?
22581   echo "$as_me:22581: \$? = $ac_status" >&5
22582   (exit $ac_status); } &&
22583          { ac_try='test -s conftest$ac_exeext'
22584   { (eval echo "$as_me:22584: \"$ac_try\"") >&5
22585   (eval $ac_try) 2>&5
22586   ac_status=$?
22587   echo "$as_me:22587: \$? = $ac_status" >&5
22588   (exit $ac_status); }; }; then
22589
22590                 cf_cv_func_openpty=$cf_header
22591                 break
22592
22593 else
22594   echo "$as_me: failed program was:" >&5
22595 cat conftest.$ac_ext >&5
22596
22597                 cf_cv_func_openpty=no
22598
22599 fi
22600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22601         done
22602         LIBS="$cf_save_LIBS"
22603
22604 fi
22605 echo "$as_me:22605: result: $cf_cv_func_openpty" >&5
22606 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22607
22608 if test "$cf_cv_func_openpty" != no ; then
22609
22610 cat >>confdefs.h <<EOF
22611 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22612 EOF
22613
22614 cat >>confdefs.h <<\EOF
22615 #define USE_XTERM_PTY 1
22616 EOF
22617
22618         if test "x$cf_cv_lib_util" = xyes ; then
22619
22620 cf_add_libs="$TEST_LIBS"
22621 # reverse order
22622 cf_add_0lib=
22623 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22624 # filter duplicates
22625 for cf_add_1lib in $cf_add_0lib; do
22626         for cf_add_2lib in $cf_add_libs; do
22627                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22628                         cf_add_1lib=
22629                         break
22630                 fi
22631         done
22632         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22633 done
22634 TEST_LIBS="$cf_add_libs"
22635
22636         fi
22637 fi
22638
22639 if test "$with_hashed_db" != no ; then
22640
22641 cat >>confdefs.h <<\EOF
22642 #define USE_HASHED_DB 1
22643 EOF
22644
22645 case $with_hashed_db in
22646 (yes|*able*)
22647         ;;
22648 (*)
22649         if test -d "$with_hashed_db" ; then
22650
22651 if test -n "$with_hashed_db/include" ; then
22652   for cf_add_incdir in $with_hashed_db/include
22653   do
22654         while test $cf_add_incdir != /usr/include
22655         do
22656           if test -d $cf_add_incdir
22657           then
22658                 cf_have_incdir=no
22659                 if test -n "$CFLAGS$CPPFLAGS" ; then
22660                   # a loop is needed to ensure we can add subdirs of existing dirs
22661                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22662                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22663                           cf_have_incdir=yes; break
22664                         fi
22665                   done
22666                 fi
22667
22668                 if test "$cf_have_incdir" = no ; then
22669                   if test "$cf_add_incdir" = /usr/local/include ; then
22670                         if test "$GCC" = yes
22671                         then
22672                           cf_save_CPPFLAGS=$CPPFLAGS
22673
22674         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22675         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22676
22677                           cat >conftest.$ac_ext <<_ACEOF
22678 #line 22678 "configure"
22679 #include "confdefs.h"
22680 #include <stdio.h>
22681 int
22682 main (void)
22683 {
22684 printf("Hello")
22685   ;
22686   return 0;
22687 }
22688 _ACEOF
22689 rm -f conftest.$ac_objext
22690 if { (eval echo "$as_me:22690: \"$ac_compile\"") >&5
22691   (eval $ac_compile) 2>&5
22692   ac_status=$?
22693   echo "$as_me:22693: \$? = $ac_status" >&5
22694   (exit $ac_status); } &&
22695          { ac_try='test -s conftest.$ac_objext'
22696   { (eval echo "$as_me:22696: \"$ac_try\"") >&5
22697   (eval $ac_try) 2>&5
22698   ac_status=$?
22699   echo "$as_me:22699: \$? = $ac_status" >&5
22700   (exit $ac_status); }; }; then
22701   :
22702 else
22703   echo "$as_me: failed program was:" >&5
22704 cat conftest.$ac_ext >&5
22705 cf_have_incdir=yes
22706 fi
22707 rm -f conftest.$ac_objext conftest.$ac_ext
22708                           CPPFLAGS=$cf_save_CPPFLAGS
22709                         fi
22710                   fi
22711                 fi
22712
22713                 if test "$cf_have_incdir" = no ; then
22714                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22715
22716 echo "${as_me:-configure}:22716: testing adding $cf_add_incdir to include-path ..." 1>&5
22717
22718                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22719
22720                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22721                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22722                   cf_add_incdir="$cf_top_incdir"
22723                 else
22724                   break
22725                 fi
22726           else
22727                 break
22728           fi
22729         done
22730   done
22731 fi
22732
22733 if test -n "$with_hashed_db/lib" ; then
22734         for cf_add_libdir in $with_hashed_db/lib
22735         do
22736                 if test $cf_add_libdir = /usr/lib ; then
22737                         :
22738                 elif test -d $cf_add_libdir
22739                 then
22740                         cf_have_libdir=no
22741                         if test -n "$LDFLAGS$LIBS" ; then
22742                                 # a loop is needed to ensure we can add subdirs of existing dirs
22743                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22744                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22745                                                 cf_have_libdir=yes; break
22746                                         fi
22747                                 done
22748                         fi
22749                         if test "$cf_have_libdir" = no ; then
22750                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22751
22752 echo "${as_me:-configure}:22752: testing adding $cf_add_libdir to library-path ..." 1>&5
22753
22754                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22755                         fi
22756                 fi
22757         done
22758 fi
22759
22760         else
22761                 case "$with_hashed_db" in
22762                 (./*|../*|/*)
22763                         { echo "$as_me:22763: WARNING: no such directory $with_hashed_db" >&5
22764 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22765                         ;;
22766                 (*)
22767
22768 cf_search=
22769
22770 test "x$prefix" != "xNONE" && \
22771 test -d "$prefix" && \
22772  {
22773         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22774         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22775         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22776         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22777         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22778         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22779 }
22780
22781 for cf_subdir_prefix in \
22782         /usr \
22783         /usr/local \
22784         /usr/pkg \
22785         /opt \
22786         /opt/local \
22787         $HOME
22788 do
22789
22790 test "x$cf_subdir_prefix" != "x$prefix" && \
22791 test -d "$cf_subdir_prefix" && \
22792 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22793         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22794         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22795         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22796         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22797         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22798         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"
22799 }
22800
22801 done
22802
22803         for cf_item in $cf_search
22804         do
22805                 case $cf_item in
22806                 (*/$with_hashed_db)
22807
22808 if test -n "$cf_item" ; then
22809   for cf_add_incdir in $cf_item
22810   do
22811         while test $cf_add_incdir != /usr/include
22812         do
22813           if test -d $cf_add_incdir
22814           then
22815                 cf_have_incdir=no
22816                 if test -n "$CFLAGS$CPPFLAGS" ; then
22817                   # a loop is needed to ensure we can add subdirs of existing dirs
22818                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22819                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22820                           cf_have_incdir=yes; break
22821                         fi
22822                   done
22823                 fi
22824
22825                 if test "$cf_have_incdir" = no ; then
22826                   if test "$cf_add_incdir" = /usr/local/include ; then
22827                         if test "$GCC" = yes
22828                         then
22829                           cf_save_CPPFLAGS=$CPPFLAGS
22830
22831         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22832         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22833
22834                           cat >conftest.$ac_ext <<_ACEOF
22835 #line 22835 "configure"
22836 #include "confdefs.h"
22837 #include <stdio.h>
22838 int
22839 main (void)
22840 {
22841 printf("Hello")
22842   ;
22843   return 0;
22844 }
22845 _ACEOF
22846 rm -f conftest.$ac_objext
22847 if { (eval echo "$as_me:22847: \"$ac_compile\"") >&5
22848   (eval $ac_compile) 2>&5
22849   ac_status=$?
22850   echo "$as_me:22850: \$? = $ac_status" >&5
22851   (exit $ac_status); } &&
22852          { ac_try='test -s conftest.$ac_objext'
22853   { (eval echo "$as_me:22853: \"$ac_try\"") >&5
22854   (eval $ac_try) 2>&5
22855   ac_status=$?
22856   echo "$as_me:22856: \$? = $ac_status" >&5
22857   (exit $ac_status); }; }; then
22858   :
22859 else
22860   echo "$as_me: failed program was:" >&5
22861 cat conftest.$ac_ext >&5
22862 cf_have_incdir=yes
22863 fi
22864 rm -f conftest.$ac_objext conftest.$ac_ext
22865                           CPPFLAGS=$cf_save_CPPFLAGS
22866                         fi
22867                   fi
22868                 fi
22869
22870                 if test "$cf_have_incdir" = no ; then
22871                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22872
22873 echo "${as_me:-configure}:22873: testing adding $cf_add_incdir to include-path ..." 1>&5
22874
22875                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22876
22877                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22878                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22879                   cf_add_incdir="$cf_top_incdir"
22880                 else
22881                   break
22882                 fi
22883           else
22884                 break
22885           fi
22886         done
22887   done
22888 fi
22889
22890                         ;;
22891                 esac
22892         done
22893
22894 cf_search=
22895
22896 test "x$prefix" != "xNONE" && \
22897 test -d "$prefix" && \
22898  {
22899         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22900         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22901         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22902         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22903         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22904         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22905 }
22906
22907 for cf_subdir_prefix in \
22908         /usr \
22909         /usr/local \
22910         /usr/pkg \
22911         /opt \
22912         /opt/local \
22913         $HOME
22914 do
22915
22916 test "x$cf_subdir_prefix" != "x$prefix" && \
22917 test -d "$cf_subdir_prefix" && \
22918 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22919         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22920         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22921         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22922         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22923         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22924         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"
22925 }
22926
22927 done
22928
22929         for cf_item in $cf_search
22930         do
22931                 case $cf_item in
22932                 (*/$with_hashed_db)
22933
22934 if test -n "$cf_item" ; then
22935         for cf_add_libdir in $cf_item
22936         do
22937                 if test $cf_add_libdir = /usr/lib ; then
22938                         :
22939                 elif test -d $cf_add_libdir
22940                 then
22941                         cf_have_libdir=no
22942                         if test -n "$LDFLAGS$LIBS" ; then
22943                                 # a loop is needed to ensure we can add subdirs of existing dirs
22944                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22945                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22946                                                 cf_have_libdir=yes; break
22947                                         fi
22948                                 done
22949                         fi
22950                         if test "$cf_have_libdir" = no ; then
22951                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22952
22953 echo "${as_me:-configure}:22953: testing adding $cf_add_libdir to library-path ..." 1>&5
22954
22955                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22956                         fi
22957                 fi
22958         done
22959 fi
22960
22961                         ;;
22962                 esac
22963         done
22964
22965                         ;;
22966                 esac
22967         fi
22968 esac
22969
22970 echo "$as_me:22970: checking for db.h" >&5
22971 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22972 if test "${ac_cv_header_db_h+set}" = set; then
22973   echo $ECHO_N "(cached) $ECHO_C" >&6
22974 else
22975   cat >conftest.$ac_ext <<_ACEOF
22976 #line 22976 "configure"
22977 #include "confdefs.h"
22978 #include <db.h>
22979 _ACEOF
22980 if { (eval echo "$as_me:22980: \"$ac_cpp conftest.$ac_ext\"") >&5
22981   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22982   ac_status=$?
22983   egrep -v '^ *\+' conftest.er1 >conftest.err
22984   rm -f conftest.er1
22985   cat conftest.err >&5
22986   echo "$as_me:22986: \$? = $ac_status" >&5
22987   (exit $ac_status); } >/dev/null; then
22988   if test -s conftest.err; then
22989     ac_cpp_err=$ac_c_preproc_warn_flag
22990   else
22991     ac_cpp_err=
22992   fi
22993 else
22994   ac_cpp_err=yes
22995 fi
22996 if test -z "$ac_cpp_err"; then
22997   ac_cv_header_db_h=yes
22998 else
22999   echo "$as_me: failed program was:" >&5
23000   cat conftest.$ac_ext >&5
23001   ac_cv_header_db_h=no
23002 fi
23003 rm -f conftest.err conftest.$ac_ext
23004 fi
23005 echo "$as_me:23005: result: $ac_cv_header_db_h" >&5
23006 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23007 if test $ac_cv_header_db_h = yes; then
23008
23009 echo "$as_me:23009: checking for version of db" >&5
23010 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23011 if test "${cf_cv_hashed_db_version+set}" = set; then
23012   echo $ECHO_N "(cached) $ECHO_C" >&6
23013 else
23014
23015 cf_cv_hashed_db_version=unknown
23016
23017 for cf_db_version in 1 2 3 4 5 6
23018 do
23019
23020 echo "${as_me:-configure}:23020: testing checking for db version $cf_db_version ..." 1>&5
23021
23022         cat >conftest.$ac_ext <<_ACEOF
23023 #line 23023 "configure"
23024 #include "confdefs.h"
23025
23026 $ac_includes_default
23027 #include <db.h>
23028
23029 #ifdef DB_VERSION_MAJOR
23030         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23031 #if $cf_db_version == DB_VERSION_MAJOR
23032         /* ok */
23033 #else
23034         make an error
23035 #endif
23036 #else
23037 #if $cf_db_version == 1
23038         /* ok: assuming this is DB 1.8.5 */
23039 #else
23040         make an error
23041 #endif
23042 #endif
23043
23044 int
23045 main (void)
23046 {
23047 DBT *foo = 0
23048   ;
23049   return 0;
23050 }
23051 _ACEOF
23052 rm -f conftest.$ac_objext
23053 if { (eval echo "$as_me:23053: \"$ac_compile\"") >&5
23054   (eval $ac_compile) 2>&5
23055   ac_status=$?
23056   echo "$as_me:23056: \$? = $ac_status" >&5
23057   (exit $ac_status); } &&
23058          { ac_try='test -s conftest.$ac_objext'
23059   { (eval echo "$as_me:23059: \"$ac_try\"") >&5
23060   (eval $ac_try) 2>&5
23061   ac_status=$?
23062   echo "$as_me:23062: \$? = $ac_status" >&5
23063   (exit $ac_status); }; }; then
23064
23065         cf_cv_hashed_db_version=$cf_db_version
23066         break
23067
23068 else
23069   echo "$as_me: failed program was:" >&5
23070 cat conftest.$ac_ext >&5
23071 fi
23072 rm -f conftest.$ac_objext conftest.$ac_ext
23073 done
23074
23075 fi
23076 echo "$as_me:23076: result: $cf_cv_hashed_db_version" >&5
23077 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23078
23079 if test "$cf_cv_hashed_db_version" = unknown ; then
23080         { { echo "$as_me:23080: error: Cannot determine version of db" >&5
23081 echo "$as_me: error: Cannot determine version of db" >&2;}
23082    { (exit 1); exit 1; }; }
23083 else
23084
23085 echo "$as_me:23085: checking for db libraries" >&5
23086 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23087 if test "${cf_cv_hashed_db_libs+set}" = set; then
23088   echo $ECHO_N "(cached) $ECHO_C" >&6
23089 else
23090
23091 cf_cv_hashed_db_libs=unknown
23092 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23093 do
23094         cf_save_libs="$LIBS"
23095         if test -n "$cf_db_libs"; then
23096
23097 cf_add_libs="$LIBS"
23098 # reverse order
23099 cf_add_0lib=
23100 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23101 # filter duplicates
23102 for cf_add_1lib in $cf_add_0lib; do
23103         for cf_add_2lib in $cf_add_libs; do
23104                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23105                         cf_add_1lib=
23106                         break
23107                 fi
23108         done
23109         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23110 done
23111 LIBS="$cf_add_libs"
23112
23113         fi
23114
23115 echo "${as_me:-configure}:23115: testing checking for library "$cf_db_libs" ..." 1>&5
23116
23117         cat >conftest.$ac_ext <<_ACEOF
23118 #line 23118 "configure"
23119 #include "confdefs.h"
23120
23121 $ac_includes_default
23122 #include <db.h>
23123
23124 int
23125 main (void)
23126 {
23127
23128         char *path = "/tmp/foo";
23129 #ifdef DB_VERSION_MAJOR
23130 #if DB_VERSION_MAJOR >= 4
23131         DB *result = 0;
23132         db_create(&result, NULL, 0);
23133         result->open(result,
23134                 NULL,
23135                 path,
23136                 path,
23137                 DB_HASH,
23138                 DB_CREATE,
23139                 0644);
23140 #elif DB_VERSION_MAJOR >= 3
23141         DB *result = 0;
23142         db_create(&result, NULL, 0);
23143         result->open(result,
23144                 path,
23145                 path,
23146                 DB_HASH,
23147                 DB_CREATE,
23148                 0644);
23149 #elif DB_VERSION_MAJOR >= 2
23150         DB *result = 0;
23151         db_open(path,
23152                 DB_HASH,
23153                 DB_CREATE,
23154                 0644,
23155                 (DB_ENV *) 0,
23156                 (DB_INFO *) 0,
23157                 &result);
23158 #endif /* DB_VERSION_MAJOR */
23159 #else
23160         DB *result = dbopen(path,
23161                      2,
23162                      0644,
23163                      DB_HASH,
23164                      0);
23165 #endif
23166         ${cf_cv_main_return:-return}(result != 0)
23167
23168   ;
23169   return 0;
23170 }
23171 _ACEOF
23172 rm -f conftest.$ac_objext conftest$ac_exeext
23173 if { (eval echo "$as_me:23173: \"$ac_link\"") >&5
23174   (eval $ac_link) 2>&5
23175   ac_status=$?
23176   echo "$as_me:23176: \$? = $ac_status" >&5
23177   (exit $ac_status); } &&
23178          { ac_try='test -s conftest$ac_exeext'
23179   { (eval echo "$as_me:23179: \"$ac_try\"") >&5
23180   (eval $ac_try) 2>&5
23181   ac_status=$?
23182   echo "$as_me:23182: \$? = $ac_status" >&5
23183   (exit $ac_status); }; }; then
23184
23185         if test -n "$cf_db_libs" ; then
23186                 cf_cv_hashed_db_libs=$cf_db_libs
23187         else
23188                 cf_cv_hashed_db_libs=default
23189         fi
23190         LIBS="$cf_save_libs"
23191         break
23192
23193 else
23194   echo "$as_me: failed program was:" >&5
23195 cat conftest.$ac_ext >&5
23196 fi
23197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23198         LIBS="$cf_save_libs"
23199 done
23200
23201 fi
23202 echo "$as_me:23202: result: $cf_cv_hashed_db_libs" >&5
23203 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23204
23205         if test "$cf_cv_hashed_db_libs" = unknown ; then
23206                 { { echo "$as_me:23206: error: Cannot determine library for db" >&5
23207 echo "$as_me: error: Cannot determine library for db" >&2;}
23208    { (exit 1); exit 1; }; }
23209         elif test "$cf_cv_hashed_db_libs" != default ; then
23210
23211 cf_add_libs="$LIBS"
23212 # reverse order
23213 cf_add_0lib=
23214 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23215 # filter duplicates
23216 for cf_add_1lib in $cf_add_0lib; do
23217         for cf_add_2lib in $cf_add_libs; do
23218                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23219                         cf_add_1lib=
23220                         break
23221                 fi
23222         done
23223         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23224 done
23225 LIBS="$cf_add_libs"
23226
23227         fi
23228 fi
23229
23230 else
23231
23232         { { echo "$as_me:23232: error: Cannot find db.h" >&5
23233 echo "$as_me: error: Cannot find db.h" >&2;}
23234    { (exit 1); exit 1; }; }
23235
23236 fi
23237
23238 fi
23239
23240 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23241         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23242         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23243 fi
23244
23245 # Just in case, check if the C compiler has a bool type.
23246
23247 echo "$as_me:23247: checking if we should include stdbool.h" >&5
23248 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23249
23250 if test "${cf_cv_header_stdbool_h+set}" = set; then
23251   echo $ECHO_N "(cached) $ECHO_C" >&6
23252 else
23253
23254         cat >conftest.$ac_ext <<_ACEOF
23255 #line 23255 "configure"
23256 #include "confdefs.h"
23257
23258 int
23259 main (void)
23260 {
23261 bool foo = false
23262   ;
23263   return 0;
23264 }
23265 _ACEOF
23266 rm -f conftest.$ac_objext
23267 if { (eval echo "$as_me:23267: \"$ac_compile\"") >&5
23268   (eval $ac_compile) 2>&5
23269   ac_status=$?
23270   echo "$as_me:23270: \$? = $ac_status" >&5
23271   (exit $ac_status); } &&
23272          { ac_try='test -s conftest.$ac_objext'
23273   { (eval echo "$as_me:23273: \"$ac_try\"") >&5
23274   (eval $ac_try) 2>&5
23275   ac_status=$?
23276   echo "$as_me:23276: \$? = $ac_status" >&5
23277   (exit $ac_status); }; }; then
23278   cf_cv_header_stdbool_h=0
23279 else
23280   echo "$as_me: failed program was:" >&5
23281 cat conftest.$ac_ext >&5
23282 cat >conftest.$ac_ext <<_ACEOF
23283 #line 23283 "configure"
23284 #include "confdefs.h"
23285
23286 #ifndef __BEOS__
23287 #include <stdbool.h>
23288 #endif
23289
23290 int
23291 main (void)
23292 {
23293 bool foo = false
23294   ;
23295   return 0;
23296 }
23297 _ACEOF
23298 rm -f conftest.$ac_objext
23299 if { (eval echo "$as_me:23299: \"$ac_compile\"") >&5
23300   (eval $ac_compile) 2>&5
23301   ac_status=$?
23302   echo "$as_me:23302: \$? = $ac_status" >&5
23303   (exit $ac_status); } &&
23304          { ac_try='test -s conftest.$ac_objext'
23305   { (eval echo "$as_me:23305: \"$ac_try\"") >&5
23306   (eval $ac_try) 2>&5
23307   ac_status=$?
23308   echo "$as_me:23308: \$? = $ac_status" >&5
23309   (exit $ac_status); }; }; then
23310   cf_cv_header_stdbool_h=1
23311 else
23312   echo "$as_me: failed program was:" >&5
23313 cat conftest.$ac_ext >&5
23314 cf_cv_header_stdbool_h=0
23315 fi
23316 rm -f conftest.$ac_objext conftest.$ac_ext
23317 fi
23318 rm -f conftest.$ac_objext conftest.$ac_ext
23319 fi
23320
23321 if test "$cf_cv_header_stdbool_h" = 1
23322 then    echo "$as_me:23322: result: yes" >&5
23323 echo "${ECHO_T}yes" >&6
23324 else    echo "$as_me:23324: result: no" >&5
23325 echo "${ECHO_T}no" >&6
23326 fi
23327
23328 echo "$as_me:23328: checking for builtin bool type" >&5
23329 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23330
23331 if test "${cf_cv_cc_bool_type+set}" = set; then
23332   echo $ECHO_N "(cached) $ECHO_C" >&6
23333 else
23334
23335         cat >conftest.$ac_ext <<_ACEOF
23336 #line 23336 "configure"
23337 #include "confdefs.h"
23338
23339 #include <stdio.h>
23340 #include <sys/types.h>
23341
23342 int
23343 main (void)
23344 {
23345 bool x = false
23346   ;
23347   return 0;
23348 }
23349 _ACEOF
23350 rm -f conftest.$ac_objext
23351 if { (eval echo "$as_me:23351: \"$ac_compile\"") >&5
23352   (eval $ac_compile) 2>&5
23353   ac_status=$?
23354   echo "$as_me:23354: \$? = $ac_status" >&5
23355   (exit $ac_status); } &&
23356          { ac_try='test -s conftest.$ac_objext'
23357   { (eval echo "$as_me:23357: \"$ac_try\"") >&5
23358   (eval $ac_try) 2>&5
23359   ac_status=$?
23360   echo "$as_me:23360: \$? = $ac_status" >&5
23361   (exit $ac_status); }; }; then
23362   cf_cv_cc_bool_type=1
23363 else
23364   echo "$as_me: failed program was:" >&5
23365 cat conftest.$ac_ext >&5
23366 cf_cv_cc_bool_type=0
23367 fi
23368 rm -f conftest.$ac_objext conftest.$ac_ext
23369
23370 fi
23371
23372 if test "$cf_cv_cc_bool_type" = 1
23373 then    echo "$as_me:23373: result: yes" >&5
23374 echo "${ECHO_T}yes" >&6
23375 else    echo "$as_me:23375: result: no" >&5
23376 echo "${ECHO_T}no" >&6
23377 fi
23378
23379 # Check for C++ compiler characteristics (and ensure that it's there!)
23380 if test -n "$CXX" ; then
23381         ac_ext=cc
23382 ac_cpp='$CXXCPP $CPPFLAGS'
23383 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23384 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23385 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23386 ac_main_return=return
23387
23388 if test -n "$GXX" ; then
23389
23390         cf_save="$LIBS"
23391         LIBS="$LIBS $CXXLIBS"
23392         echo "$as_me:23392: checking if we already have C++ library" >&5
23393 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23394         cat >conftest.$ac_ext <<_ACEOF
23395 #line 23395 "configure"
23396 #include "confdefs.h"
23397
23398                         #include <iostream>
23399 int
23400 main (void)
23401 {
23402
23403                         std::cout << "Hello World!" << std::endl;
23404   ;
23405   return 0;
23406 }
23407 _ACEOF
23408 rm -f conftest.$ac_objext conftest$ac_exeext
23409 if { (eval echo "$as_me:23409: \"$ac_link\"") >&5
23410   (eval $ac_link) 2>&5
23411   ac_status=$?
23412   echo "$as_me:23412: \$? = $ac_status" >&5
23413   (exit $ac_status); } &&
23414          { ac_try='test -s conftest$ac_exeext'
23415   { (eval echo "$as_me:23415: \"$ac_try\"") >&5
23416   (eval $ac_try) 2>&5
23417   ac_status=$?
23418   echo "$as_me:23418: \$? = $ac_status" >&5
23419   (exit $ac_status); }; }; then
23420   cf_have_libstdcpp=yes
23421 else
23422   echo "$as_me: failed program was:" >&5
23423 cat conftest.$ac_ext >&5
23424 cf_have_libstdcpp=no
23425 fi
23426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23427         echo "$as_me:23427: result: $cf_have_libstdcpp" >&5
23428 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23429         LIBS="$cf_save"
23430
23431         if test $cf_have_libstdcpp != yes
23432         then
23433                 case $cf_cv_system_name in
23434                 (os2*)
23435                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23436                                 cf_stdcpp_libname=stdcpp
23437                         else
23438                                 cf_stdcpp_libname=stdc++
23439                         fi
23440                         ;;
23441                 (*)
23442                         cf_stdcpp_libname=stdc++
23443                         ;;
23444                 esac
23445
23446                 echo "$as_me:23446: checking for library $cf_stdcpp_libname" >&5
23447 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23448 if test "${cf_cv_libstdcpp+set}" = set; then
23449   echo $ECHO_N "(cached) $ECHO_C" >&6
23450 else
23451
23452                         cf_save="$LIBS"
23453                         LIBS="$LIBS $CXXLIBS"
23454
23455 cf_add_libs="$LIBS"
23456 # reverse order
23457 cf_add_0lib=
23458 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23459 # filter duplicates
23460 for cf_add_1lib in $cf_add_0lib; do
23461         for cf_add_2lib in $cf_add_libs; do
23462                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23463                         cf_add_1lib=
23464                         break
23465                 fi
23466         done
23467         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23468 done
23469 LIBS="$cf_add_libs"
23470
23471                 cat >conftest.$ac_ext <<_ACEOF
23472 #line 23472 "configure"
23473 #include "confdefs.h"
23474
23475                                 #include <iostream>
23476 int
23477 main (void)
23478 {
23479
23480                                 std::cout << "Hello World!" << std::endl;
23481   ;
23482   return 0;
23483 }
23484 _ACEOF
23485 rm -f conftest.$ac_objext conftest$ac_exeext
23486 if { (eval echo "$as_me:23486: \"$ac_link\"") >&5
23487   (eval $ac_link) 2>&5
23488   ac_status=$?
23489   echo "$as_me:23489: \$? = $ac_status" >&5
23490   (exit $ac_status); } &&
23491          { ac_try='test -s conftest$ac_exeext'
23492   { (eval echo "$as_me:23492: \"$ac_try\"") >&5
23493   (eval $ac_try) 2>&5
23494   ac_status=$?
23495   echo "$as_me:23495: \$? = $ac_status" >&5
23496   (exit $ac_status); }; }; then
23497   cf_cv_libstdcpp=yes
23498 else
23499   echo "$as_me: failed program was:" >&5
23500 cat conftest.$ac_ext >&5
23501 cf_cv_libstdcpp=no
23502 fi
23503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23504                         LIBS="$cf_save"
23505
23506 fi
23507 echo "$as_me:23507: result: $cf_cv_libstdcpp" >&5
23508 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23509                 test "$cf_cv_libstdcpp" = yes && {
23510 cf_add_libs="$CXXLIBS"
23511 # reverse order
23512 cf_add_0lib=
23513 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23514 # filter duplicates
23515 for cf_add_1lib in $cf_add_0lib; do
23516         for cf_add_2lib in $cf_add_libs; do
23517                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23518                         cf_add_1lib=
23519                         break
23520                 fi
23521         done
23522         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23523 done
23524 CXXLIBS="$cf_add_libs"
23525  }
23526         fi
23527 fi
23528
23529         echo "$as_me:23529: checking whether $CXX understands -c and -o together" >&5
23530 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23531 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23532   echo $ECHO_N "(cached) $ECHO_C" >&6
23533 else
23534
23535 cat > conftest.$ac_ext <<CF_EOF
23536 int main(void)
23537 {
23538         ${cf_cv_main_return:-return}(0);
23539 }
23540 CF_EOF
23541 # We do the test twice because some compilers refuse to overwrite an
23542 # existing .o file with -o, though they will create one.
23543 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23544 if { (eval echo "$as_me:23544: \"$ac_try\"") >&5
23545   (eval $ac_try) 2>&5
23546   ac_status=$?
23547   echo "$as_me:23547: \$? = $ac_status" >&5
23548   (exit $ac_status); } &&
23549   test -f conftest2.$ac_objext && { (eval echo "$as_me:23549: \"$ac_try\"") >&5
23550   (eval $ac_try) 2>&5
23551   ac_status=$?
23552   echo "$as_me:23552: \$? = $ac_status" >&5
23553   (exit $ac_status); };
23554 then
23555   eval cf_cv_prog_CXX_c_o=yes
23556 else
23557   eval cf_cv_prog_CXX_c_o=no
23558 fi
23559 rm -rf conftest*
23560
23561 fi
23562 if test $cf_cv_prog_CXX_c_o = yes; then
23563   echo "$as_me:23563: result: yes" >&5
23564 echo "${ECHO_T}yes" >&6
23565 else
23566   echo "$as_me:23566: result: no" >&5
23567 echo "${ECHO_T}no" >&6
23568 fi
23569
23570         case $GXX_VERSION in
23571         (1.*|2.[0-6]*|[1-9][0-9].*)
23572                 cf_cxx_library=yes
23573                 ;;
23574         (*-2.7*|2.7*)
23575
23576 cf_cxx_library=unknown
23577 case $cf_cv_system_name in
23578 (os2*)
23579         cf_gpp_libname=gpp
23580         ;;
23581 (*)
23582         cf_gpp_libname=g++
23583         ;;
23584 esac
23585 if test "$GXX" = yes; then
23586         echo "$as_me:23586: checking for lib$cf_gpp_libname" >&5
23587 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23588         cf_save="$LIBS"
23589
23590 cf_add_libs="$LIBS"
23591 # reverse order
23592 cf_add_0lib=
23593 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23594 # filter duplicates
23595 for cf_add_1lib in $cf_add_0lib; do
23596         for cf_add_2lib in $cf_add_libs; do
23597                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23598                         cf_add_1lib=
23599                         break
23600                 fi
23601         done
23602         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23603 done
23604 LIBS="$cf_add_libs"
23605
23606         cat >conftest.$ac_ext <<_ACEOF
23607 #line 23607 "configure"
23608 #include "confdefs.h"
23609
23610 #include <$cf_gpp_libname/builtin.h>
23611
23612 int
23613 main (void)
23614 {
23615 two_arg_error_handler_t foo2 = lib_error_handler
23616   ;
23617   return 0;
23618 }
23619 _ACEOF
23620 rm -f conftest.$ac_objext conftest$ac_exeext
23621 if { (eval echo "$as_me:23621: \"$ac_link\"") >&5
23622   (eval $ac_link) 2>&5
23623   ac_status=$?
23624   echo "$as_me:23624: \$? = $ac_status" >&5
23625   (exit $ac_status); } &&
23626          { ac_try='test -s conftest$ac_exeext'
23627   { (eval echo "$as_me:23627: \"$ac_try\"") >&5
23628   (eval $ac_try) 2>&5
23629   ac_status=$?
23630   echo "$as_me:23630: \$? = $ac_status" >&5
23631   (exit $ac_status); }; }; then
23632   cf_cxx_library=yes
23633
23634 cf_add_libs="$CXXLIBS"
23635 # reverse order
23636 cf_add_0lib=
23637 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23638 # filter duplicates
23639 for cf_add_1lib in $cf_add_0lib; do
23640         for cf_add_2lib in $cf_add_libs; do
23641                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23642                         cf_add_1lib=
23643                         break
23644                 fi
23645         done
23646         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23647 done
23648 CXXLIBS="$cf_add_libs"
23649
23650          if test "$cf_gpp_libname" = cpp ; then
23651
23652 cat >>confdefs.h <<\EOF
23653 #define HAVE_GPP_BUILTIN_H 1
23654 EOF
23655
23656          else
23657
23658 cat >>confdefs.h <<\EOF
23659 #define HAVE_GXX_BUILTIN_H 1
23660 EOF
23661
23662          fi
23663 else
23664   echo "$as_me: failed program was:" >&5
23665 cat conftest.$ac_ext >&5
23666 cat >conftest.$ac_ext <<_ACEOF
23667 #line 23667 "configure"
23668 #include "confdefs.h"
23669
23670 #include <builtin.h>
23671
23672 int
23673 main (void)
23674 {
23675 two_arg_error_handler_t foo2 = lib_error_handler
23676   ;
23677   return 0;
23678 }
23679 _ACEOF
23680 rm -f conftest.$ac_objext conftest$ac_exeext
23681 if { (eval echo "$as_me:23681: \"$ac_link\"") >&5
23682   (eval $ac_link) 2>&5
23683   ac_status=$?
23684   echo "$as_me:23684: \$? = $ac_status" >&5
23685   (exit $ac_status); } &&
23686          { ac_try='test -s conftest$ac_exeext'
23687   { (eval echo "$as_me:23687: \"$ac_try\"") >&5
23688   (eval $ac_try) 2>&5
23689   ac_status=$?
23690   echo "$as_me:23690: \$? = $ac_status" >&5
23691   (exit $ac_status); }; }; then
23692   cf_cxx_library=yes
23693
23694 cf_add_libs="$CXXLIBS"
23695 # reverse order
23696 cf_add_0lib=
23697 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23698 # filter duplicates
23699 for cf_add_1lib in $cf_add_0lib; do
23700         for cf_add_2lib in $cf_add_libs; do
23701                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23702                         cf_add_1lib=
23703                         break
23704                 fi
23705         done
23706         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23707 done
23708 CXXLIBS="$cf_add_libs"
23709
23710 cat >>confdefs.h <<\EOF
23711 #define HAVE_BUILTIN_H 1
23712 EOF
23713
23714 else
23715   echo "$as_me: failed program was:" >&5
23716 cat conftest.$ac_ext >&5
23717 cf_cxx_library=no
23718 fi
23719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23720 fi
23721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23722         LIBS="$cf_save"
23723         echo "$as_me:23723: result: $cf_cxx_library" >&5
23724 echo "${ECHO_T}$cf_cxx_library" >&6
23725 fi
23726
23727                 ;;
23728         (*)
23729                 cf_cxx_library=no
23730                 ;;
23731         esac
23732
23733         ac_ext=cc
23734 ac_cpp='$CXXCPP $CPPFLAGS'
23735 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23736 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23737 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23738 ac_main_return=return
23739 echo "$as_me:23739: checking how to run the C++ preprocessor" >&5
23740 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23741 if test -z "$CXXCPP"; then
23742   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23743   echo $ECHO_N "(cached) $ECHO_C" >&6
23744 else
23745       # Double quotes because CXXCPP needs to be expanded
23746     for CXXCPP in "$CXX -E" "/lib/cpp"
23747     do
23748       ac_preproc_ok=false
23749 for ac_cxx_preproc_warn_flag in '' yes
23750 do
23751   # Use a header file that comes with gcc, so configuring glibc
23752   # with a fresh cross-compiler works.
23753   # On the NeXT, cc -E runs the code through the compiler's parser,
23754   # not just through cpp. "Syntax error" is here to catch this case.
23755   cat >conftest.$ac_ext <<_ACEOF
23756 #line 23756 "configure"
23757 #include "confdefs.h"
23758 #include <assert.h>
23759                      Syntax error
23760 _ACEOF
23761 if { (eval echo "$as_me:23761: \"$ac_cpp conftest.$ac_ext\"") >&5
23762   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23763   ac_status=$?
23764   egrep -v '^ *\+' conftest.er1 >conftest.err
23765   rm -f conftest.er1
23766   cat conftest.err >&5
23767   echo "$as_me:23767: \$? = $ac_status" >&5
23768   (exit $ac_status); } >/dev/null; then
23769   if test -s conftest.err; then
23770     ac_cpp_err=$ac_cxx_preproc_warn_flag
23771   else
23772     ac_cpp_err=
23773   fi
23774 else
23775   ac_cpp_err=yes
23776 fi
23777 if test -z "$ac_cpp_err"; then
23778   :
23779 else
23780   echo "$as_me: failed program was:" >&5
23781   cat conftest.$ac_ext >&5
23782   # Broken: fails on valid input.
23783 continue
23784 fi
23785 rm -f conftest.err conftest.$ac_ext
23786
23787   # OK, works on sane cases.  Now check whether non-existent headers
23788   # can be detected and how.
23789   cat >conftest.$ac_ext <<_ACEOF
23790 #line 23790 "configure"
23791 #include "confdefs.h"
23792 #include <ac_nonexistent.h>
23793 _ACEOF
23794 if { (eval echo "$as_me:23794: \"$ac_cpp conftest.$ac_ext\"") >&5
23795   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23796   ac_status=$?
23797   egrep -v '^ *\+' conftest.er1 >conftest.err
23798   rm -f conftest.er1
23799   cat conftest.err >&5
23800   echo "$as_me:23800: \$? = $ac_status" >&5
23801   (exit $ac_status); } >/dev/null; then
23802   if test -s conftest.err; then
23803     ac_cpp_err=$ac_cxx_preproc_warn_flag
23804   else
23805     ac_cpp_err=
23806   fi
23807 else
23808   ac_cpp_err=yes
23809 fi
23810 if test -z "$ac_cpp_err"; then
23811   # Broken: success on invalid input.
23812 continue
23813 else
23814   echo "$as_me: failed program was:" >&5
23815   cat conftest.$ac_ext >&5
23816   # Passes both tests.
23817 ac_preproc_ok=:
23818 break
23819 fi
23820 rm -f conftest.err conftest.$ac_ext
23821
23822 done
23823 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23824 rm -f conftest.err conftest.$ac_ext
23825 if $ac_preproc_ok; then
23826   break
23827 fi
23828
23829     done
23830     ac_cv_prog_CXXCPP=$CXXCPP
23831
23832 fi
23833   CXXCPP=$ac_cv_prog_CXXCPP
23834 else
23835   ac_cv_prog_CXXCPP=$CXXCPP
23836 fi
23837 echo "$as_me:23837: result: $CXXCPP" >&5
23838 echo "${ECHO_T}$CXXCPP" >&6
23839 ac_preproc_ok=false
23840 for ac_cxx_preproc_warn_flag in '' yes
23841 do
23842   # Use a header file that comes with gcc, so configuring glibc
23843   # with a fresh cross-compiler works.
23844   # On the NeXT, cc -E runs the code through the compiler's parser,
23845   # not just through cpp. "Syntax error" is here to catch this case.
23846   cat >conftest.$ac_ext <<_ACEOF
23847 #line 23847 "configure"
23848 #include "confdefs.h"
23849 #include <assert.h>
23850                      Syntax error
23851 _ACEOF
23852 if { (eval echo "$as_me:23852: \"$ac_cpp conftest.$ac_ext\"") >&5
23853   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23854   ac_status=$?
23855   egrep -v '^ *\+' conftest.er1 >conftest.err
23856   rm -f conftest.er1
23857   cat conftest.err >&5
23858   echo "$as_me:23858: \$? = $ac_status" >&5
23859   (exit $ac_status); } >/dev/null; then
23860   if test -s conftest.err; then
23861     ac_cpp_err=$ac_cxx_preproc_warn_flag
23862   else
23863     ac_cpp_err=
23864   fi
23865 else
23866   ac_cpp_err=yes
23867 fi
23868 if test -z "$ac_cpp_err"; then
23869   :
23870 else
23871   echo "$as_me: failed program was:" >&5
23872   cat conftest.$ac_ext >&5
23873   # Broken: fails on valid input.
23874 continue
23875 fi
23876 rm -f conftest.err conftest.$ac_ext
23877
23878   # OK, works on sane cases.  Now check whether non-existent headers
23879   # can be detected and how.
23880   cat >conftest.$ac_ext <<_ACEOF
23881 #line 23881 "configure"
23882 #include "confdefs.h"
23883 #include <ac_nonexistent.h>
23884 _ACEOF
23885 if { (eval echo "$as_me:23885: \"$ac_cpp conftest.$ac_ext\"") >&5
23886   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23887   ac_status=$?
23888   egrep -v '^ *\+' conftest.er1 >conftest.err
23889   rm -f conftest.er1
23890   cat conftest.err >&5
23891   echo "$as_me:23891: \$? = $ac_status" >&5
23892   (exit $ac_status); } >/dev/null; then
23893   if test -s conftest.err; then
23894     ac_cpp_err=$ac_cxx_preproc_warn_flag
23895   else
23896     ac_cpp_err=
23897   fi
23898 else
23899   ac_cpp_err=yes
23900 fi
23901 if test -z "$ac_cpp_err"; then
23902   # Broken: success on invalid input.
23903 continue
23904 else
23905   echo "$as_me: failed program was:" >&5
23906   cat conftest.$ac_ext >&5
23907   # Passes both tests.
23908 ac_preproc_ok=:
23909 break
23910 fi
23911 rm -f conftest.err conftest.$ac_ext
23912
23913 done
23914 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23915 rm -f conftest.err conftest.$ac_ext
23916 if $ac_preproc_ok; then
23917   :
23918 else
23919   { { echo "$as_me:23919: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23920 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23921    { (exit 1); exit 1; }; }
23922 fi
23923
23924 ac_ext=cc
23925 ac_cpp='$CXXCPP $CPPFLAGS'
23926 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23927 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23928 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23929 ac_main_return=return
23930
23931 for ac_header in typeinfo
23932 do
23933 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23934 echo "$as_me:23934: checking for $ac_header" >&5
23935 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23936 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23937   echo $ECHO_N "(cached) $ECHO_C" >&6
23938 else
23939   cat >conftest.$ac_ext <<_ACEOF
23940 #line 23940 "configure"
23941 #include "confdefs.h"
23942 #include <$ac_header>
23943 _ACEOF
23944 if { (eval echo "$as_me:23944: \"$ac_cpp conftest.$ac_ext\"") >&5
23945   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23946   ac_status=$?
23947   egrep -v '^ *\+' conftest.er1 >conftest.err
23948   rm -f conftest.er1
23949   cat conftest.err >&5
23950   echo "$as_me:23950: \$? = $ac_status" >&5
23951   (exit $ac_status); } >/dev/null; then
23952   if test -s conftest.err; then
23953     ac_cpp_err=$ac_cxx_preproc_warn_flag
23954   else
23955     ac_cpp_err=
23956   fi
23957 else
23958   ac_cpp_err=yes
23959 fi
23960 if test -z "$ac_cpp_err"; then
23961   eval "$as_ac_Header=yes"
23962 else
23963   echo "$as_me: failed program was:" >&5
23964   cat conftest.$ac_ext >&5
23965   eval "$as_ac_Header=no"
23966 fi
23967 rm -f conftest.err conftest.$ac_ext
23968 fi
23969 echo "$as_me:23969: result: `eval echo '${'$as_ac_Header'}'`" >&5
23970 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23971 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23972   cat >>confdefs.h <<EOF
23973 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23974 EOF
23975
23976 fi
23977 done
23978
23979 for ac_header in iostream
23980 do
23981 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23982 echo "$as_me:23982: checking for $ac_header" >&5
23983 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23984 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23985   echo $ECHO_N "(cached) $ECHO_C" >&6
23986 else
23987   cat >conftest.$ac_ext <<_ACEOF
23988 #line 23988 "configure"
23989 #include "confdefs.h"
23990 #include <$ac_header>
23991 _ACEOF
23992 if { (eval echo "$as_me:23992: \"$ac_cpp conftest.$ac_ext\"") >&5
23993   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23994   ac_status=$?
23995   egrep -v '^ *\+' conftest.er1 >conftest.err
23996   rm -f conftest.er1
23997   cat conftest.err >&5
23998   echo "$as_me:23998: \$? = $ac_status" >&5
23999   (exit $ac_status); } >/dev/null; then
24000   if test -s conftest.err; then
24001     ac_cpp_err=$ac_cxx_preproc_warn_flag
24002   else
24003     ac_cpp_err=
24004   fi
24005 else
24006   ac_cpp_err=yes
24007 fi
24008 if test -z "$ac_cpp_err"; then
24009   eval "$as_ac_Header=yes"
24010 else
24011   echo "$as_me: failed program was:" >&5
24012   cat conftest.$ac_ext >&5
24013   eval "$as_ac_Header=no"
24014 fi
24015 rm -f conftest.err conftest.$ac_ext
24016 fi
24017 echo "$as_me:24017: result: `eval echo '${'$as_ac_Header'}'`" >&5
24018 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24019 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24020   cat >>confdefs.h <<EOF
24021 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24022 EOF
24023
24024 fi
24025 done
24026
24027 if test x"$ac_cv_header_iostream" = xyes ; then
24028         echo "$as_me:24028: checking if iostream uses std-namespace" >&5
24029 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24030         cat >conftest.$ac_ext <<_ACEOF
24031 #line 24031 "configure"
24032 #include "confdefs.h"
24033
24034 #include <iostream>
24035 using std::endl;
24036 using std::cerr;
24037 int
24038 main (void)
24039 {
24040
24041 cerr << "testing" << endl;
24042
24043   ;
24044   return 0;
24045 }
24046 _ACEOF
24047 rm -f conftest.$ac_objext
24048 if { (eval echo "$as_me:24048: \"$ac_compile\"") >&5
24049   (eval $ac_compile) 2>&5
24050   ac_status=$?
24051   echo "$as_me:24051: \$? = $ac_status" >&5
24052   (exit $ac_status); } &&
24053          { ac_try='test -s conftest.$ac_objext'
24054   { (eval echo "$as_me:24054: \"$ac_try\"") >&5
24055   (eval $ac_try) 2>&5
24056   ac_status=$?
24057   echo "$as_me:24057: \$? = $ac_status" >&5
24058   (exit $ac_status); }; }; then
24059   cf_iostream_namespace=yes
24060 else
24061   echo "$as_me: failed program was:" >&5
24062 cat conftest.$ac_ext >&5
24063 cf_iostream_namespace=no
24064 fi
24065 rm -f conftest.$ac_objext conftest.$ac_ext
24066         echo "$as_me:24066: result: $cf_iostream_namespace" >&5
24067 echo "${ECHO_T}$cf_iostream_namespace" >&6
24068         if test "$cf_iostream_namespace" = yes ; then
24069
24070 cat >>confdefs.h <<\EOF
24071 #define IOSTREAM_NAMESPACE 1
24072 EOF
24073
24074         fi
24075 fi
24076
24077 echo "$as_me:24077: checking if we should include stdbool.h" >&5
24078 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24079
24080 if test "${cf_cv_header_stdbool_h+set}" = set; then
24081   echo $ECHO_N "(cached) $ECHO_C" >&6
24082 else
24083
24084         cat >conftest.$ac_ext <<_ACEOF
24085 #line 24085 "configure"
24086 #include "confdefs.h"
24087
24088 int
24089 main (void)
24090 {
24091 bool foo = false
24092   ;
24093   return 0;
24094 }
24095 _ACEOF
24096 rm -f conftest.$ac_objext
24097 if { (eval echo "$as_me:24097: \"$ac_compile\"") >&5
24098   (eval $ac_compile) 2>&5
24099   ac_status=$?
24100   echo "$as_me:24100: \$? = $ac_status" >&5
24101   (exit $ac_status); } &&
24102          { ac_try='test -s conftest.$ac_objext'
24103   { (eval echo "$as_me:24103: \"$ac_try\"") >&5
24104   (eval $ac_try) 2>&5
24105   ac_status=$?
24106   echo "$as_me:24106: \$? = $ac_status" >&5
24107   (exit $ac_status); }; }; then
24108   cf_cv_header_stdbool_h=0
24109 else
24110   echo "$as_me: failed program was:" >&5
24111 cat conftest.$ac_ext >&5
24112 cat >conftest.$ac_ext <<_ACEOF
24113 #line 24113 "configure"
24114 #include "confdefs.h"
24115
24116 #ifndef __BEOS__
24117 #include <stdbool.h>
24118 #endif
24119
24120 int
24121 main (void)
24122 {
24123 bool foo = false
24124   ;
24125   return 0;
24126 }
24127 _ACEOF
24128 rm -f conftest.$ac_objext
24129 if { (eval echo "$as_me:24129: \"$ac_compile\"") >&5
24130   (eval $ac_compile) 2>&5
24131   ac_status=$?
24132   echo "$as_me:24132: \$? = $ac_status" >&5
24133   (exit $ac_status); } &&
24134          { ac_try='test -s conftest.$ac_objext'
24135   { (eval echo "$as_me:24135: \"$ac_try\"") >&5
24136   (eval $ac_try) 2>&5
24137   ac_status=$?
24138   echo "$as_me:24138: \$? = $ac_status" >&5
24139   (exit $ac_status); }; }; then
24140   cf_cv_header_stdbool_h=1
24141 else
24142   echo "$as_me: failed program was:" >&5
24143 cat conftest.$ac_ext >&5
24144 cf_cv_header_stdbool_h=0
24145 fi
24146 rm -f conftest.$ac_objext conftest.$ac_ext
24147 fi
24148 rm -f conftest.$ac_objext conftest.$ac_ext
24149 fi
24150
24151 if test "$cf_cv_header_stdbool_h" = 1
24152 then    echo "$as_me:24152: result: yes" >&5
24153 echo "${ECHO_T}yes" >&6
24154 else    echo "$as_me:24154: result: no" >&5
24155 echo "${ECHO_T}no" >&6
24156 fi
24157
24158 echo "$as_me:24158: checking for builtin bool type" >&5
24159 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24160
24161 if test "${cf_cv_builtin_bool+set}" = set; then
24162   echo $ECHO_N "(cached) $ECHO_C" >&6
24163 else
24164
24165         cat >conftest.$ac_ext <<_ACEOF
24166 #line 24166 "configure"
24167 #include "confdefs.h"
24168
24169 #include <stdio.h>
24170 #include <sys/types.h>
24171
24172 int
24173 main (void)
24174 {
24175 bool x = false
24176   ;
24177   return 0;
24178 }
24179 _ACEOF
24180 rm -f conftest.$ac_objext
24181 if { (eval echo "$as_me:24181: \"$ac_compile\"") >&5
24182   (eval $ac_compile) 2>&5
24183   ac_status=$?
24184   echo "$as_me:24184: \$? = $ac_status" >&5
24185   (exit $ac_status); } &&
24186          { ac_try='test -s conftest.$ac_objext'
24187   { (eval echo "$as_me:24187: \"$ac_try\"") >&5
24188   (eval $ac_try) 2>&5
24189   ac_status=$?
24190   echo "$as_me:24190: \$? = $ac_status" >&5
24191   (exit $ac_status); }; }; then
24192   cf_cv_builtin_bool=1
24193 else
24194   echo "$as_me: failed program was:" >&5
24195 cat conftest.$ac_ext >&5
24196 cf_cv_builtin_bool=0
24197 fi
24198 rm -f conftest.$ac_objext conftest.$ac_ext
24199
24200 fi
24201
24202 if test "$cf_cv_builtin_bool" = 1
24203 then    echo "$as_me:24203: result: yes" >&5
24204 echo "${ECHO_T}yes" >&6
24205 else    echo "$as_me:24205: result: no" >&5
24206 echo "${ECHO_T}no" >&6
24207 fi
24208
24209 echo "$as_me:24209: checking for size of bool" >&5
24210 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24211 if test "${cf_cv_type_of_bool+set}" = set; then
24212   echo $ECHO_N "(cached) $ECHO_C" >&6
24213 else
24214
24215         rm -f cf_test.out
24216         if test "$cross_compiling" = yes; then
24217   cf_cv_type_of_bool=unknown
24218 else
24219   cat >conftest.$ac_ext <<_ACEOF
24220 #line 24220 "configure"
24221 #include "confdefs.h"
24222
24223 #include <stdlib.h>
24224 #include <stdio.h>
24225
24226 #if defined(__cplusplus)
24227
24228 #ifdef HAVE_GXX_BUILTIN_H
24229 #include <g++/builtin.h>
24230 #elif HAVE_GPP_BUILTIN_H
24231 #include <gpp/builtin.h>
24232 #elif HAVE_BUILTIN_H
24233 #include <builtin.h>
24234 #endif
24235
24236 #else
24237
24238 #if $cf_cv_header_stdbool_h
24239 #include <stdbool.h>
24240 #endif
24241
24242 #endif
24243
24244 int main(void)
24245 {
24246         FILE *fp = fopen("cf_test.out", "w");
24247         if (fp != 0) {
24248                 bool x = true;
24249                 if ((bool)(-x) >= 0)
24250                         fputs("unsigned ", fp);
24251                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24252                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24253                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24254                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24255                 fclose(fp);
24256         }
24257         ${cf_cv_main_return:-return}(0);
24258 }
24259
24260 _ACEOF
24261 rm -f conftest$ac_exeext
24262 if { (eval echo "$as_me:24262: \"$ac_link\"") >&5
24263   (eval $ac_link) 2>&5
24264   ac_status=$?
24265   echo "$as_me:24265: \$? = $ac_status" >&5
24266   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24267   { (eval echo "$as_me:24267: \"$ac_try\"") >&5
24268   (eval $ac_try) 2>&5
24269   ac_status=$?
24270   echo "$as_me:24270: \$? = $ac_status" >&5
24271   (exit $ac_status); }; }; then
24272   cf_cv_type_of_bool=`cat cf_test.out`
24273                  if test -z "$cf_cv_type_of_bool"; then
24274                    cf_cv_type_of_bool=unknown
24275                  fi
24276 else
24277   echo "$as_me: program exited with status $ac_status" >&5
24278 echo "$as_me: failed program was:" >&5
24279 cat conftest.$ac_ext >&5
24280 cf_cv_type_of_bool=unknown
24281 fi
24282 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24283 fi
24284
24285 fi
24286
24287         rm -f cf_test.out
24288 echo "$as_me:24288: result: $cf_cv_type_of_bool" >&5
24289 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24290 if test "$cf_cv_type_of_bool" = unknown ; then
24291         case .$NCURSES_BOOL in
24292         (.auto|.) NCURSES_BOOL=unsigned;;
24293         esac
24294         { echo "$as_me:24294: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24295 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24296         cf_cv_type_of_bool=$NCURSES_BOOL
24297 fi
24298
24299 echo "$as_me:24299: checking for special defines needed for etip.h" >&5
24300 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24301 cf_save_CXXFLAGS="$CXXFLAGS"
24302 cf_result="none"
24303
24304 # etip.h includes ncurses.h which includes ncurses_dll.h
24305 # But ncurses_dll.h is generated - fix here.
24306 test -d include || mkdir include
24307 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
24308
24309 for cf_math in "" MATH_H
24310 do
24311 for cf_excp in "" MATH_EXCEPTION
24312 do
24313         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24314         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24315         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24316 cat >conftest.$ac_ext <<_ACEOF
24317 #line 24317 "configure"
24318 #include "confdefs.h"
24319
24320 #include <etip.h.in>
24321
24322 int
24323 main (void)
24324 {
24325
24326   ;
24327   return 0;
24328 }
24329 _ACEOF
24330 rm -f conftest.$ac_objext
24331 if { (eval echo "$as_me:24331: \"$ac_compile\"") >&5
24332   (eval $ac_compile) 2>&5
24333   ac_status=$?
24334   echo "$as_me:24334: \$? = $ac_status" >&5
24335   (exit $ac_status); } &&
24336          { ac_try='test -s conftest.$ac_objext'
24337   { (eval echo "$as_me:24337: \"$ac_try\"") >&5
24338   (eval $ac_try) 2>&5
24339   ac_status=$?
24340   echo "$as_me:24340: \$? = $ac_status" >&5
24341   (exit $ac_status); }; }; then
24342
24343         test -n "$cf_math" && cat >>confdefs.h <<EOF
24344 #define ETIP_NEEDS_${cf_math} 1
24345 EOF
24346
24347         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24348 #define ETIP_NEEDS_${cf_excp} 1
24349 EOF
24350
24351         cf_result="$cf_math $cf_excp"
24352         break 2
24353
24354 else
24355   echo "$as_me: failed program was:" >&5
24356 cat conftest.$ac_ext >&5
24357 fi
24358 rm -f conftest.$ac_objext conftest.$ac_ext
24359 done
24360 done
24361 echo "$as_me:24361: result: $cf_result" >&5
24362 echo "${ECHO_T}$cf_result" >&6
24363 CXXFLAGS="$cf_save_CXXFLAGS"
24364
24365 if test -n "$CXX"; then
24366 echo "$as_me:24366: checking if $CXX accepts parameter initialization" >&5
24367 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24368 if test "${cf_cv_cpp_param_init+set}" = set; then
24369   echo $ECHO_N "(cached) $ECHO_C" >&6
24370 else
24371
24372         ac_ext=cc
24373 ac_cpp='$CXXCPP $CPPFLAGS'
24374 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24375 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24376 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24377 ac_main_return=return
24378
24379         if test "$cross_compiling" = yes; then
24380   cf_cv_cpp_param_init=unknown
24381 else
24382   cat >conftest.$ac_ext <<_ACEOF
24383 #line 24383 "configure"
24384 #include "confdefs.h"
24385
24386 class TEST {
24387 private:
24388         int value;
24389 public:
24390         TEST(int x = 1);
24391         ~TEST();
24392 };
24393
24394 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24395 {
24396         value = x;
24397 }
24398 int main(void) { }
24399
24400 _ACEOF
24401 rm -f conftest$ac_exeext
24402 if { (eval echo "$as_me:24402: \"$ac_link\"") >&5
24403   (eval $ac_link) 2>&5
24404   ac_status=$?
24405   echo "$as_me:24405: \$? = $ac_status" >&5
24406   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24407   { (eval echo "$as_me:24407: \"$ac_try\"") >&5
24408   (eval $ac_try) 2>&5
24409   ac_status=$?
24410   echo "$as_me:24410: \$? = $ac_status" >&5
24411   (exit $ac_status); }; }; then
24412   cf_cv_cpp_param_init=yes
24413 else
24414   echo "$as_me: program exited with status $ac_status" >&5
24415 echo "$as_me: failed program was:" >&5
24416 cat conftest.$ac_ext >&5
24417 cf_cv_cpp_param_init=no
24418 fi
24419 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24420 fi
24421         ac_ext=cc
24422 ac_cpp='$CXXCPP $CPPFLAGS'
24423 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24424 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24425 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24426 ac_main_return=return
24427
24428 fi
24429 echo "$as_me:24429: result: $cf_cv_cpp_param_init" >&5
24430 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24431 fi
24432 test "$cf_cv_cpp_param_init" = yes &&
24433 cat >>confdefs.h <<\EOF
24434 #define CPP_HAS_PARAM_INIT 1
24435 EOF
24436
24437 if test -n "$CXX"; then
24438
24439 echo "$as_me:24439: checking if $CXX accepts static_cast" >&5
24440 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24441 if test "${cf_cv_cpp_static_cast+set}" = set; then
24442   echo $ECHO_N "(cached) $ECHO_C" >&6
24443 else
24444
24445         ac_ext=cc
24446 ac_cpp='$CXXCPP $CPPFLAGS'
24447 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24448 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24449 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24450 ac_main_return=return
24451
24452         cat >conftest.$ac_ext <<_ACEOF
24453 #line 24453 "configure"
24454 #include "confdefs.h"
24455
24456 class NCursesPanel
24457 {
24458 public:
24459   NCursesPanel(int nlines,
24460                int ncols,
24461                int begin_y = 0,
24462                int begin_x = 0)
24463   {
24464   }
24465   NCursesPanel();
24466   ~NCursesPanel();
24467 };
24468
24469 template<class T> class NCursesUserPanel : public NCursesPanel
24470 {
24471 public:
24472   NCursesUserPanel (int nlines,
24473                     int ncols,
24474                     int begin_y = 0,
24475                     int begin_x = 0,
24476                     const T* p_UserData = static_cast<T*>(0))
24477     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24478   {
24479   };
24480   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24481   {
24482   };
24483
24484   virtual ~NCursesUserPanel() {};
24485 };
24486
24487 int
24488 main (void)
24489 {
24490
24491         const char* p_UserData = static_cast<char*>(0)
24492   ;
24493   return 0;
24494 }
24495 _ACEOF
24496 rm -f conftest.$ac_objext
24497 if { (eval echo "$as_me:24497: \"$ac_compile\"") >&5
24498   (eval $ac_compile) 2>&5
24499   ac_status=$?
24500   echo "$as_me:24500: \$? = $ac_status" >&5
24501   (exit $ac_status); } &&
24502          { ac_try='test -s conftest.$ac_objext'
24503   { (eval echo "$as_me:24503: \"$ac_try\"") >&5
24504   (eval $ac_try) 2>&5
24505   ac_status=$?
24506   echo "$as_me:24506: \$? = $ac_status" >&5
24507   (exit $ac_status); }; }; then
24508   cf_cv_cpp_static_cast=yes
24509 else
24510   echo "$as_me: failed program was:" >&5
24511 cat conftest.$ac_ext >&5
24512 cf_cv_cpp_static_cast=no
24513 fi
24514 rm -f conftest.$ac_objext conftest.$ac_ext
24515
24516         ac_ext=cc
24517 ac_cpp='$CXXCPP $CPPFLAGS'
24518 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24519 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24520 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24521 ac_main_return=return
24522
24523 fi
24524 echo "$as_me:24524: result: $cf_cv_cpp_static_cast" >&5
24525 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24526
24527 fi
24528
24529 test "$cf_cv_cpp_static_cast" = yes &&
24530 cat >>confdefs.h <<\EOF
24531 #define CPP_HAS_STATIC_CAST 1
24532 EOF
24533
24534         CXX_AR='$(AR)'
24535         CXX_ARFLAGS='$(ARFLAGS)'
24536         case $cf_cv_system_name in
24537         (irix*)
24538             if test "$GXX" != yes ; then
24539                 CXX_AR='$(CXX)'
24540                 CXX_ARFLAGS='-ar -o'
24541             fi
24542             ;;
24543         (sco3.2v5*)
24544             CXXLDFLAGS="-u main"
24545             ;;
24546         (solaris2*)
24547             if test "$GXX" != yes ; then
24548                 CXX_AR='$(CXX)'
24549                 CXX_ARFLAGS='-xar -o'
24550             fi
24551             ;;
24552         esac
24553
24554 else
24555         cf_cxx_library=no
24556         cf_cv_builtin_bool=1
24557
24558         # Just because we are not configuring against C++ right now does not
24559         # mean that a user will not want to use C++.  Some distributors disable
24560         # the C++ portion of this configuration as a shortcut (or just to avoid
24561         # compiling the demo in the c++ directory).  So we need a reasonable
24562         # default for the 'bool' type.
24563         #
24564         # Caveat: since the storage of the bool type is not standardized, it
24565         # may change.
24566
24567         if test "$NCURSES_BOOL" != auto ; then
24568                 cf_cv_type_of_bool=$NCURSES_BOOL
24569                 cf_cv_header_stdbool_h=0
24570         else
24571                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24572
24573 echo "$as_me:24573: checking for size of bool" >&5
24574 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24575 if test "${cf_cv_type_of_bool+set}" = set; then
24576   echo $ECHO_N "(cached) $ECHO_C" >&6
24577 else
24578
24579         rm -f cf_test.out
24580         if test "$cross_compiling" = yes; then
24581   cf_cv_type_of_bool=unknown
24582 else
24583   cat >conftest.$ac_ext <<_ACEOF
24584 #line 24584 "configure"
24585 #include "confdefs.h"
24586
24587 #include <stdlib.h>
24588 #include <stdio.h>
24589
24590 #if defined(__cplusplus)
24591
24592 #ifdef HAVE_GXX_BUILTIN_H
24593 #include <g++/builtin.h>
24594 #elif HAVE_GPP_BUILTIN_H
24595 #include <gpp/builtin.h>
24596 #elif HAVE_BUILTIN_H
24597 #include <builtin.h>
24598 #endif
24599
24600 #else
24601
24602 #if $cf_cv_header_stdbool_h
24603 #include <stdbool.h>
24604 #endif
24605
24606 #endif
24607
24608 int main(void)
24609 {
24610         FILE *fp = fopen("cf_test.out", "w");
24611         if (fp != 0) {
24612                 bool x = true;
24613                 if ((bool)(-x) >= 0)
24614                         fputs("unsigned ", fp);
24615                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24616                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24617                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24618                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24619                 fclose(fp);
24620         }
24621         ${cf_cv_main_return:-return}(0);
24622 }
24623
24624 _ACEOF
24625 rm -f conftest$ac_exeext
24626 if { (eval echo "$as_me:24626: \"$ac_link\"") >&5
24627   (eval $ac_link) 2>&5
24628   ac_status=$?
24629   echo "$as_me:24629: \$? = $ac_status" >&5
24630   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24631   { (eval echo "$as_me:24631: \"$ac_try\"") >&5
24632   (eval $ac_try) 2>&5
24633   ac_status=$?
24634   echo "$as_me:24634: \$? = $ac_status" >&5
24635   (exit $ac_status); }; }; then
24636   cf_cv_type_of_bool=`cat cf_test.out`
24637                  if test -z "$cf_cv_type_of_bool"; then
24638                    cf_cv_type_of_bool=unknown
24639                  fi
24640 else
24641   echo "$as_me: program exited with status $ac_status" >&5
24642 echo "$as_me: failed program was:" >&5
24643 cat conftest.$ac_ext >&5
24644 cf_cv_type_of_bool=unknown
24645 fi
24646 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24647 fi
24648
24649 fi
24650
24651         rm -f cf_test.out
24652 echo "$as_me:24652: result: $cf_cv_type_of_bool" >&5
24653 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24654 if test "$cf_cv_type_of_bool" = unknown ; then
24655         case .$NCURSES_BOOL in
24656         (.auto|.) NCURSES_BOOL=unsigned;;
24657         esac
24658         { echo "$as_me:24658: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24659 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24660         cf_cv_type_of_bool=$NCURSES_BOOL
24661 fi
24662
24663                 else
24664                         echo "$as_me:24664: checking for fallback type of bool" >&5
24665 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24666                         case "$host_cpu" in
24667                         (i?86)  cf_cv_type_of_bool=char ;;
24668                         (*)     cf_cv_type_of_bool=int  ;;
24669                         esac
24670                         echo "$as_me:24670: result: $cf_cv_type_of_bool" >&5
24671 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24672                 fi
24673         fi
24674 fi
24675
24676 # If the C compiler did not declare bool, and we did not determine that the C++
24677 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24678 # ncurses library use the same type as C++ bool.  Note that this allows one to
24679 # specify the type of bool in a configure-script option and postpone
24680 # integration with the C++ compiler provided that the types are compatible.
24681 USE_CXX_BOOL=1
24682 if test $cf_cv_cc_bool_type = 1
24683 then
24684         # oops: C has a bool.  Unlikely, but C++ could differ.
24685         USE_CXX_BOOL=0
24686 elif test $cf_cv_builtin_bool = 0
24687 then
24688         # C++ has no bool
24689         USE_CXX_BOOL=0
24690 else
24691         # this is the normal case
24692         USE_CXX_BOOL='defined(__cplusplus)'
24693 fi
24694
24695 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24696
24697         if test "$cf_with_ada" != "no" ; then
24698                 if test "$with_libtool" != "no"; then
24699                         { echo "$as_me:24699: WARNING: libtool does not support Ada - disabling feature" >&5
24700 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24701                         cf_with_ada=no
24702                 fi
24703         fi
24704
24705         if test "$cf_with_ada" != "no" ; then
24706
24707 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24708 do
24709
24710 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24711
24712         unset ac_cv_path_cf_TEMP_gnat
24713         unset cf_TEMP_gnat
24714         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24715 set dummy $cf_prog_gnat; ac_word=$2
24716 echo "$as_me:24716: checking for $ac_word" >&5
24717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24718 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24719   echo $ECHO_N "(cached) $ECHO_C" >&6
24720 else
24721   case $cf_TEMP_gnat in
24722   [\\/]* | ?:[\\/]*)
24723   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24724   ;;
24725   *)
24726   ac_save_IFS=$IFS; IFS=$ac_path_separator
24727 ac_dummy="$PATH"
24728 for ac_dir in $ac_dummy; do
24729   IFS=$ac_save_IFS
24730   test -z "$ac_dir" && ac_dir=.
24731   if $as_executable_p "$ac_dir/$ac_word"; then
24732    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24733    echo "$as_me:24733: found $ac_dir/$ac_word" >&5
24734    break
24735 fi
24736 done
24737
24738   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24739   ;;
24740 esac
24741 fi
24742 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24743
24744 if test -n "$cf_TEMP_gnat"; then
24745   echo "$as_me:24745: result: $cf_TEMP_gnat" >&5
24746 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24747 else
24748   echo "$as_me:24748: result: no" >&5
24749 echo "${ECHO_T}no" >&6
24750 fi
24751
24752         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24753
24754         if test "x$cf_TEMP_gnat" != xno; then
24755                 unset cf_cv_gnat_version
24756                 unset cf_TEMP_gnat
24757
24758 echo "$as_me:24758: checking for $cf_prog_gnat version" >&5
24759 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24760 if test "${cf_cv_gnat_version+set}" = set; then
24761   echo $ECHO_N "(cached) $ECHO_C" >&6
24762 else
24763
24764 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24765         grep '[0-9].[0-9][0-9]*' |\
24766         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24767
24768 fi
24769 echo "$as_me:24769: result: $cf_cv_gnat_version" >&5
24770 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24771 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24772 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24773
24774         fi
24775         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24776
24777         unset cf_TEMP_gnat
24778         unset cf_cv_gnat_version
24779         unset ac_cv_path_cf_TEMP_gnat
24780 done
24781
24782 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24783         cf_ada_make=
24784         cf_cv_prog_gnat_correct=no
24785 else
24786         cf_ada_make=gnatmake
24787         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24788                 # gprconfig is newer than gnatmake; we can continue...
24789                 cf_ada_config="##"
24790         else
24791                 rm -rf conftest* *~conftest*
24792                 if mkdir conftest.src
24793                 then
24794                         cf_ada_config=""
24795                         cd conftest.src
24796                         for cf_gprconfig in Ada C
24797                         do
24798                                 echo "$as_me:24798: checking for gprconfig name for $cf_gprconfig" >&5
24799 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24800                                 if test $cf_gprconfig = C
24801                                 then
24802                                         for cf_gprconfig_param in \
24803                                                 $cf_gprconfig,,,,GNATGCC \
24804                                                 $cf_gprconfig,,,,GCC \
24805                                                 $cf_gprconfig
24806                                         do
24807                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24808                                                 test -n "$cf_gprconfig_value" && break
24809                                         done
24810                                 else
24811                                         cf_gprconfig_param=$cf_gprconfig
24812                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24813                                 fi
24814                                 if test -n "$cf_gprconfig_value"
24815                                 then
24816                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24817                                         echo "$as_me:24817: result: $cf_gprconfig_value" >&5
24818 echo "${ECHO_T}$cf_gprconfig_value" >&6
24819                                 else
24820                                         echo "$as_me:24820: result: missing" >&5
24821 echo "${ECHO_T}missing" >&6
24822                                         cf_ada_config="#"
24823                                         break
24824                                 fi
24825                         done
24826                         cd ..
24827                         rm -rf conftest* *~conftest*
24828                 fi
24829         fi
24830         if test "x$cf_ada_config" != "x#"
24831         then
24832
24833 echo "$as_me:24833: checking for gnat version" >&5
24834 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24835 if test "${cf_cv_gnat_version+set}" = set; then
24836   echo $ECHO_N "(cached) $ECHO_C" >&6
24837 else
24838
24839 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24840         grep '[0-9].[0-9][0-9]*' |\
24841         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24842
24843 fi
24844 echo "$as_me:24844: result: $cf_cv_gnat_version" >&5
24845 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24846 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24847
24848 case $cf_cv_gnat_version in
24849 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24850         cf_cv_prog_gnat_correct=yes
24851         ;;
24852 (*)
24853         { echo "$as_me:24853: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24854 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24855         cf_cv_prog_gnat_correct=no
24856         ;;
24857 esac
24858
24859                 # Extract the first word of "m4", so it can be a program name with args.
24860 set dummy m4; ac_word=$2
24861 echo "$as_me:24861: checking for $ac_word" >&5
24862 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24863 if test "${ac_cv_prog_M4_exists+set}" = set; then
24864   echo $ECHO_N "(cached) $ECHO_C" >&6
24865 else
24866   if test -n "$M4_exists"; then
24867   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24868 else
24869   ac_save_IFS=$IFS; IFS=$ac_path_separator
24870 ac_dummy="$PATH"
24871 for ac_dir in $ac_dummy; do
24872   IFS=$ac_save_IFS
24873   test -z "$ac_dir" && ac_dir=.
24874   $as_executable_p "$ac_dir/$ac_word" || continue
24875 ac_cv_prog_M4_exists="yes"
24876 echo "$as_me:24876: found $ac_dir/$ac_word" >&5
24877 break
24878 done
24879
24880   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24881 fi
24882 fi
24883 M4_exists=$ac_cv_prog_M4_exists
24884 if test -n "$M4_exists"; then
24885   echo "$as_me:24885: result: $M4_exists" >&5
24886 echo "${ECHO_T}$M4_exists" >&6
24887 else
24888   echo "$as_me:24888: result: no" >&5
24889 echo "${ECHO_T}no" >&6
24890 fi
24891
24892                 if test "$ac_cv_prog_M4_exists" = no; then
24893                         cf_cv_prog_gnat_correct=no
24894                         { echo "$as_me:24894: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24895 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24896                 fi
24897                 if test "$cf_cv_prog_gnat_correct" = yes; then
24898                         echo "$as_me:24898: checking if GNAT works" >&5
24899 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24900
24901 rm -rf conftest* *~conftest*
24902 cat >>conftest.ads <<CF_EOF
24903 procedure conftest;
24904 CF_EOF
24905 cat >>conftest.adb <<CF_EOF
24906 with Text_IO;
24907 with GNAT.OS_Lib;
24908 procedure conftest is
24909 begin
24910    Text_IO.Put ("Hello World");
24911    Text_IO.New_Line;
24912    GNAT.OS_Lib.OS_Exit (0);
24913 end conftest;
24914 CF_EOF
24915 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24916    if ( ./conftest 1>&5 2>&1 ) ; then
24917       cf_cv_prog_gnat_correct=yes
24918    else
24919       cf_cv_prog_gnat_correct=no
24920    fi
24921 else
24922    cf_cv_prog_gnat_correct=no
24923 fi
24924 rm -rf conftest* *~conftest*
24925
24926                         echo "$as_me:24926: result: $cf_cv_prog_gnat_correct" >&5
24927 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24928                 fi
24929         else
24930                 cf_cv_prog_gnat_correct=no
24931         fi
24932 fi
24933
24934                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24935
24936         ADAFLAGS="$ADAFLAGS -gnatpn"
24937
24938         echo "$as_me:24938: checking optimization options for ADAFLAGS" >&5
24939 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24940         case "$CFLAGS" in
24941         (*-g*)
24942
24943         ADAFLAGS="$ADAFLAGS -g"
24944
24945                 ;;
24946         esac
24947         case "$CFLAGS" in
24948         (*-O*)
24949                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24950
24951         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24952
24953                 ;;
24954         esac
24955         echo "$as_me:24955: result: $ADAFLAGS" >&5
24956 echo "${ECHO_T}$ADAFLAGS" >&6
24957
24958 echo "$as_me:24958: checking if GNATPREP supports -T option" >&5
24959 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24960 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24961   echo $ECHO_N "(cached) $ECHO_C" >&6
24962 else
24963
24964 cf_cv_gnatprep_opt_t=no
24965 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24966
24967 fi
24968 echo "$as_me:24968: result: $cf_cv_gnatprep_opt_t" >&5
24969 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24970 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24971
24972 echo "$as_me:24972: checking if GNAT supports generics" >&5
24973 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24974 case $cf_cv_gnat_version in
24975 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24976         cf_gnat_generics=yes
24977         ;;
24978 (*)
24979         cf_gnat_generics=no
24980         ;;
24981 esac
24982 echo "$as_me:24982: result: $cf_gnat_generics" >&5
24983 echo "${ECHO_T}$cf_gnat_generics" >&6
24984
24985 if test "$cf_gnat_generics" = yes
24986 then
24987         cf_compile_generics=generics
24988         cf_generic_objects="\${GENOBJS}"
24989 else
24990         cf_compile_generics=
24991         cf_generic_objects=
24992 fi
24993
24994 echo "$as_me:24994: checking if GNAT supports SIGINT" >&5
24995 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24996 if test "${cf_cv_gnat_sigint+set}" = set; then
24997   echo $ECHO_N "(cached) $ECHO_C" >&6
24998 else
24999
25000 rm -rf conftest* *~conftest*
25001 cat >>conftest.ads <<CF_EOF
25002 with Ada.Interrupts.Names;
25003
25004 package ConfTest is
25005
25006    pragma Warnings (Off);  --  the next pragma exists since 3.11p
25007    pragma Unreserve_All_Interrupts;
25008    pragma Warnings (On);
25009
25010    protected Process is
25011       procedure Stop;
25012       function Continue return Boolean;
25013       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
25014    private
25015       Done : Boolean := False;
25016    end Process;
25017
25018 end ConfTest;
25019 CF_EOF
25020 cat >>conftest.adb <<CF_EOF
25021 package body ConfTest is
25022    protected body Process is
25023       procedure Stop is
25024       begin
25025          Done := True;
25026       end Stop;
25027       function Continue return Boolean is
25028       begin
25029          return not Done;
25030       end Continue;
25031    end Process;
25032 end ConfTest;
25033 CF_EOF
25034 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
25035       cf_cv_gnat_sigint=yes
25036 else
25037    cf_cv_gnat_sigint=no
25038 fi
25039 rm -rf conftest* *~conftest*
25040
25041 fi
25042 echo "$as_me:25042: result: $cf_cv_gnat_sigint" >&5
25043 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
25044
25045 if test $cf_cv_gnat_sigint = yes ; then
25046         USE_GNAT_SIGINT=""
25047 else
25048         USE_GNAT_SIGINT="#"
25049 fi
25050
25051 cf_gnat_libraries=no
25052 cf_gnat_projects=no
25053
25054 if test "$enable_gnat_projects" != no ; then
25055 echo "$as_me:25055: checking if GNAT supports project files" >&5
25056 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
25057 case $cf_cv_gnat_version in
25058 (3.[0-9]*)
25059         ;;
25060 (*)
25061         case $cf_cv_system_name in
25062         (cygwin*|msys*)
25063                 ;;
25064         (*)
25065                 rm -rf conftest* *~conftest*
25066                 if mkdir conftest.src conftest.bin conftest.lib
25067                 then
25068                         cd conftest.src
25069                         rm -rf conftest* *~conftest*
25070                         cat >>library.gpr <<CF_EOF
25071 project Library is
25072   Kind := External ("LIB_KIND");
25073   for Library_Name use "ConfTest";
25074   for Object_Dir use ".";
25075   for Library_ALI_Dir use External("LIBRARY_DIR");
25076   for Library_Version use External ("SONAME");
25077   for Library_Kind use Kind;
25078   for Library_Dir use External("BUILD_DIR");
25079   Source_Dir := External ("SOURCE_DIR");
25080   for Source_Dirs use (Source_Dir);
25081 end Library;
25082 CF_EOF
25083                         cat >>confpackage.ads <<CF_EOF
25084 package ConfPackage is
25085    procedure conftest;
25086 end ConfPackage;
25087 CF_EOF
25088                         cat >>confpackage.adb <<CF_EOF
25089 with Text_IO;
25090 package body ConfPackage is
25091    procedure conftest is
25092    begin
25093       Text_IO.Put ("Hello World");
25094       Text_IO.New_Line;
25095    end conftest;
25096 end ConfPackage;
25097 CF_EOF
25098                         if ( $cf_ada_make $ADAFLAGS \
25099                                         -Plibrary.gpr \
25100                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
25101                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
25102                                         -XSOURCE_DIR=`pwd` \
25103                                         -XSONAME=libConfTest.so.1 \
25104                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
25105                                 cf_gnat_projects=yes
25106                         fi
25107                         cd ..
25108                 fi
25109                 if test -f conftest.lib/confpackage.ali
25110                 then
25111                         cf_gnat_libraries=yes
25112                 fi
25113                 rm -rf conftest* *~conftest*
25114                 ;;
25115         esac
25116         ;;
25117 esac
25118 echo "$as_me:25118: result: $cf_gnat_projects" >&5
25119 echo "${ECHO_T}$cf_gnat_projects" >&6
25120 fi # enable_gnat_projects
25121
25122 if test $cf_gnat_projects = yes
25123 then
25124         echo "$as_me:25124: checking if GNAT supports libraries" >&5
25125 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25126         echo "$as_me:25126: result: $cf_gnat_libraries" >&5
25127 echo "${ECHO_T}$cf_gnat_libraries" >&6
25128 fi
25129
25130 if test "$cf_gnat_projects" = yes
25131 then
25132         USE_OLD_MAKERULES="#"
25133         USE_GNAT_PROJECTS=""
25134 else
25135         USE_OLD_MAKERULES=""
25136         USE_GNAT_PROJECTS="#"
25137 fi
25138
25139 if test "$cf_gnat_libraries" = yes
25140 then
25141         USE_GNAT_LIBRARIES=""
25142 else
25143         USE_GNAT_LIBRARIES="#"
25144 fi
25145
25146 echo "$as_me:25146: checking for ada-compiler" >&5
25147 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25148
25149 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25150 if test "${with_ada_compiler+set}" = set; then
25151   withval="$with_ada_compiler"
25152   cf_ada_compiler=$withval
25153 else
25154   cf_ada_compiler=gnatmake
25155 fi;
25156
25157 echo "$as_me:25157: result: $cf_ada_compiler" >&5
25158 echo "${ECHO_T}$cf_ada_compiler" >&6
25159
25160                         cf_ada_package=terminal_interface
25161
25162 echo "$as_me:25162: checking for ada-include" >&5
25163 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25164
25165 # Check whether --with-ada-include or --without-ada-include was given.
25166 if test "${with_ada_include+set}" = set; then
25167   withval="$with_ada_include"
25168
25169 else
25170   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25171 fi; if test -n "$prefix/share/ada/adainclude" ; then
25172
25173 if test "x$prefix" != xNONE; then
25174         cf_path_syntax="$prefix"
25175 else
25176         cf_path_syntax="$ac_default_prefix"
25177 fi
25178
25179 case ".$withval" in
25180 (.\$\(*\)*|.\'*\'*)
25181         ;;
25182 (..|./*|.\\*)
25183         ;;
25184 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25185         ;;
25186 (.\${*prefix}*|.\${*dir}*)
25187         eval withval="$withval"
25188         case ".$withval" in
25189         (.NONE/*)
25190                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25191                 ;;
25192         esac
25193         ;;
25194 (.no|.NONE/*)
25195         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25196         ;;
25197 (*)
25198         { { echo "$as_me:25198: error: expected a pathname, not \"$withval\"" >&5
25199 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25200    { (exit 1); exit 1; }; }
25201         ;;
25202 esac
25203
25204 fi
25205 eval ADA_INCLUDE="$withval"
25206
25207 echo "$as_me:25207: result: $ADA_INCLUDE" >&5
25208 echo "${ECHO_T}$ADA_INCLUDE" >&6
25209
25210 echo "$as_me:25210: checking for ada-objects" >&5
25211 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25212
25213 # Check whether --with-ada-objects or --without-ada-objects was given.
25214 if test "${with_ada_objects+set}" = set; then
25215   withval="$with_ada_objects"
25216
25217 else
25218   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25219 fi; if test -n "$prefix/lib/ada/adalib" ; then
25220
25221 if test "x$prefix" != xNONE; then
25222         cf_path_syntax="$prefix"
25223 else
25224         cf_path_syntax="$ac_default_prefix"
25225 fi
25226
25227 case ".$withval" in
25228 (.\$\(*\)*|.\'*\'*)
25229         ;;
25230 (..|./*|.\\*)
25231         ;;
25232 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25233         ;;
25234 (.\${*prefix}*|.\${*dir}*)
25235         eval withval="$withval"
25236         case ".$withval" in
25237         (.NONE/*)
25238                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25239                 ;;
25240         esac
25241         ;;
25242 (.no|.NONE/*)
25243         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25244         ;;
25245 (*)
25246         { { echo "$as_me:25246: error: expected a pathname, not \"$withval\"" >&5
25247 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25248    { (exit 1); exit 1; }; }
25249         ;;
25250 esac
25251
25252 fi
25253 eval ADA_OBJECTS="$withval"
25254
25255 echo "$as_me:25255: result: $ADA_OBJECTS" >&5
25256 echo "${ECHO_T}$ADA_OBJECTS" >&6
25257
25258 echo "$as_me:25258: checking if an Ada95 shared-library should be built" >&5
25259 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25260
25261 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25262 if test "${with_ada_sharedlib+set}" = set; then
25263   withval="$with_ada_sharedlib"
25264   with_ada_sharedlib=$withval
25265 else
25266   with_ada_sharedlib=no
25267 fi;
25268 echo "$as_me:25268: result: $with_ada_sharedlib" >&5
25269 echo "${ECHO_T}$with_ada_sharedlib" >&6
25270
25271 if test "x$with_ada_sharedlib" != xno
25272 then
25273         if test "x$cf_gnat_projects" != xyes
25274         then
25275                 { echo "$as_me:25275: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25276 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25277                 with_ada_sharedlib=no
25278         fi
25279 fi
25280
25281 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25282 MAKE_ADA_SHAREDLIB="#"
25283
25284 if test "x$with_ada_sharedlib" != xno
25285 then
25286         MAKE_ADA_SHAREDLIB=
25287         if test "x$with_ada_sharedlib" != xyes
25288         then
25289                 ADA_SHAREDLIB="$with_ada_sharedlib"
25290         fi
25291 fi
25292
25293                         # allow the Ada binding to be renamed
25294
25295 echo "$as_me:25295: checking for ada-libname" >&5
25296 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25297
25298 # Check whether --with-ada-libname or --without-ada-libname was given.
25299 if test "${with_ada_libname+set}" = set; then
25300   withval="$with_ada_libname"
25301   ADA_LIBNAME=$withval
25302 else
25303   ADA_LIBNAME=AdaCurses
25304 fi;
25305 case "x$ADA_LIBNAME" in
25306 (x|xyes|xno)
25307         ADA_LIBNAME=AdaCurses
25308         ;;
25309 esac
25310
25311 echo "$as_me:25311: result: $ADA_LIBNAME" >&5
25312 echo "${ECHO_T}$ADA_LIBNAME" >&6
25313
25314                 fi
25315         fi
25316 else
25317         cf_with_ada=no
25318 fi
25319
25320 # do this "late" to avoid conflict with header-checks
25321 if test "x$with_widec" = xyes ; then
25322         echo "$as_me:25322: checking for wchar_t" >&5
25323 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25324 if test "${ac_cv_type_wchar_t+set}" = set; then
25325   echo $ECHO_N "(cached) $ECHO_C" >&6
25326 else
25327   cat >conftest.$ac_ext <<_ACEOF
25328 #line 25328 "configure"
25329 #include "confdefs.h"
25330 $ac_includes_default
25331 int
25332 main (void)
25333 {
25334 if ((wchar_t *) 0)
25335   return 0;
25336 if (sizeof (wchar_t))
25337   return 0;
25338   ;
25339   return 0;
25340 }
25341 _ACEOF
25342 rm -f conftest.$ac_objext
25343 if { (eval echo "$as_me:25343: \"$ac_compile\"") >&5
25344   (eval $ac_compile) 2>&5
25345   ac_status=$?
25346   echo "$as_me:25346: \$? = $ac_status" >&5
25347   (exit $ac_status); } &&
25348          { ac_try='test -s conftest.$ac_objext'
25349   { (eval echo "$as_me:25349: \"$ac_try\"") >&5
25350   (eval $ac_try) 2>&5
25351   ac_status=$?
25352   echo "$as_me:25352: \$? = $ac_status" >&5
25353   (exit $ac_status); }; }; then
25354   ac_cv_type_wchar_t=yes
25355 else
25356   echo "$as_me: failed program was:" >&5
25357 cat conftest.$ac_ext >&5
25358 ac_cv_type_wchar_t=no
25359 fi
25360 rm -f conftest.$ac_objext conftest.$ac_ext
25361 fi
25362 echo "$as_me:25362: result: $ac_cv_type_wchar_t" >&5
25363 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25364
25365 echo "$as_me:25365: checking size of wchar_t" >&5
25366 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25367 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25368   echo $ECHO_N "(cached) $ECHO_C" >&6
25369 else
25370   if test "$ac_cv_type_wchar_t" = yes; then
25371   if test "$cross_compiling" = yes; then
25372   # Depending upon the size, compute the lo and hi bounds.
25373 cat >conftest.$ac_ext <<_ACEOF
25374 #line 25374 "configure"
25375 #include "confdefs.h"
25376 $ac_includes_default
25377 int
25378 main (void)
25379 {
25380 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25381   ;
25382   return 0;
25383 }
25384 _ACEOF
25385 rm -f conftest.$ac_objext
25386 if { (eval echo "$as_me:25386: \"$ac_compile\"") >&5
25387   (eval $ac_compile) 2>&5
25388   ac_status=$?
25389   echo "$as_me:25389: \$? = $ac_status" >&5
25390   (exit $ac_status); } &&
25391          { ac_try='test -s conftest.$ac_objext'
25392   { (eval echo "$as_me:25392: \"$ac_try\"") >&5
25393   (eval $ac_try) 2>&5
25394   ac_status=$?
25395   echo "$as_me:25395: \$? = $ac_status" >&5
25396   (exit $ac_status); }; }; then
25397   ac_lo=0 ac_mid=0
25398   while :; do
25399     cat >conftest.$ac_ext <<_ACEOF
25400 #line 25400 "configure"
25401 #include "confdefs.h"
25402 $ac_includes_default
25403 int
25404 main (void)
25405 {
25406 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25407   ;
25408   return 0;
25409 }
25410 _ACEOF
25411 rm -f conftest.$ac_objext
25412 if { (eval echo "$as_me:25412: \"$ac_compile\"") >&5
25413   (eval $ac_compile) 2>&5
25414   ac_status=$?
25415   echo "$as_me:25415: \$? = $ac_status" >&5
25416   (exit $ac_status); } &&
25417          { ac_try='test -s conftest.$ac_objext'
25418   { (eval echo "$as_me:25418: \"$ac_try\"") >&5
25419   (eval $ac_try) 2>&5
25420   ac_status=$?
25421   echo "$as_me:25421: \$? = $ac_status" >&5
25422   (exit $ac_status); }; }; then
25423   ac_hi=$ac_mid; break
25424 else
25425   echo "$as_me: failed program was:" >&5
25426 cat conftest.$ac_ext >&5
25427 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25428 fi
25429 rm -f conftest.$ac_objext conftest.$ac_ext
25430   done
25431 else
25432   echo "$as_me: failed program was:" >&5
25433 cat conftest.$ac_ext >&5
25434 ac_hi=-1 ac_mid=-1
25435   while :; do
25436     cat >conftest.$ac_ext <<_ACEOF
25437 #line 25437 "configure"
25438 #include "confdefs.h"
25439 $ac_includes_default
25440 int
25441 main (void)
25442 {
25443 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25444   ;
25445   return 0;
25446 }
25447 _ACEOF
25448 rm -f conftest.$ac_objext
25449 if { (eval echo "$as_me:25449: \"$ac_compile\"") >&5
25450   (eval $ac_compile) 2>&5
25451   ac_status=$?
25452   echo "$as_me:25452: \$? = $ac_status" >&5
25453   (exit $ac_status); } &&
25454          { ac_try='test -s conftest.$ac_objext'
25455   { (eval echo "$as_me:25455: \"$ac_try\"") >&5
25456   (eval $ac_try) 2>&5
25457   ac_status=$?
25458   echo "$as_me:25458: \$? = $ac_status" >&5
25459   (exit $ac_status); }; }; then
25460   ac_lo=$ac_mid; break
25461 else
25462   echo "$as_me: failed program was:" >&5
25463 cat conftest.$ac_ext >&5
25464 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25465 fi
25466 rm -f conftest.$ac_objext conftest.$ac_ext
25467   done
25468 fi
25469 rm -f conftest.$ac_objext conftest.$ac_ext
25470 # Binary search between lo and hi bounds.
25471 while test "x$ac_lo" != "x$ac_hi"; do
25472   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25473   cat >conftest.$ac_ext <<_ACEOF
25474 #line 25474 "configure"
25475 #include "confdefs.h"
25476 $ac_includes_default
25477 int
25478 main (void)
25479 {
25480 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25481   ;
25482   return 0;
25483 }
25484 _ACEOF
25485 rm -f conftest.$ac_objext
25486 if { (eval echo "$as_me:25486: \"$ac_compile\"") >&5
25487   (eval $ac_compile) 2>&5
25488   ac_status=$?
25489   echo "$as_me:25489: \$? = $ac_status" >&5
25490   (exit $ac_status); } &&
25491          { ac_try='test -s conftest.$ac_objext'
25492   { (eval echo "$as_me:25492: \"$ac_try\"") >&5
25493   (eval $ac_try) 2>&5
25494   ac_status=$?
25495   echo "$as_me:25495: \$? = $ac_status" >&5
25496   (exit $ac_status); }; }; then
25497   ac_hi=$ac_mid
25498 else
25499   echo "$as_me: failed program was:" >&5
25500 cat conftest.$ac_ext >&5
25501 ac_lo=`expr $ac_mid + 1`
25502 fi
25503 rm -f conftest.$ac_objext conftest.$ac_ext
25504 done
25505 ac_cv_sizeof_wchar_t=$ac_lo
25506 else
25507   if test "$cross_compiling" = yes; then
25508   { { echo "$as_me:25508: error: cannot run test program while cross compiling" >&5
25509 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25510    { (exit 1); exit 1; }; }
25511 else
25512   cat >conftest.$ac_ext <<_ACEOF
25513 #line 25513 "configure"
25514 #include "confdefs.h"
25515 $ac_includes_default
25516 int
25517 main (void)
25518 {
25519 FILE *f = fopen ("conftest.val", "w");
25520 if (!f)
25521   $ac_main_return (1);
25522 fprintf (f, "%d", (sizeof (wchar_t)));
25523 fclose (f);
25524   ;
25525   return 0;
25526 }
25527 _ACEOF
25528 rm -f conftest$ac_exeext
25529 if { (eval echo "$as_me:25529: \"$ac_link\"") >&5
25530   (eval $ac_link) 2>&5
25531   ac_status=$?
25532   echo "$as_me:25532: \$? = $ac_status" >&5
25533   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25534   { (eval echo "$as_me:25534: \"$ac_try\"") >&5
25535   (eval $ac_try) 2>&5
25536   ac_status=$?
25537   echo "$as_me:25537: \$? = $ac_status" >&5
25538   (exit $ac_status); }; }; then
25539   ac_cv_sizeof_wchar_t=`cat conftest.val`
25540 else
25541   echo "$as_me: program exited with status $ac_status" >&5
25542 echo "$as_me: failed program was:" >&5
25543 cat conftest.$ac_ext >&5
25544 fi
25545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25546 fi
25547 fi
25548 rm -f conftest.val
25549 else
25550   ac_cv_sizeof_wchar_t=0
25551 fi
25552 fi
25553 echo "$as_me:25553: result: $ac_cv_sizeof_wchar_t" >&5
25554 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25555 cat >>confdefs.h <<EOF
25556 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25557 EOF
25558
25559         # cross-compiling to mingw can run into the problem that attempting to
25560         # link with the regex library fails, causing the test to not set this to
25561         # a number.  "recent" autoconf does not address this problem either -TD
25562         if test -z "$ac_cv_sizeof_wchar_t"
25563         then
25564                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25565
25566 echo "${as_me:-configure}:25566: testing test failed (assume 2) ..." 1>&5
25567
25568                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25569                 mv confdefs.tmp confdefs.h
25570                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25571         fi
25572 fi
25573
25574 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25575 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25576 ###
25577 ### ticlib modules may be a separate library, otherwise contained in termlib.
25578 ### termlib modules may be a separate library, otherwise contained in ncurses.
25579 ###
25580 ### The of "+" or " " between the tokens controls the way the script
25581 ### chooses to split module lists into libraries.
25582 ###
25583 ### (see CF_LIB_RULES).
25584 echo "$as_me:25584: checking for library subsets" >&5
25585 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25586 LIB_SUBSETS=
25587
25588 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25589         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25590         if test "$with_ticlib" != no ; then
25591                 LIB_SUBSETS="${LIB_SUBSETS} "
25592         else
25593                 LIB_SUBSETS="${LIB_SUBSETS}+"
25594         fi
25595 fi
25596
25597 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25598 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25599
25600 if test "$with_termlib" != no ; then
25601         LIB_SUBSETS="${LIB_SUBSETS} "
25602 else
25603         LIB_SUBSETS="${LIB_SUBSETS}+"
25604 fi
25605
25606 LIB_SUBSETS="${LIB_SUBSETS}base"
25607
25608 # Most term-driver calls are to tinfo, but some like init_pair are to the
25609 # base library (so it resides in base).
25610 if test "$with_term_driver" != no ; then
25611         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25612         case $cf_cv_system_name in
25613         (*mingw32*|*mingw64*)
25614                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25615                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25616                 ;;
25617         (*)
25618                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25619                 ;;
25620         esac
25621 fi
25622
25623 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25624 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25625
25626 echo "$as_me:25626: result: $LIB_SUBSETS" >&5
25627 echo "${ECHO_T}$LIB_SUBSETS" >&6
25628
25629 ### Construct the list of include-directories to be generated
25630
25631 if test "$srcdir" != "."; then
25632         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25633 fi
25634 CPPFLAGS="-I../include $CPPFLAGS"
25635 if test "$srcdir" != "."; then
25636         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25637 fi
25638 CPPFLAGS="-I. $CPPFLAGS"
25639
25640 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25641 if test "$srcdir" != "."; then
25642         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25643 fi
25644 if test "$GCC" != yes; then
25645         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25646 elif test "$includedir" != "/usr/include"; then
25647         if test "$includedir" = '${prefix}/include' ; then
25648                 if test x$prefix != x/usr ; then
25649                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25650                 fi
25651         else
25652                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25653         fi
25654 fi
25655
25656 ### Build up pieces for makefile rules
25657 echo "$as_me:25657: checking default library suffix" >&5
25658 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25659
25660         case $DFT_LWR_MODEL in
25661         (libtool) DFT_ARG_SUFFIX=''   ;;
25662         (normal)  DFT_ARG_SUFFIX=''   ;;
25663         (debug)   DFT_ARG_SUFFIX='_g' ;;
25664         (profile) DFT_ARG_SUFFIX='_p' ;;
25665         (shared)  DFT_ARG_SUFFIX=''   ;;
25666         esac
25667         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25668 echo "$as_me:25668: result: $DFT_ARG_SUFFIX" >&5
25669 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25670
25671 echo "$as_me:25671: checking default library-dependency suffix" >&5
25672 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25673
25674         case X$DFT_LWR_MODEL in
25675         (Xlibtool)
25676                 DFT_LIB_SUFFIX='.la'
25677                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25678                 ;;
25679         (Xdebug)
25680                 case $cf_cv_system_name in
25681                 (*-msvc*)
25682                         DFT_LIB_SUFFIX='_g.lib'
25683                         ;;
25684                 (*)
25685                         DFT_LIB_SUFFIX='_g.a'
25686                         ;;
25687                 esac
25688                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25689                 ;;
25690         (Xprofile)
25691                 case $cf_cv_system_name in
25692                 (*-msvc*)
25693                         DFT_LIB_SUFFIX='_p.lib'
25694                         ;;
25695                 (*)
25696                         DFT_LIB_SUFFIX='_p.a'
25697                         ;;
25698                 esac
25699                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25700                 ;;
25701         (Xshared)
25702                 case $cf_cv_system_name in
25703                 (aix[5-7]*)
25704                         DFT_LIB_SUFFIX='.so'
25705                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25706                         ;;
25707                 (*-msvc*)
25708                         DFT_LIB_SUFFIX='.dll'
25709                         DFT_DEP_SUFFIX='.dll.lib'
25710                         ;;
25711                 (cygwin*|msys*|mingw*)
25712                         DFT_LIB_SUFFIX='.dll'
25713                         DFT_DEP_SUFFIX='.dll.a'
25714                         ;;
25715                 (darwin*)
25716                         DFT_LIB_SUFFIX='.dylib'
25717                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25718                         ;;
25719                 (hpux*)
25720                         case $target in
25721                         (ia64*)
25722                                 DFT_LIB_SUFFIX='.so'
25723                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25724                                 ;;
25725                         (*)
25726                                 DFT_LIB_SUFFIX='.sl'
25727                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25728                                 ;;
25729                         esac
25730                         ;;
25731                 (*)
25732                         DFT_LIB_SUFFIX='.so'
25733                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25734                         ;;
25735                 esac
25736                 ;;
25737         (*)
25738                 case $target in
25739                 (*-msvc*)
25740                         DFT_LIB_SUFFIX='.lib'
25741                         ;;
25742                 (*)
25743                         DFT_LIB_SUFFIX='.a'
25744                         ;;
25745                 esac
25746                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25747                 ;;
25748         esac
25749         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25750         then
25751                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25752                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25753         fi
25754 echo "$as_me:25754: result: $DFT_DEP_SUFFIX" >&5
25755 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25756
25757 echo "$as_me:25757: checking default object directory" >&5
25758 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25759
25760         case $DFT_LWR_MODEL in
25761         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25762         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25763         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25764         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25765         (shared)
25766                 case $cf_cv_system_name in
25767                 (cygwin|msys)
25768                         DFT_OBJ_SUBDIR='objects' ;;
25769                 (*)
25770                         DFT_OBJ_SUBDIR='obj_s' ;;
25771                 esac
25772         esac
25773 echo "$as_me:25773: result: $DFT_OBJ_SUBDIR" >&5
25774 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25775
25776 if test "x$cf_with_cxx" = xyes ; then
25777 echo "$as_me:25777: checking c++ library-dependency suffix" >&5
25778 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25779 if test "$with_libtool" != "no"; then
25780         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25781         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25782 elif test "$with_shared_cxx" != "no"; then
25783         # also for g++ users...
25784         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25785 else
25786         # we normally make a static library because C/C++ library rules differ
25787
25788         case Xnormal in
25789         (Xlibtool)
25790                 CXX_LIB_SUFFIX='.la'
25791                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25792                 ;;
25793         (Xdebug)
25794                 case $cf_cv_system_name in
25795                 (*-msvc*)
25796                         CXX_LIB_SUFFIX='_g.lib'
25797                         ;;
25798                 (*)
25799                         CXX_LIB_SUFFIX='_g.a'
25800                         ;;
25801                 esac
25802                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25803                 ;;
25804         (Xprofile)
25805                 case $cf_cv_system_name in
25806                 (*-msvc*)
25807                         CXX_LIB_SUFFIX='_p.lib'
25808                         ;;
25809                 (*)
25810                         CXX_LIB_SUFFIX='_p.a'
25811                         ;;
25812                 esac
25813                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25814                 ;;
25815         (Xshared)
25816                 case $cf_cv_system_name in
25817                 (aix[5-7]*)
25818                         CXX_LIB_SUFFIX='.so'
25819                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25820                         ;;
25821                 (*-msvc*)
25822                         CXX_LIB_SUFFIX='.dll'
25823                         CXX_DEP_SUFFIX='.dll.lib'
25824                         ;;
25825                 (cygwin*|msys*|mingw*)
25826                         CXX_LIB_SUFFIX='.dll'
25827                         CXX_DEP_SUFFIX='.dll.a'
25828                         ;;
25829                 (darwin*)
25830                         CXX_LIB_SUFFIX='.dylib'
25831                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25832                         ;;
25833                 (hpux*)
25834                         case $target in
25835                         (ia64*)
25836                                 CXX_LIB_SUFFIX='.so'
25837                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25838                                 ;;
25839                         (*)
25840                                 CXX_LIB_SUFFIX='.sl'
25841                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25842                                 ;;
25843                         esac
25844                         ;;
25845                 (*)
25846                         CXX_LIB_SUFFIX='.so'
25847                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25848                         ;;
25849                 esac
25850                 ;;
25851         (*)
25852                 case $target in
25853                 (*-msvc*)
25854                         CXX_LIB_SUFFIX='.lib'
25855                         ;;
25856                 (*)
25857                         CXX_LIB_SUFFIX='.a'
25858                         ;;
25859                 esac
25860                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25861                 ;;
25862         esac
25863         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25864         then
25865                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25866                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25867         fi
25868
25869 fi
25870 echo "$as_me:25870: result: $CXX_LIB_SUFFIX" >&5
25871 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25872
25873 fi
25874
25875 # do not want -ldl in build except as needed for -lncurses dependency
25876 if test "x$with_dlsym" = xyes ; then
25877 if test $DFT_LWR_MODEL = shared || \
25878    test $DFT_LWR_MODEL = libtool ; then
25879
25880 # remove dl library from $LIBS
25881 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25882
25883 fi
25884 fi
25885 ### Set up low-level terminfo dependencies for makefiles.
25886
25887 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25888 # do not need libdl
25889 TICS_LIST=
25890 if test "x$with_dlsym" = xyes ; then
25891
25892 # remove dl library from $SHLIB_LIST
25893 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25894
25895 fi
25896
25897 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25898 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25899 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25900 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25901 then
25902         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25903 fi
25904
25905 if test "$with_ticlib" != no ; then
25906
25907         if test "x$with_ticlib" != xyes ; then
25908                 TICS_NAME=$with_ticlib
25909                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25910                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25911                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25912                 TICS_LIB_SUFFIX="${with_ticlib}"
25913         else
25914                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25915                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25916                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25917                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25918         fi
25919         TICS_LDFLAGS="-L${LIB_DIR}"
25920         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25921 else
25922         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25923         TICS_LDFLAGS="-L${LIB_DIR}"
25924         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25925 fi
25926
25927 if test "$with_termlib" != no ; then
25928
25929         if test "x$with_termlib" != xyes ; then
25930                 TINFO_NAME=$with_termlib
25931                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25932                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25933                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25934                 TINFO_LIB_SUFFIX="${with_termlib}"
25935         else
25936                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25937                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25938                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25939                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25940         fi
25941
25942         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25943         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25944         if test "$DFT_LWR_MODEL" = "libtool"; then
25945                 TEST_ARGS="${TEST_DEPS}"
25946                 TEST_ARG2="${TEST_DEP2}"
25947                 TINFO_LDFLAGS="-L${LIB_DIR}"
25948                 TINFO_LIBS="$TEST_ARGS"
25949                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25950                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25951         else
25952                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25953                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25954                 if test "x$with_term_driver" != xno ; then
25955                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25956                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25957                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25958                 else
25959                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25960                         TINFO_LIBS="$TEST_ARGS"
25961                 fi
25962                 TINFO_LDFLAGS="-L${LIB_DIR}"
25963                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25964         fi
25965 else
25966         # the next lines are needed for linking libtic over libncurses
25967         TINFO_NAME=${LIB_NAME}
25968         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25969         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25970         if test "x$with_tic_depends" = xyes ; then
25971                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25972         else
25973                 TICS_LIST="$SHLIB_LIST"
25974         fi
25975
25976         TINFO_LDFLAGS="-L${LIB_DIR}"
25977         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25978 fi
25979
25980 if test "$DFT_LWR_MODEL" = shared ; then
25981         case $cf_cv_system_name in
25982         (cygwin*|msys*)
25983                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25984                 TINFO_SUFFIX=.dll
25985                 ;;
25986         esac
25987 fi
25988
25989 if test "x$with_dlsym" = xyes ; then
25990
25991 # remove dl library from $TICS_LIST
25992 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25993
25994 fi
25995
25996 if test "$DFT_LWR_MODEL" = "libtool"; then
25997         OBJEXT=lo
25998 fi
25999
26000 # needed for Ada95
26001 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
26002
26003 case $DFT_LWR_MODEL in
26004 (normal|debug|profile)
26005
26006 if test "$GCC" = yes ; then
26007         case $cf_cv_system_name in
26008         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
26009                 LDFLAGS_STATIC=
26010                 LDFLAGS_SHARED=
26011                 ;;
26012         (*)     # normally, except when broken
26013                 LDFLAGS_STATIC=-static
26014                 LDFLAGS_SHARED=-dynamic
26015                 ;;
26016         esac
26017 else
26018         case $cf_cv_system_name in
26019         (aix[4-7]*)     # from ld manpage
26020                 LDFLAGS_STATIC=-bstatic
26021                 LDFLAGS_SHARED=-bdynamic
26022                 ;;
26023         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
26024                 # We could also use just "archive" and "shared".
26025                 LDFLAGS_STATIC=-Wl,-a,archive_shared
26026                 LDFLAGS_SHARED=-Wl,-a,shared_archive
26027                 ;;
26028         (irix*)         # from ld manpage IRIX64
26029                 LDFLAGS_STATIC=-Bstatic
26030                 LDFLAGS_SHARED=-Bdynamic
26031                 ;;
26032         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
26033                 # alternative "-oldstyle_liblookup" (not in cc manpage)
26034                 LDFLAGS_STATIC=-noso
26035                 LDFLAGS_SHARED=-so_archive
26036                 ;;
26037         (solaris2*)
26038                 LDFLAGS_STATIC=-Bstatic
26039                 LDFLAGS_SHARED=-Bdynamic
26040                 ;;
26041         esac
26042 fi
26043
26044 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
26045 then
26046         echo "$as_me:26046: checking if linker supports switching between static/dynamic" >&5
26047 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
26048
26049         rm -f libconftest.a
26050         cat >conftest.$ac_ext <<EOF
26051 #line 26051 "configure"
26052 #include <stdio.h>
26053 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
26054 EOF
26055         if { (eval echo "$as_me:26055: \"$ac_compile\"") >&5
26056   (eval $ac_compile) 2>&5
26057   ac_status=$?
26058   echo "$as_me:26058: \$? = $ac_status" >&5
26059   (exit $ac_status); } ; then
26060                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
26061                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
26062         fi
26063         rm -f conftest.*
26064
26065         cf_save_LIBS="$LIBS"
26066
26067         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
26068         cat >conftest.$ac_ext <<_ACEOF
26069 #line 26069 "configure"
26070 #include "confdefs.h"
26071
26072 #line 26072 "configure"
26073 #include <stdio.h>
26074 int cf_ldflags_static(FILE *fp);
26075
26076 int
26077 main (void)
26078 {
26079
26080         return cf_ldflags_static(stdin);
26081
26082   ;
26083   return 0;
26084 }
26085 _ACEOF
26086 rm -f conftest.$ac_objext conftest$ac_exeext
26087 if { (eval echo "$as_me:26087: \"$ac_link\"") >&5
26088   (eval $ac_link) 2>&5
26089   ac_status=$?
26090   echo "$as_me:26090: \$? = $ac_status" >&5
26091   (exit $ac_status); } &&
26092          { ac_try='test -s conftest$ac_exeext'
26093   { (eval echo "$as_me:26093: \"$ac_try\"") >&5
26094   (eval $ac_try) 2>&5
26095   ac_status=$?
26096   echo "$as_me:26096: \$? = $ac_status" >&5
26097   (exit $ac_status); }; }; then
26098
26099         # some linkers simply ignore the -dynamic
26100         case x`file conftest$ac_exeext 2>/dev/null` in
26101         (*static*)
26102                 cf_ldflags_static=no
26103                 ;;
26104         (*)
26105                 cf_ldflags_static=yes
26106                 ;;
26107         esac
26108
26109 else
26110   echo "$as_me: failed program was:" >&5
26111 cat conftest.$ac_ext >&5
26112 cf_ldflags_static=no
26113 fi
26114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26115
26116         rm -f libconftest.*
26117         LIBS="$cf_save_LIBS"
26118
26119         echo "$as_me:26119: result: $cf_ldflags_static" >&5
26120 echo "${ECHO_T}$cf_ldflags_static" >&6
26121
26122         if test $cf_ldflags_static != yes
26123         then
26124                 LDFLAGS_STATIC=
26125                 LDFLAGS_SHARED=
26126         fi
26127 else
26128         LDFLAGS_STATIC=
26129         LDFLAGS_SHARED=
26130 fi
26131
26132         ;;
26133 esac
26134
26135 echo "$as_me:26135: checking where we will install curses.h" >&5
26136 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26137
26138 includesubdir=
26139 if test "$with_overwrite" = no && \
26140  ( test "x$includedir" = 'x${prefix}/include' || \
26141    test "x$includedir" = "x${prefix}/include" )
26142 then
26143         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26144 fi
26145 echo "$as_me:26145: result: ${includedir}${includesubdir}" >&5
26146 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26147
26148 ### Resolve a conflict between normal and wide-curses by forcing applications
26149 ### that will need libutf8 to add it to their configure script.
26150 if test "$with_overwrite" != no ; then
26151 if test "$NCURSES_LIBUTF8" = 1 ; then
26152         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26153         { echo "$as_me:26153: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26154 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26155 fi
26156 fi
26157 WITH_OVERWRITE=$with_overwrite
26158
26159 ### At least on MinGW a shared library build without libtool
26160 ### requires adding the additional libs to the link list.
26161 case $cf_cv_system_name in
26162 (*mingw32*|*mingw64*)
26163         if test "$DFT_LWR_MODEL" != "libtool"; then
26164            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
26165         fi
26166         ;;
26167 *)      ;;
26168 esac
26169
26170 # used to separate tack out of the tree
26171 NCURSES_TREE=
26172
26173 ### predefined stuff for the test programs
26174
26175 cat >>confdefs.h <<\EOF
26176 #define HAVE_SLK_COLOR 1
26177 EOF
26178
26179 # pkgsrc uses these
26180
26181 echo "$as_me:26181: checking for desired basename for form library" >&5
26182 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26183
26184 # Check whether --with-form-libname or --without-form-libname was given.
26185 if test "${with_form_libname+set}" = set; then
26186   withval="$with_form_libname"
26187   with_lib_basename=$withval
26188 else
26189   with_lib_basename=form
26190 fi;
26191 FORM_NAME="$with_lib_basename"
26192
26193 case "x$FORM_NAME" in
26194 (x|xno|xnone|xyes)
26195         FORM_NAME=form
26196         ;;
26197 (*)
26198         ;;
26199 esac
26200
26201 echo "$as_me:26201: result: $FORM_NAME" >&5
26202 echo "${ECHO_T}$FORM_NAME" >&6
26203
26204 echo "$as_me:26204: checking for desired basename for menu library" >&5
26205 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26206
26207 # Check whether --with-menu-libname or --without-menu-libname was given.
26208 if test "${with_menu_libname+set}" = set; then
26209   withval="$with_menu_libname"
26210   with_lib_basename=$withval
26211 else
26212   with_lib_basename=menu
26213 fi;
26214 MENU_NAME="$with_lib_basename"
26215
26216 case "x$MENU_NAME" in
26217 (x|xno|xnone|xyes)
26218         MENU_NAME=menu
26219         ;;
26220 (*)
26221         ;;
26222 esac
26223
26224 echo "$as_me:26224: result: $MENU_NAME" >&5
26225 echo "${ECHO_T}$MENU_NAME" >&6
26226
26227 echo "$as_me:26227: checking for desired basename for panel library" >&5
26228 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26229
26230 # Check whether --with-panel-libname or --without-panel-libname was given.
26231 if test "${with_panel_libname+set}" = set; then
26232   withval="$with_panel_libname"
26233   with_lib_basename=$withval
26234 else
26235   with_lib_basename=panel
26236 fi;
26237 PANEL_NAME="$with_lib_basename"
26238
26239 case "x$PANEL_NAME" in
26240 (x|xno|xnone|xyes)
26241         PANEL_NAME=panel
26242         ;;
26243 (*)
26244         ;;
26245 esac
26246
26247 echo "$as_me:26247: result: $PANEL_NAME" >&5
26248 echo "${ECHO_T}$PANEL_NAME" >&6
26249
26250 echo "$as_me:26250: checking for desired basename for cxx library" >&5
26251 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26252
26253 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26254 if test "${with_cxx_libname+set}" = set; then
26255   withval="$with_cxx_libname"
26256   with_lib_basename=$withval
26257 else
26258   with_lib_basename=ncurses++
26259 fi;
26260 CXX_NAME="$with_lib_basename"
26261
26262 case "x$CXX_NAME" in
26263 (x|xno|xnone|xyes)
26264         CXX_NAME=ncurses++
26265         ;;
26266 (*)
26267         ;;
26268 esac
26269
26270 echo "$as_me:26270: result: $CXX_NAME" >&5
26271 echo "${ECHO_T}$CXX_NAME" >&6
26272
26273 ### Construct the list of subdirectories for which we'll customize makefiles
26274 ### with the appropriate compile-rules.
26275
26276 echo "$as_me:26276: checking for src modules" >&5
26277 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26278
26279 # dependencies and linker-arguments for test-programs
26280 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26281 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26282 if test "$DFT_LWR_MODEL" = "libtool"; then
26283         TEST_ARGS="${TEST_DEPS}"
26284         TEST_ARG2="${TEST_DEP2}"
26285 else
26286         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26287         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26288 fi
26289
26290 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26291 cf_cv_src_modules=
26292 for cf_dir in $modules_to_build
26293 do
26294         if test -f $srcdir/$cf_dir/modules; then
26295
26296                 # We may/may not have tack in the distribution, though the
26297                 # makefile is.
26298                 if test $cf_dir = tack ; then
26299                         if test "x$cf_with_tack" != "xyes"; then
26300                                 continue
26301                         fi
26302                 fi
26303
26304                 if test -z "$cf_cv_src_modules"; then
26305                         cf_cv_src_modules=$cf_dir
26306                 else
26307                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26308                 fi
26309
26310                 # Make the ncurses_cfg.h file record the library interface files as
26311                 # well.  These are header files that are the same name as their
26312                 # directory.  Ncurses is the only library that does not follow
26313                 # that pattern.
26314                 if test $cf_dir = tack ; then
26315                         continue
26316                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26317
26318 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26319
26320                         cat >>confdefs.h <<EOF
26321 #define HAVE_${cf_have_include}_H 1
26322 EOF
26323
26324                         cat >>confdefs.h <<EOF
26325 #define HAVE_LIB${cf_have_include} 1
26326 EOF
26327
26328 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26329
26330 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26331
26332                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26333                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26334                         if test "$DFT_LWR_MODEL" = "libtool"; then
26335                                 TEST_ARGS="${TEST_DEPS}"
26336                                 TEST_ARG2="${TEST_DEP2}"
26337                         else
26338                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26339                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26340                         fi
26341                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26342                 fi
26343         fi
26344 done
26345 echo "$as_me:26345: result: $cf_cv_src_modules" >&5
26346 echo "${ECHO_T}$cf_cv_src_modules" >&6
26347
26348 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26349 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26350
26351 SRC_SUBDIRS=
26352 if test "x$cf_with_manpages" != xno ; then
26353         SRC_SUBDIRS="$SRC_SUBDIRS man"
26354 fi
26355 SRC_SUBDIRS="$SRC_SUBDIRS include"
26356 for cf_dir in $cf_cv_src_modules
26357 do
26358         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26359 done
26360 if test "x$cf_with_tests" != "xno" ; then
26361         SRC_SUBDIRS="$SRC_SUBDIRS test"
26362 fi
26363 # always make this, to install the ncurses-config script
26364 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26365 if test "$cf_with_cxx_binding" != no; then
26366         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26367         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26368 fi
26369
26370 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26371 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26372
26373 ADA_SUBDIRS=
26374 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26375         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26376         ADA_SUBDIRS="gen src"
26377         if test "x$cf_with_tests" != "xno" ; then
26378                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26379         fi
26380 fi
26381
26382 SUB_MAKEFILES=
26383 for cf_dir in $SRC_SUBDIRS
26384 do
26385         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26386 done
26387
26388 if test -n "$ADA_SUBDIRS"; then
26389         for cf_dir in $ADA_SUBDIRS
26390         do
26391                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26392         done
26393
26394 fi
26395
26396 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26397    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26398    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26399    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26400 fi
26401
26402 DIRS_TO_MAKE="lib"
26403 for cf_item in $cf_list_models
26404 do
26405
26406         case $cf_item in
26407         (libtool) cf_subdir='obj_lo'  ;;
26408         (normal)  cf_subdir='objects' ;;
26409         (debug)   cf_subdir='obj_g' ;;
26410         (profile) cf_subdir='obj_p' ;;
26411         (shared)
26412                 case $cf_cv_system_name in
26413                 (cygwin|msys)
26414                         cf_subdir='objects' ;;
26415                 (*)
26416                         cf_subdir='obj_s' ;;
26417                 esac
26418         esac
26419
26420         for cf_item2 in $DIRS_TO_MAKE
26421         do
26422                 test $cf_item2 = $cf_subdir && break
26423         done
26424         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26425 done
26426 for cf_dir in $DIRS_TO_MAKE
26427 do
26428         test ! -d $cf_dir && mkdir $cf_dir
26429 done
26430
26431 # symbols that differ when compiling Ada95 by itself.
26432 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26433
26434 # values to use as strings
26435
26436 cat >>confdefs.h <<EOF
26437 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26438 EOF
26439
26440 cat >>confdefs.h <<EOF
26441 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26442 EOF
26443
26444 ### Now that we're done running tests, add the compiler-warnings, if any
26445
26446 cf_fix_cppflags=no
26447 cf_new_cflags=
26448 cf_new_cppflags=
26449 cf_new_extra_cppflags=
26450
26451 for cf_add_cflags in $EXTRA_CFLAGS
26452 do
26453 case $cf_fix_cppflags in
26454 (no)
26455         case $cf_add_cflags in
26456         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
26457                 case $cf_add_cflags in
26458                 (-D*)
26459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
26460
26461                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26462                                 && test -z "${cf_tst_cflags}" \
26463                                 && cf_fix_cppflags=yes
26464
26465                         if test $cf_fix_cppflags = yes ; then
26466
26467         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26468         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26469
26470                                 continue
26471                         elif test "${cf_tst_cflags}" = "\"'" ; then
26472
26473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26475
26476                                 continue
26477                         fi
26478                         ;;
26479                 esac
26480                 case "$CPPFLAGS" in
26481                 (*$cf_add_cflags)
26482                         ;;
26483                 (*)
26484                         case $cf_add_cflags in
26485                         (-D*)
26486                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
26487
26488 CPPFLAGS=`echo "$CPPFLAGS" | \
26489         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
26490                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
26491
26492                                 ;;
26493                         esac
26494
26495         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
26496         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
26497
26498                         ;;
26499                 esac
26500                 ;;
26501         (*)
26502
26503         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26504         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26505
26506                 ;;
26507         esac
26508         ;;
26509 (yes)
26510
26511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26513
26514         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
26515
26516         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26517                 && test -z "${cf_tst_cflags}" \
26518                 && cf_fix_cppflags=no
26519         ;;
26520 esac
26521 done
26522
26523 if test -n "$cf_new_cflags" ; then
26524
26525         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26526         CFLAGS="${CFLAGS}$cf_new_cflags"
26527
26528 fi
26529
26530 if test -n "$cf_new_cppflags" ; then
26531
26532         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26533         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26534
26535 fi
26536
26537 if test -n "$cf_new_extra_cppflags" ; then
26538
26539         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26540         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26541
26542 fi
26543
26544 ### Define substitutions for header files to avoid name-pollution
26545
26546 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26547         HAVE_TCGETATTR=1
26548 else
26549         HAVE_TCGETATTR=0
26550 fi
26551
26552 if test "x$ac_cv_header_stdint_h" = xyes ; then
26553         HAVE_STDINT_H=1
26554 else
26555         HAVE_STDINT_H=0
26556 fi
26557
26558 if test "x$ac_cv_header_termio_h" = xyes ; then
26559         HAVE_TERMIO_H=1
26560 else
26561         HAVE_TERMIO_H=0
26562 fi
26563
26564 if test "x$ac_cv_header_termios_h" = xyes ; then
26565         HAVE_TERMIOS_H=1
26566 else
26567         HAVE_TERMIOS_H=0
26568 fi
26569
26570 ################################################################################
26571 test "x$use_database" = xyes && \
26572 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26573
26574 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26575 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26576
26577 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26578 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26579 fi
26580
26581 if test "x$cf_with_tests" != xno ; then
26582         MAKE_TESTS=
26583 else
26584         MAKE_TESTS="#"
26585 fi
26586
26587 ADAHTML_DIR=../../doc/html/ada
26588
26589 # workaround for OS/2 (20151017)
26590 case $cf_cv_system_name in
26591 (os2*)
26592         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26593         ;;
26594 (*)
26595         LIBTOOL_OPTS_CXX=
26596         ;;
26597 esac
26598
26599 # workaround for g++ versus Solaris (20131116)
26600 case $cf_cv_system_name in
26601 (solaris2*)
26602         case "x$CPPFLAGS" in
26603         (*-D_XOPEN_SOURCE_EXTENDED*)
26604                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26605
26606 echo "${as_me:-configure}:26606: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26607
26608                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26609                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26610                 ;;
26611         esac
26612         ;;
26613 esac
26614
26615 # Help to automatically enable the extended curses features when using either
26616 # the *-config or the ".pc" files by adding defines.
26617 echo "$as_me:26617: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26618 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26619 PKG_CFLAGS=
26620 for cf_loop1 in $CPPFLAGS_after_XOPEN
26621 do
26622         cf_found=no
26623         for cf_loop2 in $CPPFLAGS_before_XOPEN
26624         do
26625                 if test "x$cf_loop1" = "x$cf_loop2"
26626                 then
26627                         cf_found=yes
26628                         break
26629                 fi
26630         done
26631         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26632 done
26633 echo "$as_me:26633: result: $PKG_CFLAGS" >&5
26634 echo "${ECHO_T}$PKG_CFLAGS" >&6
26635
26636 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26637 case "x$NCURSES_OSPEED" in
26638 (*short*)
26639         cf_compatible=1
26640         ;;
26641 (*)
26642         cf_compatible=0
26643         ;;
26644 esac
26645
26646 cat >>confdefs.h <<EOF
26647 #define NCURSES_OSPEED_COMPAT $cf_compatible
26648 EOF
26649
26650 case "x$cf_cv_typeof_chtype" in
26651 (xshort|xint|xlong)
26652         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26653         ;;
26654 esac
26655
26656 case "x$cf_cv_typeof_mmask_t" in
26657 (xshort|xint|xlong)
26658         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26659         ;;
26660 esac
26661
26662 # substitute into misc/Makefile to suppress
26663 # (un)install.data from the
26664 # (un)install rules.
26665 if test "x$cf_with_db_install" = "xno"; then
26666         MISC_INSTALL_DATA=
26667         MISC_UNINSTALL_DATA=
26668 else
26669         MISC_INSTALL_DATA=install.data
26670         MISC_UNINSTALL_DATA=uninstall.data
26671 fi
26672
26673 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26674         MAKE_DATABASE="#"
26675 else
26676         MAKE_DATABASE="$MAKE_TERMINFO"
26677 fi
26678
26679 if test -n "$PACKAGE"
26680 then
26681         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26682         export PACKAGE
26683         echo "package: $PACKAGE"
26684 fi
26685
26686 UNALTERED_SYMS=
26687 cf_filter_syms=no
26688
26689 if test -n "$RESULTING_SYMS"
26690 then
26691         cf_filter_syms=$cf_dft_filter_syms
26692         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26693
26694 echo "${as_me:-configure}:26694: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26695
26696 fi
26697
26698 if test "x$WILDCARD_SYMS" = xno
26699 then
26700         cf_filter_syms=yes
26701 fi
26702
26703 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26704
26705 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26706 if test $cf_filter_syms = yes
26707 then
26708         RESULTING_SYMS=resulting.map
26709 fi
26710
26711 if test "x$cross_compiling" = xyes ; then
26712         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26713         CHECK_BUILD="#"
26714 else
26715         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26716         CHECK_BUILD=
26717 fi
26718
26719 # This is used for the *-config script and *.pc data files.
26720
26721 echo "$as_me:26721: checking for linker search path" >&5
26722 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26723 if test "${cf_cv_ld_searchpath+set}" = set; then
26724   echo $ECHO_N "(cached) $ECHO_C" >&6
26725 else
26726
26727 if test "$cross_compiling" != yes ; then
26728
26729 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26730 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26731
26732 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26733 # update the cache, which makes it run faster.
26734 test -z "$cf_pathlist" && \
26735         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26736
26737 test -z "$cf_pathlist" &&
26738         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26739
26740 # This works with OpenBSD 6.5, which lists only filenames
26741 test -z "$cf_pathlist" &&
26742         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26743
26744 if test -z "$cf_pathlist"
26745 then
26746         # dyld default path with MacOS
26747         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26748         then
26749                 # do this to bypass check
26750                 cf_cv_ld_searchpath='$HOME/lib'
26751                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26752         fi
26753 fi
26754
26755 if test -z "$cf_pathlist"
26756 then
26757         # Solaris is hardcoded
26758         if test -d /opt/SUNWspro/lib
26759         then
26760                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26761         elif test -d /usr/ccs/lib
26762         then
26763                 cf_pathlist="/usr/ccs/lib /usr/lib"
26764         fi
26765 fi
26766
26767 fi
26768
26769 # If nothing else, assume it is conventional
26770 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26771
26772 # Finally, check that this is only directories
26773 for cf_path in $0 $cf_pathlist
26774 do
26775         if test -d "$cf_path"; then
26776                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26777                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26778         fi
26779 done
26780
26781 # Ensure that it is nonempty
26782 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26783
26784 fi
26785 echo "$as_me:26785: result: $cf_cv_ld_searchpath" >&5
26786 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26787
26788 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26789
26790 cat >>confdefs.h <<\EOF
26791 #define HAVE_CURSES_DATA_BOOLNAMES 1
26792 EOF
26793
26794 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"
26795 ac_config_commands="$ac_config_commands default"
26796 cat >confcache <<\_ACEOF
26797 # This file is a shell script that caches the results of configure
26798 # tests run on this system so they can be shared between configure
26799 # scripts and configure runs, see configure's option --config-cache.
26800 # It is not useful on other systems.  If it contains results you don't
26801 # want to keep, you may remove or edit it.
26802 #
26803 # config.status only pays attention to the cache file if you give it
26804 # the --recheck option to rerun configure.
26805 #
26806 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26807 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26808 # following values.
26809
26810 _ACEOF
26811
26812 # The following way of writing the cache mishandles newlines in values,
26813 # but we know of no workaround that is simple, portable, and efficient.
26814 # So, don't put newlines in cache variables' values.
26815 # Ultrix sh set writes to stderr and can't be redirected directly,
26816 # and sets the high bit in the cache file unless we assign to the vars.
26817 {
26818   (set) 2>&1 |
26819     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26820     *ac_space=\ *)
26821       # `set' does not quote correctly, so add quotes (double-quote
26822       # substitution turns \\\\ into \\, and sed turns \\ into \).
26823       sed -n \
26824         "s/'/'\\\\''/g;
26825           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26826       ;;
26827     *)
26828       # `set' quotes correctly as required by POSIX, so do not add quotes.
26829       sed -n \
26830         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26831       ;;
26832     esac;
26833 } |
26834   sed '
26835      t clear
26836      : clear
26837      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26838      t end
26839      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26840      : end' >>confcache
26841 if cmp -s $cache_file confcache; then :; else
26842   if test -w $cache_file; then
26843     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26844     cat confcache >$cache_file
26845   else
26846     echo "not updating unwritable cache $cache_file"
26847   fi
26848 fi
26849 rm -f confcache
26850
26851 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26852 # Let make expand exec_prefix.
26853 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26854
26855 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26856 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26857 # trailing colons and then remove the whole line if VPATH becomes empty
26858 # (actually we leave an empty line to preserve line numbers).
26859 if test "x$srcdir" = x.; then
26860   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26861 s/:*\$(srcdir):*/:/;
26862 s/:*\${srcdir}:*/:/;
26863 s/:*@srcdir@:*/:/;
26864 s/^\([^=]*=[    ]*\):*/\1/;
26865 s/:*$//;
26866 s/^[^=]*=[      ]*$//;
26867 }'
26868 fi
26869
26870 DEFS=-DHAVE_CONFIG_H
26871
26872 : ${CONFIG_STATUS=./config.status}
26873 ac_clean_files_save=$ac_clean_files
26874 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26875 { echo "$as_me:26875: creating $CONFIG_STATUS" >&5
26876 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26877 cat >$CONFIG_STATUS <<_ACEOF
26878 #! $SHELL
26879 # Generated automatically by configure.
26880 # Run this file to recreate the current configuration.
26881 # Compiler output produced by configure, useful for debugging
26882 # configure, is in config.log if it exists.
26883
26884 debug=false
26885 SHELL=\${CONFIG_SHELL-$SHELL}
26886 ac_cs_invocation="\$0 \$@"
26887
26888 _ACEOF
26889
26890 cat >>$CONFIG_STATUS <<\_ACEOF
26891 # Be Bourne compatible
26892 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26893   emulate sh
26894   NULLCMD=:
26895 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26896   set -o posix
26897 fi
26898
26899 # Name of the executable.
26900 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26901
26902 if expr a : '\(a\)' >/dev/null 2>&1; then
26903   as_expr=expr
26904 else
26905   as_expr=false
26906 fi
26907
26908 rm -f conf$$ conf$$.exe conf$$.file
26909 echo >conf$$.file
26910 if ln -s conf$$.file conf$$ 2>/dev/null; then
26911   # We could just check for DJGPP; but this test a) works b) is more generic
26912   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26913   if test -f conf$$.exe; then
26914     # Don't use ln at all; we don't have any links
26915     as_ln_s='cp -p'
26916   else
26917     as_ln_s='ln -s'
26918   fi
26919 elif ln conf$$.file conf$$ 2>/dev/null; then
26920   as_ln_s=ln
26921 else
26922   as_ln_s='cp -p'
26923 fi
26924 rm -f conf$$ conf$$.exe conf$$.file
26925
26926 as_executable_p="test -f"
26927
26928 # Support unset when possible.
26929 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26930   as_unset=unset
26931 else
26932   as_unset=false
26933 fi
26934
26935 # NLS nuisances.
26936 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26937 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26938 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26939 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26940 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26941 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26942 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26943 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26944
26945 # IFS
26946 # We need space, tab and new line, in precisely that order.
26947 as_nl='
26948 '
26949 IFS="   $as_nl"
26950
26951 # CDPATH.
26952 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26953
26954 exec 6>&1
26955
26956 _ACEOF
26957
26958 # Files that config.status was made for.
26959 if test -n "$ac_config_files"; then
26960   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26961 fi
26962
26963 if test -n "$ac_config_headers"; then
26964   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26965 fi
26966
26967 if test -n "$ac_config_links"; then
26968   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26969 fi
26970
26971 if test -n "$ac_config_commands"; then
26972   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26973 fi
26974
26975 cat >>$CONFIG_STATUS <<\EOF
26976
26977 ac_cs_usage="\
26978 \`$as_me' instantiates files from templates according to the
26979 current configuration.
26980
26981 Usage: $0 [OPTIONS] [FILE]...
26982
26983   -h, --help       print this help, then exit
26984   -V, --version    print version number, then exit
26985   -d, --debug      don't remove temporary files
26986       --recheck    update $as_me by reconfiguring in the same conditions
26987   --file=FILE[:TEMPLATE]
26988                    instantiate the configuration file FILE
26989   --header=FILE[:TEMPLATE]
26990                    instantiate the configuration header FILE
26991
26992 Configuration files:
26993 $config_files
26994
26995 Configuration headers:
26996 $config_headers
26997
26998 Configuration commands:
26999 $config_commands
27000
27001 Report bugs to <dickey@invisible-island.net>."
27002 EOF
27003
27004 cat >>$CONFIG_STATUS <<EOF
27005 ac_cs_version="\\
27006 config.status
27007 configured by $0, generated by GNU Autoconf 2.52.20200111,
27008   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
27009
27010 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
27011 Free Software Foundation, Inc.
27012 This config.status script is free software; the Free Software Foundation
27013 gives unlimited permission to copy, distribute and modify it."
27014 srcdir=$srcdir
27015 INSTALL="$INSTALL"
27016 EOF
27017
27018 cat >>$CONFIG_STATUS <<\EOF
27019 # If no file are specified by the user, then we need to provide default
27020 # value.  By we need to know if files were specified by the user.
27021 ac_need_defaults=:
27022 while test $# != 0
27023 do
27024   case $1 in
27025   --*=*)
27026     ac_option=`expr "x$1" : 'x\([^=]*\)='`
27027     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
27028     shift
27029     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
27030     shift
27031     ;;
27032   -*);;
27033   *) # This is not an option, so the user has probably given explicit
27034      # arguments.
27035      ac_need_defaults=false;;
27036   esac
27037
27038   case $1 in
27039   # Handling of the options.
27040 EOF
27041 cat >>$CONFIG_STATUS <<EOF
27042   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27043     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
27044     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
27045 EOF
27046 cat >>$CONFIG_STATUS <<\EOF
27047   --version | --vers* | -V )
27048     echo "$ac_cs_version"; exit 0 ;;
27049   --he | --h)
27050     # Conflict between --help and --header
27051     { { echo "$as_me:27051: error: ambiguous option: $1
27052 Try \`$0 --help' for more information." >&5
27053 echo "$as_me: error: ambiguous option: $1
27054 Try \`$0 --help' for more information." >&2;}
27055    { (exit 1); exit 1; }; };;
27056   --help | --hel | -h )
27057     echo "$ac_cs_usage"; exit 0 ;;
27058   --debug | --d* | -d )
27059     debug=: ;;
27060   --file | --fil | --fi | --f )
27061     shift
27062     CONFIG_FILES="$CONFIG_FILES $1"
27063     ac_need_defaults=false;;
27064   --header | --heade | --head | --hea )
27065     shift
27066     CONFIG_HEADERS="$CONFIG_HEADERS $1"
27067     ac_need_defaults=false;;
27068
27069   # This is an error.
27070   -*) { { echo "$as_me:27070: error: unrecognized option: $1
27071 Try \`$0 --help' for more information." >&5
27072 echo "$as_me: error: unrecognized option: $1
27073 Try \`$0 --help' for more information." >&2;}
27074    { (exit 1); exit 1; }; } ;;
27075
27076   *) ac_config_targets="$ac_config_targets $1" ;;
27077
27078   esac
27079   shift
27080 done
27081
27082 exec 5>>config.log
27083 cat >&5 << _ACEOF
27084
27085 ## ----------------------- ##
27086 ## Running config.status.  ##
27087 ## ----------------------- ##
27088
27089 This file was extended by $as_me 2.52.20200111, executed with
27090   CONFIG_FILES    = $CONFIG_FILES
27091   CONFIG_HEADERS  = $CONFIG_HEADERS
27092   CONFIG_LINKS    = $CONFIG_LINKS
27093   CONFIG_COMMANDS = $CONFIG_COMMANDS
27094   > $ac_cs_invocation
27095 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27096
27097 _ACEOF
27098 EOF
27099
27100 cat >>$CONFIG_STATUS <<EOF
27101 #
27102 # INIT-COMMANDS section.
27103 #
27104
27105 ### Special initialization commands, used to pass information from the
27106 ### configuration-run into config.status
27107
27108 ALTERNATE_SYMS="$ALTERNATE_SYMS"
27109 AWK="$AWK"
27110 CXX_NAME="$CXX_NAME"
27111 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
27112 DFT_LWR_MODEL="$DFT_LWR_MODEL"
27113 ECHO_LD="$ECHO_LD"
27114 EXTRA_SUFFIX="$EXTRA_SUFFIX"
27115 FORM_NAME="$FORM_NAME"
27116 LDCONFIG="$LDCONFIG"
27117 LIBTOOL_VERSION="$LIBTOOL_VERSION"
27118 LIB_NAME="$LIB_NAME"
27119 LIB_PREFIX="$LIB_PREFIX"
27120 LIB_SUBSETS="$LIB_SUBSETS"
27121 LIB_SUFFIX="$LIB_SUFFIX"
27122 LIB_TRACING="$LIB_TRACING"
27123 LN_S="$LN_S"
27124 MAKE_TERMINFO="$MAKE_TERMINFO"
27125 MENU_NAME="$MENU_NAME"
27126 NCURSES_MAJOR="$NCURSES_MAJOR"
27127 NCURSES_MINOR="$NCURSES_MINOR"
27128 NCURSES_OSPEED="$NCURSES_OSPEED"
27129 NCURSES_PATCH="$NCURSES_PATCH"
27130 PANEL_NAME="$PANEL_NAME"
27131 SRC_SUBDIRS="$SRC_SUBDIRS"
27132 TERMINFO="$TERMINFO"
27133 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27134 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27135 TICS_NAME="$TICS_NAME"
27136 TICS_SUFFIX="$TICS_SUFFIX"
27137 TIC_PATH="$TIC_PATH"
27138 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27139 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27140 TINFO_NAME="$TINFO_NAME"
27141 TINFO_SUFFIX="$TINFO_SUFFIX"
27142 UNALTERED_SYMS="$UNALTERED_SYMS"
27143 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27144 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27145 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27146 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27147 WILDCARD_SYMS="$WILDCARD_SYMS"
27148 WITH_CURSES_H="$with_curses_h"
27149 WITH_ECHO="${enable_echo:=yes}"
27150 WITH_OVERWRITE="$with_overwrite"
27151 cf_LIST_MODELS="$cf_list_models"
27152 cf_cv_abi_version="$cf_cv_abi_version"
27153 cf_cv_do_relink="$cf_cv_do_relink"
27154 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27155 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27156 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27157 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27158 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27159 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27160 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27161 cf_cv_rel_version="$cf_cv_rel_version"
27162 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27163 cf_cv_shared_soname='$cf_cv_shared_soname'
27164 cf_cv_shlib_version="$cf_cv_shlib_version"
27165 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27166 cf_cv_system_name="$cf_cv_system_name"
27167 cf_cv_term_driver="$with_term_driver"
27168 cf_with_ada="$cf_with_ada"
27169 cf_with_cxx_binding="$cf_with_cxx_binding"
27170 cf_with_db_install="$cf_with_db_install"
27171 cf_with_manpages="$cf_with_manpages"
27172 cf_with_tests="$cf_with_tests"
27173 host="$host"
27174 target="$target"
27175 with_shared_cxx="$with_shared_cxx"
27176
27177 EOF
27178
27179 cat >>$CONFIG_STATUS <<\EOF
27180 for ac_config_target in $ac_config_targets
27181 do
27182   case "$ac_config_target" in
27183   # Handling of arguments.
27184   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27185   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27186   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27187   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27188   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27189   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27190   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27191   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27192   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27193   *) { { echo "$as_me:27193: error: invalid argument: $ac_config_target" >&5
27194 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27195    { (exit 1); exit 1; }; };;
27196   esac
27197 done
27198
27199 # If the user did not use the arguments to specify the items to instantiate,
27200 # then the envvar interface is used.  Set only those that are not.
27201 # We use the long form for the default assignment because of an extremely
27202 # bizarre bug on SunOS 4.1.3.
27203 if $ac_need_defaults; then
27204   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27205   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27206   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27207 fi
27208
27209 # Create a temporary directory, and hook for its removal unless debugging.
27210 $debug ||
27211 {
27212   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27213   trap '{ (exit 1); exit 1; }' 1 2 13 15
27214 }
27215
27216 # Create a (secure) tmp directory for tmp files.
27217 : ${TMPDIR=/tmp}
27218 {
27219   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27220   test -n "$tmp" && test -d "$tmp"
27221 }  ||
27222 {
27223   tmp=$TMPDIR/cs$$-$RANDOM
27224   (umask 077 && mkdir $tmp)
27225 } ||
27226 {
27227    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27228    { (exit 1); exit 1; }
27229 }
27230
27231 EOF
27232
27233 cat >>$CONFIG_STATUS <<EOF
27234
27235 #
27236 # CONFIG_FILES section.
27237 #
27238
27239 # No need to generate the scripts if there are no CONFIG_FILES.
27240 # This happens for instance when ./config.status config.h
27241 if test -n "\$CONFIG_FILES"; then
27242   # Protect against being on the right side of a sed subst in config.status.
27243   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27244    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27245 s,@SHELL@,$SHELL,;t t
27246 s,@exec_prefix@,$exec_prefix,;t t
27247 s,@prefix@,$prefix,;t t
27248 s,@program_transform_name@,$program_transform_name,;t t
27249 s,@bindir@,$bindir,;t t
27250 s,@sbindir@,$sbindir,;t t
27251 s,@libexecdir@,$libexecdir,;t t
27252 s,@datarootdir@,$datarootdir,;t t
27253 s,@datadir@,$datadir,;t t
27254 s,@sysconfdir@,$sysconfdir,;t t
27255 s,@sharedstatedir@,$sharedstatedir,;t t
27256 s,@localstatedir@,$localstatedir,;t t
27257 s,@runstatedir@,$runstatedir,;t t
27258 s,@libdir@,$libdir,;t t
27259 s,@includedir@,$includedir,;t t
27260 s,@oldincludedir@,$oldincludedir,;t t
27261 s,@infodir@,$infodir,;t t
27262 s,@mandir@,$mandir,;t t
27263 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27264 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27265 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27266 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27267 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27268 s,@build_alias@,$build_alias,;t t
27269 s,@host_alias@,$host_alias,;t t
27270 s,@target_alias@,$target_alias,;t t
27271 s,@ECHO_C@,$ECHO_C,;t t
27272 s,@ECHO_N@,$ECHO_N,;t t
27273 s,@ECHO_T@,$ECHO_T,;t t
27274 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27275 s,@DEFS@,$DEFS,;t t
27276 s,@LIBS@,$LIBS,;t t
27277 s,@top_builddir@,$top_builddir,;t t
27278 s,@EGREP@,$EGREP,;t t
27279 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27280 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27281 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27282 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27283 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27284 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27285 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27286 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27287 s,@VERSION@,$VERSION,;t t
27288 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27289 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27290 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27291 s,@PACKAGE@,$PACKAGE,;t t
27292 s,@build@,$build,;t t
27293 s,@build_cpu@,$build_cpu,;t t
27294 s,@build_vendor@,$build_vendor,;t t
27295 s,@build_os@,$build_os,;t t
27296 s,@host@,$host,;t t
27297 s,@host_cpu@,$host_cpu,;t t
27298 s,@host_vendor@,$host_vendor,;t t
27299 s,@host_os@,$host_os,;t t
27300 s,@target@,$target,;t t
27301 s,@target_cpu@,$target_cpu,;t t
27302 s,@target_vendor@,$target_vendor,;t t
27303 s,@target_os@,$target_os,;t t
27304 s,@CC@,$CC,;t t
27305 s,@CFLAGS@,$CFLAGS,;t t
27306 s,@LDFLAGS@,$LDFLAGS,;t t
27307 s,@CPPFLAGS@,$CPPFLAGS,;t t
27308 s,@ac_ct_CC@,$ac_ct_CC,;t t
27309 s,@EXEEXT@,$EXEEXT,;t t
27310 s,@OBJEXT@,$OBJEXT,;t t
27311 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27312 s,@CPP@,$CPP,;t t
27313 s,@LDCONFIG@,$LDCONFIG,;t t
27314 s,@CXX@,$CXX,;t t
27315 s,@CXXFLAGS@,$CXXFLAGS,;t t
27316 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27317 s,@AWK@,$AWK,;t t
27318 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27319 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27320 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27321 s,@LINT@,$LINT,;t t
27322 s,@LINT_OPTS@,$LINT_OPTS,;t t
27323 s,@LN_S@,$LN_S,;t t
27324 s,@cf_config_suffix@,$cf_config_suffix,;t t
27325 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27326 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27327 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27328 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27329 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27330 s,@SET_MAKE@,$SET_MAKE,;t t
27331 s,@CTAGS@,$CTAGS,;t t
27332 s,@ETAGS@,$ETAGS,;t t
27333 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27334 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27335 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27336 s,@RANLIB@,$RANLIB,;t t
27337 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27338 s,@LD@,$LD,;t t
27339 s,@ac_ct_LD@,$ac_ct_LD,;t t
27340 s,@AR@,$AR,;t t
27341 s,@ac_ct_AR@,$ac_ct_AR,;t t
27342 s,@NM@,$NM,;t t
27343 s,@ac_ct_NM@,$ac_ct_NM,;t t
27344 s,@ARFLAGS@,$ARFLAGS,;t t
27345 s,@DESTDIR@,$DESTDIR,;t t
27346 s,@BUILD_CC@,$BUILD_CC,;t t
27347 s,@BUILD_CPP@,$BUILD_CPP,;t t
27348 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27349 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27350 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27351 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27352 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27353 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27354 s,@cf_list_models@,$cf_list_models,;t t
27355 s,@ABI_VERSION@,$ABI_VERSION,;t t
27356 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27357 s,@LIBTOOL@,$LIBTOOL,;t t
27358 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27359 s,@LT_UNDEF@,$LT_UNDEF,;t t
27360 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27361 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27362 s,@LIB_CREATE@,$LIB_CREATE,;t t
27363 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27364 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27365 s,@LIB_PREP@,$LIB_PREP,;t t
27366 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27367 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27368 s,@LIB_LINK@,$LIB_LINK,;t t
27369 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27370 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27371 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27372 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27373 s,@TICS_NAME@,$TICS_NAME,;t t
27374 s,@TINFO_NAME@,$TINFO_NAME,;t t
27375 s,@LIB_NAME@,$LIB_NAME,;t t
27376 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27377 s,@CC_G_OPT@,$CC_G_OPT,;t t
27378 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27379 s,@LD_MODEL@,$LD_MODEL,;t t
27380 s,@shlibdir@,$shlibdir,;t t
27381 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27382 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27383 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27384 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27385 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27386 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27387 s,@LINK_PROGS@,$LINK_PROGS,;t t
27388 s,@LINK_TESTS@,$LINK_TESTS,;t t
27389 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27390 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27391 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27392 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27393 s,@RPATH_LIST@,$RPATH_LIST,;t t
27394 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27395 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27396 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27397 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27398 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27399 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
27400 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27401 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27402 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27403 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27404 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27405 s,@TIC@,$TIC,;t t
27406 s,@INFOCMP@,$INFOCMP,;t t
27407 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27408 s,@XTERM_KBS@,$XTERM_KBS,;t t
27409 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27410 s,@TERMINFO@,$TERMINFO,;t t
27411 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27412 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27413 s,@TERMPATH@,$TERMPATH,;t t
27414 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27415 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27416 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27417 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27418 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27419 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27420 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27421 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27422 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27423 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27424 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27425 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27426 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27427 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27428 s,@RGB_PATH@,$RGB_PATH,;t t
27429 s,@no_x11_rgb@,$no_x11_rgb,;t t
27430 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27431 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27432 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27433 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27434 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27435 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27436 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27437 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27438 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27439 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27440 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27441 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27442 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27443 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27444 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27445 s,@PTHREAD@,$PTHREAD,;t t
27446 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27447 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27448 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27449 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27450 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27451 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27452 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27453 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27454 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27455 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27456 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27457 s,@ECHO_LT@,$ECHO_LT,;t t
27458 s,@ECHO_LD@,$ECHO_LD,;t t
27459 s,@RULE_CC@,$RULE_CC,;t t
27460 s,@SHOW_CC@,$SHOW_CC,;t t
27461 s,@ECHO_CC@,$ECHO_CC,;t t
27462 s,@ECHO_LINK@,$ECHO_LINK,;t t
27463 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27464 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27465 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27466 s,@ADAFLAGS@,$ADAFLAGS,;t t
27467 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27468 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27469 s,@ADA_TRACE@,$ADA_TRACE,;t t
27470 s,@MATH_LIB@,$MATH_LIB,;t t
27471 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27472 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27473 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27474 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27475 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27476 s,@TEST_LIBS@,$TEST_LIBS,;t t
27477 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27478 s,@CXXCPP@,$CXXCPP,;t t
27479 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27480 s,@CXX_AR@,$CXX_AR,;t t
27481 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27482 s,@CXXLIBS@,$CXXLIBS,;t t
27483 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27484 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27485 s,@M4_exists@,$M4_exists,;t t
27486 s,@cf_ada_make@,$cf_ada_make,;t t
27487 s,@cf_ada_config@,$cf_ada_config,;t t
27488 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27489 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27490 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27491 s,@cf_compile_generics@,$cf_compile_generics,;t t
27492 s,@cf_generic_objects@,$cf_generic_objects,;t t
27493 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27494 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27495 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27496 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27497 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27498 s,@cf_ada_package@,$cf_ada_package,;t t
27499 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27500 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27501 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27502 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27503 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27504 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27505 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27506 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27507 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27508 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27509 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27510 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27511 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27512 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27513 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27514 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27515 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27516 s,@TICS_LIBS@,$TICS_LIBS,;t t
27517 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27518 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27519 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27520 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27521 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27522 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27523 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27524 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27525 s,@includesubdir@,$includesubdir,;t t
27526 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27527 s,@TICS_LIST@,$TICS_LIST,;t t
27528 s,@TINFO_LIST@,$TINFO_LIST,;t t
27529 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27530 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27531 s,@FORM_NAME@,$FORM_NAME,;t t
27532 s,@MENU_NAME@,$MENU_NAME,;t t
27533 s,@PANEL_NAME@,$PANEL_NAME,;t t
27534 s,@CXX_NAME@,$CXX_NAME,;t t
27535 s,@TEST_ARGS@,$TEST_ARGS,;t t
27536 s,@TEST_DEPS@,$TEST_DEPS,;t t
27537 s,@TEST_ARG2@,$TEST_ARG2,;t t
27538 s,@TEST_DEP2@,$TEST_DEP2,;t t
27539 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27540 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27541 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27542 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27543 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27544 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27545 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27546 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27547 s,@cross_compiling@,$cross_compiling,;t t
27548 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27549 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27550 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27551 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27552 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27553 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27554 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27555 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27556 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27557 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27558 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27559 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27560 CEOF
27561
27562 EOF
27563
27564   cat >>$CONFIG_STATUS <<\EOF
27565   # Split the substitutions into bite-sized pieces for seds with
27566   # small command number limits, like on Digital OSF/1 and HP-UX.
27567   ac_max_sed_lines=48
27568   ac_sed_frag=1 # Number of current file.
27569   ac_beg=1 # First line for current file.
27570   ac_end=$ac_max_sed_lines # Line after last line for current file.
27571   ac_more_lines=:
27572   ac_sed_cmds=
27573   while $ac_more_lines; do
27574     if test $ac_beg -gt 1; then
27575       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27576     else
27577       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27578     fi
27579     if test ! -s $tmp/subs.frag; then
27580       ac_more_lines=false
27581     else
27582       # The purpose of the label and of the branching condition is to
27583       # speed up the sed processing (if there are no `@' at all, there
27584       # is no need to browse any of the substitutions).
27585       # These are the two extra sed commands mentioned above.
27586       (echo ':t
27587   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27588       # It is possible to make a multiline substitution using escaped newlines.
27589       # Ensure that we do not split the substitution between script fragments.
27590       ac_BEG=$ac_end
27591       ac_END=`expr $ac_end + $ac_max_sed_lines`
27592       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27593       if test -s $tmp/subs.next; then
27594         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27595         if test ! -s $tmp/subs.edit; then
27596           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27597           if test ! -s $tmp/subs.edit; then
27598             if test $ac_beg -gt 1; then
27599               ac_end=`expr $ac_end - 1`
27600               continue
27601             fi
27602           fi
27603         fi
27604       fi
27605
27606       if test -z "$ac_sed_cmds"; then
27607         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27608       else
27609         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27610       fi
27611       ac_sed_frag=`expr $ac_sed_frag + 1`
27612       ac_beg=$ac_end
27613       ac_end=`expr $ac_end + $ac_max_sed_lines`
27614     fi
27615   done
27616   if test -z "$ac_sed_cmds"; then
27617     ac_sed_cmds=cat
27618   fi
27619 fi # test -n "$CONFIG_FILES"
27620
27621 EOF
27622 cat >>$CONFIG_STATUS <<\EOF
27623 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27624   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27625   case $ac_file in
27626   - | *:- | *:-:* ) # input from stdin
27627         cat >$tmp/stdin
27628         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27629         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27630   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27631         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27632   * )   ac_file_in=$ac_file.in ;;
27633   esac
27634
27635   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27636   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27637          X"$ac_file" : 'X\(//\)[^/]' \| \
27638          X"$ac_file" : 'X\(//\)$' \| \
27639          X"$ac_file" : 'X\(/\)' \| \
27640          .     : '\(.\)' 2>/dev/null ||
27641 echo X"$ac_file" |
27642     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27643           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27644           /^X\(\/\/\)$/{ s//\1/; q; }
27645           /^X\(\/\).*/{ s//\1/; q; }
27646           s/.*/./; q'`
27647   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27648     { case "$ac_dir" in
27649   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27650   *)                      as_incr_dir=.;;
27651 esac
27652 as_dummy="$ac_dir"
27653 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27654   case $as_mkdir_dir in
27655     # Skip DOS drivespec
27656     ?:) as_incr_dir=$as_mkdir_dir ;;
27657     *)
27658       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27659       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27660     ;;
27661   esac
27662 done; }
27663
27664     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27665     # A "../" for each directory in $ac_dir_suffix.
27666     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27667   else
27668     ac_dir_suffix= ac_dots=
27669   fi
27670
27671   case $srcdir in
27672   .)  ac_srcdir=.
27673       if test -z "$ac_dots"; then
27674          ac_top_srcdir=.
27675       else
27676          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27677       fi ;;
27678   [\\/]* | ?:[\\/]* )
27679       ac_srcdir=$srcdir$ac_dir_suffix;
27680       ac_top_srcdir=$srcdir ;;
27681   *) # Relative path.
27682     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27683     ac_top_srcdir=$ac_dots$srcdir ;;
27684   esac
27685
27686   case $INSTALL in
27687   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27688   *) ac_INSTALL=$ac_dots$INSTALL ;;
27689   esac
27690
27691   if test x"$ac_file" != x-; then
27692     { echo "$as_me:27692: creating $ac_file" >&5
27693 echo "$as_me: creating $ac_file" >&6;}
27694     rm -f "$ac_file"
27695   fi
27696   # Let's still pretend it is `configure' which instantiates (i.e., don't
27697   # use $as_me), people would be surprised to read:
27698   #    /* config.h.  Generated automatically by config.status.  */
27699   configure_input="Generated automatically from `echo $ac_file_in |
27700                                                  sed 's,.*/,,'` by configure."
27701
27702   # First look for the input files in the build tree, otherwise in the
27703   # src tree.
27704   ac_file_inputs=`IFS=:
27705     for f in $ac_file_in; do
27706       case $f in
27707       -) echo $tmp/stdin ;;
27708       [\\/$]*)
27709          # Absolute (can't be DOS-style, as IFS=:)
27710          test -f "$f" || { { echo "$as_me:27710: error: cannot find input file: $f" >&5
27711 echo "$as_me: error: cannot find input file: $f" >&2;}
27712    { (exit 1); exit 1; }; }
27713          echo $f;;
27714       *) # Relative
27715          if test -f "$f"; then
27716            # Build tree
27717            echo $f
27718          elif test -f "$srcdir/$f"; then
27719            # Source tree
27720            echo $srcdir/$f
27721          else
27722            # /dev/null tree
27723            { { echo "$as_me:27723: error: cannot find input file: $f" >&5
27724 echo "$as_me: error: cannot find input file: $f" >&2;}
27725    { (exit 1); exit 1; }; }
27726          fi;;
27727       esac
27728     done` || { (exit 1); exit 1; }
27729 EOF
27730 cat >>$CONFIG_STATUS <<\EOF
27731   ac_warn_datarootdir=no
27732   if test x"$ac_file" != x-; then
27733     for ac_item in $ac_file_inputs
27734     do
27735       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27736       if test -n "$ac_seen"; then
27737         ac_used=`grep '@datarootdir@' $ac_item`
27738         if test -z "$ac_used"; then
27739           { echo "$as_me:27739: WARNING: datarootdir was used implicitly but not set:
27740 $ac_seen" >&5
27741 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27742 $ac_seen" >&2;}
27743           ac_warn_datarootdir=yes
27744         fi
27745       fi
27746       ac_seen=`grep '${datarootdir}' $ac_item`
27747       if test -n "$ac_seen"; then
27748         { echo "$as_me:27748: WARNING: datarootdir was used explicitly but not set:
27749 $ac_seen" >&5
27750 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27751 $ac_seen" >&2;}
27752         ac_warn_datarootdir=yes
27753       fi
27754     done
27755   fi
27756
27757 if test "x$ac_warn_datarootdir" = xyes; then
27758   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27759 fi
27760
27761 EOF
27762 cat >>$CONFIG_STATUS <<EOF
27763   sed "$ac_vpsub
27764 $extrasub
27765 EOF
27766 cat >>$CONFIG_STATUS <<\EOF
27767 :t
27768 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27769 s,@configure_input@,$configure_input,;t t
27770 s,@srcdir@,$ac_srcdir,;t t
27771 s,@top_srcdir@,$ac_top_srcdir,;t t
27772 s,@INSTALL@,$ac_INSTALL,;t t
27773 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27774   rm -f $tmp/stdin
27775   if test x"$ac_file" != x-; then
27776     cp $tmp/out $ac_file
27777
27778     for ac_name in prefix exec_prefix datarootdir
27779     do
27780         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27781         if test -n "$ac_seen"; then
27782             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27783             if test -z "$ac_init"; then
27784               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27785               { echo "$as_me:27785: WARNING: Variable $ac_name is used but was not set:
27786 $ac_seen" >&5
27787 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27788 $ac_seen" >&2;}
27789             fi
27790         fi
27791     done
27792     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27793     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27794     if test -s $tmp/out; then
27795       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27796       { echo "$as_me:27796: WARNING: Some variables may not be substituted:
27797 $ac_seen" >&5
27798 echo "$as_me: WARNING: Some variables may not be substituted:
27799 $ac_seen" >&2;}
27800     fi
27801   else
27802     cat $tmp/out
27803   fi
27804   rm -f $tmp/out
27805
27806 done
27807 EOF
27808 cat >>$CONFIG_STATUS <<\EOF
27809
27810 #
27811 # CONFIG_HEADER section.
27812 #
27813
27814 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27815 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27816 #
27817 # ac_d sets the value in "#define NAME VALUE" lines.
27818 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27819 ac_dB='[        ].*$,\1#\2'
27820 ac_dC=' '
27821 ac_dD=',;t'
27822 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27823 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27824 ac_iB='\([      ]\),\1#\2define\3'
27825 ac_iC=' '
27826 ac_iD='\4,;t'
27827 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27828 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27829 ac_uB='$,\1#\2define\3'
27830 ac_uC=' '
27831 ac_uD=',;t'
27832
27833 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27834   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27835   case $ac_file in
27836   - | *:- | *:-:* ) # input from stdin
27837         cat >$tmp/stdin
27838         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27839         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27840   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27841         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27842   * )   ac_file_in=$ac_file.in ;;
27843   esac
27844
27845   test x"$ac_file" != x- && { echo "$as_me:27845: creating $ac_file" >&5
27846 echo "$as_me: creating $ac_file" >&6;}
27847
27848   # First look for the input files in the build tree, otherwise in the
27849   # src tree.
27850   ac_file_inputs=`IFS=:
27851     for f in $ac_file_in; do
27852       case $f in
27853       -) echo $tmp/stdin ;;
27854       [\\/$]*)
27855          # Absolute (can't be DOS-style, as IFS=:)
27856          test -f "$f" || { { echo "$as_me:27856: error: cannot find input file: $f" >&5
27857 echo "$as_me: error: cannot find input file: $f" >&2;}
27858    { (exit 1); exit 1; }; }
27859          echo $f;;
27860       *) # Relative
27861          if test -f "$f"; then
27862            # Build tree
27863            echo $f
27864          elif test -f "$srcdir/$f"; then
27865            # Source tree
27866            echo $srcdir/$f
27867          else
27868            # /dev/null tree
27869            { { echo "$as_me:27869: error: cannot find input file: $f" >&5
27870 echo "$as_me: error: cannot find input file: $f" >&2;}
27871    { (exit 1); exit 1; }; }
27872          fi;;
27873       esac
27874     done` || { (exit 1); exit 1; }
27875   # Remove the trailing spaces.
27876   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27877
27878 EOF
27879
27880 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27881 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27882 # be either 'cat' or 'sort'.
27883 cat confdefs.h | uniq >conftest.vals
27884
27885 # Break up conftest.vals because some shells have a limit on
27886 # the size of here documents, and old seds have small limits too.
27887
27888 rm -f conftest.tail
27889 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27890 while grep . conftest.vals >/dev/null
27891 do
27892   # Write chunks of a limited-size here document to conftest.frag.
27893   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27894   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27895   echo 'CEOF' >> $CONFIG_STATUS
27896   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27897   rm -f conftest.vals
27898   mv conftest.tail conftest.vals
27899 done
27900 rm -f conftest.vals
27901
27902 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27903 # marker @DEFS@.
27904 echo '  cat >> conftest.edit <<CEOF
27905 /@DEFS@/r conftest.frag
27906 /@DEFS@/d
27907 CEOF
27908 sed -f conftest.edit $tmp/in > $tmp/out
27909 rm -f $tmp/in
27910 mv $tmp/out $tmp/in
27911 rm -f conftest.edit conftest.frag
27912 ' >> $CONFIG_STATUS
27913
27914 cat >>$CONFIG_STATUS <<\EOF
27915   # Let's still pretend it is `configure' which instantiates (i.e., don't
27916   # use $as_me), people would be surprised to read:
27917   #    /* config.h.  Generated automatically by config.status.  */
27918   if test x"$ac_file" = x-; then
27919     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27920   else
27921     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27922   fi
27923   cat $tmp/in >>$tmp/config.h
27924   rm -f $tmp/in
27925   if test x"$ac_file" != x-; then
27926     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27927       { echo "$as_me:27927: $ac_file is unchanged" >&5
27928 echo "$as_me: $ac_file is unchanged" >&6;}
27929     else
27930       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27931          X"$ac_file" : 'X\(//\)[^/]' \| \
27932          X"$ac_file" : 'X\(//\)$' \| \
27933          X"$ac_file" : 'X\(/\)' \| \
27934          .     : '\(.\)' 2>/dev/null ||
27935 echo X"$ac_file" |
27936     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27937           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27938           /^X\(\/\/\)$/{ s//\1/; q; }
27939           /^X\(\/\).*/{ s//\1/; q; }
27940           s/.*/./; q'`
27941       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27942         { case "$ac_dir" in
27943   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27944   *)                      as_incr_dir=.;;
27945 esac
27946 as_dummy="$ac_dir"
27947 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27948   case $as_mkdir_dir in
27949     # Skip DOS drivespec
27950     ?:) as_incr_dir=$as_mkdir_dir ;;
27951     *)
27952       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27953       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27954     ;;
27955   esac
27956 done; }
27957
27958       fi
27959       rm -f $ac_file
27960       mv $tmp/config.h $ac_file
27961     fi
27962   else
27963     cat $tmp/config.h
27964     rm -f $tmp/config.h
27965   fi
27966 done
27967 EOF
27968 cat >>$CONFIG_STATUS <<\EOF
27969 #
27970 # CONFIG_COMMANDS section.
27971 #
27972 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27973   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27974   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27975
27976   case $ac_dest in
27977     default )
27978 if test "x$cf_with_tests" != xno ; then
27979
27980 for cf_dir in test
27981 do
27982         if test ! -d $srcdir/$cf_dir; then
27983                 continue
27984         elif test -f $srcdir/$cf_dir/programs; then
27985                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27986         fi
27987 done
27988
27989 fi
27990
27991 cf_prefix=$LIB_PREFIX
27992
27993 case $cf_cv_shlib_version in
27994 (cygdll|msysdll|mingw|msvcdll)
27995         TINFO_NAME=$TINFO_ARG_SUFFIX
27996         TINFO_SUFFIX=.dll
27997         ;;
27998 esac
27999
28000 if test -n "$TINFO_SUFFIX" ; then
28001         case $TINFO_SUFFIX in
28002         (tw*)
28003                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
28004                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
28005                 ;;
28006         (t*)
28007                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
28008                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
28009                 ;;
28010         (w*)
28011                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
28012                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
28013                 ;;
28014         esac
28015 fi
28016
28017 for cf_dir in $SRC_SUBDIRS
28018 do
28019         if test ! -d $srcdir/$cf_dir ; then
28020                 continue
28021         elif test -f $srcdir/$cf_dir/modules; then
28022
28023                 SHARED_LIB=
28024                 Libs_To_Make=
28025                 cf_awk_program=
28026                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
28027                 then
28028                         cf_awk_program="$cf_awk_program\
28029 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
28030 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
28031 "
28032                 fi
28033
28034                 if test "x$WILDCARD_SYMS" = xno
28035                 then
28036                         cf_awk_program="$cf_awk_program\
28037 /[      ]_\\*;/ { skip=1; next; }\
28038 "
28039                 fi
28040
28041                 if test "x$cf_awk_program" != "x"
28042                 then
28043                         cat >>$cf_dir/Makefile <<CF_EOF
28044
28045 # Generated by CF_LIB_RULES
28046 resulting.map: $UNALTERED_SYMS
28047         $AWK 'BEGIN { skip = 1; last=""; } \
28048 $cf_awk_program \
28049 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
28050  skip = 0; last = \$\$0; } \
28051 END { print last; }' < $UNALTERED_SYMS >\$@
28052
28053 distclean::
28054         rm -f resulting.map
28055 CF_EOF
28056                 fi
28057
28058                 for cf_item in $cf_LIST_MODELS
28059                 do
28060
28061         case X$cf_item in
28062         (Xlibtool)
28063                 cf_suffix='.la'
28064                 cf_depsuf=$cf_suffix
28065                 ;;
28066         (Xdebug)
28067                 case $cf_cv_system_name in
28068                 (*-msvc*)
28069                         cf_suffix='_g.lib'
28070                         ;;
28071                 (*)
28072                         cf_suffix='_g.a'
28073                         ;;
28074                 esac
28075                 cf_depsuf=$cf_suffix
28076                 ;;
28077         (Xprofile)
28078                 case $cf_cv_system_name in
28079                 (*-msvc*)
28080                         cf_suffix='_p.lib'
28081                         ;;
28082                 (*)
28083                         cf_suffix='_p.a'
28084                         ;;
28085                 esac
28086                 cf_depsuf=$cf_suffix
28087                 ;;
28088         (Xshared)
28089                 case $cf_cv_system_name in
28090                 (aix[5-7]*)
28091                         cf_suffix='.so'
28092                         cf_depsuf=$cf_suffix
28093                         ;;
28094                 (*-msvc*)
28095                         cf_suffix='.dll'
28096                         cf_depsuf='.dll.lib'
28097                         ;;
28098                 (cygwin*|msys*|mingw*)
28099                         cf_suffix='.dll'
28100                         cf_depsuf='.dll.a'
28101                         ;;
28102                 (darwin*)
28103                         cf_suffix='.dylib'
28104                         cf_depsuf=$cf_suffix
28105                         ;;
28106                 (hpux*)
28107                         case $target in
28108                         (ia64*)
28109                                 cf_suffix='.so'
28110                                 cf_depsuf=$cf_suffix
28111                                 ;;
28112                         (*)
28113                                 cf_suffix='.sl'
28114                                 cf_depsuf=$cf_suffix
28115                                 ;;
28116                         esac
28117                         ;;
28118                 (*)
28119                         cf_suffix='.so'
28120                         cf_depsuf=$cf_suffix
28121                         ;;
28122                 esac
28123                 ;;
28124         (*)
28125                 case $target in
28126                 (*-msvc*)
28127                         cf_suffix='.lib'
28128                         ;;
28129                 (*)
28130                         cf_suffix='.a'
28131                         ;;
28132                 esac
28133                 cf_depsuf=$cf_suffix
28134                 ;;
28135         esac
28136         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28137         then
28138                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28139                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28140         fi
28141
28142                         if test "$cf_dir" = "c++"
28143                         then
28144
28145 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28146
28147 eval cf_libname=\$${cf_map_lib_basename}_NAME
28148
28149                         else
28150
28151 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28152
28153 eval cf_libname=\$${cf_map_lib_basename}_NAME
28154
28155                         fi
28156                         test -z "$cf_libname" && cf_libname="$cf_dir"
28157                         if test $cf_item = shared ; then
28158                                 if test -n "${LIB_SUFFIX}"
28159                                 then
28160                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28161                                 else
28162                                         cf_shared_suffix="$cf_suffix"
28163                                 fi
28164                                 if test "$cf_cv_do_symlinks" = yes ; then
28165                                         cf_version_name=
28166
28167                                         case "$cf_cv_shlib_version" in
28168                                         (rel)
28169                                                 cf_version_name=REL_VERSION
28170                                                 ;;
28171                                         (abi)
28172                                                 cf_version_name=ABI_VERSION
28173                                                 ;;
28174                                         esac
28175
28176                                         if test -n "$cf_version_name"
28177                                         then
28178                                                 case "$cf_cv_system_name" in
28179                                                 (darwin*)
28180                                                         # "w", etc?
28181                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28182                                                         ;;
28183                                                 (*)
28184                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28185                                                         ;;
28186                                                 esac
28187                                         fi
28188                                         if test -n "${USE_LIB_SUFFIX}"
28189                                         then
28190                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28191                                         else
28192                                                 cf_shared_suffix="$cf_suffix"
28193                                         fi
28194                                 fi
28195                                 # cygwin needs import library, and has unique naming convention
28196                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28197                                 # use 'cyg' prefix for shared lib.
28198                                 case $cf_cv_shlib_version in
28199                                 (cygdll)
28200                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28201                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28202                                         ;;
28203                                 (msysdll)
28204                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28205                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28206                                         ;;
28207                                 (mingw)
28208                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28209                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28210                                         ;;
28211                                 (msvcdll)
28212                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28213                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28214                                         ;;
28215                                 (*)
28216                                         cf_add_lib=
28217                                         ;;
28218                                 esac
28219                                 if test -n "$cf_add_lib"
28220                                 then
28221                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28222                                         continue
28223                                 fi
28224                         fi
28225                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28226                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28227                 done
28228
28229                 if test $cf_dir = ncurses ; then
28230                         cf_subsets="$LIB_SUBSETS"
28231                         cf_r_parts="$cf_subsets"
28232                         cf_liblist="$Libs_To_Make"
28233
28234                         while test -n "$cf_r_parts"
28235                         do
28236                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28237                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28238                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28239                                         cf_add_lib=
28240                                         case $cf_l_parts in
28241                                         (*termlib*)
28242                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28243                                                 ;;
28244                                         (*ticlib*)
28245                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28246                                                 ;;
28247                                         (*)
28248                                                 break
28249                                                 ;;
28250                                         esac
28251                                         if test -n "$cf_add_lib"; then
28252                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28253                                         fi
28254                                 else
28255                                         break
28256                                 fi
28257                         done
28258                 else
28259                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28260                 fi
28261
28262                 if test $cf_dir = c++; then
28263                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28264                                 cf_list=
28265                                 for cf_item in $Libs_To_Make
28266                                 do
28267                                         case $cf_item in
28268                                         (*.a)
28269                                                 ;;
28270                                         (*)
28271                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28272                                                 ;;
28273                                         esac
28274                                         for cf_test in $cf_list
28275                                         do
28276                                                 if test "$cf_test" = "$cf_item"
28277                                                 then
28278                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28279                                                         cf_item=
28280                                                         break
28281                                                 fi
28282                                         done
28283                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28284                                 done
28285                                 Libs_To_Make="$cf_list"
28286                         fi
28287                 fi
28288
28289                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28290                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28291                         $cf_dir/Makefile >$cf_dir/Makefile.out
28292                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28293
28294                 $AWK -f $srcdir/mk-0th.awk \
28295                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28296                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28297
28298                 for cf_subset in $cf_subsets
28299                 do
28300                         cf_subdirs=
28301                         for cf_item in $cf_LIST_MODELS
28302                         do
28303
28304                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28305
28306 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28307
28308                         CXX_MODEL=$cf_ITEM
28309                         if test "$CXX_MODEL" = SHARED; then
28310                                 case $cf_cv_shlib_version in
28311                                 (cygdll|msysdll|mingw|msvcdll)
28312                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28313
28314 echo "${as_me:-configure}:28314: testing overriding CXX_MODEL to SHARED ..." 1>&5
28315
28316                                         with_shared_cxx=yes
28317                                         ;;
28318                                 (*)
28319                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28320                                         ;;
28321                                 esac
28322                         fi
28323
28324         case X$cf_item in
28325         (Xlibtool)
28326                 cf_suffix='.la'
28327                 cf_depsuf=$cf_suffix
28328                 ;;
28329         (Xdebug)
28330                 case $cf_cv_system_name in
28331                 (*-msvc*)
28332                         cf_suffix='_g.lib'
28333                         ;;
28334                 (*)
28335                         cf_suffix='_g.a'
28336                         ;;
28337                 esac
28338                 cf_depsuf=$cf_suffix
28339                 ;;
28340         (Xprofile)
28341                 case $cf_cv_system_name in
28342                 (*-msvc*)
28343                         cf_suffix='_p.lib'
28344                         ;;
28345                 (*)
28346                         cf_suffix='_p.a'
28347                         ;;
28348                 esac
28349                 cf_depsuf=$cf_suffix
28350                 ;;
28351         (Xshared)
28352                 case $cf_cv_system_name in
28353                 (aix[5-7]*)
28354                         cf_suffix='.so'
28355                         cf_depsuf=$cf_suffix
28356                         ;;
28357                 (*-msvc*)
28358                         cf_suffix='.dll'
28359                         cf_depsuf='.dll.lib'
28360                         ;;
28361                 (cygwin*|msys*|mingw*)
28362                         cf_suffix='.dll'
28363                         cf_depsuf='.dll.a'
28364                         ;;
28365                 (darwin*)
28366                         cf_suffix='.dylib'
28367                         cf_depsuf=$cf_suffix
28368                         ;;
28369                 (hpux*)
28370                         case $target in
28371                         (ia64*)
28372                                 cf_suffix='.so'
28373                                 cf_depsuf=$cf_suffix
28374                                 ;;
28375                         (*)
28376                                 cf_suffix='.sl'
28377                                 cf_depsuf=$cf_suffix
28378                                 ;;
28379                         esac
28380                         ;;
28381                 (*)
28382                         cf_suffix='.so'
28383                         cf_depsuf=$cf_suffix
28384                         ;;
28385                 esac
28386                 ;;
28387         (*)
28388                 case $target in
28389                 (*-msvc*)
28390                         cf_suffix='.lib'
28391                         ;;
28392                 (*)
28393                         cf_suffix='.a'
28394                         ;;
28395                 esac
28396                 cf_depsuf=$cf_suffix
28397                 ;;
28398         esac
28399         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28400         then
28401                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28402                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28403         fi
28404
28405         case $cf_item in
28406         (libtool) cf_subdir='obj_lo'  ;;
28407         (normal)  cf_subdir='objects' ;;
28408         (debug)   cf_subdir='obj_g' ;;
28409         (profile) cf_subdir='obj_p' ;;
28410         (shared)
28411                 case $cf_cv_system_name in
28412                 (cygwin|msys)
28413                         cf_subdir='objects' ;;
28414                 (*)
28415                         cf_subdir='obj_s' ;;
28416                 esac
28417         esac
28418
28419                         # Test for case where we build libtinfo with a different name.
28420                         cf_libname=$cf_dir
28421                         if test $cf_dir = ncurses ; then
28422                                 case $cf_subset in
28423                                 (*base*)
28424                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28425                                         ;;
28426                                 (*termlib*)
28427                                         cf_libname=$TINFO_LIB_SUFFIX
28428                                         ;;
28429                                 (ticlib*)
28430                                         cf_libname=$TICS_LIB_SUFFIX
28431                                         ;;
28432                                 esac
28433                         elif test $cf_dir = c++ ; then
28434
28435 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28436
28437 eval cf_libname=\$${cf_map_lib_basename}_NAME
28438
28439                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28440                         else
28441
28442 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28443
28444 eval cf_libname=\$${cf_map_lib_basename}_NAME
28445
28446                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28447                         fi
28448                         if test -n "${USE_ARG_SUFFIX}" ; then
28449                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28450                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28451                         fi
28452
28453                         # These dependencies really are for development, not
28454                         # builds, but they are useful in porting, too.
28455                         cf_depend="../include/ncurses_cfg.h"
28456                         if test "$srcdir" = "."; then
28457                                 cf_reldir="."
28458                         else
28459                                 cf_reldir="\${srcdir}"
28460                         fi
28461
28462                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28463                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28464                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28465                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28466                         fi
28467
28468                         cf_dir_suffix=
28469                         old_cf_suffix="$cf_suffix"
28470                         if test "$cf_cv_shlib_version_infix" = yes ; then
28471                         if test -n "$USE_LIB_SUFFIX" ; then
28472                                 case $USE_LIB_SUFFIX in
28473                                 (tw*)
28474                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28475                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28476                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28477                                         ;;
28478                                 (t*)
28479                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28480                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28481                                         cf_dir_suffix=t$EXTRA_SUFFIX
28482                                         ;;
28483                                 (w*)
28484                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28485                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28486                                         cf_dir_suffix=w$EXTRA_SUFFIX
28487                                         ;;
28488                                 (*)
28489                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28490                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28491                                         cf_dir_suffix=$EXTRA_SUFFIX
28492                                         ;;
28493                                 esac
28494                         fi
28495                         fi
28496
28497                         $AWK -f $srcdir/mk-1st.awk \
28498                                 name=${cf_libname}${cf_dir_suffix} \
28499                                 traces=$LIB_TRACING \
28500                                 MODEL=$cf_ITEM \
28501                                 CXX_MODEL=$CXX_MODEL \
28502                                 model=$cf_subdir \
28503                                 prefix=$cf_prefix \
28504                                 suffix=$cf_suffix \
28505                                 subset=$cf_subset \
28506                                 driver=$cf_cv_term_driver \
28507                                 SymLink="$LN_S" \
28508                                 TermlibRoot=$TINFO_NAME \
28509                                 TermlibSuffix=$TINFO_SUFFIX \
28510                                 ShlibVer=$cf_cv_shlib_version \
28511                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28512                                 ReLink=${cf_cv_do_relink:-no} \
28513                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28514                                 DoLinks=$cf_cv_do_symlinks \
28515                                 rmSoLocs=$cf_cv_rm_so_locs \
28516                                 ldconfig="$LDCONFIG" \
28517                                 overwrite=$WITH_OVERWRITE \
28518                                 depend="$cf_depend" \
28519                                 host="$host" \
28520                                 libtool_version="$LIBTOOL_VERSION" \
28521                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28522
28523                         cf_suffix="$old_cf_suffix"
28524
28525                         for cf_subdir2 in $cf_subdirs lib
28526                         do
28527                                 test $cf_subdir = $cf_subdir2 && break
28528                         done
28529                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28530                         $AWK -f $srcdir/mk-2nd.awk \
28531                                 name=$cf_dir \
28532                                 traces=$LIB_TRACING \
28533                                 MODEL=$cf_ITEM \
28534                                 model=$cf_subdir \
28535                                 subset=$cf_subset \
28536                                 srcdir=$srcdir \
28537                                 echo=$WITH_ECHO \
28538                                 crenames=$cf_cv_prog_CC_c_o \
28539                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28540                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28541                         cf_subdirs="$cf_subdirs $cf_subdir"
28542                         done
28543                 done
28544         fi
28545
28546         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28547 done
28548
28549 for cf_dir in $SRC_SUBDIRS
28550 do
28551         if test ! -d $srcdir/$cf_dir ; then
28552                 continue
28553         fi
28554
28555         if test -f $cf_dir/Makefile ; then
28556                 case "$cf_dir" in
28557                 (Ada95)
28558                         echo 'libs \' >> Makefile
28559                         echo 'install.libs \' >> Makefile
28560                         echo 'uninstall.libs ::' >> Makefile
28561                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28562                         ;;
28563                 esac
28564         fi
28565
28566         if test -f $srcdir/$cf_dir/modules; then
28567                 echo >> Makefile
28568                 if test -f $srcdir/$cf_dir/headers; then
28569 cat >> Makefile <<CF_EOF
28570 install.includes \\
28571 uninstall.includes \\
28572 CF_EOF
28573                 fi
28574 if test "$cf_dir" != "c++" ; then
28575 echo 'lint \' >> Makefile
28576 fi
28577 cat >> Makefile <<CF_EOF
28578 libs \\
28579 lintlib \\
28580 install.libs \\
28581 uninstall.libs \\
28582 install.$cf_dir \\
28583 uninstall.$cf_dir ::
28584         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28585 CF_EOF
28586         elif test -f $srcdir/$cf_dir/headers; then
28587 cat >> Makefile <<CF_EOF
28588
28589 libs \\
28590 install.libs \\
28591 uninstall.libs \\
28592 install.includes \\
28593 uninstall.includes ::
28594         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28595 CF_EOF
28596 fi
28597 done
28598
28599 if test "x$cf_with_db_install" = xyes; then
28600 cat >> Makefile <<CF_EOF
28601
28602 install.libs uninstall.libs \\
28603 install.data uninstall.data ::
28604 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28605 CF_EOF
28606 else
28607 cat >> Makefile <<CF_EOF
28608
28609 install.libs uninstall.libs ::
28610         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28611 CF_EOF
28612 fi
28613
28614 if test "x$cf_with_manpages" = xyes; then
28615 cat >> Makefile <<CF_EOF
28616
28617 install.man \\
28618 uninstall.man ::
28619         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28620 CF_EOF
28621 fi
28622
28623 cat >> Makefile <<CF_EOF
28624
28625 distclean ::
28626         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28627         rm -f headers.sh headers.sed mk_shared_lib.sh
28628         rm -f edit_man.* man_alias.*
28629         rm -rf \${DIRS_TO_MAKE}
28630 CF_EOF
28631
28632 # Special case: tack's manpage lives in its own directory.
28633 if test "x$cf_with_manpages" = xyes; then
28634 if test "x$cf_with_tack" = "xyes"; then
28635 cat >> Makefile <<CF_EOF
28636
28637 install.man \\
28638 uninstall.man ::
28639         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28640 CF_EOF
28641 fi
28642 fi
28643
28644 rm -f headers.sed headers.sh
28645
28646 echo creating headers.sh
28647 cat >headers.sh <<CF_EOF
28648 #! $SHELL
28649 # This shell script is generated by the 'configure' script.  It is invoked in a
28650 # subdirectory of the build tree.  It generates a sed-script in the parent
28651 # directory that is used to adjust includes for header files that reside in a
28652 # subdirectory of /usr/include, etc.
28653 PRG=""
28654 while test \$# != 3
28655 do
28656 PRG="\$PRG \$1"; shift
28657 done
28658 DST=\$1
28659 REF=\$2
28660 SRC=\$3
28661 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28662 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28663 echo installing \$SRC in \$DST
28664 CF_EOF
28665
28666 if test $WITH_CURSES_H = yes; then
28667         cat >>headers.sh <<CF_EOF
28668 case \$DST in
28669 (/*/include/*)
28670         END=\`basename \$DST\`
28671         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28672         do
28673                 NAME=\`basename \$i\`
28674                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28675         done
28676         ;;
28677 (*)
28678         echo "" >> \$TMPSED
28679         ;;
28680 esac
28681 CF_EOF
28682
28683 else
28684         cat >>headers.sh <<CF_EOF
28685 case \$DST in
28686 (/*/include/*)
28687         END=\`basename \$DST\`
28688         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28689         do
28690                 NAME=\`basename \$i\`
28691                 if test "\$NAME" = "curses.h"
28692                 then
28693                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28694                         NAME=ncurses.h
28695                 fi
28696                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28697         done
28698         ;;
28699 (*)
28700         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28701         ;;
28702 esac
28703 CF_EOF
28704 fi
28705 cat >>headers.sh <<CF_EOF
28706 rm -f \$TMPSRC
28707 sed -f \$TMPSED \$SRC > \$TMPSRC
28708 NAME=\`basename \$SRC\`
28709 CF_EOF
28710 if test $WITH_CURSES_H != yes; then
28711         cat >>headers.sh <<CF_EOF
28712 test "\$NAME" = "curses.h" && NAME=ncurses.h
28713 CF_EOF
28714 fi
28715 cat >>headers.sh <<CF_EOF
28716 # Just in case someone gzip'd manpages, remove the conflicting copy.
28717 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28718
28719 eval \$PRG \$TMPSRC \$DST/\$NAME
28720 rm -f \$TMPSRC \$TMPSED
28721 CF_EOF
28722
28723 chmod 0755 headers.sh
28724
28725 for cf_dir in $SRC_SUBDIRS
28726 do
28727         if test ! -d $srcdir/$cf_dir ; then
28728                 continue
28729         fi
28730
28731         if test -f $srcdir/$cf_dir/headers; then
28732                 $AWK -f $srcdir/mk-hdr.awk \
28733                         subset="$LIB_SUBSETS" \
28734                         compat="$WITH_CURSES_H" \
28735                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28736         fi
28737
28738         if test -f $srcdir/$cf_dir/modules; then
28739                 if test "$cf_dir" != "c++" ; then
28740                         cat >>$cf_dir/Makefile <<"CF_EOF"
28741 depend : ${AUTO_SRC}
28742         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28743
28744 # DO NOT DELETE THIS LINE -- make depend depends on it.
28745 CF_EOF
28746                 fi
28747         fi
28748 done
28749
28750 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28751 if test -z "$USE_OLD_MAKERULES" ; then
28752         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28753 fi
28754 fi
28755  ;;
28756   esac
28757 done
28758 EOF
28759
28760 cat >>$CONFIG_STATUS <<\EOF
28761
28762 { (exit 0); exit 0; }
28763 EOF
28764 chmod +x $CONFIG_STATUS
28765 ac_clean_files=$ac_clean_files_save
28766
28767 # configure is writing to config.log, and then calls config.status.
28768 # config.status does its own redirection, appending to config.log.
28769 # Unfortunately, on DOS this fails, as config.log is still kept open
28770 # by configure, so config.status won't be able to write to it; its
28771 # output is simply discarded.  So we exec the FD to /dev/null,
28772 # effectively closing config.log, so it can be properly (re)opened and
28773 # appended to by config.status.  When coming back to configure, we
28774 # need to make the FD available again.
28775 if test "$no_create" != yes; then
28776   ac_cs_success=:
28777   exec 5>/dev/null
28778   $SHELL $CONFIG_STATUS || ac_cs_success=false
28779   exec 5>>config.log
28780   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28781   # would make configure fail if this is the last instruction.
28782   $ac_cs_success || { (exit 1); exit 1; }
28783 fi
28784 ${MAKE:-make} preinstall