]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20200822
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.716 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200802.
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.20200802.  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 case $cf_cv_system_name in
4851 (*-msvc*)
4852         LDFLAGS="$LDFLAGS user32.lib"
4853         export LDFLAGS
4854         ;;
4855 esac
4856
4857 if test "$cross_compiling" = yes ; then
4858
4859         # defaults that we might want to override
4860         : ${BUILD_CFLAGS:=''}
4861         : ${BUILD_CPPFLAGS:=''}
4862         : ${BUILD_LDFLAGS:=''}
4863         : ${BUILD_LIBS:=''}
4864         : ${BUILD_EXEEXT:='$x'}
4865         : ${BUILD_OBJEXT:='o'}
4866
4867 # Check whether --with-build-cc or --without-build-cc was given.
4868 if test "${with_build_cc+set}" = set; then
4869   withval="$with_build_cc"
4870   BUILD_CC="$withval"
4871 else
4872   for ac_prog in gcc clang c99 c89 cc cl
4873 do
4874   # Extract the first word of "$ac_prog", so it can be a program name with args.
4875 set dummy $ac_prog; ac_word=$2
4876 echo "$as_me:4876: checking for $ac_word" >&5
4877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4878 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4879   echo $ECHO_N "(cached) $ECHO_C" >&6
4880 else
4881   if test -n "$BUILD_CC"; then
4882   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4883 else
4884   ac_save_IFS=$IFS; IFS=$ac_path_separator
4885 ac_dummy="$PATH"
4886 for ac_dir in $ac_dummy; do
4887   IFS=$ac_save_IFS
4888   test -z "$ac_dir" && ac_dir=.
4889   $as_executable_p "$ac_dir/$ac_word" || continue
4890 ac_cv_prog_BUILD_CC="$ac_prog"
4891 echo "$as_me:4891: found $ac_dir/$ac_word" >&5
4892 break
4893 done
4894
4895 fi
4896 fi
4897 BUILD_CC=$ac_cv_prog_BUILD_CC
4898 if test -n "$BUILD_CC"; then
4899   echo "$as_me:4899: result: $BUILD_CC" >&5
4900 echo "${ECHO_T}$BUILD_CC" >&6
4901 else
4902   echo "$as_me:4902: result: no" >&5
4903 echo "${ECHO_T}no" >&6
4904 fi
4905
4906   test -n "$BUILD_CC" && break
4907 done
4908 test -n "$BUILD_CC" || BUILD_CC="none"
4909
4910 fi;
4911         echo "$as_me:4911: checking for native build C compiler" >&5
4912 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4913         echo "$as_me:4913: result: $BUILD_CC" >&5
4914 echo "${ECHO_T}$BUILD_CC" >&6
4915
4916         echo "$as_me:4916: checking for native build C preprocessor" >&5
4917 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4918
4919 # Check whether --with-build-cpp or --without-build-cpp was given.
4920 if test "${with_build_cpp+set}" = set; then
4921   withval="$with_build_cpp"
4922   BUILD_CPP="$withval"
4923 else
4924   BUILD_CPP='${BUILD_CC} -E'
4925 fi;
4926         echo "$as_me:4926: result: $BUILD_CPP" >&5
4927 echo "${ECHO_T}$BUILD_CPP" >&6
4928
4929         echo "$as_me:4929: checking for native build C flags" >&5
4930 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4931
4932 # Check whether --with-build-cflags or --without-build-cflags was given.
4933 if test "${with_build_cflags+set}" = set; then
4934   withval="$with_build_cflags"
4935   BUILD_CFLAGS="$withval"
4936 fi;
4937         echo "$as_me:4937: result: $BUILD_CFLAGS" >&5
4938 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4939
4940         echo "$as_me:4940: checking for native build C preprocessor-flags" >&5
4941 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4942
4943 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4944 if test "${with_build_cppflags+set}" = set; then
4945   withval="$with_build_cppflags"
4946   BUILD_CPPFLAGS="$withval"
4947 fi;
4948         echo "$as_me:4948: result: $BUILD_CPPFLAGS" >&5
4949 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4950
4951         echo "$as_me:4951: checking for native build linker-flags" >&5
4952 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4953
4954 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4955 if test "${with_build_ldflags+set}" = set; then
4956   withval="$with_build_ldflags"
4957   BUILD_LDFLAGS="$withval"
4958 fi;
4959         echo "$as_me:4959: result: $BUILD_LDFLAGS" >&5
4960 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4961
4962         echo "$as_me:4962: checking for native build linker-libraries" >&5
4963 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4964
4965 # Check whether --with-build-libs or --without-build-libs was given.
4966 if test "${with_build_libs+set}" = set; then
4967   withval="$with_build_libs"
4968   BUILD_LIBS="$withval"
4969 fi;
4970         echo "$as_me:4970: result: $BUILD_LIBS" >&5
4971 echo "${ECHO_T}$BUILD_LIBS" >&6
4972
4973         # this assumes we're on Unix.
4974         BUILD_EXEEXT=
4975         BUILD_OBJEXT=o
4976
4977         : ${BUILD_CC:='${CC}'}
4978
4979         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4980                 { { echo "$as_me:4980: error: Cross-build requires two compilers.
4981 Use --with-build-cc to specify the native compiler." >&5
4982 echo "$as_me: error: Cross-build requires two compilers.
4983 Use --with-build-cc to specify the native compiler." >&2;}
4984    { (exit 1); exit 1; }; }
4985         fi
4986
4987 else
4988         : ${BUILD_CC:='${CC}'}
4989         : ${BUILD_CPP:='${CPP}'}
4990         : ${BUILD_CFLAGS:='${CFLAGS}'}
4991         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4992         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4993         : ${BUILD_LIBS:='${LIBS}'}
4994         : ${BUILD_EXEEXT:='$x'}
4995         : ${BUILD_OBJEXT:='o'}
4996 fi
4997
4998 ###############################################################################
4999
5000 ### Options to allow the user to specify the set of libraries which are used.
5001 ### Use "--without-normal --with-shared" to allow the default model to be
5002 ### shared, for example.
5003 cf_list_models=""
5004
5005 echo "$as_me:5005: checking if libtool -version-number should be used" >&5
5006 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5007
5008 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5009 if test "${enable_libtool_version+set}" = set; then
5010   enableval="$enable_libtool_version"
5011   test "$enableval" != no && enableval=yes
5012         if test "$enableval" != "yes" ; then
5013     cf_libtool_version=no
5014         else
5015                 cf_libtool_version=yes
5016         fi
5017 else
5018   enableval=yes
5019         cf_libtool_version=yes
5020
5021 fi;
5022 echo "$as_me:5022: result: $cf_libtool_version" >&5
5023 echo "${ECHO_T}$cf_libtool_version" >&6
5024
5025 if test "$cf_libtool_version" = yes ; then
5026         LIBTOOL_VERSION="-version-number"
5027 else
5028         LIBTOOL_VERSION="-version-info"
5029         case "x$VERSION" in
5030         (x)
5031                 { echo "$as_me:5031: WARNING: VERSION was not set" >&5
5032 echo "$as_me: WARNING: VERSION was not set" >&2;}
5033                 ;;
5034         (x*.*.*)
5035                 ABI_VERSION="$VERSION"
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         (x*:*:*)
5042                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5043                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5044
5045 echo "${as_me:-configure}:5045: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5046
5047                 ;;
5048         (*)
5049                 { echo "$as_me:5049: WARNING: unexpected VERSION value: $VERSION" >&5
5050 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5051                 ;;
5052         esac
5053 fi
5054
5055 LIBTOOL=
5056
5057 # common library maintenance symbols that are convenient for libtool scripts:
5058 LIB_CREATE='${AR} -cr'
5059 LIB_OBJECT='${OBJECTS}'
5060 LIB_SUFFIX=.a
5061 LIB_PREP="$RANLIB"
5062
5063 # symbols used to prop libtool up to enable it to determine what it should be
5064 # doing:
5065 LIB_CLEAN=
5066 LIB_COMPILE=
5067 LIB_LINK='${CC}'
5068 LIB_INSTALL=
5069 LIB_UNINSTALL=
5070
5071 echo "$as_me:5071: checking if you want to build libraries with libtool" >&5
5072 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5073
5074 # Check whether --with-libtool or --without-libtool was given.
5075 if test "${with_libtool+set}" = set; then
5076   withval="$with_libtool"
5077   with_libtool=$withval
5078 else
5079   with_libtool=no
5080 fi;
5081 echo "$as_me:5081: result: $with_libtool" >&5
5082 echo "${ECHO_T}$with_libtool" >&6
5083 if test "$with_libtool" != "no"; then
5084
5085         if test "$with_libtool" != "yes" ; then
5086
5087 if test "x$prefix" != xNONE; then
5088         cf_path_syntax="$prefix"
5089 else
5090         cf_path_syntax="$ac_default_prefix"
5091 fi
5092
5093 case ".$with_libtool" in
5094 (.\$\(*\)*|.\'*\'*)
5095         ;;
5096 (..|./*|.\\*)
5097         ;;
5098 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5099         ;;
5100 (.\${*prefix}*|.\${*dir}*)
5101         eval with_libtool="$with_libtool"
5102         case ".$with_libtool" in
5103         (.NONE/*)
5104                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5105                 ;;
5106         esac
5107         ;;
5108 (.no|.NONE/*)
5109         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5110         ;;
5111 (*)
5112         { { echo "$as_me:5112: error: expected a pathname, not \"$with_libtool\"" >&5
5113 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5114    { (exit 1); exit 1; }; }
5115         ;;
5116 esac
5117
5118                 LIBTOOL=$with_libtool
5119         else
5120                 if test -n "$ac_tool_prefix"; then
5121   for ac_prog in libtool glibtool
5122   do
5123     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5124 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5125 echo "$as_me:5125: checking for $ac_word" >&5
5126 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5127 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5128   echo $ECHO_N "(cached) $ECHO_C" >&6
5129 else
5130   if test -n "$LIBTOOL"; then
5131   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5132 else
5133   ac_save_IFS=$IFS; IFS=$ac_path_separator
5134 ac_dummy="$PATH"
5135 for ac_dir in $ac_dummy; do
5136   IFS=$ac_save_IFS
5137   test -z "$ac_dir" && ac_dir=.
5138   $as_executable_p "$ac_dir/$ac_word" || continue
5139 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5140 echo "$as_me:5140: found $ac_dir/$ac_word" >&5
5141 break
5142 done
5143
5144 fi
5145 fi
5146 LIBTOOL=$ac_cv_prog_LIBTOOL
5147 if test -n "$LIBTOOL"; then
5148   echo "$as_me:5148: result: $LIBTOOL" >&5
5149 echo "${ECHO_T}$LIBTOOL" >&6
5150 else
5151   echo "$as_me:5151: result: no" >&5
5152 echo "${ECHO_T}no" >&6
5153 fi
5154
5155     test -n "$LIBTOOL" && break
5156   done
5157 fi
5158 if test -z "$LIBTOOL"; then
5159   ac_ct_LIBTOOL=$LIBTOOL
5160   for ac_prog in libtool glibtool
5161 do
5162   # Extract the first word of "$ac_prog", so it can be a program name with args.
5163 set dummy $ac_prog; ac_word=$2
5164 echo "$as_me:5164: checking for $ac_word" >&5
5165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5166 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5167   echo $ECHO_N "(cached) $ECHO_C" >&6
5168 else
5169   if test -n "$ac_ct_LIBTOOL"; then
5170   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5171 else
5172   ac_save_IFS=$IFS; IFS=$ac_path_separator
5173 ac_dummy="$PATH"
5174 for ac_dir in $ac_dummy; do
5175   IFS=$ac_save_IFS
5176   test -z "$ac_dir" && ac_dir=.
5177   $as_executable_p "$ac_dir/$ac_word" || continue
5178 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5179 echo "$as_me:5179: found $ac_dir/$ac_word" >&5
5180 break
5181 done
5182
5183 fi
5184 fi
5185 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5186 if test -n "$ac_ct_LIBTOOL"; then
5187   echo "$as_me:5187: result: $ac_ct_LIBTOOL" >&5
5188 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5189 else
5190   echo "$as_me:5190: result: no" >&5
5191 echo "${ECHO_T}no" >&6
5192 fi
5193
5194   test -n "$ac_ct_LIBTOOL" && break
5195 done
5196 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5197
5198   LIBTOOL=$ac_ct_LIBTOOL
5199 fi
5200
5201 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5202 then
5203         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.].*//'`
5204 else
5205         cf_cv_libtool_version=
5206 fi
5207 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5208
5209                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5210                 then
5211
5212 unset ac_cv_prog_ac_ct_LIBTOOL
5213 unset ac_ct_LIBTOOL
5214 unset LIBTOOL
5215
5216                         if test -n "$ac_tool_prefix"; then
5217   for ac_prog in glibtool
5218   do
5219     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5220 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5221 echo "$as_me:5221: checking for $ac_word" >&5
5222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5223 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5224   echo $ECHO_N "(cached) $ECHO_C" >&6
5225 else
5226   if test -n "$LIBTOOL"; then
5227   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5228 else
5229   ac_save_IFS=$IFS; IFS=$ac_path_separator
5230 ac_dummy="$PATH"
5231 for ac_dir in $ac_dummy; do
5232   IFS=$ac_save_IFS
5233   test -z "$ac_dir" && ac_dir=.
5234   $as_executable_p "$ac_dir/$ac_word" || continue
5235 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5236 echo "$as_me:5236: found $ac_dir/$ac_word" >&5
5237 break
5238 done
5239
5240 fi
5241 fi
5242 LIBTOOL=$ac_cv_prog_LIBTOOL
5243 if test -n "$LIBTOOL"; then
5244   echo "$as_me:5244: result: $LIBTOOL" >&5
5245 echo "${ECHO_T}$LIBTOOL" >&6
5246 else
5247   echo "$as_me:5247: result: no" >&5
5248 echo "${ECHO_T}no" >&6
5249 fi
5250
5251     test -n "$LIBTOOL" && break
5252   done
5253 fi
5254 if test -z "$LIBTOOL"; then
5255   ac_ct_LIBTOOL=$LIBTOOL
5256   for ac_prog in glibtool
5257 do
5258   # Extract the first word of "$ac_prog", so it can be a program name with args.
5259 set dummy $ac_prog; ac_word=$2
5260 echo "$as_me:5260: checking for $ac_word" >&5
5261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5262 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5263   echo $ECHO_N "(cached) $ECHO_C" >&6
5264 else
5265   if test -n "$ac_ct_LIBTOOL"; then
5266   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5267 else
5268   ac_save_IFS=$IFS; IFS=$ac_path_separator
5269 ac_dummy="$PATH"
5270 for ac_dir in $ac_dummy; do
5271   IFS=$ac_save_IFS
5272   test -z "$ac_dir" && ac_dir=.
5273   $as_executable_p "$ac_dir/$ac_word" || continue
5274 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5275 echo "$as_me:5275: found $ac_dir/$ac_word" >&5
5276 break
5277 done
5278
5279 fi
5280 fi
5281 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5282 if test -n "$ac_ct_LIBTOOL"; then
5283   echo "$as_me:5283: result: $ac_ct_LIBTOOL" >&5
5284 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5285 else
5286   echo "$as_me:5286: result: no" >&5
5287 echo "${ECHO_T}no" >&6
5288 fi
5289
5290   test -n "$ac_ct_LIBTOOL" && break
5291 done
5292 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5293
5294   LIBTOOL=$ac_ct_LIBTOOL
5295 fi
5296
5297 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5298 then
5299         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.].*//'`
5300 else
5301         cf_cv_libtool_version=
5302 fi
5303 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5304
5305                 fi
5306         fi
5307         if test -z "$LIBTOOL" ; then
5308                 { { echo "$as_me:5308: error: Cannot find libtool" >&5
5309 echo "$as_me: error: Cannot find libtool" >&2;}
5310    { (exit 1); exit 1; }; }
5311         fi
5312         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5313         LIB_OBJECT='${OBJECTS:.o=.lo}'
5314         LIB_SUFFIX=.la
5315         LIB_CLEAN='${LIBTOOL} --mode=clean'
5316         LIB_COMPILE='${LIBTOOL} --mode=compile'
5317         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5318         LIB_INSTALL='${LIBTOOL} --mode=install'
5319         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5320         LIB_PREP=:
5321
5322 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5323 then
5324         echo "$as_me:5324: checking version of $LIBTOOL" >&5
5325 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5326
5327 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5328 then
5329         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.].*//'`
5330 else
5331         cf_cv_libtool_version=
5332 fi
5333 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5334
5335         echo "$as_me:5335: result: $cf_cv_libtool_version" >&5
5336 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5337         if test -z "$cf_cv_libtool_version" ; then
5338                 { { echo "$as_me:5338: error: This is not GNU libtool" >&5
5339 echo "$as_me: error: This is not GNU libtool" >&2;}
5340    { (exit 1); exit 1; }; }
5341         fi
5342 else
5343         { { echo "$as_me:5343: error: GNU libtool has not been found" >&5
5344 echo "$as_me: error: GNU libtool has not been found" >&2;}
5345    { (exit 1); exit 1; }; }
5346 fi
5347
5348         # special hack to add -no-undefined (which libtool should do for itself)
5349         LT_UNDEF=
5350         case "$cf_cv_system_name" in
5351         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5352                 LT_UNDEF=-no-undefined
5353                 ;;
5354         esac
5355
5356         # special hack to add --tag option for C++ compiler
5357         case $cf_cv_libtool_version in
5358         (1.[5-9]*|[2-9].[0-9.a-z]*)
5359                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5360                 LIBTOOL="$LIBTOOL --tag=CC"
5361                 ;;
5362         (*)
5363                 LIBTOOL_CXX="$LIBTOOL"
5364                 ;;
5365         esac
5366 else
5367         LIBTOOL=""
5368         LIBTOOL_CXX=""
5369 fi
5370
5371 test -z "$LIBTOOL" && ECHO_LT=
5372
5373 if test "$with_libtool" != "no" ; then
5374
5375 cf_list_models="$cf_list_models libtool"
5376
5377 else
5378
5379 echo "$as_me:5379: checking if you want to build shared libraries" >&5
5380 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5381
5382 # Check whether --with-shared or --without-shared was given.
5383 if test "${with_shared+set}" = set; then
5384   withval="$with_shared"
5385   with_shared=$withval
5386 else
5387   with_shared=no
5388 fi;
5389 echo "$as_me:5389: result: $with_shared" >&5
5390 echo "${ECHO_T}$with_shared" >&6
5391 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5392
5393 echo "$as_me:5393: checking if you want to build static libraries" >&5
5394 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5395
5396 # Check whether --with-normal or --without-normal was given.
5397 if test "${with_normal+set}" = set; then
5398   withval="$with_normal"
5399   with_normal=$withval
5400 else
5401   with_normal=yes
5402 fi;
5403 echo "$as_me:5403: result: $with_normal" >&5
5404 echo "${ECHO_T}$with_normal" >&6
5405 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5406
5407 echo "$as_me:5407: checking if you want to build debug libraries" >&5
5408 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5409
5410 # Check whether --with-debug or --without-debug was given.
5411 if test "${with_debug+set}" = set; then
5412   withval="$with_debug"
5413   with_debug=$withval
5414 else
5415   with_debug=yes
5416 fi;
5417 echo "$as_me:5417: result: $with_debug" >&5
5418 echo "${ECHO_T}$with_debug" >&6
5419 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5420
5421 echo "$as_me:5421: checking if you want to build profiling libraries" >&5
5422 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5423
5424 # Check whether --with-profile or --without-profile was given.
5425 if test "${with_profile+set}" = set; then
5426   withval="$with_profile"
5427   with_profile=$withval
5428 else
5429   with_profile=no
5430 fi;
5431 echo "$as_me:5431: result: $with_profile" >&5
5432 echo "${ECHO_T}$with_profile" >&6
5433 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5434
5435 fi
5436
5437 if test "X$cf_with_cxx_binding" != Xno; then
5438 if test "x$with_shared" = "xyes"; then
5439 echo "$as_me:5439: checking if you want to build C++ shared libraries" >&5
5440 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5441
5442 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5443 if test "${with_cxx_shared+set}" = set; then
5444   withval="$with_cxx_shared"
5445   with_shared_cxx=$withval
5446 else
5447   with_shared_cxx=no
5448 fi;
5449 echo "$as_me:5449: result: $with_shared_cxx" >&5
5450 echo "${ECHO_T}$with_shared_cxx" >&6
5451 fi
5452 fi
5453
5454 ###############################################################################
5455
5456 echo "$as_me:5456: checking for specified models" >&5
5457 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5458 test -z "$cf_list_models" && cf_list_models=normal
5459 test "$with_libtool" != "no" && cf_list_models=libtool
5460 echo "$as_me:5460: result: $cf_list_models" >&5
5461 echo "${ECHO_T}$cf_list_models" >&6
5462
5463 ### Use the first model as the default, and save its suffix for use in building
5464 ### up test-applications.
5465 echo "$as_me:5465: checking for default model" >&5
5466 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5467 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5468 echo "$as_me:5468: result: $DFT_LWR_MODEL" >&5
5469 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5470
5471 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5472
5473 TICS_NAME=tic
5474
5475 TINFO_NAME=tinfo
5476
5477 LIB_NAME=ncurses
5478
5479 LIB_DIR=../lib
5480 LIB_2ND=../../lib
5481
5482 echo "$as_me:5482: checking if you want to have a library-prefix" >&5
5483 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5484
5485 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5486 if test "${with_lib_prefix+set}" = set; then
5487   withval="$with_lib_prefix"
5488   with_lib_prefix=$withval
5489 else
5490   with_lib_prefix=auto
5491 fi;
5492 echo "$as_me:5492: result: $with_lib_prefix" >&5
5493 echo "${ECHO_T}$with_lib_prefix" >&6
5494
5495 if test $with_lib_prefix = auto
5496 then
5497
5498         case $cf_cv_system_name in
5499         (OS/2*|os2*)
5500                 if test "$DFT_LWR_MODEL" = libtool; then
5501                         LIB_PREFIX='lib'
5502                 else
5503                         LIB_PREFIX=''
5504                 fi
5505                 ;;
5506         (*-msvc*)
5507                 LIB_PREFIX=''
5508                 ;;
5509         (*)     LIB_PREFIX='lib'
5510                 ;;
5511         esac
5512 cf_prefix=$LIB_PREFIX
5513
5514 elif test $with_lib_prefix = no
5515 then
5516         LIB_PREFIX=
5517 else
5518         LIB_PREFIX=$with_lib_prefix
5519 fi
5520
5521 LIB_SUFFIX=
5522
5523         echo "$as_me:5523: checking for PATH separator" >&5
5524 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5525         case $cf_cv_system_name in
5526         (os2*)  PATH_SEPARATOR=';'  ;;
5527         (*)     ${PATH_SEPARATOR:=':'}  ;;
5528         esac
5529
5530         echo "$as_me:5530: result: $PATH_SEPARATOR" >&5
5531 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5532
5533 ###############################################################################
5534
5535 echo "$as_me:5535: checking if you want to build a separate terminfo library" >&5
5536 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5537
5538 # Check whether --with-termlib or --without-termlib was given.
5539 if test "${with_termlib+set}" = set; then
5540   withval="$with_termlib"
5541   with_termlib=$withval
5542 else
5543   with_termlib=no
5544 fi;
5545 echo "$as_me:5545: result: $with_termlib" >&5
5546 echo "${ECHO_T}$with_termlib" >&6
5547
5548 echo "$as_me:5548: checking if you want to build a separate tic library" >&5
5549 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5550
5551 # Check whether --with-ticlib or --without-ticlib was given.
5552 if test "${with_ticlib+set}" = set; then
5553   withval="$with_ticlib"
5554   with_ticlib=$withval
5555 else
5556   with_ticlib=no
5557 fi;
5558 echo "$as_me:5558: result: $with_ticlib" >&5
5559 echo "${ECHO_T}$with_ticlib" >&6
5560
5561 if test X"$CC_G_OPT" = X"" ; then
5562         CC_G_OPT='-g'
5563         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5564 fi
5565
5566 if test X"$CXX_G_OPT" = X"" ; then
5567         CXX_G_OPT='-g'
5568         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5569 fi
5570
5571 echo "$as_me:5571: checking for default loader flags" >&5
5572 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5573 case $DFT_LWR_MODEL in
5574 (libtool) LD_MODEL=''   ;;
5575 (normal)  LD_MODEL=''   ;;
5576 (debug)   LD_MODEL=$CC_G_OPT ;;
5577 (profile) LD_MODEL='-pg';;
5578 (shared)  LD_MODEL=''   ;;
5579 esac
5580 echo "$as_me:5580: result: $LD_MODEL" >&5
5581 echo "${ECHO_T}$LD_MODEL" >&6
5582
5583 case $DFT_LWR_MODEL in
5584 (shared)
5585
5586 echo "$as_me:5586: checking if rpath option should be used" >&5
5587 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5588
5589 # Check whether --enable-rpath or --disable-rpath was given.
5590 if test "${enable_rpath+set}" = set; then
5591   enableval="$enable_rpath"
5592   cf_cv_enable_rpath=$enableval
5593 else
5594   cf_cv_enable_rpath=no
5595 fi;
5596 echo "$as_me:5596: result: $cf_cv_enable_rpath" >&5
5597 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5598
5599 echo "$as_me:5599: checking if shared libraries should be relinked during install" >&5
5600 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5601
5602 # Check whether --enable-relink or --disable-relink was given.
5603 if test "${enable_relink+set}" = set; then
5604   enableval="$enable_relink"
5605   cf_cv_do_relink=$enableval
5606 else
5607   cf_cv_do_relink=yes
5608 fi;
5609 echo "$as_me:5609: result: $cf_cv_do_relink" >&5
5610 echo "${ECHO_T}$cf_cv_do_relink" >&6
5611         ;;
5612 esac
5613
5614 # we will build libraries one-level down.
5615 rel_builddir=..
5616
5617 LD_RPATH_OPT=
5618 if test "x$cf_cv_enable_rpath" != xno
5619 then
5620         echo "$as_me:5620: checking for an rpath option" >&5
5621 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5622         case $cf_cv_system_name in
5623         (irix*)
5624                 if test "$GCC" = yes; then
5625                         LD_RPATH_OPT="-Wl,-rpath,"
5626                 else
5627                         LD_RPATH_OPT="-rpath "
5628                 fi
5629                 ;;
5630         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5631                 LD_RPATH_OPT="-Wl,-rpath,"
5632                 ;;
5633         (openbsd[2-9].*|mirbsd*)
5634                 LD_RPATH_OPT="-Wl,-rpath,"
5635                 ;;
5636         (dragonfly*)
5637                 LD_RPATH_OPT="-rpath "
5638                 ;;
5639         (netbsd*)
5640                 LD_RPATH_OPT="-Wl,-rpath,"
5641                 ;;
5642         (osf*|mls+*)
5643                 LD_RPATH_OPT="-rpath "
5644                 ;;
5645         (solaris2*)
5646                 LD_RPATH_OPT="-R"
5647                 ;;
5648         (*)
5649                 ;;
5650         esac
5651         echo "$as_me:5651: result: $LD_RPATH_OPT" >&5
5652 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5653
5654         case "x$LD_RPATH_OPT" in
5655         (x-R*)
5656                 echo "$as_me:5656: checking if we need a space after rpath option" >&5
5657 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5658                 cf_save_LIBS="$LIBS"
5659
5660 cf_add_libs="$LIBS"
5661 # reverse order
5662 cf_add_0lib=
5663 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5664 # filter duplicates
5665 for cf_add_1lib in $cf_add_0lib; do
5666         for cf_add_2lib in $cf_add_libs; do
5667                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5668                         cf_add_1lib=
5669                         break
5670                 fi
5671         done
5672         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5673 done
5674 LIBS="$cf_add_libs"
5675
5676                 cat >conftest.$ac_ext <<_ACEOF
5677 #line 5677 "configure"
5678 #include "confdefs.h"
5679
5680 int
5681 main (void)
5682 {
5683
5684   ;
5685   return 0;
5686 }
5687 _ACEOF
5688 rm -f conftest.$ac_objext conftest$ac_exeext
5689 if { (eval echo "$as_me:5689: \"$ac_link\"") >&5
5690   (eval $ac_link) 2>&5
5691   ac_status=$?
5692   echo "$as_me:5692: \$? = $ac_status" >&5
5693   (exit $ac_status); } &&
5694          { ac_try='test -s conftest$ac_exeext'
5695   { (eval echo "$as_me:5695: \"$ac_try\"") >&5
5696   (eval $ac_try) 2>&5
5697   ac_status=$?
5698   echo "$as_me:5698: \$? = $ac_status" >&5
5699   (exit $ac_status); }; }; then
5700   cf_rpath_space=no
5701 else
5702   echo "$as_me: failed program was:" >&5
5703 cat conftest.$ac_ext >&5
5704 cf_rpath_space=yes
5705 fi
5706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5707                 LIBS="$cf_save_LIBS"
5708                 echo "$as_me:5708: result: $cf_rpath_space" >&5
5709 echo "${ECHO_T}$cf_rpath_space" >&6
5710                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5711                 ;;
5712         esac
5713 fi
5714
5715         RM_SHARED_OPTS=
5716         LOCAL_LDFLAGS=
5717         LOCAL_LDFLAGS2=
5718         LD_SHARED_OPTS=
5719         INSTALL_LIB="-m 644"
5720         : ${rel_builddir:=.}
5721
5722         shlibdir=$libdir
5723
5724         MAKE_DLLS="#"
5725
5726         cf_cv_do_symlinks=no
5727         cf_ld_rpath_opt=
5728         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5729
5730         echo "$as_me:5730: checking if release/abi version should be used for shared libs" >&5
5731 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5732
5733 # Check whether --with-shlib-version or --without-shlib-version was given.
5734 if test "${with_shlib_version+set}" = set; then
5735   withval="$with_shlib_version"
5736   test -z "$withval" && withval=auto
5737         case $withval in
5738         (yes)
5739                 cf_cv_shlib_version=auto
5740                 ;;
5741         (rel|abi|auto)
5742                 cf_cv_shlib_version=$withval
5743                 ;;
5744         (*)
5745                 echo "$as_me:5745: result: $withval" >&5
5746 echo "${ECHO_T}$withval" >&6
5747                 { { echo "$as_me:5747: error: option value must be one of: rel, abi, or auto" >&5
5748 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5749    { (exit 1); exit 1; }; }
5750                 ;;
5751         esac
5752
5753 else
5754   cf_cv_shlib_version=auto
5755 fi;
5756         echo "$as_me:5756: result: $cf_cv_shlib_version" >&5
5757 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5758
5759         cf_cv_rm_so_locs=no
5760         cf_try_cflags=
5761
5762         # Some less-capable ports of gcc support only -fpic
5763         CC_SHARED_OPTS=
5764
5765         cf_try_fPIC=no
5766         if test "$GCC" = yes
5767         then
5768                 cf_try_fPIC=yes
5769         else
5770                 case $cf_cv_system_name in
5771                 (*linux*)       # e.g., PGI compiler
5772                         cf_try_fPIC=yes
5773                         ;;
5774                 esac
5775         fi
5776
5777         if test "$cf_try_fPIC" = yes
5778         then
5779                 echo "$as_me:5779: checking which $CC option to use" >&5
5780 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5781                 cf_save_CFLAGS="$CFLAGS"
5782                 for CC_SHARED_OPTS in -fPIC -fpic ''
5783                 do
5784                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5785                         cat >conftest.$ac_ext <<_ACEOF
5786 #line 5786 "configure"
5787 #include "confdefs.h"
5788 #include <stdio.h>
5789 int
5790 main (void)
5791 {
5792 int x = 1
5793   ;
5794   return 0;
5795 }
5796 _ACEOF
5797 rm -f conftest.$ac_objext
5798 if { (eval echo "$as_me:5798: \"$ac_compile\"") >&5
5799   (eval $ac_compile) 2>&5
5800   ac_status=$?
5801   echo "$as_me:5801: \$? = $ac_status" >&5
5802   (exit $ac_status); } &&
5803          { ac_try='test -s conftest.$ac_objext'
5804   { (eval echo "$as_me:5804: \"$ac_try\"") >&5
5805   (eval $ac_try) 2>&5
5806   ac_status=$?
5807   echo "$as_me:5807: \$? = $ac_status" >&5
5808   (exit $ac_status); }; }; then
5809   break
5810 else
5811   echo "$as_me: failed program was:" >&5
5812 cat conftest.$ac_ext >&5
5813 fi
5814 rm -f conftest.$ac_objext conftest.$ac_ext
5815                 done
5816                 echo "$as_me:5816: result: $CC_SHARED_OPTS" >&5
5817 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5818                 CFLAGS="$cf_save_CFLAGS"
5819         fi
5820
5821         cf_cv_shlib_version_infix=no
5822
5823         case $cf_cv_system_name in
5824         (aix4.3-9*|aix[5-7]*)
5825                 if test "$GCC" = yes; then
5826                         CC_SHARED_OPTS='-Wl,-brtl'
5827                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5828                 else
5829                         CC_SHARED_OPTS='-brtl'
5830                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5831                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5832                 fi
5833                 ;;
5834         (beos*)
5835                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5836                 ;;
5837         (cygwin*)
5838                 CC_SHARED_OPTS=
5839                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5840                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5841                 cf_cv_shlib_version=cygdll
5842                 cf_cv_shlib_version_infix=cygdll
5843                 shlibdir=$bindir
5844                 MAKE_DLLS=
5845                 cat >mk_shared_lib.sh <<-CF_EOF
5846                 #!$SHELL
5847                 SHARED_LIB=\$1
5848                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5849                 shift
5850                 cat <<-EOF
5851                 Linking shared library
5852                 ** SHARED_LIB \$SHARED_LIB
5853                 ** IMPORT_LIB \$IMPORT_LIB
5854 EOF
5855                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5856 CF_EOF
5857                 chmod +x mk_shared_lib.sh
5858                 ;;
5859         (msys*)
5860                 CC_SHARED_OPTS=
5861                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5862                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5863                 cf_cv_shlib_version=msysdll
5864                 cf_cv_shlib_version_infix=msysdll
5865                 shlibdir=$bindir
5866                 MAKE_DLLS=
5867                 cat >mk_shared_lib.sh <<-CF_EOF
5868                 #!$SHELL
5869                 SHARED_LIB=\$1
5870                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5871                 shift
5872                 cat <<-EOF
5873                 Linking shared library
5874                 ** SHARED_LIB \$SHARED_LIB
5875                 ** IMPORT_LIB \$IMPORT_LIB
5876 EOF
5877                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5878 CF_EOF
5879                 chmod +x mk_shared_lib.sh
5880                 ;;
5881         (darwin*)
5882                 cf_try_cflags="no-cpp-precomp"
5883                 CC_SHARED_OPTS="-dynamic"
5884                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5885                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5886                 cf_cv_shlib_version_infix=yes
5887                 echo "$as_me:5887: checking if ld -search_paths_first works" >&5
5888 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5889 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5890   echo $ECHO_N "(cached) $ECHO_C" >&6
5891 else
5892
5893                         cf_save_LDFLAGS=$LDFLAGS
5894                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5895                         cat >conftest.$ac_ext <<_ACEOF
5896 #line 5896 "configure"
5897 #include "confdefs.h"
5898
5899 int
5900 main (void)
5901 {
5902 int i;
5903   ;
5904   return 0;
5905 }
5906 _ACEOF
5907 rm -f conftest.$ac_objext conftest$ac_exeext
5908 if { (eval echo "$as_me:5908: \"$ac_link\"") >&5
5909   (eval $ac_link) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); } &&
5913          { ac_try='test -s conftest$ac_exeext'
5914   { (eval echo "$as_me:5914: \"$ac_try\"") >&5
5915   (eval $ac_try) 2>&5
5916   ac_status=$?
5917   echo "$as_me:5917: \$? = $ac_status" >&5
5918   (exit $ac_status); }; }; then
5919   cf_cv_ldflags_search_paths_first=yes
5920 else
5921   echo "$as_me: failed program was:" >&5
5922 cat conftest.$ac_ext >&5
5923 cf_cv_ldflags_search_paths_first=no
5924 fi
5925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5926                                 LDFLAGS=$cf_save_LDFLAGS
5927 fi
5928 echo "$as_me:5928: result: $cf_cv_ldflags_search_paths_first" >&5
5929 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5930                 if test $cf_cv_ldflags_search_paths_first = yes; then
5931                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5932                 fi
5933                 ;;
5934         (hpux[7-8]*)
5935                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5936                 if test "$GCC" != yes; then
5937                         CC_SHARED_OPTS='+Z'
5938                 fi
5939                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5940                 INSTALL_LIB="-m 555"
5941                 ;;
5942         (hpux*)
5943                 # (tested with gcc 2.7.2 -- I don't have c89)
5944                 if test "$GCC" = yes; then
5945                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5946                 else
5947                         CC_SHARED_OPTS='+Z'
5948                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5949                 fi
5950                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5951                 # HP-UX shared libraries must be executable, and should be
5952                 # readonly to exploit a quirk in the memory manager.
5953                 INSTALL_LIB="-m 555"
5954                 ;;
5955         (interix*)
5956                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5957                 if test "$cf_cv_shlib_version" = rel; then
5958                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5959                 else
5960                         cf_shared_soname='`basename $@`'
5961                 fi
5962                 CC_SHARED_OPTS=
5963                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5964                 ;;
5965         (irix*)
5966                 if test "$cf_cv_enable_rpath" = yes ; then
5967                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5968                 fi
5969                 # tested with IRIX 5.2 and 'cc'.
5970                 if test "$GCC" != yes; then
5971                         CC_SHARED_OPTS='-KPIC'
5972                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5973                 else
5974                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5975                 fi
5976                 cf_cv_rm_so_locs=yes
5977                 ;;
5978         (linux*|gnu*|k*bsd*-gnu)
5979                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5980                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5981                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5982                 fi
5983                 if test "$cf_cv_enable_rpath" = yes ; then
5984                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5985                 fi
5986
5987         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5988         if test "$cf_cv_shlib_version" = rel; then
5989                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5990         else
5991                 cf_cv_shared_soname='`basename $@`'
5992         fi
5993
5994                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5995                 ;;
5996         (mingw*msvc*)
5997                 cf_cv_shlib_version=msvcdll
5998                 cf_cv_shlib_version_infix=msvcdll
5999                 shlibdir=$bindir
6000                 MAKE_DLLS=
6001                 if test "$DFT_LWR_MODEL" = "shared" ; then
6002                         LOCAL_LDFLAGS="-link -dll"
6003                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6004                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6005                 fi
6006                 CC_SHARED_OPTS=
6007                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6008                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6009                 cat >mk_shared_lib.sh <<-CF_EOF
6010                 #!$SHELL
6011                 SHARED_LIB=\$1
6012                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6013                 shift
6014                 my_ld=\$1
6015                 shift
6016                 cat <<-EOF
6017                 Linking shared library
6018                 ** SHARED LIB \$SHARED_LIB
6019                 ** IMPORT_LIB \$IMPORT_LIB
6020 EOF
6021                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6022                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6023                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6024 CF_EOF
6025                 chmod +x mk_shared_lib.sh
6026                 cat >mk_prog.sh <<-CF_EOF
6027                 #!$SHELL
6028                 shift
6029                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6030                 LD="$LD"
6031                 clopts=()
6032                 ldopts=("/subsystem:console")
6033                 libs=()
6034                 isdll=0
6035                 while test \$# -gt 0; do
6036                         case "\$1" in
6037                                 -link)
6038                                         # ignore -link argument
6039                                         ;;
6040                                 -M[TD] | -M[TD]d)
6041                                         # ignore runtime-library option
6042                                         ;;
6043                                 -dll)
6044                                         isdll=1
6045                                         ;;
6046                                 -W* | -w*)
6047                                         # ignore warnings
6048                                         ;;
6049                                 -D*)
6050                                         clopts+=("\$1")
6051                                         ;;
6052                                 -I*)
6053                                         clopts+=("\$1")
6054                                         ;;
6055                                 -l*)
6056                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6057                                         ;;
6058                                 -L*)
6059                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6060                                         ;;
6061                                 *.obj | *.o)
6062                                         ldopts+=("\$1")
6063                                         ;;
6064                                 -Wl,*)
6065                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6066                                                 ldopts+=("\${linkarg}")
6067                                         done
6068                                         ;;
6069                                 *.lib)
6070                                         ldopts+=("\$1")
6071                                         ;;
6072                                 -o)
6073                                         shift
6074                                         ldopts+=("-out:\$1")
6075                                         ;;
6076                                 *)
6077                                         clopts+=("\$1")
6078                                         ldopts+=("\$1")
6079                                         ;;
6080                         esac
6081                         shift
6082                 done
6083                 if [ "\$isdll" -ne 0 ]; then
6084                         for lib in \${libs[*]}; do
6085                                 ldopts+=("\$lib.dll.lib")
6086                         done
6087                 else
6088                         for lib in \${libs[*]}; do
6089                                 ldopts+=("\$lib.lib")
6090                         done
6091                 fi
6092                 cat <<-EOF
6093                 Creating program
6094                 ** ld options:   "\${ldopts[@]}"
6095 EOF
6096                 exec \$LD \${ldopts[@]}
6097 CF_EOF
6098                 chmod +x mk_prog.sh
6099                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6100                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6101                 ;;
6102         (mingw*)
6103                 cf_cv_shlib_version=mingw
6104                 cf_cv_shlib_version_infix=mingw
6105                 shlibdir=$bindir
6106                 MAKE_DLLS=
6107                 if test "$DFT_LWR_MODEL" = "shared" ; then
6108                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6109                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6110                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6111                 fi
6112                 CC_SHARED_OPTS=
6113                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6114                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6115                 cat >mk_shared_lib.sh <<-CF_EOF
6116                 #!$SHELL
6117                 SHARED_LIB=\$1
6118                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6119                 shift
6120                 cat <<-EOF
6121                 Linking shared library
6122                 ** SHARED_LIB \$SHARED_LIB
6123                 ** IMPORT_LIB \$IMPORT_LIB
6124 EOF
6125                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6126 CF_EOF
6127                 chmod +x mk_shared_lib.sh
6128                 ;;
6129         (openbsd[2-9].*|mirbsd*)
6130                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6131                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6132                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6133                 fi
6134                 if test "$cf_cv_enable_rpath" = yes ; then
6135                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6136                 fi
6137                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6138
6139         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6140         if test "$cf_cv_shlib_version" = rel; then
6141                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6142         else
6143                 cf_cv_shared_soname='`basename $@`'
6144         fi
6145
6146                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6147                 ;;
6148         (nskJ*)
6149                 CC_SHARED_OPTS=
6150                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6151                 ;;
6152         (nskL*)
6153                 CC_SHARED_OPTS=
6154                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6155                 ;;
6156         (nto-qnx*|openbsd*|freebsd[12].*)
6157                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6158                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6159                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6160                 ;;
6161         (dragonfly*|freebsd*)
6162                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6163                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6164                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6165                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6166                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6167                 fi
6168
6169         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6170         if test "$cf_cv_shlib_version" = rel; then
6171                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6172         else
6173                 cf_cv_shared_soname='`basename $@`'
6174         fi
6175
6176                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6177                 ;;
6178         (netbsd*)
6179                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6180                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6181                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6182                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6183                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6184                         if test "$cf_cv_shlib_version" = auto; then
6185                         if test -f /usr/libexec/ld.elf_so; then
6186                                 cf_cv_shlib_version=abi
6187                         else
6188                                 cf_cv_shlib_version=rel
6189                         fi
6190                         fi
6191
6192         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6193         if test "$cf_cv_shlib_version" = rel; then
6194                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6195         else
6196                 cf_cv_shared_soname='`basename $@`'
6197         fi
6198
6199                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6200                 else
6201                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6202                 fi
6203                 ;;
6204         (osf*|mls+*)
6205                 # tested with OSF/1 V3.2 and 'cc'
6206                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6207                 # link with shared libs).
6208                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6209                 case $host_os in
6210                 (osf4*)
6211                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6212                         ;;
6213                 esac
6214                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6215                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6216                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6217                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6218                 fi
6219                 cf_cv_rm_so_locs=yes
6220                 ;;
6221         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6222                 # tested with osr5.0.5
6223                 if test "$GCC" != yes; then
6224                         CC_SHARED_OPTS='-belf -KPIC'
6225                 fi
6226                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6227                 if test "$cf_cv_enable_rpath" = yes ; then
6228                         # only way is to set LD_RUN_PATH but no switch for it
6229                         RUN_PATH=$libdir
6230                 fi
6231                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6232                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6233                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6234                 ;;
6235         (sunos4*)
6236                 # tested with SunOS 4.1.1 and gcc 2.7.0
6237                 if test "$GCC" != yes; then
6238                         CC_SHARED_OPTS='-KPIC'
6239                 fi
6240                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6241                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6242                 ;;
6243         (solaris2*)
6244                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6245                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6246                 if test "$DFT_LWR_MODEL" = "shared" ; then
6247                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6248                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6249                 fi
6250                 if test "$cf_cv_enable_rpath" = yes ; then
6251                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6252                 fi
6253
6254         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6255         if test "$cf_cv_shlib_version" = rel; then
6256                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6257         else
6258                 cf_cv_shared_soname='`basename $@`'
6259         fi
6260
6261                 if test "$GCC" != yes; then
6262                         cf_save_CFLAGS="$CFLAGS"
6263                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6264                         do
6265                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6266                                 cat >conftest.$ac_ext <<_ACEOF
6267 #line 6267 "configure"
6268 #include "confdefs.h"
6269 #include <stdio.h>
6270 int
6271 main (void)
6272 {
6273 printf("Hello\n");
6274   ;
6275   return 0;
6276 }
6277 _ACEOF
6278 rm -f conftest.$ac_objext
6279 if { (eval echo "$as_me:6279: \"$ac_compile\"") >&5
6280   (eval $ac_compile) 2>&5
6281   ac_status=$?
6282   echo "$as_me:6282: \$? = $ac_status" >&5
6283   (exit $ac_status); } &&
6284          { ac_try='test -s conftest.$ac_objext'
6285   { (eval echo "$as_me:6285: \"$ac_try\"") >&5
6286   (eval $ac_try) 2>&5
6287   ac_status=$?
6288   echo "$as_me:6288: \$? = $ac_status" >&5
6289   (exit $ac_status); }; }; then
6290   break
6291 else
6292   echo "$as_me: failed program was:" >&5
6293 cat conftest.$ac_ext >&5
6294 fi
6295 rm -f conftest.$ac_objext conftest.$ac_ext
6296                         done
6297                         CFLAGS="$cf_save_CFLAGS"
6298                         CC_SHARED_OPTS=$cf_shared_opts
6299                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6300                 else
6301                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6302                 fi
6303                 ;;
6304         (sysv5uw7*|unix_sv*)
6305                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6306                 if test "$GCC" != yes; then
6307                         CC_SHARED_OPTS='-KPIC'
6308                 fi
6309                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6310                 ;;
6311         (*)
6312                 CC_SHARED_OPTS='unknown'
6313                 MK_SHARED_LIB='echo unknown'
6314                 ;;
6315         esac
6316
6317         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6318         case "$cf_cv_shlib_version" in
6319         (rel|abi)
6320                 case "$MK_SHARED_LIB" in
6321                 (*'-o $@')
6322                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6323                         ;;
6324                 (*)
6325                         { echo "$as_me:6325: WARNING: ignored --with-shlib-version" >&5
6326 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6327                         ;;
6328                 esac
6329                 ;;
6330         esac
6331
6332         if test -n "$cf_try_cflags"
6333         then
6334 cat > conftest.$ac_ext <<EOF
6335 #line 6335 "${as_me:-configure}"
6336 #include <stdio.h>
6337 int main(int argc, char *argv[])
6338 {
6339         printf("hello\n");
6340         return (argv[argc-1] == 0) ;
6341 }
6342 EOF
6343                 cf_save_CFLAGS="$CFLAGS"
6344                 for cf_opt in $cf_try_cflags
6345                 do
6346                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6347                         echo "$as_me:6347: checking if CFLAGS option -$cf_opt works" >&5
6348 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6349                         if { (eval echo "$as_me:6349: \"$ac_compile\"") >&5
6350   (eval $ac_compile) 2>&5
6351   ac_status=$?
6352   echo "$as_me:6352: \$? = $ac_status" >&5
6353   (exit $ac_status); }; then
6354                                 echo "$as_me:6354: result: yes" >&5
6355 echo "${ECHO_T}yes" >&6
6356                                 cf_save_CFLAGS="$CFLAGS"
6357                         else
6358                                 echo "$as_me:6358: result: no" >&5
6359 echo "${ECHO_T}no" >&6
6360                         fi
6361                 done
6362                 CFLAGS="$cf_save_CFLAGS"
6363         fi
6364
6365         # RPATH_LIST is a colon-separated list of directories
6366         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6367         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6368
6369         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6370
6371         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6372
6373 echo "${as_me:-configure}:6373: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6374
6375         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6376
6377 echo "${as_me:-configure}:6377: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6378
6379 for model in $cf_list_models; do
6380         case $model in
6381         (libtool)
6382
6383 echo "$as_me:6383: checking for additional libtool options" >&5
6384 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6385
6386 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6387 if test "${with_libtool_opts+set}" = set; then
6388   withval="$with_libtool_opts"
6389   with_libtool_opts=$withval
6390 else
6391   with_libtool_opts=no
6392 fi;
6393 echo "$as_me:6393: result: $with_libtool_opts" >&5
6394 echo "${ECHO_T}$with_libtool_opts" >&6
6395
6396 case .$with_libtool_opts in
6397 (.yes|.no|.)
6398         ;;
6399 (*)
6400         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6401         ;;
6402 esac
6403
6404 echo "$as_me:6404: checking if exported-symbols file should be used" >&5
6405 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6406
6407 # Check whether --with-export-syms or --without-export-syms was given.
6408 if test "${with_export_syms+set}" = set; then
6409   withval="$with_export_syms"
6410   with_export_syms=$withval
6411 else
6412   with_export_syms=no
6413 fi;
6414 if test "x$with_export_syms" = xyes
6415 then
6416         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6417
6418 fi
6419 echo "$as_me:6419: result: $with_export_syms" >&5
6420 echo "${ECHO_T}$with_export_syms" >&6
6421 if test "x$with_export_syms" != xno
6422 then
6423         EXPORT_SYMS="-export-symbols $with_export_syms"
6424
6425 fi
6426
6427                 ;;
6428         (shared)
6429                 if test "$CC_SHARED_OPTS" = "unknown"; then
6430                         { { echo "$as_me:6430: error: Shared libraries are not supported in this version" >&5
6431 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6432    { (exit 1); exit 1; }; }
6433                 fi
6434                 # workaround for inept transition to PIE vs PIC...
6435                 echo "$as_me:6435: checking if current CFLAGS link properly" >&5
6436 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6437                 cat >conftest.$ac_ext <<_ACEOF
6438 #line 6438 "configure"
6439 #include "confdefs.h"
6440 #include <stdio.h>
6441 int
6442 main (void)
6443 {
6444 printf("Hello work\n");
6445   ;
6446   return 0;
6447 }
6448 _ACEOF
6449 rm -f conftest.$ac_objext conftest$ac_exeext
6450 if { (eval echo "$as_me:6450: \"$ac_link\"") >&5
6451   (eval $ac_link) 2>&5
6452   ac_status=$?
6453   echo "$as_me:6453: \$? = $ac_status" >&5
6454   (exit $ac_status); } &&
6455          { ac_try='test -s conftest$ac_exeext'
6456   { (eval echo "$as_me:6456: \"$ac_try\"") >&5
6457   (eval $ac_try) 2>&5
6458   ac_status=$?
6459   echo "$as_me:6459: \$? = $ac_status" >&5
6460   (exit $ac_status); }; }; then
6461   cf_cflags_work=yes
6462 else
6463   echo "$as_me: failed program was:" >&5
6464 cat conftest.$ac_ext >&5
6465 cf_cflags_work=no
6466 fi
6467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6468                 echo "$as_me:6468: result: $cf_cflags_work" >&5
6469 echo "${ECHO_T}$cf_cflags_work" >&6
6470                 if test "$cf_cflags_work" = no
6471                 then
6472                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6473
6474 echo "${as_me:-configure}:6474: testing try to work around by appending shared-options ..." 1>&5
6475
6476                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6477                 fi
6478
6479 echo "$as_me:6479: checking if versioned-symbols file should be used" >&5
6480 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6481
6482 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6483 if test "${with_versioned_syms+set}" = set; then
6484   withval="$with_versioned_syms"
6485   with_versioned_syms=$withval
6486 else
6487   with_versioned_syms=no
6488 fi;
6489 case "x$with_versioned_syms" in
6490 (xyes)
6491         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6492
6493         ;;
6494 (xno)
6495         ;;
6496 (x/*)
6497         test -f "$with_versioned_syms" || { { echo "$as_me:6497: error: expected a filename: $with_versioned_syms" >&5
6498 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6499    { (exit 1); exit 1; }; }
6500         ;;
6501 (*)
6502         test -f "$with_versioned_syms" || { { echo "$as_me:6502: error: expected a filename: $with_versioned_syms" >&5
6503 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6504    { (exit 1); exit 1; }; }
6505         with_versioned_syms=`pwd`/"$with_versioned_syms"
6506         ;;
6507 esac
6508 echo "$as_me:6508: result: $with_versioned_syms" >&5
6509 echo "${ECHO_T}$with_versioned_syms" >&6
6510
6511 RESULTING_SYMS=
6512 VERSIONED_SYMS=
6513 WILDCARD_SYMS=
6514
6515 if test "x$with_versioned_syms" != xno
6516 then
6517         RESULTING_SYMS=$with_versioned_syms
6518         case "x$MK_SHARED_LIB" in
6519         (*-Wl,*)
6520                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6521                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6522                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6523
6524 echo "${as_me:-configure}:6524: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6525
6526                 ;;
6527         (*-dy\ *)
6528                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6529                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6530                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6531
6532 echo "${as_me:-configure}:6532: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6533
6534                 ;;
6535         (*)
6536                 { echo "$as_me:6536: WARNING: this system does not support versioned-symbols" >&5
6537 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6538                 ;;
6539         esac
6540
6541         # Linux ld can selectively override scope, e.g., of symbols beginning with
6542         # "_" by first declaring some as global, and then using a wildcard to
6543         # declare the others as local.  Some other loaders cannot do this.  Check
6544         # by constructing a (very) simple shared library and inspecting its
6545         # symbols.
6546         if test "x$VERSIONED_SYMS" != "x"
6547         then
6548                 echo "$as_me:6548: checking if wildcards can be used to selectively omit symbols" >&5
6549 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6550                 WILDCARD_SYMS=no
6551
6552                 # make sources
6553                 rm -f conftest.*
6554
6555                 cat >conftest.ver <<EOF
6556 module_1.0 {
6557 global:
6558         globalf1;
6559 local:
6560         localf1;
6561 };
6562 module_2.0 {
6563 global:
6564         globalf2;
6565 local:
6566         localf2;
6567         _*;
6568 } module_1.0;
6569 submodule_1.0 {
6570 global:
6571         subglobalf1;
6572         _ismissing;
6573 local:
6574         sublocalf1;
6575 };
6576 submodule_2.0 {
6577 global:
6578         subglobalf2;
6579 local:
6580         sublocalf2;
6581         _*;
6582 } submodule_1.0;
6583 EOF
6584                 cat >conftest.$ac_ext <<EOF
6585 #line 6585 "configure"
6586 int     _ismissing(void) { return 1; }
6587 int     _localf1(void) { return 1; }
6588 int     _localf2(void) { return 2; }
6589 int     globalf1(void) { return 1; }
6590 int     globalf2(void) { return 2; }
6591 int     _sublocalf1(void) { return 1; }
6592 int     _sublocalf2(void) { return 2; }
6593 int     subglobalf1(void) { return 1; }
6594 int     subglobalf2(void) { return 2; }
6595 EOF
6596                 cat >conftest.mk <<EOF
6597 CC=${CC}
6598 CFLAGS=${CFLAGS}
6599 CPPFLAGS=${CPPFLAGS}
6600 LDFLAGS=${LDFLAGS}
6601 LIBS=${LIBS}
6602 VERSIONED_SYMS=${VERSIONED_SYMS}
6603 RESULTING_SYMS=conftest.ver
6604 MK_SHARED_LIB=${MK_SHARED_LIB}
6605 conftest.so: conftest.$ac_cv_objext
6606                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6607 EOF
6608
6609                 # compile source, make library
6610                 if make -f conftest.mk 2>&5 >/dev/null
6611                 then
6612                         # test for missing symbol in either Data or Text section
6613                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6614                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6615                 fi
6616                 echo "$as_me:6616: result: $WILDCARD_SYMS" >&5
6617 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6618                 rm -f conftest.*
6619         fi
6620 fi
6621
6622                 ;;
6623         esac
6624 done
6625
6626 ### Checks for special libraries, must be done up-front.
6627 SHLIB_LIST=""
6628
6629 echo "$as_me:6629: checking if you want to link with the GPM mouse library" >&5
6630 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6631
6632 # Check whether --with-gpm or --without-gpm was given.
6633 if test "${with_gpm+set}" = set; then
6634   withval="$with_gpm"
6635   with_gpm=$withval
6636 else
6637   with_gpm=maybe
6638 fi;
6639 echo "$as_me:6639: result: $with_gpm" >&5
6640 echo "${ECHO_T}$with_gpm" >&6
6641
6642 if test "$with_gpm" != no ; then
6643         echo "$as_me:6643: checking for gpm.h" >&5
6644 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6645 if test "${ac_cv_header_gpm_h+set}" = set; then
6646   echo $ECHO_N "(cached) $ECHO_C" >&6
6647 else
6648   cat >conftest.$ac_ext <<_ACEOF
6649 #line 6649 "configure"
6650 #include "confdefs.h"
6651 #include <gpm.h>
6652 _ACEOF
6653 if { (eval echo "$as_me:6653: \"$ac_cpp conftest.$ac_ext\"") >&5
6654   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6655   ac_status=$?
6656   egrep -v '^ *\+' conftest.er1 >conftest.err
6657   rm -f conftest.er1
6658   cat conftest.err >&5
6659   echo "$as_me:6659: \$? = $ac_status" >&5
6660   (exit $ac_status); } >/dev/null; then
6661   if test -s conftest.err; then
6662     ac_cpp_err=$ac_c_preproc_warn_flag
6663   else
6664     ac_cpp_err=
6665   fi
6666 else
6667   ac_cpp_err=yes
6668 fi
6669 if test -z "$ac_cpp_err"; then
6670   ac_cv_header_gpm_h=yes
6671 else
6672   echo "$as_me: failed program was:" >&5
6673   cat conftest.$ac_ext >&5
6674   ac_cv_header_gpm_h=no
6675 fi
6676 rm -f conftest.err conftest.$ac_ext
6677 fi
6678 echo "$as_me:6678: result: $ac_cv_header_gpm_h" >&5
6679 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6680 if test $ac_cv_header_gpm_h = yes; then
6681
6682 cat >>confdefs.h <<\EOF
6683 #define HAVE_GPM_H 1
6684 EOF
6685
6686                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6687                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6688
6689 echo "${as_me:-configure}:6689: testing assuming we really have GPM library ..." 1>&5
6690
6691 cat >>confdefs.h <<\EOF
6692 #define HAVE_LIBGPM 1
6693 EOF
6694
6695                         with_gpm=yes
6696                 else
6697                         echo "$as_me:6697: checking for Gpm_Open in -lgpm" >&5
6698 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6699 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6700   echo $ECHO_N "(cached) $ECHO_C" >&6
6701 else
6702   ac_check_lib_save_LIBS=$LIBS
6703 LIBS="-lgpm  $LIBS"
6704 cat >conftest.$ac_ext <<_ACEOF
6705 #line 6705 "configure"
6706 #include "confdefs.h"
6707
6708 /* Override any gcc2 internal prototype to avoid an error.  */
6709 #ifdef __cplusplus
6710 extern "C"
6711 #endif
6712 /* We use char because int might match the return type of a gcc2
6713    builtin and then its argument prototype would still apply.  */
6714 char Gpm_Open ();
6715 int
6716 main (void)
6717 {
6718 Gpm_Open ();
6719   ;
6720   return 0;
6721 }
6722 _ACEOF
6723 rm -f conftest.$ac_objext conftest$ac_exeext
6724 if { (eval echo "$as_me:6724: \"$ac_link\"") >&5
6725   (eval $ac_link) 2>&5
6726   ac_status=$?
6727   echo "$as_me:6727: \$? = $ac_status" >&5
6728   (exit $ac_status); } &&
6729          { ac_try='test -s conftest$ac_exeext'
6730   { (eval echo "$as_me:6730: \"$ac_try\"") >&5
6731   (eval $ac_try) 2>&5
6732   ac_status=$?
6733   echo "$as_me:6733: \$? = $ac_status" >&5
6734   (exit $ac_status); }; }; then
6735   ac_cv_lib_gpm_Gpm_Open=yes
6736 else
6737   echo "$as_me: failed program was:" >&5
6738 cat conftest.$ac_ext >&5
6739 ac_cv_lib_gpm_Gpm_Open=no
6740 fi
6741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6742 LIBS=$ac_check_lib_save_LIBS
6743 fi
6744 echo "$as_me:6744: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6745 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6746 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6747   with_gpm=yes
6748 else
6749
6750                                 if test "$with_gpm" = maybe; then
6751                                         { echo "$as_me:6751: WARNING: Cannot link with GPM library" >&5
6752 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6753                                         with_gpm=no
6754                                 else
6755                                         { { echo "$as_me:6755: error: Cannot link with GPM library" >&5
6756 echo "$as_me: error: Cannot link with GPM library" >&2;}
6757    { (exit 1); exit 1; }; }
6758                                 fi
6759
6760 fi
6761
6762                 fi
6763
6764 else
6765
6766                 test "$with_gpm" != maybe && { echo "$as_me:6766: WARNING: Cannot find GPM header" >&5
6767 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6768                 with_gpm=no
6769
6770 fi
6771
6772 fi
6773
6774 if test "$with_gpm" != no ; then
6775         echo "$as_me:6775: checking if you want to load GPM dynamically" >&5
6776 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6777
6778 # Check whether --with-dlsym or --without-dlsym was given.
6779 if test "${with_dlsym+set}" = set; then
6780   withval="$with_dlsym"
6781   with_dlsym=$withval
6782 else
6783   with_dlsym=yes
6784 fi;
6785         echo "$as_me:6785: result: $with_dlsym" >&5
6786 echo "${ECHO_T}$with_dlsym" >&6
6787         if test "x$with_dlsym" = xyes ; then
6788
6789 cf_have_dlsym=no
6790 echo "$as_me:6790: checking for dlsym" >&5
6791 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6792 if test "${ac_cv_func_dlsym+set}" = set; then
6793   echo $ECHO_N "(cached) $ECHO_C" >&6
6794 else
6795   cat >conftest.$ac_ext <<_ACEOF
6796 #line 6796 "configure"
6797 #include "confdefs.h"
6798 #define dlsym autoconf_temporary
6799 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6800 #undef dlsym
6801
6802 #ifdef __cplusplus
6803 extern "C"
6804 #endif
6805
6806 /* We use char because int might match the return type of a gcc2
6807    builtin and then its argument prototype would still apply.  */
6808 char dlsym (void);
6809
6810 int
6811 main (void)
6812 {
6813
6814 /* The GNU C library defines stubs for functions which it implements
6815     to always fail with ENOSYS.  Some functions are actually named
6816     something starting with __ and the normal name is an alias.  */
6817 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6818 #error found stub for dlsym
6819 #endif
6820
6821         return dlsym ();
6822   ;
6823   return 0;
6824 }
6825 _ACEOF
6826 rm -f conftest.$ac_objext conftest$ac_exeext
6827 if { (eval echo "$as_me:6827: \"$ac_link\"") >&5
6828   (eval $ac_link) 2>&5
6829   ac_status=$?
6830   echo "$as_me:6830: \$? = $ac_status" >&5
6831   (exit $ac_status); } &&
6832          { ac_try='test -s conftest$ac_exeext'
6833   { (eval echo "$as_me:6833: \"$ac_try\"") >&5
6834   (eval $ac_try) 2>&5
6835   ac_status=$?
6836   echo "$as_me:6836: \$? = $ac_status" >&5
6837   (exit $ac_status); }; }; then
6838   ac_cv_func_dlsym=yes
6839 else
6840   echo "$as_me: failed program was:" >&5
6841 cat conftest.$ac_ext >&5
6842 ac_cv_func_dlsym=no
6843 fi
6844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6845 fi
6846 echo "$as_me:6846: result: $ac_cv_func_dlsym" >&5
6847 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6848 if test $ac_cv_func_dlsym = yes; then
6849   cf_have_dlsym=yes
6850 else
6851
6852 cf_have_libdl=no
6853 echo "$as_me:6853: checking for dlsym in -ldl" >&5
6854 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6855 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6856   echo $ECHO_N "(cached) $ECHO_C" >&6
6857 else
6858   ac_check_lib_save_LIBS=$LIBS
6859 LIBS="-ldl  $LIBS"
6860 cat >conftest.$ac_ext <<_ACEOF
6861 #line 6861 "configure"
6862 #include "confdefs.h"
6863
6864 /* Override any gcc2 internal prototype to avoid an error.  */
6865 #ifdef __cplusplus
6866 extern "C"
6867 #endif
6868 /* We use char because int might match the return type of a gcc2
6869    builtin and then its argument prototype would still apply.  */
6870 char dlsym ();
6871 int
6872 main (void)
6873 {
6874 dlsym ();
6875   ;
6876   return 0;
6877 }
6878 _ACEOF
6879 rm -f conftest.$ac_objext conftest$ac_exeext
6880 if { (eval echo "$as_me:6880: \"$ac_link\"") >&5
6881   (eval $ac_link) 2>&5
6882   ac_status=$?
6883   echo "$as_me:6883: \$? = $ac_status" >&5
6884   (exit $ac_status); } &&
6885          { ac_try='test -s conftest$ac_exeext'
6886   { (eval echo "$as_me:6886: \"$ac_try\"") >&5
6887   (eval $ac_try) 2>&5
6888   ac_status=$?
6889   echo "$as_me:6889: \$? = $ac_status" >&5
6890   (exit $ac_status); }; }; then
6891   ac_cv_lib_dl_dlsym=yes
6892 else
6893   echo "$as_me: failed program was:" >&5
6894 cat conftest.$ac_ext >&5
6895 ac_cv_lib_dl_dlsym=no
6896 fi
6897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6898 LIBS=$ac_check_lib_save_LIBS
6899 fi
6900 echo "$as_me:6900: result: $ac_cv_lib_dl_dlsym" >&5
6901 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6902 if test $ac_cv_lib_dl_dlsym = yes; then
6903
6904         cf_have_dlsym=yes
6905         cf_have_libdl=yes
6906 fi
6907
6908 fi
6909
6910 if test "$cf_have_dlsym" = yes ; then
6911         test "$cf_have_libdl" = yes && {
6912 cf_add_libs="$LIBS"
6913 # reverse order
6914 cf_add_0lib=
6915 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6916 # filter duplicates
6917 for cf_add_1lib in $cf_add_0lib; do
6918         for cf_add_2lib in $cf_add_libs; do
6919                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6920                         cf_add_1lib=
6921                         break
6922                 fi
6923         done
6924         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6925 done
6926 LIBS="$cf_add_libs"
6927  }
6928
6929         echo "$as_me:6929: checking whether able to link to dl*() functions" >&5
6930 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6931         cat >conftest.$ac_ext <<_ACEOF
6932 #line 6932 "configure"
6933 #include "confdefs.h"
6934 #include <dlfcn.h>
6935 int
6936 main (void)
6937 {
6938
6939                 void *obj;
6940                 if ((obj = dlopen("filename", 0)) != 0) {
6941                         if (dlsym(obj, "symbolname") == 0) {
6942                         dlclose(obj);
6943                         }
6944                 }
6945   ;
6946   return 0;
6947 }
6948 _ACEOF
6949 rm -f conftest.$ac_objext conftest$ac_exeext
6950 if { (eval echo "$as_me:6950: \"$ac_link\"") >&5
6951   (eval $ac_link) 2>&5
6952   ac_status=$?
6953   echo "$as_me:6953: \$? = $ac_status" >&5
6954   (exit $ac_status); } &&
6955          { ac_try='test -s conftest$ac_exeext'
6956   { (eval echo "$as_me:6956: \"$ac_try\"") >&5
6957   (eval $ac_try) 2>&5
6958   ac_status=$?
6959   echo "$as_me:6959: \$? = $ac_status" >&5
6960   (exit $ac_status); }; }; then
6961
6962 cat >>confdefs.h <<\EOF
6963 #define HAVE_LIBDL 1
6964 EOF
6965
6966 else
6967   echo "$as_me: failed program was:" >&5
6968 cat conftest.$ac_ext >&5
6969
6970                 { { echo "$as_me:6970: error: Cannot link test program for libdl" >&5
6971 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6972    { (exit 1); exit 1; }; }
6973 fi
6974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6975         echo "$as_me:6975: result: ok" >&5
6976 echo "${ECHO_T}ok" >&6
6977 else
6978         { { echo "$as_me:6978: error: Cannot find dlsym function" >&5
6979 echo "$as_me: error: Cannot find dlsym function" >&2;}
6980    { (exit 1); exit 1; }; }
6981 fi
6982
6983                 if test "x$with_gpm" != xyes ; then
6984                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6985
6986 echo "${as_me:-configure}:6986: testing assuming soname for gpm is $with_gpm ..." 1>&5
6987
6988                         cf_cv_gpm_soname="$with_gpm"
6989                 else
6990
6991 echo "$as_me:6991: checking for soname of gpm library" >&5
6992 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6993 if test "${cf_cv_gpm_soname+set}" = set; then
6994   echo $ECHO_N "(cached) $ECHO_C" >&6
6995 else
6996
6997 cf_cv_gpm_soname=unknown
6998 if test "$cross_compiling" != yes ; then
6999 cat >conftest.$ac_ext <<CF_EOF
7000 #include <gpm.h>
7001 int main(void)
7002 {
7003 if (Gpm_Open(0,0)) Gpm_Close();
7004         ${cf_cv_main_return:-return}(0);
7005 }
7006 CF_EOF
7007 cf_save_LIBS="$LIBS"
7008
7009 cf_add_libs="$LIBS"
7010 # reverse order
7011 cf_add_0lib=
7012 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7013 # filter duplicates
7014 for cf_add_1lib in $cf_add_0lib; do
7015         for cf_add_2lib in $cf_add_libs; do
7016                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7017                         cf_add_1lib=
7018                         break
7019                 fi
7020         done
7021         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7022 done
7023 LIBS="$cf_add_libs"
7024
7025         if { (eval echo "$as_me:7025: \"$ac_compile\"") >&5
7026   (eval $ac_compile) 2>&5
7027   ac_status=$?
7028   echo "$as_me:7028: \$? = $ac_status" >&5
7029   (exit $ac_status); } ; then
7030                 if { (eval echo "$as_me:7030: \"$ac_link\"") >&5
7031   (eval $ac_link) 2>&5
7032   ac_status=$?
7033   echo "$as_me:7033: \$? = $ac_status" >&5
7034   (exit $ac_status); } ; then
7035                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7036                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7037                 fi
7038         fi
7039 rm -rf conftest*
7040 LIBS="$cf_save_LIBS"
7041 fi
7042
7043 fi
7044 echo "$as_me:7044: result: $cf_cv_gpm_soname" >&5
7045 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7046
7047                 fi
7048                 test "$cf_cv_gpm_soname" != "unknown" &&
7049 cat >>confdefs.h <<EOF
7050 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7051 EOF
7052
7053                 SHLIB_LIST="-ldl $SHLIB_LIST"
7054
7055 cf_add_libs="$PRIVATE_LIBS"
7056 # reverse order
7057 cf_add_0lib=
7058 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7059 # filter duplicates
7060 for cf_add_1lib in $cf_add_0lib; do
7061         for cf_add_2lib in $cf_add_libs; do
7062                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7063                         cf_add_1lib=
7064                         break
7065                 fi
7066         done
7067         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7068 done
7069 PRIVATE_LIBS="$cf_add_libs"
7070
7071         else
7072                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7073
7074 cf_add_libs="$TEST_LIBS"
7075 # reverse order
7076 cf_add_0lib=
7077 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7078 # filter duplicates
7079 for cf_add_1lib in $cf_add_0lib; do
7080         for cf_add_2lib in $cf_add_libs; do
7081                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7082                         cf_add_1lib=
7083                         break
7084                 fi
7085         done
7086         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7087 done
7088 TEST_LIBS="$cf_add_libs"
7089
7090 cf_add_libs="$PRIVATE_LIBS"
7091 # reverse order
7092 cf_add_0lib=
7093 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7094 # filter duplicates
7095 for cf_add_1lib in $cf_add_0lib; do
7096         for cf_add_2lib in $cf_add_libs; do
7097                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7098                         cf_add_1lib=
7099                         break
7100                 fi
7101         done
7102         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7103 done
7104 PRIVATE_LIBS="$cf_add_libs"
7105
7106         fi
7107
7108 cat >>confdefs.h <<\EOF
7109 #define HAVE_LIBGPM 1
7110 EOF
7111
7112 echo "$as_me:7112: checking for Gpm_Wgetch in -lgpm" >&5
7113 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7114 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7115   echo $ECHO_N "(cached) $ECHO_C" >&6
7116 else
7117   ac_check_lib_save_LIBS=$LIBS
7118 LIBS="-lgpm  $LIBS"
7119 cat >conftest.$ac_ext <<_ACEOF
7120 #line 7120 "configure"
7121 #include "confdefs.h"
7122
7123 /* Override any gcc2 internal prototype to avoid an error.  */
7124 #ifdef __cplusplus
7125 extern "C"
7126 #endif
7127 /* We use char because int might match the return type of a gcc2
7128    builtin and then its argument prototype would still apply.  */
7129 char Gpm_Wgetch ();
7130 int
7131 main (void)
7132 {
7133 Gpm_Wgetch ();
7134   ;
7135   return 0;
7136 }
7137 _ACEOF
7138 rm -f conftest.$ac_objext conftest$ac_exeext
7139 if { (eval echo "$as_me:7139: \"$ac_link\"") >&5
7140   (eval $ac_link) 2>&5
7141   ac_status=$?
7142   echo "$as_me:7142: \$? = $ac_status" >&5
7143   (exit $ac_status); } &&
7144          { ac_try='test -s conftest$ac_exeext'
7145   { (eval echo "$as_me:7145: \"$ac_try\"") >&5
7146   (eval $ac_try) 2>&5
7147   ac_status=$?
7148   echo "$as_me:7148: \$? = $ac_status" >&5
7149   (exit $ac_status); }; }; then
7150   ac_cv_lib_gpm_Gpm_Wgetch=yes
7151 else
7152   echo "$as_me: failed program was:" >&5
7153 cat conftest.$ac_ext >&5
7154 ac_cv_lib_gpm_Gpm_Wgetch=no
7155 fi
7156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7157 LIBS=$ac_check_lib_save_LIBS
7158 fi
7159 echo "$as_me:7159: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7160 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7161 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7162
7163 echo "$as_me:7163: checking if GPM is weakly bound to curses library" >&5
7164 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7165 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7166   echo $ECHO_N "(cached) $ECHO_C" >&6
7167 else
7168
7169 cf_cv_check_gpm_wgetch=unknown
7170 if test "$cross_compiling" != yes ; then
7171
7172 cat >conftest.$ac_ext <<CF_EOF
7173 #include <gpm.h>
7174 int main(void)
7175 {
7176         Gpm_Wgetch();
7177         ${cf_cv_main_return:-return}(0);
7178 }
7179 CF_EOF
7180
7181         cf_save_LIBS="$LIBS"
7182         # This only works if we can look at the symbol table.  If a shared
7183         # library is stripped for install, we cannot use that.  So we're forced
7184         # to rely on the static library, noting that some packagers may not
7185         # include it.
7186         LIBS="-static -lgpm -dynamic $LIBS"
7187         if { (eval echo "$as_me:7187: \"$ac_compile\"") >&5
7188   (eval $ac_compile) 2>&5
7189   ac_status=$?
7190   echo "$as_me:7190: \$? = $ac_status" >&5
7191   (exit $ac_status); } ; then
7192                 if { (eval echo "$as_me:7192: \"$ac_link\"") >&5
7193   (eval $ac_link) 2>&5
7194   ac_status=$?
7195   echo "$as_me:7195: \$? = $ac_status" >&5
7196   (exit $ac_status); } ; then
7197                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7198                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7199                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7200                 fi
7201         fi
7202         rm -rf conftest*
7203         LIBS="$cf_save_LIBS"
7204 fi
7205
7206 fi
7207 echo "$as_me:7207: result: $cf_cv_check_gpm_wgetch" >&5
7208 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7209
7210 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7211         { echo "$as_me:7211: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7212 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7213 fi
7214
7215 fi
7216
7217 fi
7218
7219 echo "$as_me:7219: checking if you want to use PCRE2 for regular-expressions" >&5
7220 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7221
7222 # Check whether --with-pcre2 or --without-pcre2 was given.
7223 if test "${with_pcre2+set}" = set; then
7224   withval="$with_pcre2"
7225
7226 fi;
7227 test -z "$with_pcre2" && with_pcre2=no
7228 echo "$as_me:7228: result: $with_pcre2" >&5
7229 echo "${ECHO_T}$with_pcre2" >&6
7230
7231 if test "x$with_pcre2" != xno ; then
7232
7233 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7234         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7235
7236 echo "${as_me:-configure}:7236: testing found package libpcre2 ..." 1>&5
7237
7238         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7239         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7240         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7241
7242 echo "${as_me:-configure}:7242: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7243
7244         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7245
7246 echo "${as_me:-configure}:7246: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7247
7248 cf_fix_cppflags=no
7249 cf_new_cflags=
7250 cf_new_cppflags=
7251 cf_new_extra_cppflags=
7252
7253 for cf_add_cflags in $cf_pkgconfig_incs
7254 do
7255 case $cf_fix_cppflags in
7256 (no)
7257         case $cf_add_cflags in
7258         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7259                 case $cf_add_cflags in
7260                 (-D*)
7261                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7262
7263                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7264                                 && test -z "${cf_tst_cflags}" \
7265                                 && cf_fix_cppflags=yes
7266
7267                         if test $cf_fix_cppflags = yes ; then
7268
7269         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7270         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7271
7272                                 continue
7273                         elif test "${cf_tst_cflags}" = "\"'" ; then
7274
7275         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7276         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7277
7278                                 continue
7279                         fi
7280                         ;;
7281                 esac
7282                 case "$CPPFLAGS" in
7283                 (*$cf_add_cflags)
7284                         ;;
7285                 (*)
7286                         case $cf_add_cflags in
7287                         (-D*)
7288                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7289
7290 CPPFLAGS=`echo "$CPPFLAGS" | \
7291         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7292                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7293
7294                                 ;;
7295                         esac
7296
7297         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7298         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7299
7300                         ;;
7301                 esac
7302                 ;;
7303         (*)
7304
7305         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7306         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7307
7308                 ;;
7309         esac
7310         ;;
7311 (yes)
7312
7313         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7314         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7315
7316         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7317
7318         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7319                 && test -z "${cf_tst_cflags}" \
7320                 && cf_fix_cppflags=no
7321         ;;
7322 esac
7323 done
7324
7325 if test -n "$cf_new_cflags" ; then
7326
7327         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7328         CFLAGS="${CFLAGS}$cf_new_cflags"
7329
7330 fi
7331
7332 if test -n "$cf_new_cppflags" ; then
7333
7334         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7335         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7336
7337 fi
7338
7339 if test -n "$cf_new_extra_cppflags" ; then
7340
7341         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7342         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7343
7344 fi
7345
7346 cf_add_libs="$LIBS"
7347 # reverse order
7348 cf_add_0lib=
7349 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7350 # filter duplicates
7351 for cf_add_1lib in $cf_add_0lib; do
7352         for cf_add_2lib in $cf_add_libs; do
7353                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7354                         cf_add_1lib=
7355                         break
7356                 fi
7357         done
7358         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7359 done
7360 LIBS="$cf_add_libs"
7361
7362         :
7363 else
7364         cf_pkgconfig_incs=
7365         cf_pkgconfig_libs=
7366
7367 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7368         test -n "$verbose" && echo "    found package libpcre" 1>&6
7369
7370 echo "${as_me:-configure}:7370: testing found package libpcre ..." 1>&5
7371
7372         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7373         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7374         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7375
7376 echo "${as_me:-configure}:7376: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7377
7378         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7379
7380 echo "${as_me:-configure}:7380: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7381
7382 cf_fix_cppflags=no
7383 cf_new_cflags=
7384 cf_new_cppflags=
7385 cf_new_extra_cppflags=
7386
7387 for cf_add_cflags in $cf_pkgconfig_incs
7388 do
7389 case $cf_fix_cppflags in
7390 (no)
7391         case $cf_add_cflags in
7392         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7393                 case $cf_add_cflags in
7394                 (-D*)
7395                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7396
7397                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7398                                 && test -z "${cf_tst_cflags}" \
7399                                 && cf_fix_cppflags=yes
7400
7401                         if test $cf_fix_cppflags = yes ; then
7402
7403         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7404         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7405
7406                                 continue
7407                         elif test "${cf_tst_cflags}" = "\"'" ; then
7408
7409         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7410         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7411
7412                                 continue
7413                         fi
7414                         ;;
7415                 esac
7416                 case "$CPPFLAGS" in
7417                 (*$cf_add_cflags)
7418                         ;;
7419                 (*)
7420                         case $cf_add_cflags in
7421                         (-D*)
7422                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7423
7424 CPPFLAGS=`echo "$CPPFLAGS" | \
7425         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7426                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7427
7428                                 ;;
7429                         esac
7430
7431         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7432         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7433
7434                         ;;
7435                 esac
7436                 ;;
7437         (*)
7438
7439         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7440         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7441
7442                 ;;
7443         esac
7444         ;;
7445 (yes)
7446
7447         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7448         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7449
7450         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7451
7452         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7453                 && test -z "${cf_tst_cflags}" \
7454                 && cf_fix_cppflags=no
7455         ;;
7456 esac
7457 done
7458
7459 if test -n "$cf_new_cflags" ; then
7460
7461         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7462         CFLAGS="${CFLAGS}$cf_new_cflags"
7463
7464 fi
7465
7466 if test -n "$cf_new_cppflags" ; then
7467
7468         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7469         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7470
7471 fi
7472
7473 if test -n "$cf_new_extra_cppflags" ; then
7474
7475         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7476         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7477
7478 fi
7479
7480 cf_add_libs="$LIBS"
7481 # reverse order
7482 cf_add_0lib=
7483 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7484 # filter duplicates
7485 for cf_add_1lib in $cf_add_0lib; do
7486         for cf_add_2lib in $cf_add_libs; do
7487                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7488                         cf_add_1lib=
7489                         break
7490                 fi
7491         done
7492         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7493 done
7494 LIBS="$cf_add_libs"
7495
7496         :
7497 else
7498         cf_pkgconfig_incs=
7499         cf_pkgconfig_libs=
7500
7501                         { { echo "$as_me:7501: error: Cannot find PCRE2 library" >&5
7502 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7503    { (exit 1); exit 1; }; }
7504 fi
7505
7506 fi
7507
7508 cat >>confdefs.h <<\EOF
7509 #define HAVE_LIB_PCRE2 1
7510 EOF
7511
7512         # if pkgconfig gave no results, look for the libraries directly
7513         case $LIBS in
7514         (*pcre2-posix*|*pcreposix*)
7515                 ;;
7516         (*)
7517                 echo "$as_me:7517: checking for regcomp in -lpcre2-posix" >&5
7518 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7519 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7520   echo $ECHO_N "(cached) $ECHO_C" >&6
7521 else
7522   ac_check_lib_save_LIBS=$LIBS
7523 LIBS="-lpcre2-posix  $LIBS"
7524 cat >conftest.$ac_ext <<_ACEOF
7525 #line 7525 "configure"
7526 #include "confdefs.h"
7527
7528 /* Override any gcc2 internal prototype to avoid an error.  */
7529 #ifdef __cplusplus
7530 extern "C"
7531 #endif
7532 /* We use char because int might match the return type of a gcc2
7533    builtin and then its argument prototype would still apply.  */
7534 char regcomp ();
7535 int
7536 main (void)
7537 {
7538 regcomp ();
7539   ;
7540   return 0;
7541 }
7542 _ACEOF
7543 rm -f conftest.$ac_objext conftest$ac_exeext
7544 if { (eval echo "$as_me:7544: \"$ac_link\"") >&5
7545   (eval $ac_link) 2>&5
7546   ac_status=$?
7547   echo "$as_me:7547: \$? = $ac_status" >&5
7548   (exit $ac_status); } &&
7549          { ac_try='test -s conftest$ac_exeext'
7550   { (eval echo "$as_me:7550: \"$ac_try\"") >&5
7551   (eval $ac_try) 2>&5
7552   ac_status=$?
7553   echo "$as_me:7553: \$? = $ac_status" >&5
7554   (exit $ac_status); }; }; then
7555   ac_cv_lib_pcre2_posix_regcomp=yes
7556 else
7557   echo "$as_me: failed program was:" >&5
7558 cat conftest.$ac_ext >&5
7559 ac_cv_lib_pcre2_posix_regcomp=no
7560 fi
7561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7562 LIBS=$ac_check_lib_save_LIBS
7563 fi
7564 echo "$as_me:7564: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7565 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7566 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7567
7568 cf_add_libs="$LIBS"
7569 # reverse order
7570 cf_add_0lib=
7571 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7572 # filter duplicates
7573 for cf_add_1lib in $cf_add_0lib; do
7574         for cf_add_2lib in $cf_add_libs; do
7575                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7576                         cf_add_1lib=
7577                         break
7578                 fi
7579         done
7580         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7581 done
7582 LIBS="$cf_add_libs"
7583
7584 else
7585   echo "$as_me:7585: checking for regcomp in -lpcreposix" >&5
7586 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7587 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7588   echo $ECHO_N "(cached) $ECHO_C" >&6
7589 else
7590   ac_check_lib_save_LIBS=$LIBS
7591 LIBS="-lpcreposix  $LIBS"
7592 cat >conftest.$ac_ext <<_ACEOF
7593 #line 7593 "configure"
7594 #include "confdefs.h"
7595
7596 /* Override any gcc2 internal prototype to avoid an error.  */
7597 #ifdef __cplusplus
7598 extern "C"
7599 #endif
7600 /* We use char because int might match the return type of a gcc2
7601    builtin and then its argument prototype would still apply.  */
7602 char regcomp ();
7603 int
7604 main (void)
7605 {
7606 regcomp ();
7607   ;
7608   return 0;
7609 }
7610 _ACEOF
7611 rm -f conftest.$ac_objext conftest$ac_exeext
7612 if { (eval echo "$as_me:7612: \"$ac_link\"") >&5
7613   (eval $ac_link) 2>&5
7614   ac_status=$?
7615   echo "$as_me:7615: \$? = $ac_status" >&5
7616   (exit $ac_status); } &&
7617          { ac_try='test -s conftest$ac_exeext'
7618   { (eval echo "$as_me:7618: \"$ac_try\"") >&5
7619   (eval $ac_try) 2>&5
7620   ac_status=$?
7621   echo "$as_me:7621: \$? = $ac_status" >&5
7622   (exit $ac_status); }; }; then
7623   ac_cv_lib_pcreposix_regcomp=yes
7624 else
7625   echo "$as_me: failed program was:" >&5
7626 cat conftest.$ac_ext >&5
7627 ac_cv_lib_pcreposix_regcomp=no
7628 fi
7629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7630 LIBS=$ac_check_lib_save_LIBS
7631 fi
7632 echo "$as_me:7632: result: $ac_cv_lib_pcreposix_regcomp" >&5
7633 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7634 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7635
7636 cf_add_libs="$LIBS"
7637 # reverse order
7638 cf_add_0lib=
7639 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7640 # filter duplicates
7641 for cf_add_1lib in $cf_add_0lib; do
7642         for cf_add_2lib in $cf_add_libs; do
7643                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7644                         cf_add_1lib=
7645                         break
7646                 fi
7647         done
7648         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7649 done
7650 LIBS="$cf_add_libs"
7651
7652 else
7653   { { echo "$as_me:7653: error: Cannot find PCRE2 POSIX library" >&5
7654 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7655    { (exit 1); exit 1; }; }
7656 fi
7657
7658 fi
7659
7660                 ;;
7661         esac
7662
7663         # either way, check for the library header files
7664
7665 for ac_header in pcre2posix.h pcreposix.h
7666 do
7667 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7668 echo "$as_me:7668: checking for $ac_header" >&5
7669 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7670 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7671   echo $ECHO_N "(cached) $ECHO_C" >&6
7672 else
7673   cat >conftest.$ac_ext <<_ACEOF
7674 #line 7674 "configure"
7675 #include "confdefs.h"
7676 #include <$ac_header>
7677 _ACEOF
7678 if { (eval echo "$as_me:7678: \"$ac_cpp conftest.$ac_ext\"") >&5
7679   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7680   ac_status=$?
7681   egrep -v '^ *\+' conftest.er1 >conftest.err
7682   rm -f conftest.er1
7683   cat conftest.err >&5
7684   echo "$as_me:7684: \$? = $ac_status" >&5
7685   (exit $ac_status); } >/dev/null; then
7686   if test -s conftest.err; then
7687     ac_cpp_err=$ac_c_preproc_warn_flag
7688   else
7689     ac_cpp_err=
7690   fi
7691 else
7692   ac_cpp_err=yes
7693 fi
7694 if test -z "$ac_cpp_err"; then
7695   eval "$as_ac_Header=yes"
7696 else
7697   echo "$as_me: failed program was:" >&5
7698   cat conftest.$ac_ext >&5
7699   eval "$as_ac_Header=no"
7700 fi
7701 rm -f conftest.err conftest.$ac_ext
7702 fi
7703 echo "$as_me:7703: result: `eval echo '${'$as_ac_Header'}'`" >&5
7704 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7705 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7706   cat >>confdefs.h <<EOF
7707 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7708 EOF
7709
7710 fi
7711 done
7712
7713 fi
7714
7715 # not everyone has "test -c"
7716 if test -c /dev/sysmouse 2>/dev/null ; then
7717 echo "$as_me:7717: checking if you want to use sysmouse" >&5
7718 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7719
7720 # Check whether --with-sysmouse or --without-sysmouse was given.
7721 if test "${with_sysmouse+set}" = set; then
7722   withval="$with_sysmouse"
7723   cf_with_sysmouse=$withval
7724 else
7725   cf_with_sysmouse=maybe
7726 fi;
7727         if test "$cf_with_sysmouse" != no ; then
7728         cat >conftest.$ac_ext <<_ACEOF
7729 #line 7729 "configure"
7730 #include "confdefs.h"
7731
7732 #include <osreldate.h>
7733 #if (__FreeBSD_version >= 400017)
7734 #include <sys/consio.h>
7735 #include <sys/fbio.h>
7736 #else
7737 #include <machine/console.h>
7738 #endif
7739
7740 int
7741 main (void)
7742 {
7743
7744         struct mouse_info the_mouse;
7745         ioctl(0, CONS_MOUSECTL, &the_mouse);
7746
7747   ;
7748   return 0;
7749 }
7750 _ACEOF
7751 rm -f conftest.$ac_objext
7752 if { (eval echo "$as_me:7752: \"$ac_compile\"") >&5
7753   (eval $ac_compile) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit $ac_status); } &&
7757          { ac_try='test -s conftest.$ac_objext'
7758   { (eval echo "$as_me:7758: \"$ac_try\"") >&5
7759   (eval $ac_try) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); }; }; then
7763   cf_with_sysmouse=yes
7764 else
7765   echo "$as_me: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767 cf_with_sysmouse=no
7768 fi
7769 rm -f conftest.$ac_objext conftest.$ac_ext
7770         fi
7771 echo "$as_me:7771: result: $cf_with_sysmouse" >&5
7772 echo "${ECHO_T}$cf_with_sysmouse" >&6
7773 test "$cf_with_sysmouse" = yes &&
7774 cat >>confdefs.h <<\EOF
7775 #define USE_SYSMOUSE 1
7776 EOF
7777
7778 fi
7779
7780 # pretend that ncurses==ncursesw==ncursest
7781 echo "$as_me:7781: checking if you want to disable library suffixes" >&5
7782 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7783
7784 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7785 if test "${enable_lib_suffixes+set}" = set; then
7786   enableval="$enable_lib_suffixes"
7787   test "$enableval" != no && enableval=yes
7788         if test "$enableval" != "yes" ; then
7789     disable_lib_suffixes=yes
7790         else
7791                 disable_lib_suffixes=no
7792         fi
7793 else
7794   enableval=yes
7795         disable_lib_suffixes=no
7796
7797 fi;
7798 echo "$as_me:7798: result: $disable_lib_suffixes" >&5
7799 echo "${ECHO_T}$disable_lib_suffixes" >&6
7800
7801 ### If we're building with rpath, try to link non-standard libs that way too.
7802 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7803
7804 echo "$as_me:7804: checking if rpath-hack should be disabled" >&5
7805 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7806
7807 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7808 if test "${enable_rpath_hack+set}" = set; then
7809   enableval="$enable_rpath_hack"
7810   test "$enableval" != no && enableval=yes
7811         if test "$enableval" != "yes" ; then
7812     cf_disable_rpath_hack=yes
7813         else
7814                 cf_disable_rpath_hack=no
7815         fi
7816 else
7817   enableval=yes
7818         cf_disable_rpath_hack=no
7819
7820 fi;
7821 echo "$as_me:7821: result: $cf_disable_rpath_hack" >&5
7822 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7823 if test "$cf_disable_rpath_hack" = no ; then
7824
7825 echo "$as_me:7825: checking for updated LDFLAGS" >&5
7826 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7827 if test -n "$LD_RPATH_OPT" ; then
7828         echo "$as_me:7828: result: maybe" >&5
7829 echo "${ECHO_T}maybe" >&6
7830
7831         for ac_prog in ldd
7832 do
7833   # Extract the first word of "$ac_prog", so it can be a program name with args.
7834 set dummy $ac_prog; ac_word=$2
7835 echo "$as_me:7835: checking for $ac_word" >&5
7836 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7837 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7838   echo $ECHO_N "(cached) $ECHO_C" >&6
7839 else
7840   if test -n "$cf_ldd_prog"; then
7841   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7842 else
7843   ac_save_IFS=$IFS; IFS=$ac_path_separator
7844 ac_dummy="$PATH"
7845 for ac_dir in $ac_dummy; do
7846   IFS=$ac_save_IFS
7847   test -z "$ac_dir" && ac_dir=.
7848   $as_executable_p "$ac_dir/$ac_word" || continue
7849 ac_cv_prog_cf_ldd_prog="$ac_prog"
7850 echo "$as_me:7850: found $ac_dir/$ac_word" >&5
7851 break
7852 done
7853
7854 fi
7855 fi
7856 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7857 if test -n "$cf_ldd_prog"; then
7858   echo "$as_me:7858: result: $cf_ldd_prog" >&5
7859 echo "${ECHO_T}$cf_ldd_prog" >&6
7860 else
7861   echo "$as_me:7861: result: no" >&5
7862 echo "${ECHO_T}no" >&6
7863 fi
7864
7865   test -n "$cf_ldd_prog" && break
7866 done
7867 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7868
7869         cf_rpath_list="/usr/lib /lib"
7870         if test "$cf_ldd_prog" != no
7871         then
7872                 cf_rpath_oops=
7873
7874 cat >conftest.$ac_ext <<_ACEOF
7875 #line 7875 "configure"
7876 #include "confdefs.h"
7877 #include <stdio.h>
7878 int
7879 main (void)
7880 {
7881 printf("Hello");
7882   ;
7883   return 0;
7884 }
7885 _ACEOF
7886 rm -f conftest.$ac_objext conftest$ac_exeext
7887 if { (eval echo "$as_me:7887: \"$ac_link\"") >&5
7888   (eval $ac_link) 2>&5
7889   ac_status=$?
7890   echo "$as_me:7890: \$? = $ac_status" >&5
7891   (exit $ac_status); } &&
7892          { ac_try='test -s conftest$ac_exeext'
7893   { (eval echo "$as_me:7893: \"$ac_try\"") >&5
7894   (eval $ac_try) 2>&5
7895   ac_status=$?
7896   echo "$as_me:7896: \$? = $ac_status" >&5
7897   (exit $ac_status); }; }; then
7898   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7899                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7900 else
7901   echo "$as_me: failed program was:" >&5
7902 cat conftest.$ac_ext >&5
7903 fi
7904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7905
7906                 # If we passed the link-test, but get a "not found" on a given library,
7907                 # this could be due to inept reconfiguration of gcc to make it only
7908                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7909                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7910                 # /usr/local libraries.
7911                 if test -n "$cf_rpath_oops"
7912                 then
7913                         for cf_rpath_src in $cf_rpath_oops
7914                         do
7915                                 for cf_rpath_dir in \
7916                                         /usr/local \
7917                                         /usr/pkg \
7918                                         /opt/sfw
7919                                 do
7920                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7921                                         then
7922                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7923
7924 echo "${as_me:-configure}:7924: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7925
7926                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7927                                                 break
7928                                         fi
7929                                 done
7930                         done
7931                 fi
7932         fi
7933
7934         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7935
7936 echo "${as_me:-configure}:7936: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7937
7938 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7939
7940 echo "${as_me:-configure}:7940: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7941
7942 cf_rpath_dst=
7943 for cf_rpath_src in $LDFLAGS
7944 do
7945         case $cf_rpath_src in
7946         (-L*)
7947
7948                 # check if this refers to a directory which we will ignore
7949                 cf_rpath_skip=no
7950                 if test -n "$cf_rpath_list"
7951                 then
7952                         for cf_rpath_item in $cf_rpath_list
7953                         do
7954                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7955                                 then
7956                                         cf_rpath_skip=yes
7957                                         break
7958                                 fi
7959                         done
7960                 fi
7961
7962                 if test "$cf_rpath_skip" = no
7963                 then
7964                         # transform the option
7965                         if test "$LD_RPATH_OPT" = "-R " ; then
7966                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7967                         else
7968                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7969                         fi
7970
7971                         # if we have not already added this, add it now
7972                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7973                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7974                         then
7975                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7976
7977 echo "${as_me:-configure}:7977: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7978
7979                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7980                         fi
7981                 fi
7982                 ;;
7983         esac
7984         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7985 done
7986 LDFLAGS=$cf_rpath_dst
7987
7988 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7989
7990 echo "${as_me:-configure}:7990: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7991
7992 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7993
7994 echo "${as_me:-configure}:7994: testing ...checking LIBS $LIBS ..." 1>&5
7995
7996 cf_rpath_dst=
7997 for cf_rpath_src in $LIBS
7998 do
7999         case $cf_rpath_src in
8000         (-L*)
8001
8002                 # check if this refers to a directory which we will ignore
8003                 cf_rpath_skip=no
8004                 if test -n "$cf_rpath_list"
8005                 then
8006                         for cf_rpath_item in $cf_rpath_list
8007                         do
8008                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8009                                 then
8010                                         cf_rpath_skip=yes
8011                                         break
8012                                 fi
8013                         done
8014                 fi
8015
8016                 if test "$cf_rpath_skip" = no
8017                 then
8018                         # transform the option
8019                         if test "$LD_RPATH_OPT" = "-R " ; then
8020                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8021                         else
8022                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8023                         fi
8024
8025                         # if we have not already added this, add it now
8026                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8027                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8028                         then
8029                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8030
8031 echo "${as_me:-configure}:8031: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8032
8033                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8034                         fi
8035                 fi
8036                 ;;
8037         esac
8038         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8039 done
8040 LIBS=$cf_rpath_dst
8041
8042 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8043
8044 echo "${as_me:-configure}:8044: testing ...checked LIBS $LIBS ..." 1>&5
8045
8046         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8047
8048 echo "${as_me:-configure}:8048: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8049
8050 else
8051         echo "$as_me:8051: result: no" >&5
8052 echo "${ECHO_T}no" >&6
8053 fi
8054
8055 fi
8056
8057 fi
8058
8059 ### Depending on the system, someone may use rpath to build ncurses but not
8060 # want users of the package to rely upon that feature.  Give those people an
8061 # option to suppress that detail from EXTRA_LDFLAGS.
8062 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8063 if test -n "$EXTRA_PKG_LDFLAGS"
8064 then
8065         echo "$as_me:8065: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8066 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8067
8068 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8069 if test "${enable_pkg_ldflags+set}" = set; then
8070   enableval="$enable_pkg_ldflags"
8071   test "$enableval" != no && enableval=yes
8072         if test "$enableval" != "yes" ; then
8073     disable_pkg_ldflags=yes
8074         else
8075                 disable_pkg_ldflags=no
8076         fi
8077 else
8078   enableval=yes
8079         disable_pkg_ldflags=no
8080
8081 fi;
8082         echo "$as_me:8082: result: $disable_pkg_ldflags" >&5
8083 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8084         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8085 fi
8086
8087 ###############################################################################
8088
8089 ###     use option --with-extra-suffix to append suffix to headers and libraries
8090 echo "$as_me:8090: checking if you wish to append extra suffix to header/library paths" >&5
8091 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8092 EXTRA_SUFFIX=
8093
8094 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8095 if test "${with_extra_suffix+set}" = set; then
8096   withval="$with_extra_suffix"
8097   case x$withval in
8098         (no)
8099                 ;;
8100         (xyes|x)
8101                 EXTRA_SUFFIX=$cf_cv_abi_version
8102                 ;;
8103         (*)
8104                 EXTRA_SUFFIX=$withval
8105                 ;;
8106         esac
8107
8108 fi;
8109 echo "$as_me:8109: result: $EXTRA_SUFFIX" >&5
8110 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8111
8112 ###     use option --disable-overwrite to leave out the link to -lcurses
8113 echo "$as_me:8113: checking if you wish to install ncurses overwriting curses" >&5
8114 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8115
8116 # Check whether --enable-overwrite or --disable-overwrite was given.
8117 if test "${enable_overwrite+set}" = set; then
8118   enableval="$enable_overwrite"
8119   with_overwrite=$enableval
8120 else
8121   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8122 fi;
8123 echo "$as_me:8123: result: $with_overwrite" >&5
8124 echo "${ECHO_T}$with_overwrite" >&6
8125
8126 echo "$as_me:8126: checking if external terminfo-database is used" >&5
8127 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8128
8129 # Check whether --enable-database or --disable-database was given.
8130 if test "${enable_database+set}" = set; then
8131   enableval="$enable_database"
8132   use_database=$enableval
8133 else
8134   use_database=yes
8135 fi;
8136 echo "$as_me:8136: result: $use_database" >&5
8137 echo "${ECHO_T}$use_database" >&6
8138
8139 case $host_os in
8140 (os2*)
8141         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8142         ;;
8143 (*)
8144         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8145         ;;
8146 esac
8147
8148 NCURSES_USE_DATABASE=0
8149 if test "$use_database" != no ; then
8150         NCURSES_USE_DATABASE=1
8151
8152         echo "$as_me:8152: checking which terminfo source-file will be installed" >&5
8153 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8154
8155 # Check whether --with-database or --without-database was given.
8156 if test "${with_database+set}" = set; then
8157   withval="$with_database"
8158   TERMINFO_SRC=$withval
8159 fi;
8160         echo "$as_me:8160: result: $TERMINFO_SRC" >&5
8161 echo "${ECHO_T}$TERMINFO_SRC" >&6
8162
8163         echo "$as_me:8163: checking whether to use hashed database instead of directory/tree" >&5
8164 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8165
8166 # Check whether --with-hashed-db or --without-hashed-db was given.
8167 if test "${with_hashed_db+set}" = set; then
8168   withval="$with_hashed_db"
8169
8170 else
8171   with_hashed_db=no
8172 fi;
8173         echo "$as_me:8173: result: $with_hashed_db" >&5
8174 echo "${ECHO_T}$with_hashed_db" >&6
8175 else
8176         with_hashed_db=no
8177 fi
8178
8179 echo "$as_me:8179: checking for list of fallback descriptions" >&5
8180 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8181
8182 # Check whether --with-fallbacks or --without-fallbacks was given.
8183 if test "${with_fallbacks+set}" = set; then
8184   withval="$with_fallbacks"
8185   with_fallback=$withval
8186 else
8187   with_fallback=
8188 fi;
8189 echo "$as_me:8189: result: $with_fallback" >&5
8190 echo "${ECHO_T}$with_fallback" >&6
8191
8192 case ".$with_fallback" in
8193 (.|.no)
8194         FALLBACK_LIST=
8195         ;;
8196 (.yes)
8197         { echo "$as_me:8197: WARNING: expected a list of terminal descriptions" >&5
8198 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8199         ;;
8200 (*)
8201         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8202         ;;
8203 esac
8204
8205 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8206 # tree for generating the terminal descriptions that will be compiled into the
8207 # library.  If your toolchain is old, it may not handle current terminal
8208 # databases.  Use configure-options to point to the tools which will be used,
8209 # rather than the first ones found on the $PATH.
8210 if test -n "$ac_tool_prefix"; then
8211   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8212 set dummy ${ac_tool_prefix}tic; ac_word=$2
8213 echo "$as_me:8213: checking for $ac_word" >&5
8214 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8215 if test "${ac_cv_prog_TIC+set}" = set; then
8216   echo $ECHO_N "(cached) $ECHO_C" >&6
8217 else
8218   if test -n "$TIC"; then
8219   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8220 else
8221   ac_save_IFS=$IFS; IFS=$ac_path_separator
8222 ac_dummy="$PATH"
8223 for ac_dir in $ac_dummy; do
8224   IFS=$ac_save_IFS
8225   test -z "$ac_dir" && ac_dir=.
8226   $as_executable_p "$ac_dir/$ac_word" || continue
8227 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8228 echo "$as_me:8228: found $ac_dir/$ac_word" >&5
8229 break
8230 done
8231
8232 fi
8233 fi
8234 TIC=$ac_cv_prog_TIC
8235 if test -n "$TIC"; then
8236   echo "$as_me:8236: result: $TIC" >&5
8237 echo "${ECHO_T}$TIC" >&6
8238 else
8239   echo "$as_me:8239: result: no" >&5
8240 echo "${ECHO_T}no" >&6
8241 fi
8242
8243 fi
8244 if test -z "$ac_cv_prog_TIC"; then
8245   ac_ct_TIC=$TIC
8246   # Extract the first word of "tic", so it can be a program name with args.
8247 set dummy tic; ac_word=$2
8248 echo "$as_me:8248: checking for $ac_word" >&5
8249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8250 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8251   echo $ECHO_N "(cached) $ECHO_C" >&6
8252 else
8253   if test -n "$ac_ct_TIC"; then
8254   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8255 else
8256   ac_save_IFS=$IFS; IFS=$ac_path_separator
8257 ac_dummy="$PATH"
8258 for ac_dir in $ac_dummy; do
8259   IFS=$ac_save_IFS
8260   test -z "$ac_dir" && ac_dir=.
8261   $as_executable_p "$ac_dir/$ac_word" || continue
8262 ac_cv_prog_ac_ct_TIC="tic"
8263 echo "$as_me:8263: found $ac_dir/$ac_word" >&5
8264 break
8265 done
8266
8267 fi
8268 fi
8269 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8270 if test -n "$ac_ct_TIC"; then
8271   echo "$as_me:8271: result: $ac_ct_TIC" >&5
8272 echo "${ECHO_T}$ac_ct_TIC" >&6
8273 else
8274   echo "$as_me:8274: result: no" >&5
8275 echo "${ECHO_T}no" >&6
8276 fi
8277
8278   TIC=$ac_ct_TIC
8279 else
8280   TIC="$ac_cv_prog_TIC"
8281 fi
8282
8283 if test -n "$ac_tool_prefix"; then
8284   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8285 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8286 echo "$as_me:8286: checking for $ac_word" >&5
8287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8288 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8289   echo $ECHO_N "(cached) $ECHO_C" >&6
8290 else
8291   if test -n "$INFOCMP"; then
8292   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8293 else
8294   ac_save_IFS=$IFS; IFS=$ac_path_separator
8295 ac_dummy="$PATH"
8296 for ac_dir in $ac_dummy; do
8297   IFS=$ac_save_IFS
8298   test -z "$ac_dir" && ac_dir=.
8299   $as_executable_p "$ac_dir/$ac_word" || continue
8300 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8301 echo "$as_me:8301: found $ac_dir/$ac_word" >&5
8302 break
8303 done
8304
8305 fi
8306 fi
8307 INFOCMP=$ac_cv_prog_INFOCMP
8308 if test -n "$INFOCMP"; then
8309   echo "$as_me:8309: result: $INFOCMP" >&5
8310 echo "${ECHO_T}$INFOCMP" >&6
8311 else
8312   echo "$as_me:8312: result: no" >&5
8313 echo "${ECHO_T}no" >&6
8314 fi
8315
8316 fi
8317 if test -z "$ac_cv_prog_INFOCMP"; then
8318   ac_ct_INFOCMP=$INFOCMP
8319   # Extract the first word of "infocmp", so it can be a program name with args.
8320 set dummy infocmp; ac_word=$2
8321 echo "$as_me:8321: checking for $ac_word" >&5
8322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8323 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8324   echo $ECHO_N "(cached) $ECHO_C" >&6
8325 else
8326   if test -n "$ac_ct_INFOCMP"; then
8327   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8328 else
8329   ac_save_IFS=$IFS; IFS=$ac_path_separator
8330 ac_dummy="$PATH"
8331 for ac_dir in $ac_dummy; do
8332   IFS=$ac_save_IFS
8333   test -z "$ac_dir" && ac_dir=.
8334   $as_executable_p "$ac_dir/$ac_word" || continue
8335 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8336 echo "$as_me:8336: found $ac_dir/$ac_word" >&5
8337 break
8338 done
8339
8340 fi
8341 fi
8342 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8343 if test -n "$ac_ct_INFOCMP"; then
8344   echo "$as_me:8344: result: $ac_ct_INFOCMP" >&5
8345 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8346 else
8347   echo "$as_me:8347: result: no" >&5
8348 echo "${ECHO_T}no" >&6
8349 fi
8350
8351   INFOCMP=$ac_ct_INFOCMP
8352 else
8353   INFOCMP="$ac_cv_prog_INFOCMP"
8354 fi
8355
8356 if test -n "$FALLBACK_LIST"
8357 then
8358
8359 # Check whether --with-tic-path or --without-tic-path was given.
8360 if test "${with_tic_path+set}" = set; then
8361   withval="$with_tic_path"
8362   echo "$as_me:8362: checking for tic program for fallbacks" >&5
8363 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8364                 TIC=$withval
8365                 echo "$as_me:8365: result: $TIC" >&5
8366 echo "${ECHO_T}$TIC" >&6
8367
8368 if test "x$prefix" != xNONE; then
8369         cf_path_syntax="$prefix"
8370 else
8371         cf_path_syntax="$ac_default_prefix"
8372 fi
8373
8374 case ".$TIC" in
8375 (.\$\(*\)*|.\'*\'*)
8376         ;;
8377 (..|./*|.\\*)
8378         ;;
8379 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8380         ;;
8381 (.\${*prefix}*|.\${*dir}*)
8382         eval TIC="$TIC"
8383         case ".$TIC" in
8384         (.NONE/*)
8385                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8386                 ;;
8387         esac
8388         ;;
8389 (.no|.NONE/*)
8390         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8391         ;;
8392 (*)
8393         { { echo "$as_me:8393: error: expected a pathname, not \"$TIC\"" >&5
8394 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8395    { (exit 1); exit 1; }; }
8396         ;;
8397 esac
8398
8399 else
8400
8401 test -z "$TIC" && TIC=tic
8402 for ac_prog in $TIC tic
8403 do
8404   # Extract the first word of "$ac_prog", so it can be a program name with args.
8405 set dummy $ac_prog; ac_word=$2
8406 echo "$as_me:8406: checking for $ac_word" >&5
8407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8408 if test "${ac_cv_path_TIC+set}" = set; then
8409   echo $ECHO_N "(cached) $ECHO_C" >&6
8410 else
8411   case $TIC in
8412   [\\/]* | ?:[\\/]*)
8413   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8414   ;;
8415   *)
8416   ac_save_IFS=$IFS; IFS=$ac_path_separator
8417 ac_dummy="$PATH:/usr/local/ncurses/bin"
8418 for ac_dir in $ac_dummy; do
8419   IFS=$ac_save_IFS
8420   test -z "$ac_dir" && ac_dir=.
8421   if $as_executable_p "$ac_dir/$ac_word"; then
8422    ac_cv_path_TIC="$ac_dir/$ac_word"
8423    echo "$as_me:8423: found $ac_dir/$ac_word" >&5
8424    break
8425 fi
8426 done
8427
8428   ;;
8429 esac
8430 fi
8431 TIC=$ac_cv_path_TIC
8432
8433 if test -n "$TIC"; then
8434   echo "$as_me:8434: result: $TIC" >&5
8435 echo "${ECHO_T}$TIC" >&6
8436 else
8437   echo "$as_me:8437: result: no" >&5
8438 echo "${ECHO_T}no" >&6
8439 fi
8440
8441   test -n "$TIC" && break
8442 done
8443 test -n "$TIC" || TIC="$TIC"
8444
8445 cf_path_prog=""
8446 cf_path_args=""
8447 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8448 for cf_temp in $ac_cv_path_TIC
8449 do
8450         if test -z "$cf_path_prog" ; then
8451                 if test "$with_full_paths" = yes ; then
8452
8453 if test "x$prefix" != xNONE; then
8454         cf_path_syntax="$prefix"
8455 else
8456         cf_path_syntax="$ac_default_prefix"
8457 fi
8458
8459 case ".$cf_temp" in
8460 (.\$\(*\)*|.\'*\'*)
8461         ;;
8462 (..|./*|.\\*)
8463         ;;
8464 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8465         ;;
8466 (.\${*prefix}*|.\${*dir}*)
8467         eval cf_temp="$cf_temp"
8468         case ".$cf_temp" in
8469         (.NONE/*)
8470                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8471                 ;;
8472         esac
8473         ;;
8474 (.no|.NONE/*)
8475         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8476         ;;
8477 (*)
8478         break
8479         ;;
8480 esac
8481
8482                         cf_path_prog="$cf_temp"
8483                 else
8484                         cf_path_prog="`basename $cf_temp`"
8485                 fi
8486         elif test -z "$cf_path_args" ; then
8487                 cf_path_args="$cf_temp"
8488         else
8489                 cf_path_args="$cf_path_args $cf_temp"
8490         fi
8491 done
8492 IFS="$cf_save_ifs"
8493
8494 if test -n "$cf_path_prog" ; then
8495
8496 echo "${as_me:-configure}:8496: testing defining path for ${cf_path_prog} ..." 1>&5
8497
8498 cat >>confdefs.h <<EOF
8499 #define TIC_PATH "$cf_path_prog"
8500 EOF
8501
8502         test -n "$cf_path_args" &&
8503 cat >>confdefs.h <<EOF
8504 #define TIC_ARGS "$cf_path_args"
8505 EOF
8506
8507 fi
8508
8509                 if test -z "$TIC"
8510                 then
8511                         { echo "$as_me:8511: WARNING: no tic program found for fallbacks" >&5
8512 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8513                 fi
8514
8515 fi;
8516
8517 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8518 if test "${with_infocmp_path+set}" = set; then
8519   withval="$with_infocmp_path"
8520   echo "$as_me:8520: checking for infocmp program for fallbacks" >&5
8521 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8522                 INFOCMP=$withval
8523                 echo "$as_me:8523: result: $INFOCMP" >&5
8524 echo "${ECHO_T}$INFOCMP" >&6
8525
8526 if test "x$prefix" != xNONE; then
8527         cf_path_syntax="$prefix"
8528 else
8529         cf_path_syntax="$ac_default_prefix"
8530 fi
8531
8532 case ".$INFOCMP" in
8533 (.\$\(*\)*|.\'*\'*)
8534         ;;
8535 (..|./*|.\\*)
8536         ;;
8537 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8538         ;;
8539 (.\${*prefix}*|.\${*dir}*)
8540         eval INFOCMP="$INFOCMP"
8541         case ".$INFOCMP" in
8542         (.NONE/*)
8543                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8544                 ;;
8545         esac
8546         ;;
8547 (.no|.NONE/*)
8548         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8549         ;;
8550 (*)
8551         { { echo "$as_me:8551: error: expected a pathname, not \"$INFOCMP\"" >&5
8552 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8553    { (exit 1); exit 1; }; }
8554         ;;
8555 esac
8556
8557 else
8558
8559 test -z "$INFOCMP" && INFOCMP=infocmp
8560 for ac_prog in $INFOCMP infocmp
8561 do
8562   # Extract the first word of "$ac_prog", so it can be a program name with args.
8563 set dummy $ac_prog; ac_word=$2
8564 echo "$as_me:8564: checking for $ac_word" >&5
8565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8566 if test "${ac_cv_path_INFOCMP+set}" = set; then
8567   echo $ECHO_N "(cached) $ECHO_C" >&6
8568 else
8569   case $INFOCMP in
8570   [\\/]* | ?:[\\/]*)
8571   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8572   ;;
8573   *)
8574   ac_save_IFS=$IFS; IFS=$ac_path_separator
8575 ac_dummy="$PATH:/usr/local/ncurses/bin"
8576 for ac_dir in $ac_dummy; do
8577   IFS=$ac_save_IFS
8578   test -z "$ac_dir" && ac_dir=.
8579   if $as_executable_p "$ac_dir/$ac_word"; then
8580    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8581    echo "$as_me:8581: found $ac_dir/$ac_word" >&5
8582    break
8583 fi
8584 done
8585
8586   ;;
8587 esac
8588 fi
8589 INFOCMP=$ac_cv_path_INFOCMP
8590
8591 if test -n "$INFOCMP"; then
8592   echo "$as_me:8592: result: $INFOCMP" >&5
8593 echo "${ECHO_T}$INFOCMP" >&6
8594 else
8595   echo "$as_me:8595: result: no" >&5
8596 echo "${ECHO_T}no" >&6
8597 fi
8598
8599   test -n "$INFOCMP" && break
8600 done
8601 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8602
8603 cf_path_prog=""
8604 cf_path_args=""
8605 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8606 for cf_temp in $ac_cv_path_INFOCMP
8607 do
8608         if test -z "$cf_path_prog" ; then
8609                 if test "$with_full_paths" = yes ; then
8610
8611 if test "x$prefix" != xNONE; then
8612         cf_path_syntax="$prefix"
8613 else
8614         cf_path_syntax="$ac_default_prefix"
8615 fi
8616
8617 case ".$cf_temp" in
8618 (.\$\(*\)*|.\'*\'*)
8619         ;;
8620 (..|./*|.\\*)
8621         ;;
8622 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8623         ;;
8624 (.\${*prefix}*|.\${*dir}*)
8625         eval cf_temp="$cf_temp"
8626         case ".$cf_temp" in
8627         (.NONE/*)
8628                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8629                 ;;
8630         esac
8631         ;;
8632 (.no|.NONE/*)
8633         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8634         ;;
8635 (*)
8636         break
8637         ;;
8638 esac
8639
8640                         cf_path_prog="$cf_temp"
8641                 else
8642                         cf_path_prog="`basename $cf_temp`"
8643                 fi
8644         elif test -z "$cf_path_args" ; then
8645                 cf_path_args="$cf_temp"
8646         else
8647                 cf_path_args="$cf_path_args $cf_temp"
8648         fi
8649 done
8650 IFS="$cf_save_ifs"
8651
8652 if test -n "$cf_path_prog" ; then
8653
8654 echo "${as_me:-configure}:8654: testing defining path for ${cf_path_prog} ..." 1>&5
8655
8656 cat >>confdefs.h <<EOF
8657 #define INFOCMP_PATH "$cf_path_prog"
8658 EOF
8659
8660         test -n "$cf_path_args" &&
8661 cat >>confdefs.h <<EOF
8662 #define INFOCMP_ARGS "$cf_path_args"
8663 EOF
8664
8665 fi
8666
8667                 if test -z "$INFOCMP"
8668                 then
8669                         { echo "$as_me:8669: WARNING: no infocmp program found for fallbacks" >&5
8670 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8671                 fi
8672
8673 fi;
8674
8675         test -z "$TIC" && FALLBACK_LIST=
8676         test -z "$INFOCMP" && FALLBACK_LIST=
8677         if test -z "$FALLBACK_LIST"
8678         then
8679                 { echo "$as_me:8679: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8680 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8681         fi
8682 fi
8683
8684 USE_FALLBACKS=
8685 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8686
8687 echo "$as_me:8687: checking if you want modern xterm or antique" >&5
8688 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8689
8690 # Check whether --with-xterm-new or --without-xterm-new was given.
8691 if test "${with_xterm_new+set}" = set; then
8692   withval="$with_xterm_new"
8693   with_xterm_new=$withval
8694 else
8695   with_xterm_new=yes
8696 fi;
8697 case $with_xterm_new in
8698 (no) with_xterm_new=xterm-old;;
8699 (*)      with_xterm_new=xterm-new;;
8700 esac
8701 echo "$as_me:8701: result: $with_xterm_new" >&5
8702 echo "${ECHO_T}$with_xterm_new" >&6
8703 WHICH_XTERM=$with_xterm_new
8704
8705 echo "$as_me:8705: checking if xterm backspace sends BS or DEL" >&5
8706 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8707
8708 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8709 if test "${with_xterm_kbs+set}" = set; then
8710   withval="$with_xterm_kbs"
8711   with_xterm_kbs=$withval
8712 else
8713   with_xterm_kbs=BS
8714 fi;
8715 case x$with_xterm_kbs in
8716 (xyes|xno|xBS|xbs|x8)
8717         with_xterm_kbs=BS
8718         ;;
8719 (xDEL|xdel|x127)
8720         with_xterm_kbs=DEL
8721         ;;
8722 (*)
8723         with_xterm_kbs=$withval
8724         ;;
8725 esac
8726 echo "$as_me:8726: result: $with_xterm_kbs" >&5
8727 echo "${ECHO_T}$with_xterm_kbs" >&6
8728 XTERM_KBS=$with_xterm_kbs
8729
8730 MAKE_TERMINFO=
8731 if test "$use_database" = no ; then
8732         TERMINFO="${datadir}/terminfo"
8733         MAKE_TERMINFO="#"
8734 else
8735
8736 echo "$as_me:8736: checking for list of terminfo directories" >&5
8737 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8738
8739 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8740 if test "${with_terminfo_dirs+set}" = set; then
8741   withval="$with_terminfo_dirs"
8742
8743 else
8744   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8745 fi;
8746 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8747 cf_dst_path=
8748 for cf_src_path in $withval
8749 do
8750
8751 if test "x$prefix" != xNONE; then
8752         cf_path_syntax="$prefix"
8753 else
8754         cf_path_syntax="$ac_default_prefix"
8755 fi
8756
8757 case ".$cf_src_path" in
8758 (.\$\(*\)*|.\'*\'*)
8759         ;;
8760 (..|./*|.\\*)
8761         ;;
8762 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8763         ;;
8764 (.\${*prefix}*|.\${*dir}*)
8765         eval cf_src_path="$cf_src_path"
8766         case ".$cf_src_path" in
8767         (.NONE/*)
8768                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8769                 ;;
8770         esac
8771         ;;
8772 (.no|.NONE/*)
8773         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8774         ;;
8775 (*)
8776         { { echo "$as_me:8776: error: expected a pathname, not \"$cf_src_path\"" >&5
8777 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8778    { (exit 1); exit 1; }; }
8779         ;;
8780 esac
8781
8782   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8783   cf_dst_path="${cf_dst_path}${cf_src_path}"
8784 done
8785 IFS="$ac_save_ifs"
8786
8787 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8788 # so we have to check/work around.  We do prefer the result of "eval"...
8789 eval cf_dst_eval="$cf_dst_path"
8790 case "x$cf_dst_eval" in
8791 (xNONE*)
8792         TERMINFO_DIRS=$cf_dst_path
8793         ;;
8794 (*)
8795         TERMINFO_DIRS="$cf_dst_eval"
8796         ;;
8797 esac
8798
8799 echo "$as_me:8799: result: $TERMINFO_DIRS" >&5
8800 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8801 test -n "$TERMINFO_DIRS" &&
8802 cat >>confdefs.h <<EOF
8803 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8804 EOF
8805
8806 case "x$TERMINFO" in
8807 x???:*)
8808         { echo "$as_me:8808: WARNING: ignoring non-directory/file TERMINFO value" >&5
8809 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8810         unset TERMINFO
8811         ;;
8812 esac
8813
8814 echo "$as_me:8814: checking for default terminfo directory" >&5
8815 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8816
8817 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8818 if test "${with_default_terminfo_dir+set}" = set; then
8819   withval="$with_default_terminfo_dir"
8820
8821 else
8822   withval="${TERMINFO:-${datadir}/terminfo}"
8823 fi; if test -n "${datadir}/terminfo" ; then
8824
8825 if test "x$prefix" != xNONE; then
8826         cf_path_syntax="$prefix"
8827 else
8828         cf_path_syntax="$ac_default_prefix"
8829 fi
8830
8831 case ".$withval" in
8832 (.\$\(*\)*|.\'*\'*)
8833         ;;
8834 (..|./*|.\\*)
8835         ;;
8836 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8837         ;;
8838 (.\${*prefix}*|.\${*dir}*)
8839         eval withval="$withval"
8840         case ".$withval" in
8841         (.NONE/*)
8842                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8843                 ;;
8844         esac
8845         ;;
8846 (.no|.NONE/*)
8847         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8848         ;;
8849 (*)
8850         { { echo "$as_me:8850: error: expected a pathname, not \"$withval\"" >&5
8851 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8852    { (exit 1); exit 1; }; }
8853         ;;
8854 esac
8855
8856 fi
8857 eval TERMINFO="$withval"
8858
8859 echo "$as_me:8859: result: $TERMINFO" >&5
8860 echo "${ECHO_T}$TERMINFO" >&6
8861
8862 cat >>confdefs.h <<EOF
8863 #define TERMINFO "$TERMINFO"
8864 EOF
8865
8866 fi
8867
8868 ###     use option --disable-big-core to make tic run on small machines
8869 ###     We need 4Mb, check if we can allocate 50% more than that.
8870 echo "$as_me:8870: checking if big-core option selected" >&5
8871 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8872
8873 # Check whether --enable-big-core or --disable-big-core was given.
8874 if test "${enable_big_core+set}" = set; then
8875   enableval="$enable_big_core"
8876   with_big_core=$enableval
8877 else
8878   if test "$cross_compiling" = yes; then
8879   with_big_core=no
8880 else
8881   cat >conftest.$ac_ext <<_ACEOF
8882 #line 8882 "configure"
8883 #include "confdefs.h"
8884
8885 #include <stdlib.h>
8886 #include <string.h>
8887 int main() {
8888         unsigned long n = 6000000L;
8889         char *s = malloc(n);
8890         if (s != 0)
8891                 s[0] = s[n-1] = 0;
8892         ${cf_cv_main_return:-return}(s == 0);
8893 }
8894 _ACEOF
8895 rm -f conftest$ac_exeext
8896 if { (eval echo "$as_me:8896: \"$ac_link\"") >&5
8897   (eval $ac_link) 2>&5
8898   ac_status=$?
8899   echo "$as_me:8899: \$? = $ac_status" >&5
8900   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8901   { (eval echo "$as_me:8901: \"$ac_try\"") >&5
8902   (eval $ac_try) 2>&5
8903   ac_status=$?
8904   echo "$as_me:8904: \$? = $ac_status" >&5
8905   (exit $ac_status); }; }; then
8906   with_big_core=yes
8907 else
8908   echo "$as_me: program exited with status $ac_status" >&5
8909 echo "$as_me: failed program was:" >&5
8910 cat conftest.$ac_ext >&5
8911 with_big_core=no
8912 fi
8913 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8914 fi
8915 fi;
8916 echo "$as_me:8916: result: $with_big_core" >&5
8917 echo "${ECHO_T}$with_big_core" >&6
8918 test "x$with_big_core" = "xyes" &&
8919 cat >>confdefs.h <<\EOF
8920 #define HAVE_BIG_CORE 1
8921 EOF
8922
8923 ### ISO C only guarantees 512-char strings, we have tables which load faster
8924 ### when constructed using "big" strings.  More than the C compiler, the awk
8925 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8926 echo "$as_me:8926: checking if big-strings option selected" >&5
8927 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8928
8929 # Check whether --enable-big-strings or --disable-big-strings was given.
8930 if test "${enable_big_strings+set}" = set; then
8931   enableval="$enable_big_strings"
8932   with_big_strings=$enableval
8933 else
8934
8935         case x$AWK in
8936         (x)
8937                 eval with_big_strings=no
8938                 ;;
8939         (*)
8940                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8941                         | $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
8942                         eval with_big_strings=yes
8943                 else
8944                         eval with_big_strings=no
8945                 fi
8946                 ;;
8947         esac
8948
8949 fi;
8950 echo "$as_me:8950: result: $with_big_strings" >&5
8951 echo "${ECHO_T}$with_big_strings" >&6
8952
8953 USE_BIG_STRINGS=0
8954 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8955
8956 ###     use option --enable-termcap to compile in the termcap fallback support
8957 echo "$as_me:8957: checking if you want termcap-fallback support" >&5
8958 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8959
8960 # Check whether --enable-termcap or --disable-termcap was given.
8961 if test "${enable_termcap+set}" = set; then
8962   enableval="$enable_termcap"
8963   with_termcap=$enableval
8964 else
8965   with_termcap=no
8966 fi;
8967 echo "$as_me:8967: result: $with_termcap" >&5
8968 echo "${ECHO_T}$with_termcap" >&6
8969
8970 NCURSES_USE_TERMCAP=0
8971 if test "x$with_termcap" != "xyes" ; then
8972         if test "$use_database" = no ; then
8973                 if test -z "$with_fallback" ; then
8974                         { { echo "$as_me:8974: error: You have disabled the database w/o specifying fallbacks" >&5
8975 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8976    { (exit 1); exit 1; }; }
8977                 fi
8978         fi
8979
8980 cat >>confdefs.h <<\EOF
8981 #define PURE_TERMINFO 1
8982 EOF
8983
8984 else
8985
8986         if test "$with_ticlib" != no ; then
8987                 { { echo "$as_me:8987: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8988 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8989    { (exit 1); exit 1; }; }
8990         fi
8991
8992         NCURSES_USE_TERMCAP=1
8993         echo "$as_me:8993: checking for list of termcap files" >&5
8994 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8995
8996 # Check whether --with-termpath or --without-termpath was given.
8997 if test "${with_termpath+set}" = set; then
8998   withval="$with_termpath"
8999
9000 else
9001   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9002 fi;
9003 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9004 cf_dst_path=
9005 for cf_src_path in $withval
9006 do
9007
9008 if test "x$prefix" != xNONE; then
9009         cf_path_syntax="$prefix"
9010 else
9011         cf_path_syntax="$ac_default_prefix"
9012 fi
9013
9014 case ".$cf_src_path" in
9015 (.\$\(*\)*|.\'*\'*)
9016         ;;
9017 (..|./*|.\\*)
9018         ;;
9019 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9020         ;;
9021 (.\${*prefix}*|.\${*dir}*)
9022         eval cf_src_path="$cf_src_path"
9023         case ".$cf_src_path" in
9024         (.NONE/*)
9025                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9026                 ;;
9027         esac
9028         ;;
9029 (.no|.NONE/*)
9030         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9031         ;;
9032 (*)
9033         { { echo "$as_me:9033: error: expected a pathname, not \"$cf_src_path\"" >&5
9034 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9035    { (exit 1); exit 1; }; }
9036         ;;
9037 esac
9038
9039   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9040   cf_dst_path="${cf_dst_path}${cf_src_path}"
9041 done
9042 IFS="$ac_save_ifs"
9043
9044 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9045 # so we have to check/work around.  We do prefer the result of "eval"...
9046 eval cf_dst_eval="$cf_dst_path"
9047 case "x$cf_dst_eval" in
9048 (xNONE*)
9049         TERMPATH=$cf_dst_path
9050         ;;
9051 (*)
9052         TERMPATH="$cf_dst_eval"
9053         ;;
9054 esac
9055
9056         echo "$as_me:9056: result: $TERMPATH" >&5
9057 echo "${ECHO_T}$TERMPATH" >&6
9058         test -n "$TERMPATH" &&
9059 cat >>confdefs.h <<EOF
9060 #define TERMPATH "$TERMPATH"
9061 EOF
9062
9063         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9064         echo "$as_me:9064: checking if fast termcap-loader is needed" >&5
9065 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9066
9067 # Check whether --enable-getcap or --disable-getcap was given.
9068 if test "${enable_getcap+set}" = set; then
9069   enableval="$enable_getcap"
9070   with_getcap=$enableval
9071 else
9072   with_getcap=no
9073 fi;
9074         echo "$as_me:9074: result: $with_getcap" >&5
9075 echo "${ECHO_T}$with_getcap" >&6
9076         test "x$with_getcap" = "xyes" &&
9077 cat >>confdefs.h <<\EOF
9078 #define USE_GETCAP 1
9079 EOF
9080
9081         echo "$as_me:9081: checking if translated termcaps will be cached in ~/.terminfo" >&5
9082 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9083
9084 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9085 if test "${enable_getcap_cache+set}" = set; then
9086   enableval="$enable_getcap_cache"
9087   with_getcap_cache=$enableval
9088 else
9089   with_getcap_cache=no
9090 fi;
9091         echo "$as_me:9091: result: $with_getcap_cache" >&5
9092 echo "${ECHO_T}$with_getcap_cache" >&6
9093         test "x$with_getcap_cache" = "xyes" &&
9094 cat >>confdefs.h <<\EOF
9095 #define USE_GETCAP_CACHE 1
9096 EOF
9097
9098 fi
9099
9100 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9101 echo "$as_me:9101: checking if ~/.terminfo is wanted" >&5
9102 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9103
9104 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9105 if test "${enable_home_terminfo+set}" = set; then
9106   enableval="$enable_home_terminfo"
9107   with_home_terminfo=$enableval
9108 else
9109   with_home_terminfo=yes
9110 fi;
9111 echo "$as_me:9111: result: $with_home_terminfo" >&5
9112 echo "${ECHO_T}$with_home_terminfo" >&6
9113 test "x$with_home_terminfo" = "xyes" &&
9114 cat >>confdefs.h <<\EOF
9115 #define USE_HOME_TERMINFO 1
9116 EOF
9117
9118 echo "$as_me:9118: checking if you want to use restricted environment when running as root" >&5
9119 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9120
9121 # Check whether --enable-root-environ or --disable-root-environ was given.
9122 if test "${enable_root_environ+set}" = set; then
9123   enableval="$enable_root_environ"
9124   with_root_environ=$enableval
9125 else
9126   with_root_environ=yes
9127 fi;
9128 echo "$as_me:9128: result: $with_root_environ" >&5
9129 echo "${ECHO_T}$with_root_environ" >&6
9130 test "x$with_root_environ" = xyes &&
9131 cat >>confdefs.h <<\EOF
9132 #define USE_ROOT_ENVIRON 1
9133 EOF
9134
9135 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9136 ###   to reduce storage requirements for the terminfo database.
9137
9138 for ac_header in \
9139 unistd.h \
9140
9141 do
9142 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9143 echo "$as_me:9143: checking for $ac_header" >&5
9144 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9145 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9146   echo $ECHO_N "(cached) $ECHO_C" >&6
9147 else
9148   cat >conftest.$ac_ext <<_ACEOF
9149 #line 9149 "configure"
9150 #include "confdefs.h"
9151 #include <$ac_header>
9152 _ACEOF
9153 if { (eval echo "$as_me:9153: \"$ac_cpp conftest.$ac_ext\"") >&5
9154   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9155   ac_status=$?
9156   egrep -v '^ *\+' conftest.er1 >conftest.err
9157   rm -f conftest.er1
9158   cat conftest.err >&5
9159   echo "$as_me:9159: \$? = $ac_status" >&5
9160   (exit $ac_status); } >/dev/null; then
9161   if test -s conftest.err; then
9162     ac_cpp_err=$ac_c_preproc_warn_flag
9163   else
9164     ac_cpp_err=
9165   fi
9166 else
9167   ac_cpp_err=yes
9168 fi
9169 if test -z "$ac_cpp_err"; then
9170   eval "$as_ac_Header=yes"
9171 else
9172   echo "$as_me: failed program was:" >&5
9173   cat conftest.$ac_ext >&5
9174   eval "$as_ac_Header=no"
9175 fi
9176 rm -f conftest.err conftest.$ac_ext
9177 fi
9178 echo "$as_me:9178: result: `eval echo '${'$as_ac_Header'}'`" >&5
9179 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9180 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9181   cat >>confdefs.h <<EOF
9182 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9183 EOF
9184
9185 fi
9186 done
9187
9188 for ac_func in \
9189         remove \
9190         unlink
9191 do
9192 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9193 echo "$as_me:9193: checking for $ac_func" >&5
9194 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9195 if eval "test \"\${$as_ac_var+set}\" = set"; then
9196   echo $ECHO_N "(cached) $ECHO_C" >&6
9197 else
9198   cat >conftest.$ac_ext <<_ACEOF
9199 #line 9199 "configure"
9200 #include "confdefs.h"
9201 #define $ac_func autoconf_temporary
9202 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9203 #undef $ac_func
9204
9205 #ifdef __cplusplus
9206 extern "C"
9207 #endif
9208
9209 /* We use char because int might match the return type of a gcc2
9210    builtin and then its argument prototype would still apply.  */
9211 char $ac_func (void);
9212
9213 int
9214 main (void)
9215 {
9216
9217 /* The GNU C library defines stubs for functions which it implements
9218     to always fail with ENOSYS.  Some functions are actually named
9219     something starting with __ and the normal name is an alias.  */
9220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9221 #error found stub for $ac_func
9222 #endif
9223
9224         return $ac_func ();
9225   ;
9226   return 0;
9227 }
9228 _ACEOF
9229 rm -f conftest.$ac_objext conftest$ac_exeext
9230 if { (eval echo "$as_me:9230: \"$ac_link\"") >&5
9231   (eval $ac_link) 2>&5
9232   ac_status=$?
9233   echo "$as_me:9233: \$? = $ac_status" >&5
9234   (exit $ac_status); } &&
9235          { ac_try='test -s conftest$ac_exeext'
9236   { (eval echo "$as_me:9236: \"$ac_try\"") >&5
9237   (eval $ac_try) 2>&5
9238   ac_status=$?
9239   echo "$as_me:9239: \$? = $ac_status" >&5
9240   (exit $ac_status); }; }; then
9241   eval "$as_ac_var=yes"
9242 else
9243   echo "$as_me: failed program was:" >&5
9244 cat conftest.$ac_ext >&5
9245 eval "$as_ac_var=no"
9246 fi
9247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9248 fi
9249 echo "$as_me:9249: result: `eval echo '${'$as_ac_var'}'`" >&5
9250 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9251 if test `eval echo '${'$as_ac_var'}'` = yes; then
9252   cat >>confdefs.h <<EOF
9253 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9254 EOF
9255
9256 fi
9257 done
9258
9259 if test "$cross_compiling" = yes ; then
9260
9261 for ac_func in \
9262                 link \
9263                 symlink
9264 do
9265 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9266 echo "$as_me:9266: checking for $ac_func" >&5
9267 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9268 if eval "test \"\${$as_ac_var+set}\" = set"; then
9269   echo $ECHO_N "(cached) $ECHO_C" >&6
9270 else
9271   cat >conftest.$ac_ext <<_ACEOF
9272 #line 9272 "configure"
9273 #include "confdefs.h"
9274 #define $ac_func autoconf_temporary
9275 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9276 #undef $ac_func
9277
9278 #ifdef __cplusplus
9279 extern "C"
9280 #endif
9281
9282 /* We use char because int might match the return type of a gcc2
9283    builtin and then its argument prototype would still apply.  */
9284 char $ac_func (void);
9285
9286 int
9287 main (void)
9288 {
9289
9290 /* The GNU C library defines stubs for functions which it implements
9291     to always fail with ENOSYS.  Some functions are actually named
9292     something starting with __ and the normal name is an alias.  */
9293 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9294 #error found stub for $ac_func
9295 #endif
9296
9297         return $ac_func ();
9298   ;
9299   return 0;
9300 }
9301 _ACEOF
9302 rm -f conftest.$ac_objext conftest$ac_exeext
9303 if { (eval echo "$as_me:9303: \"$ac_link\"") >&5
9304   (eval $ac_link) 2>&5
9305   ac_status=$?
9306   echo "$as_me:9306: \$? = $ac_status" >&5
9307   (exit $ac_status); } &&
9308          { ac_try='test -s conftest$ac_exeext'
9309   { (eval echo "$as_me:9309: \"$ac_try\"") >&5
9310   (eval $ac_try) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit $ac_status); }; }; then
9314   eval "$as_ac_var=yes"
9315 else
9316   echo "$as_me: failed program was:" >&5
9317 cat conftest.$ac_ext >&5
9318 eval "$as_ac_var=no"
9319 fi
9320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9321 fi
9322 echo "$as_me:9322: result: `eval echo '${'$as_ac_var'}'`" >&5
9323 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9324 if test `eval echo '${'$as_ac_var'}'` = yes; then
9325   cat >>confdefs.h <<EOF
9326 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9327 EOF
9328
9329 fi
9330 done
9331
9332 else
9333         echo "$as_me:9333: checking if link/symlink functions work" >&5
9334 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9335 if test "${cf_cv_link_funcs+set}" = set; then
9336   echo $ECHO_N "(cached) $ECHO_C" >&6
9337 else
9338
9339                 cf_cv_link_funcs=
9340                 for cf_func in link symlink ; do
9341                         if test "$cross_compiling" = yes; then
9342
9343                         eval 'ac_cv_func_'$cf_func'=error'
9344 else
9345   cat >conftest.$ac_ext <<_ACEOF
9346 #line 9346 "configure"
9347 #include "confdefs.h"
9348
9349 #include <sys/types.h>
9350 #include <sys/stat.h>
9351 #ifdef HAVE_UNISTD_H
9352 #include <unistd.h>
9353 #endif
9354 int main(void)
9355 {
9356         int fail = 0;
9357         char *src = "config.log";
9358         char *dst = "conftest.chk";
9359         struct stat src_sb;
9360         struct stat dst_sb;
9361
9362         stat(src, &src_sb);
9363         fail = ($cf_func("config.log", "conftest.chk") < 0)
9364             || (stat(dst, &dst_sb) < 0)
9365             || (dst_sb.st_mtime != src_sb.st_mtime);
9366 #ifdef HAVE_UNLINK
9367         unlink(dst);
9368 #else
9369         remove(dst);
9370 #endif
9371         ${cf_cv_main_return:-return} (fail);
9372 }
9373
9374 _ACEOF
9375 rm -f conftest$ac_exeext
9376 if { (eval echo "$as_me:9376: \"$ac_link\"") >&5
9377   (eval $ac_link) 2>&5
9378   ac_status=$?
9379   echo "$as_me:9379: \$? = $ac_status" >&5
9380   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9381   { (eval echo "$as_me:9381: \"$ac_try\"") >&5
9382   (eval $ac_try) 2>&5
9383   ac_status=$?
9384   echo "$as_me:9384: \$? = $ac_status" >&5
9385   (exit $ac_status); }; }; then
9386
9387                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9388                         eval 'ac_cv_func_'$cf_func'=yes'
9389 else
9390   echo "$as_me: program exited with status $ac_status" >&5
9391 echo "$as_me: failed program was:" >&5
9392 cat conftest.$ac_ext >&5
9393
9394                         eval 'ac_cv_func_'$cf_func'=no'
9395 fi
9396 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9397 fi
9398                 done
9399                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9400
9401 fi
9402 echo "$as_me:9402: result: $cf_cv_link_funcs" >&5
9403 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9404         test "$ac_cv_func_link"    = yes &&
9405 cat >>confdefs.h <<\EOF
9406 #define HAVE_LINK 1
9407 EOF
9408
9409         test "$ac_cv_func_symlink" = yes &&
9410 cat >>confdefs.h <<\EOF
9411 #define HAVE_SYMLINK 1
9412 EOF
9413
9414 fi
9415
9416 with_links=no
9417 with_symlinks=no
9418
9419 # soft links (symbolic links) are useful for some systems where hard links do
9420 # not work, or to make it simpler to copy terminfo trees around.
9421 if test "x$ac_cv_func_symlink" = xyes ; then
9422         echo "$as_me:9422: checking if tic should use symbolic links" >&5
9423 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9424
9425 # Check whether --enable-symlinks or --disable-symlinks was given.
9426 if test "${enable_symlinks+set}" = set; then
9427   enableval="$enable_symlinks"
9428   with_symlinks=$enableval
9429 else
9430   with_symlinks=no
9431 fi;
9432         echo "$as_me:9432: result: $with_symlinks" >&5
9433 echo "${ECHO_T}$with_symlinks" >&6
9434 fi
9435
9436 # If we have hard links and did not choose to use soft links instead, there is
9437 # no reason to make this choice optional - use the hard links.
9438 if test "$with_symlinks" = no ; then
9439         echo "$as_me:9439: checking if tic should use hard links" >&5
9440 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9441         if test "x$ac_cv_func_link" = xyes ; then
9442                 with_links=yes
9443         else
9444                 with_links=no
9445         fi
9446         echo "$as_me:9446: result: $with_links" >&5
9447 echo "${ECHO_T}$with_links" >&6
9448 fi
9449
9450 test "x$with_links" = xyes &&
9451 cat >>confdefs.h <<\EOF
9452 #define USE_LINKS 1
9453 EOF
9454
9455 test "x$with_symlinks" = xyes &&
9456 cat >>confdefs.h <<\EOF
9457 #define USE_SYMLINKS 1
9458 EOF
9459
9460 ###   use option --enable-broken-linker to force on use of broken-linker support
9461
9462 echo "$as_me:9462: checking if you want broken-linker support code" >&5
9463 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9464
9465 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9466 if test "${enable_broken_linker+set}" = set; then
9467   enableval="$enable_broken_linker"
9468   with_broken_linker=$enableval
9469 else
9470   with_broken_linker=no
9471 fi;
9472 echo "$as_me:9472: result: $with_broken_linker" >&5
9473 echo "${ECHO_T}$with_broken_linker" >&6
9474
9475 : ${BROKEN_LINKER:=0}
9476 if test "x$with_broken_linker" = xyes ; then
9477
9478 cat >>confdefs.h <<\EOF
9479 #define BROKEN_LINKER 1
9480 EOF
9481
9482         BROKEN_LINKER=1
9483 fi
9484
9485 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9486 echo "$as_me:9486: checking if tputs should process BSD-style prefix padding" >&5
9487 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9488
9489 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9490 if test "${enable_bsdpad+set}" = set; then
9491   enableval="$enable_bsdpad"
9492   with_bsdpad=$enableval
9493 else
9494   with_bsdpad=no
9495 fi;
9496 echo "$as_me:9496: result: $with_bsdpad" >&5
9497 echo "${ECHO_T}$with_bsdpad" >&6
9498 test "x$with_bsdpad" = xyes &&
9499 cat >>confdefs.h <<\EOF
9500 #define BSD_TPUTS 1
9501 EOF
9502
9503 ###   use option --enable-widec to turn on use of wide-character support
9504 NCURSES_CH_T=chtype
9505 NCURSES_LIBUTF8=0
9506
9507 NEED_WCHAR_H=0
9508 NCURSES_MBSTATE_T=0
9509 NCURSES_WCHAR_T=0
9510 NCURSES_WINT_T=0
9511
9512 # Check to define _XOPEN_SOURCE "automatically"
9513 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9514
9515 echo "$as_me:9515: checking if the POSIX test-macros are already defined" >&5
9516 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9517 if test "${cf_cv_posix_visible+set}" = set; then
9518   echo $ECHO_N "(cached) $ECHO_C" >&6
9519 else
9520
9521 cat >conftest.$ac_ext <<_ACEOF
9522 #line 9522 "configure"
9523 #include "confdefs.h"
9524 #include <stdio.h>
9525 int
9526 main (void)
9527 {
9528
9529 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9530         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9531         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9532         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9533 #error conflicting symbols found
9534 #endif
9535
9536   ;
9537   return 0;
9538 }
9539 _ACEOF
9540 rm -f conftest.$ac_objext
9541 if { (eval echo "$as_me:9541: \"$ac_compile\"") >&5
9542   (eval $ac_compile) 2>&5
9543   ac_status=$?
9544   echo "$as_me:9544: \$? = $ac_status" >&5
9545   (exit $ac_status); } &&
9546          { ac_try='test -s conftest.$ac_objext'
9547   { (eval echo "$as_me:9547: \"$ac_try\"") >&5
9548   (eval $ac_try) 2>&5
9549   ac_status=$?
9550   echo "$as_me:9550: \$? = $ac_status" >&5
9551   (exit $ac_status); }; }; then
9552   cf_cv_posix_visible=no
9553 else
9554   echo "$as_me: failed program was:" >&5
9555 cat conftest.$ac_ext >&5
9556 cf_cv_posix_visible=yes
9557 fi
9558 rm -f conftest.$ac_objext conftest.$ac_ext
9559
9560 fi
9561 echo "$as_me:9561: result: $cf_cv_posix_visible" >&5
9562 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9563
9564 if test "$cf_cv_posix_visible" = no; then
9565
9566 cf_XOPEN_SOURCE=600
9567 cf_POSIX_C_SOURCE=199506L
9568 cf_xopen_source=
9569
9570 case $host_os in
9571 (aix[4-7]*)
9572         cf_xopen_source="-D_ALL_SOURCE"
9573         ;;
9574 (msys)
9575         cf_XOPEN_SOURCE=600
9576         ;;
9577 (darwin[0-8].*)
9578         cf_xopen_source="-D_APPLE_C_SOURCE"
9579         ;;
9580 (darwin*)
9581         cf_xopen_source="-D_DARWIN_C_SOURCE"
9582         cf_XOPEN_SOURCE=
9583         ;;
9584 (freebsd*|dragonfly*|midnightbsd*)
9585         # 5.x headers associate
9586         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9587         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9588         cf_POSIX_C_SOURCE=200112L
9589         cf_XOPEN_SOURCE=600
9590         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9591         ;;
9592 (hpux11*)
9593         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9594         ;;
9595 (hpux*)
9596         cf_xopen_source="-D_HPUX_SOURCE"
9597         ;;
9598 (irix[56].*)
9599         cf_xopen_source="-D_SGI_SOURCE"
9600         cf_XOPEN_SOURCE=
9601         ;;
9602 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9603
9604 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9605
9606 echo "$as_me:9606: checking if this is the GNU C library" >&5
9607 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9608 if test "${cf_cv_gnu_library+set}" = set; then
9609   echo $ECHO_N "(cached) $ECHO_C" >&6
9610 else
9611
9612 cat >conftest.$ac_ext <<_ACEOF
9613 #line 9613 "configure"
9614 #include "confdefs.h"
9615 #include <sys/types.h>
9616 int
9617 main (void)
9618 {
9619
9620         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9621                 return 0;
9622         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9623                 return 0;
9624         #else
9625         #       error not GNU C library
9626         #endif
9627   ;
9628   return 0;
9629 }
9630 _ACEOF
9631 rm -f conftest.$ac_objext
9632 if { (eval echo "$as_me:9632: \"$ac_compile\"") >&5
9633   (eval $ac_compile) 2>&5
9634   ac_status=$?
9635   echo "$as_me:9635: \$? = $ac_status" >&5
9636   (exit $ac_status); } &&
9637          { ac_try='test -s conftest.$ac_objext'
9638   { (eval echo "$as_me:9638: \"$ac_try\"") >&5
9639   (eval $ac_try) 2>&5
9640   ac_status=$?
9641   echo "$as_me:9641: \$? = $ac_status" >&5
9642   (exit $ac_status); }; }; then
9643   cf_cv_gnu_library=yes
9644 else
9645   echo "$as_me: failed program was:" >&5
9646 cat conftest.$ac_ext >&5
9647 cf_cv_gnu_library=no
9648 fi
9649 rm -f conftest.$ac_objext conftest.$ac_ext
9650
9651 fi
9652 echo "$as_me:9652: result: $cf_cv_gnu_library" >&5
9653 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9654
9655 if test x$cf_cv_gnu_library = xyes; then
9656
9657         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9658         # was changed to help a little.  newlib incorporated the change about 4
9659         # years later.
9660         echo "$as_me:9660: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9661 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9662 if test "${cf_cv_gnu_library_219+set}" = set; then
9663   echo $ECHO_N "(cached) $ECHO_C" >&6
9664 else
9665
9666                 cf_save="$CPPFLAGS"
9667
9668         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9669         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9670
9671                 cat >conftest.$ac_ext <<_ACEOF
9672 #line 9672 "configure"
9673 #include "confdefs.h"
9674 #include <sys/types.h>
9675 int
9676 main (void)
9677 {
9678
9679                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9680                                 return 0;
9681                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9682                                 return 0;
9683                         #else
9684                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9685                         #endif
9686   ;
9687   return 0;
9688 }
9689 _ACEOF
9690 rm -f conftest.$ac_objext
9691 if { (eval echo "$as_me:9691: \"$ac_compile\"") >&5
9692   (eval $ac_compile) 2>&5
9693   ac_status=$?
9694   echo "$as_me:9694: \$? = $ac_status" >&5
9695   (exit $ac_status); } &&
9696          { ac_try='test -s conftest.$ac_objext'
9697   { (eval echo "$as_me:9697: \"$ac_try\"") >&5
9698   (eval $ac_try) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); }; }; then
9702   cf_cv_gnu_library_219=yes
9703 else
9704   echo "$as_me: failed program was:" >&5
9705 cat conftest.$ac_ext >&5
9706 cf_cv_gnu_library_219=no
9707 fi
9708 rm -f conftest.$ac_objext conftest.$ac_ext
9709                 CPPFLAGS="$cf_save"
9710
9711 fi
9712 echo "$as_me:9712: result: $cf_cv_gnu_library_219" >&5
9713 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9714
9715         if test "x$cf_cv_gnu_library_219" = xyes; then
9716                 cf_save="$CPPFLAGS"
9717                 echo "$as_me:9717: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9718 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9719 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9720   echo $ECHO_N "(cached) $ECHO_C" >&6
9721 else
9722
9723 cf_fix_cppflags=no
9724 cf_new_cflags=
9725 cf_new_cppflags=
9726 cf_new_extra_cppflags=
9727
9728 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9729 do
9730 case $cf_fix_cppflags in
9731 (no)
9732         case $cf_add_cflags in
9733         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9734                 case $cf_add_cflags in
9735                 (-D*)
9736                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9737
9738                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9739                                 && test -z "${cf_tst_cflags}" \
9740                                 && cf_fix_cppflags=yes
9741
9742                         if test $cf_fix_cppflags = yes ; then
9743
9744         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9745         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9746
9747                                 continue
9748                         elif test "${cf_tst_cflags}" = "\"'" ; then
9749
9750         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9751         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9752
9753                                 continue
9754                         fi
9755                         ;;
9756                 esac
9757                 case "$CPPFLAGS" in
9758                 (*$cf_add_cflags)
9759                         ;;
9760                 (*)
9761                         case $cf_add_cflags in
9762                         (-D*)
9763                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9764
9765 CPPFLAGS=`echo "$CPPFLAGS" | \
9766         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9767                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9768
9769                                 ;;
9770                         esac
9771
9772         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9773         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9774
9775                         ;;
9776                 esac
9777                 ;;
9778         (*)
9779
9780         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9781         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9782
9783                 ;;
9784         esac
9785         ;;
9786 (yes)
9787
9788         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9789         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9790
9791         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9792
9793         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9794                 && test -z "${cf_tst_cflags}" \
9795                 && cf_fix_cppflags=no
9796         ;;
9797 esac
9798 done
9799
9800 if test -n "$cf_new_cflags" ; then
9801
9802         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9803         CFLAGS="${CFLAGS}$cf_new_cflags"
9804
9805 fi
9806
9807 if test -n "$cf_new_cppflags" ; then
9808
9809         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9810         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9811
9812 fi
9813
9814 if test -n "$cf_new_extra_cppflags" ; then
9815
9816         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9817         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9818
9819 fi
9820
9821                         cat >conftest.$ac_ext <<_ACEOF
9822 #line 9822 "configure"
9823 #include "confdefs.h"
9824
9825                                 #include <limits.h>
9826                                 #include <sys/types.h>
9827
9828 int
9829 main (void)
9830 {
9831
9832                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9833                                         return 0;
9834                                 #else
9835                                 #       error GNU C library is too old
9836                                 #endif
9837   ;
9838   return 0;
9839 }
9840 _ACEOF
9841 rm -f conftest.$ac_objext
9842 if { (eval echo "$as_me:9842: \"$ac_compile\"") >&5
9843   (eval $ac_compile) 2>&5
9844   ac_status=$?
9845   echo "$as_me:9845: \$? = $ac_status" >&5
9846   (exit $ac_status); } &&
9847          { ac_try='test -s conftest.$ac_objext'
9848   { (eval echo "$as_me:9848: \"$ac_try\"") >&5
9849   (eval $ac_try) 2>&5
9850   ac_status=$?
9851   echo "$as_me:9851: \$? = $ac_status" >&5
9852   (exit $ac_status); }; }; then
9853   cf_cv_gnu_dftsrc_219=yes
9854 else
9855   echo "$as_me: failed program was:" >&5
9856 cat conftest.$ac_ext >&5
9857 cf_cv_gnu_dftsrc_219=no
9858 fi
9859 rm -f conftest.$ac_objext conftest.$ac_ext
9860
9861 fi
9862 echo "$as_me:9862: result: $cf_cv_gnu_dftsrc_219" >&5
9863 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9864                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9865         else
9866                 cf_cv_gnu_dftsrc_219=maybe
9867         fi
9868
9869         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9870
9871                 echo "$as_me:9871: checking if we must define _GNU_SOURCE" >&5
9872 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9873 if test "${cf_cv_gnu_source+set}" = set; then
9874   echo $ECHO_N "(cached) $ECHO_C" >&6
9875 else
9876
9877                 cat >conftest.$ac_ext <<_ACEOF
9878 #line 9878 "configure"
9879 #include "confdefs.h"
9880 #include <sys/types.h>
9881 int
9882 main (void)
9883 {
9884
9885                         #ifndef _XOPEN_SOURCE
9886                         #error  expected _XOPEN_SOURCE to be defined
9887                         #endif
9888   ;
9889   return 0;
9890 }
9891 _ACEOF
9892 rm -f conftest.$ac_objext
9893 if { (eval echo "$as_me:9893: \"$ac_compile\"") >&5
9894   (eval $ac_compile) 2>&5
9895   ac_status=$?
9896   echo "$as_me:9896: \$? = $ac_status" >&5
9897   (exit $ac_status); } &&
9898          { ac_try='test -s conftest.$ac_objext'
9899   { (eval echo "$as_me:9899: \"$ac_try\"") >&5
9900   (eval $ac_try) 2>&5
9901   ac_status=$?
9902   echo "$as_me:9902: \$? = $ac_status" >&5
9903   (exit $ac_status); }; }; then
9904   cf_cv_gnu_source=no
9905 else
9906   echo "$as_me: failed program was:" >&5
9907 cat conftest.$ac_ext >&5
9908 cf_save="$CPPFLAGS"
9909
9910 cf_fix_cppflags=no
9911 cf_new_cflags=
9912 cf_new_cppflags=
9913 cf_new_extra_cppflags=
9914
9915 for cf_add_cflags in -D_GNU_SOURCE
9916 do
9917 case $cf_fix_cppflags in
9918 (no)
9919         case $cf_add_cflags in
9920         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9921                 case $cf_add_cflags in
9922                 (-D*)
9923                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9924
9925                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9926                                 && test -z "${cf_tst_cflags}" \
9927                                 && cf_fix_cppflags=yes
9928
9929                         if test $cf_fix_cppflags = yes ; then
9930
9931         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9932         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9933
9934                                 continue
9935                         elif test "${cf_tst_cflags}" = "\"'" ; then
9936
9937         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9938         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9939
9940                                 continue
9941                         fi
9942                         ;;
9943                 esac
9944                 case "$CPPFLAGS" in
9945                 (*$cf_add_cflags)
9946                         ;;
9947                 (*)
9948                         case $cf_add_cflags in
9949                         (-D*)
9950                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9951
9952 CPPFLAGS=`echo "$CPPFLAGS" | \
9953         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9954                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9955
9956                                 ;;
9957                         esac
9958
9959         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9960         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9961
9962                         ;;
9963                 esac
9964                 ;;
9965         (*)
9966
9967         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9968         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9969
9970                 ;;
9971         esac
9972         ;;
9973 (yes)
9974
9975         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9976         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9977
9978         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9979
9980         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9981                 && test -z "${cf_tst_cflags}" \
9982                 && cf_fix_cppflags=no
9983         ;;
9984 esac
9985 done
9986
9987 if test -n "$cf_new_cflags" ; then
9988
9989         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9990         CFLAGS="${CFLAGS}$cf_new_cflags"
9991
9992 fi
9993
9994 if test -n "$cf_new_cppflags" ; then
9995
9996         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9997         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9998
9999 fi
10000
10001 if test -n "$cf_new_extra_cppflags" ; then
10002
10003         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10004         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10005
10006 fi
10007
10008                          cat >conftest.$ac_ext <<_ACEOF
10009 #line 10009 "configure"
10010 #include "confdefs.h"
10011 #include <sys/types.h>
10012 int
10013 main (void)
10014 {
10015
10016                                 #ifdef _XOPEN_SOURCE
10017                                 #error  expected _XOPEN_SOURCE to be undefined
10018                                 #endif
10019   ;
10020   return 0;
10021 }
10022 _ACEOF
10023 rm -f conftest.$ac_objext
10024 if { (eval echo "$as_me:10024: \"$ac_compile\"") >&5
10025   (eval $ac_compile) 2>&5
10026   ac_status=$?
10027   echo "$as_me:10027: \$? = $ac_status" >&5
10028   (exit $ac_status); } &&
10029          { ac_try='test -s conftest.$ac_objext'
10030   { (eval echo "$as_me:10030: \"$ac_try\"") >&5
10031   (eval $ac_try) 2>&5
10032   ac_status=$?
10033   echo "$as_me:10033: \$? = $ac_status" >&5
10034   (exit $ac_status); }; }; then
10035   cf_cv_gnu_source=no
10036 else
10037   echo "$as_me: failed program was:" >&5
10038 cat conftest.$ac_ext >&5
10039 cf_cv_gnu_source=yes
10040 fi
10041 rm -f conftest.$ac_objext conftest.$ac_ext
10042                         CPPFLAGS="$cf_save"
10043
10044 fi
10045 rm -f conftest.$ac_objext conftest.$ac_ext
10046
10047 fi
10048 echo "$as_me:10048: result: $cf_cv_gnu_source" >&5
10049 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10050
10051                 if test "$cf_cv_gnu_source" = yes
10052                 then
10053                 echo "$as_me:10053: checking if we should also define _DEFAULT_SOURCE" >&5
10054 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10055 if test "${cf_cv_default_source+set}" = set; then
10056   echo $ECHO_N "(cached) $ECHO_C" >&6
10057 else
10058
10059         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10060         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10061
10062                         cat >conftest.$ac_ext <<_ACEOF
10063 #line 10063 "configure"
10064 #include "confdefs.h"
10065 #include <sys/types.h>
10066 int
10067 main (void)
10068 {
10069
10070                                 #ifdef _DEFAULT_SOURCE
10071                                 #error  expected _DEFAULT_SOURCE to be undefined
10072                                 #endif
10073   ;
10074   return 0;
10075 }
10076 _ACEOF
10077 rm -f conftest.$ac_objext
10078 if { (eval echo "$as_me:10078: \"$ac_compile\"") >&5
10079   (eval $ac_compile) 2>&5
10080   ac_status=$?
10081   echo "$as_me:10081: \$? = $ac_status" >&5
10082   (exit $ac_status); } &&
10083          { ac_try='test -s conftest.$ac_objext'
10084   { (eval echo "$as_me:10084: \"$ac_try\"") >&5
10085   (eval $ac_try) 2>&5
10086   ac_status=$?
10087   echo "$as_me:10087: \$? = $ac_status" >&5
10088   (exit $ac_status); }; }; then
10089   cf_cv_default_source=no
10090 else
10091   echo "$as_me: failed program was:" >&5
10092 cat conftest.$ac_ext >&5
10093 cf_cv_default_source=yes
10094 fi
10095 rm -f conftest.$ac_objext conftest.$ac_ext
10096
10097 fi
10098 echo "$as_me:10098: result: $cf_cv_default_source" >&5
10099 echo "${ECHO_T}$cf_cv_default_source" >&6
10100                         if test "$cf_cv_default_source" = yes
10101                         then
10102
10103         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10104         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10105
10106                         fi
10107                 fi
10108         fi
10109
10110 fi
10111
10112         ;;
10113 (minix*)
10114         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10115         ;;
10116 (mirbsd*)
10117         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10118         cf_XOPEN_SOURCE=
10119
10120 if test "$cf_cv_posix_visible" = no; then
10121
10122 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10123
10124 cf_save_CFLAGS="$CFLAGS"
10125 cf_save_CPPFLAGS="$CPPFLAGS"
10126
10127 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10128         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10129                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10130
10131 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10132         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10133                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10134
10135 echo "$as_me:10135: checking if we should define _POSIX_C_SOURCE" >&5
10136 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10137 if test "${cf_cv_posix_c_source+set}" = set; then
10138   echo $ECHO_N "(cached) $ECHO_C" >&6
10139 else
10140
10141 echo "${as_me:-configure}:10141: testing if the symbol is already defined go no further ..." 1>&5
10142
10143         cat >conftest.$ac_ext <<_ACEOF
10144 #line 10144 "configure"
10145 #include "confdefs.h"
10146 #include <sys/types.h>
10147 int
10148 main (void)
10149 {
10150
10151 #ifndef _POSIX_C_SOURCE
10152 make an error
10153 #endif
10154   ;
10155   return 0;
10156 }
10157 _ACEOF
10158 rm -f conftest.$ac_objext
10159 if { (eval echo "$as_me:10159: \"$ac_compile\"") >&5
10160   (eval $ac_compile) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit $ac_status); } &&
10164          { ac_try='test -s conftest.$ac_objext'
10165   { (eval echo "$as_me:10165: \"$ac_try\"") >&5
10166   (eval $ac_try) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit $ac_status); }; }; then
10170   cf_cv_posix_c_source=no
10171 else
10172   echo "$as_me: failed program was:" >&5
10173 cat conftest.$ac_ext >&5
10174 cf_want_posix_source=no
10175          case .$cf_POSIX_C_SOURCE in
10176          (.[12]??*)
10177                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10178                 ;;
10179          (.2)
10180                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10181                 cf_want_posix_source=yes
10182                 ;;
10183          (.*)
10184                 cf_want_posix_source=yes
10185                 ;;
10186          esac
10187          if test "$cf_want_posix_source" = yes ; then
10188                 cat >conftest.$ac_ext <<_ACEOF
10189 #line 10189 "configure"
10190 #include "confdefs.h"
10191 #include <sys/types.h>
10192 int
10193 main (void)
10194 {
10195
10196 #ifdef _POSIX_SOURCE
10197 make an error
10198 #endif
10199   ;
10200   return 0;
10201 }
10202 _ACEOF
10203 rm -f conftest.$ac_objext
10204 if { (eval echo "$as_me:10204: \"$ac_compile\"") >&5
10205   (eval $ac_compile) 2>&5
10206   ac_status=$?
10207   echo "$as_me:10207: \$? = $ac_status" >&5
10208   (exit $ac_status); } &&
10209          { ac_try='test -s conftest.$ac_objext'
10210   { (eval echo "$as_me:10210: \"$ac_try\"") >&5
10211   (eval $ac_try) 2>&5
10212   ac_status=$?
10213   echo "$as_me:10213: \$? = $ac_status" >&5
10214   (exit $ac_status); }; }; then
10215   :
10216 else
10217   echo "$as_me: failed program was:" >&5
10218 cat conftest.$ac_ext >&5
10219 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10220 fi
10221 rm -f conftest.$ac_objext conftest.$ac_ext
10222          fi
10223
10224 echo "${as_me:-configure}:10224: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10225
10226          CFLAGS="$cf_trim_CFLAGS"
10227          CPPFLAGS="$cf_trim_CPPFLAGS"
10228
10229         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10230         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10231
10232 echo "${as_me:-configure}:10232: testing if the second compile does not leave our definition intact error ..." 1>&5
10233
10234          cat >conftest.$ac_ext <<_ACEOF
10235 #line 10235 "configure"
10236 #include "confdefs.h"
10237 #include <sys/types.h>
10238 int
10239 main (void)
10240 {
10241
10242 #ifndef _POSIX_C_SOURCE
10243 make an error
10244 #endif
10245   ;
10246   return 0;
10247 }
10248 _ACEOF
10249 rm -f conftest.$ac_objext
10250 if { (eval echo "$as_me:10250: \"$ac_compile\"") >&5
10251   (eval $ac_compile) 2>&5
10252   ac_status=$?
10253   echo "$as_me:10253: \$? = $ac_status" >&5
10254   (exit $ac_status); } &&
10255          { ac_try='test -s conftest.$ac_objext'
10256   { (eval echo "$as_me:10256: \"$ac_try\"") >&5
10257   (eval $ac_try) 2>&5
10258   ac_status=$?
10259   echo "$as_me:10259: \$? = $ac_status" >&5
10260   (exit $ac_status); }; }; then
10261   :
10262 else
10263   echo "$as_me: failed program was:" >&5
10264 cat conftest.$ac_ext >&5
10265 cf_cv_posix_c_source=no
10266 fi
10267 rm -f conftest.$ac_objext conftest.$ac_ext
10268          CFLAGS="$cf_save_CFLAGS"
10269          CPPFLAGS="$cf_save_CPPFLAGS"
10270
10271 fi
10272 rm -f conftest.$ac_objext conftest.$ac_ext
10273
10274 fi
10275 echo "$as_me:10275: result: $cf_cv_posix_c_source" >&5
10276 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10277
10278 if test "$cf_cv_posix_c_source" != no ; then
10279         CFLAGS="$cf_trim_CFLAGS"
10280         CPPFLAGS="$cf_trim_CPPFLAGS"
10281
10282 cf_fix_cppflags=no
10283 cf_new_cflags=
10284 cf_new_cppflags=
10285 cf_new_extra_cppflags=
10286
10287 for cf_add_cflags in $cf_cv_posix_c_source
10288 do
10289 case $cf_fix_cppflags in
10290 (no)
10291         case $cf_add_cflags in
10292         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10293                 case $cf_add_cflags in
10294                 (-D*)
10295                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10296
10297                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10298                                 && test -z "${cf_tst_cflags}" \
10299                                 && cf_fix_cppflags=yes
10300
10301                         if test $cf_fix_cppflags = yes ; then
10302
10303         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10304         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10305
10306                                 continue
10307                         elif test "${cf_tst_cflags}" = "\"'" ; then
10308
10309         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10310         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10311
10312                                 continue
10313                         fi
10314                         ;;
10315                 esac
10316                 case "$CPPFLAGS" in
10317                 (*$cf_add_cflags)
10318                         ;;
10319                 (*)
10320                         case $cf_add_cflags in
10321                         (-D*)
10322                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10323
10324 CPPFLAGS=`echo "$CPPFLAGS" | \
10325         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10326                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10327
10328                                 ;;
10329                         esac
10330
10331         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10332         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10333
10334                         ;;
10335                 esac
10336                 ;;
10337         (*)
10338
10339         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10340         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10341
10342                 ;;
10343         esac
10344         ;;
10345 (yes)
10346
10347         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10348         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10349
10350         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10351
10352         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10353                 && test -z "${cf_tst_cflags}" \
10354                 && cf_fix_cppflags=no
10355         ;;
10356 esac
10357 done
10358
10359 if test -n "$cf_new_cflags" ; then
10360
10361         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10362         CFLAGS="${CFLAGS}$cf_new_cflags"
10363
10364 fi
10365
10366 if test -n "$cf_new_cppflags" ; then
10367
10368         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10369         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10370
10371 fi
10372
10373 if test -n "$cf_new_extra_cppflags" ; then
10374
10375         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10376         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10377
10378 fi
10379
10380 fi
10381
10382 fi # cf_cv_posix_visible
10383
10384         ;;
10385 (netbsd*)
10386         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10387         ;;
10388 (openbsd[4-9]*)
10389         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10390         cf_xopen_source="-D_BSD_SOURCE"
10391         cf_XOPEN_SOURCE=600
10392         ;;
10393 (openbsd*)
10394         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10395         ;;
10396 (osf[45]*)
10397         cf_xopen_source="-D_OSF_SOURCE"
10398         ;;
10399 (nto-qnx*)
10400         cf_xopen_source="-D_QNX_SOURCE"
10401         ;;
10402 (sco*)
10403         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10404         ;;
10405 (solaris2.*)
10406         cf_xopen_source="-D__EXTENSIONS__"
10407         cf_cv_xopen_source=broken
10408         ;;
10409 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10410         cf_XOPEN_SOURCE=
10411         cf_POSIX_C_SOURCE=
10412         ;;
10413 (*)
10414
10415 echo "$as_me:10415: checking if we should define _XOPEN_SOURCE" >&5
10416 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10417 if test "${cf_cv_xopen_source+set}" = set; then
10418   echo $ECHO_N "(cached) $ECHO_C" >&6
10419 else
10420
10421         cat >conftest.$ac_ext <<_ACEOF
10422 #line 10422 "configure"
10423 #include "confdefs.h"
10424
10425 #include <stdlib.h>
10426 #include <string.h>
10427 #include <sys/types.h>
10428
10429 int
10430 main (void)
10431 {
10432
10433 #ifndef _XOPEN_SOURCE
10434 make an error
10435 #endif
10436   ;
10437   return 0;
10438 }
10439 _ACEOF
10440 rm -f conftest.$ac_objext
10441 if { (eval echo "$as_me:10441: \"$ac_compile\"") >&5
10442   (eval $ac_compile) 2>&5
10443   ac_status=$?
10444   echo "$as_me:10444: \$? = $ac_status" >&5
10445   (exit $ac_status); } &&
10446          { ac_try='test -s conftest.$ac_objext'
10447   { (eval echo "$as_me:10447: \"$ac_try\"") >&5
10448   (eval $ac_try) 2>&5
10449   ac_status=$?
10450   echo "$as_me:10450: \$? = $ac_status" >&5
10451   (exit $ac_status); }; }; then
10452   cf_cv_xopen_source=no
10453 else
10454   echo "$as_me: failed program was:" >&5
10455 cat conftest.$ac_ext >&5
10456 cf_save="$CPPFLAGS"
10457
10458         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10459         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10460
10461          cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464
10465 #include <stdlib.h>
10466 #include <string.h>
10467 #include <sys/types.h>
10468
10469 int
10470 main (void)
10471 {
10472
10473 #ifdef _XOPEN_SOURCE
10474 make an error
10475 #endif
10476   ;
10477   return 0;
10478 }
10479 _ACEOF
10480 rm -f conftest.$ac_objext
10481 if { (eval echo "$as_me:10481: \"$ac_compile\"") >&5
10482   (eval $ac_compile) 2>&5
10483   ac_status=$?
10484   echo "$as_me:10484: \$? = $ac_status" >&5
10485   (exit $ac_status); } &&
10486          { ac_try='test -s conftest.$ac_objext'
10487   { (eval echo "$as_me:10487: \"$ac_try\"") >&5
10488   (eval $ac_try) 2>&5
10489   ac_status=$?
10490   echo "$as_me:10490: \$? = $ac_status" >&5
10491   (exit $ac_status); }; }; then
10492   cf_cv_xopen_source=no
10493 else
10494   echo "$as_me: failed program was:" >&5
10495 cat conftest.$ac_ext >&5
10496 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10497 fi
10498 rm -f conftest.$ac_objext conftest.$ac_ext
10499         CPPFLAGS="$cf_save"
10500
10501 fi
10502 rm -f conftest.$ac_objext conftest.$ac_ext
10503
10504 fi
10505 echo "$as_me:10505: result: $cf_cv_xopen_source" >&5
10506 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10507
10508 if test "$cf_cv_xopen_source" != no ; then
10509
10510 CFLAGS=`echo "$CFLAGS" | \
10511         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10512                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10513
10514 CPPFLAGS=`echo "$CPPFLAGS" | \
10515         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10516                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10517
10518         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10519
10520 cf_fix_cppflags=no
10521 cf_new_cflags=
10522 cf_new_cppflags=
10523 cf_new_extra_cppflags=
10524
10525 for cf_add_cflags in $cf_temp_xopen_source
10526 do
10527 case $cf_fix_cppflags in
10528 (no)
10529         case $cf_add_cflags in
10530         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10531                 case $cf_add_cflags in
10532                 (-D*)
10533                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10534
10535                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10536                                 && test -z "${cf_tst_cflags}" \
10537                                 && cf_fix_cppflags=yes
10538
10539                         if test $cf_fix_cppflags = yes ; then
10540
10541         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10542         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10543
10544                                 continue
10545                         elif test "${cf_tst_cflags}" = "\"'" ; then
10546
10547         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10548         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10549
10550                                 continue
10551                         fi
10552                         ;;
10553                 esac
10554                 case "$CPPFLAGS" in
10555                 (*$cf_add_cflags)
10556                         ;;
10557                 (*)
10558                         case $cf_add_cflags in
10559                         (-D*)
10560                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10561
10562 CPPFLAGS=`echo "$CPPFLAGS" | \
10563         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10564                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10565
10566                                 ;;
10567                         esac
10568
10569         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10570         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10571
10572                         ;;
10573                 esac
10574                 ;;
10575         (*)
10576
10577         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10578         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10579
10580                 ;;
10581         esac
10582         ;;
10583 (yes)
10584
10585         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10586         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10587
10588         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10589
10590         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10591                 && test -z "${cf_tst_cflags}" \
10592                 && cf_fix_cppflags=no
10593         ;;
10594 esac
10595 done
10596
10597 if test -n "$cf_new_cflags" ; then
10598
10599         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10600         CFLAGS="${CFLAGS}$cf_new_cflags"
10601
10602 fi
10603
10604 if test -n "$cf_new_cppflags" ; then
10605
10606         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10607         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10608
10609 fi
10610
10611 if test -n "$cf_new_extra_cppflags" ; then
10612
10613         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10614         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10615
10616 fi
10617
10618 fi
10619
10620 if test "$cf_cv_posix_visible" = no; then
10621
10622 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10623
10624 cf_save_CFLAGS="$CFLAGS"
10625 cf_save_CPPFLAGS="$CPPFLAGS"
10626
10627 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10628         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10629                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10630
10631 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10632         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10633                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10634
10635 echo "$as_me:10635: checking if we should define _POSIX_C_SOURCE" >&5
10636 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10637 if test "${cf_cv_posix_c_source+set}" = set; then
10638   echo $ECHO_N "(cached) $ECHO_C" >&6
10639 else
10640
10641 echo "${as_me:-configure}:10641: testing if the symbol is already defined go no further ..." 1>&5
10642
10643         cat >conftest.$ac_ext <<_ACEOF
10644 #line 10644 "configure"
10645 #include "confdefs.h"
10646 #include <sys/types.h>
10647 int
10648 main (void)
10649 {
10650
10651 #ifndef _POSIX_C_SOURCE
10652 make an error
10653 #endif
10654   ;
10655   return 0;
10656 }
10657 _ACEOF
10658 rm -f conftest.$ac_objext
10659 if { (eval echo "$as_me:10659: \"$ac_compile\"") >&5
10660   (eval $ac_compile) 2>&5
10661   ac_status=$?
10662   echo "$as_me:10662: \$? = $ac_status" >&5
10663   (exit $ac_status); } &&
10664          { ac_try='test -s conftest.$ac_objext'
10665   { (eval echo "$as_me:10665: \"$ac_try\"") >&5
10666   (eval $ac_try) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); }; }; then
10670   cf_cv_posix_c_source=no
10671 else
10672   echo "$as_me: failed program was:" >&5
10673 cat conftest.$ac_ext >&5
10674 cf_want_posix_source=no
10675          case .$cf_POSIX_C_SOURCE in
10676          (.[12]??*)
10677                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10678                 ;;
10679          (.2)
10680                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10681                 cf_want_posix_source=yes
10682                 ;;
10683          (.*)
10684                 cf_want_posix_source=yes
10685                 ;;
10686          esac
10687          if test "$cf_want_posix_source" = yes ; then
10688                 cat >conftest.$ac_ext <<_ACEOF
10689 #line 10689 "configure"
10690 #include "confdefs.h"
10691 #include <sys/types.h>
10692 int
10693 main (void)
10694 {
10695
10696 #ifdef _POSIX_SOURCE
10697 make an error
10698 #endif
10699   ;
10700   return 0;
10701 }
10702 _ACEOF
10703 rm -f conftest.$ac_objext
10704 if { (eval echo "$as_me:10704: \"$ac_compile\"") >&5
10705   (eval $ac_compile) 2>&5
10706   ac_status=$?
10707   echo "$as_me:10707: \$? = $ac_status" >&5
10708   (exit $ac_status); } &&
10709          { ac_try='test -s conftest.$ac_objext'
10710   { (eval echo "$as_me:10710: \"$ac_try\"") >&5
10711   (eval $ac_try) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit $ac_status); }; }; then
10715   :
10716 else
10717   echo "$as_me: failed program was:" >&5
10718 cat conftest.$ac_ext >&5
10719 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10720 fi
10721 rm -f conftest.$ac_objext conftest.$ac_ext
10722          fi
10723
10724 echo "${as_me:-configure}:10724: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10725
10726          CFLAGS="$cf_trim_CFLAGS"
10727          CPPFLAGS="$cf_trim_CPPFLAGS"
10728
10729         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10730         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10731
10732 echo "${as_me:-configure}:10732: testing if the second compile does not leave our definition intact error ..." 1>&5
10733
10734          cat >conftest.$ac_ext <<_ACEOF
10735 #line 10735 "configure"
10736 #include "confdefs.h"
10737 #include <sys/types.h>
10738 int
10739 main (void)
10740 {
10741
10742 #ifndef _POSIX_C_SOURCE
10743 make an error
10744 #endif
10745   ;
10746   return 0;
10747 }
10748 _ACEOF
10749 rm -f conftest.$ac_objext
10750 if { (eval echo "$as_me:10750: \"$ac_compile\"") >&5
10751   (eval $ac_compile) 2>&5
10752   ac_status=$?
10753   echo "$as_me:10753: \$? = $ac_status" >&5
10754   (exit $ac_status); } &&
10755          { ac_try='test -s conftest.$ac_objext'
10756   { (eval echo "$as_me:10756: \"$ac_try\"") >&5
10757   (eval $ac_try) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit $ac_status); }; }; then
10761   :
10762 else
10763   echo "$as_me: failed program was:" >&5
10764 cat conftest.$ac_ext >&5
10765 cf_cv_posix_c_source=no
10766 fi
10767 rm -f conftest.$ac_objext conftest.$ac_ext
10768          CFLAGS="$cf_save_CFLAGS"
10769          CPPFLAGS="$cf_save_CPPFLAGS"
10770
10771 fi
10772 rm -f conftest.$ac_objext conftest.$ac_ext
10773
10774 fi
10775 echo "$as_me:10775: result: $cf_cv_posix_c_source" >&5
10776 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10777
10778 if test "$cf_cv_posix_c_source" != no ; then
10779         CFLAGS="$cf_trim_CFLAGS"
10780         CPPFLAGS="$cf_trim_CPPFLAGS"
10781
10782 cf_fix_cppflags=no
10783 cf_new_cflags=
10784 cf_new_cppflags=
10785 cf_new_extra_cppflags=
10786
10787 for cf_add_cflags in $cf_cv_posix_c_source
10788 do
10789 case $cf_fix_cppflags in
10790 (no)
10791         case $cf_add_cflags in
10792         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10793                 case $cf_add_cflags in
10794                 (-D*)
10795                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10796
10797                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10798                                 && test -z "${cf_tst_cflags}" \
10799                                 && cf_fix_cppflags=yes
10800
10801                         if test $cf_fix_cppflags = yes ; then
10802
10803         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10804         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10805
10806                                 continue
10807                         elif test "${cf_tst_cflags}" = "\"'" ; then
10808
10809         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10810         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10811
10812                                 continue
10813                         fi
10814                         ;;
10815                 esac
10816                 case "$CPPFLAGS" in
10817                 (*$cf_add_cflags)
10818                         ;;
10819                 (*)
10820                         case $cf_add_cflags in
10821                         (-D*)
10822                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10823
10824 CPPFLAGS=`echo "$CPPFLAGS" | \
10825         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10826                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10827
10828                                 ;;
10829                         esac
10830
10831         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10832         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10833
10834                         ;;
10835                 esac
10836                 ;;
10837         (*)
10838
10839         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10840         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10841
10842                 ;;
10843         esac
10844         ;;
10845 (yes)
10846
10847         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10848         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10849
10850         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10851
10852         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10853                 && test -z "${cf_tst_cflags}" \
10854                 && cf_fix_cppflags=no
10855         ;;
10856 esac
10857 done
10858
10859 if test -n "$cf_new_cflags" ; then
10860
10861         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10862         CFLAGS="${CFLAGS}$cf_new_cflags"
10863
10864 fi
10865
10866 if test -n "$cf_new_cppflags" ; then
10867
10868         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10869         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10870
10871 fi
10872
10873 if test -n "$cf_new_extra_cppflags" ; then
10874
10875         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10876         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10877
10878 fi
10879
10880 fi
10881
10882 fi # cf_cv_posix_visible
10883
10884         ;;
10885 esac
10886
10887 if test -n "$cf_xopen_source" ; then
10888
10889 cf_fix_cppflags=no
10890 cf_new_cflags=
10891 cf_new_cppflags=
10892 cf_new_extra_cppflags=
10893
10894 for cf_add_cflags in $cf_xopen_source
10895 do
10896 case $cf_fix_cppflags in
10897 (no)
10898         case $cf_add_cflags in
10899         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10900                 case $cf_add_cflags in
10901                 (-D*)
10902                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10903
10904                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10905                                 && test -z "${cf_tst_cflags}" \
10906                                 && cf_fix_cppflags=yes
10907
10908                         if test $cf_fix_cppflags = yes ; then
10909
10910         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10911         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10912
10913                                 continue
10914                         elif test "${cf_tst_cflags}" = "\"'" ; then
10915
10916         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10917         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10918
10919                                 continue
10920                         fi
10921                         ;;
10922                 esac
10923                 case "$CPPFLAGS" in
10924                 (*$cf_add_cflags)
10925                         ;;
10926                 (*)
10927                         case $cf_add_cflags in
10928                         (-D*)
10929                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10930
10931 CPPFLAGS=`echo "$CPPFLAGS" | \
10932         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10933                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10934
10935                                 ;;
10936                         esac
10937
10938         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10939         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10940
10941                         ;;
10942                 esac
10943                 ;;
10944         (*)
10945
10946         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10947         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10948
10949                 ;;
10950         esac
10951         ;;
10952 (yes)
10953
10954         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10955         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10956
10957         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10958
10959         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10960                 && test -z "${cf_tst_cflags}" \
10961                 && cf_fix_cppflags=no
10962         ;;
10963 esac
10964 done
10965
10966 if test -n "$cf_new_cflags" ; then
10967         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10968
10969 echo "${as_me:-configure}:10969: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10970
10971         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10972         CFLAGS="${CFLAGS}$cf_new_cflags"
10973
10974 fi
10975
10976 if test -n "$cf_new_cppflags" ; then
10977         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10978
10979 echo "${as_me:-configure}:10979: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10980
10981         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10982         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10983
10984 fi
10985
10986 if test -n "$cf_new_extra_cppflags" ; then
10987         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10988
10989 echo "${as_me:-configure}:10989: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10990
10991         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10992         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10993
10994 fi
10995
10996 fi
10997
10998 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10999         echo "$as_me:10999: checking if _XOPEN_SOURCE really is set" >&5
11000 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11001         cat >conftest.$ac_ext <<_ACEOF
11002 #line 11002 "configure"
11003 #include "confdefs.h"
11004 #include <stdlib.h>
11005 int
11006 main (void)
11007 {
11008
11009 #ifndef _XOPEN_SOURCE
11010 make an error
11011 #endif
11012   ;
11013   return 0;
11014 }
11015 _ACEOF
11016 rm -f conftest.$ac_objext
11017 if { (eval echo "$as_me:11017: \"$ac_compile\"") >&5
11018   (eval $ac_compile) 2>&5
11019   ac_status=$?
11020   echo "$as_me:11020: \$? = $ac_status" >&5
11021   (exit $ac_status); } &&
11022          { ac_try='test -s conftest.$ac_objext'
11023   { (eval echo "$as_me:11023: \"$ac_try\"") >&5
11024   (eval $ac_try) 2>&5
11025   ac_status=$?
11026   echo "$as_me:11026: \$? = $ac_status" >&5
11027   (exit $ac_status); }; }; then
11028   cf_XOPEN_SOURCE_set=yes
11029 else
11030   echo "$as_me: failed program was:" >&5
11031 cat conftest.$ac_ext >&5
11032 cf_XOPEN_SOURCE_set=no
11033 fi
11034 rm -f conftest.$ac_objext conftest.$ac_ext
11035         echo "$as_me:11035: result: $cf_XOPEN_SOURCE_set" >&5
11036 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11037         if test $cf_XOPEN_SOURCE_set = yes
11038         then
11039                 cat >conftest.$ac_ext <<_ACEOF
11040 #line 11040 "configure"
11041 #include "confdefs.h"
11042 #include <stdlib.h>
11043 int
11044 main (void)
11045 {
11046
11047 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11048 make an error
11049 #endif
11050   ;
11051   return 0;
11052 }
11053 _ACEOF
11054 rm -f conftest.$ac_objext
11055 if { (eval echo "$as_me:11055: \"$ac_compile\"") >&5
11056   (eval $ac_compile) 2>&5
11057   ac_status=$?
11058   echo "$as_me:11058: \$? = $ac_status" >&5
11059   (exit $ac_status); } &&
11060          { ac_try='test -s conftest.$ac_objext'
11061   { (eval echo "$as_me:11061: \"$ac_try\"") >&5
11062   (eval $ac_try) 2>&5
11063   ac_status=$?
11064   echo "$as_me:11064: \$? = $ac_status" >&5
11065   (exit $ac_status); }; }; then
11066   cf_XOPEN_SOURCE_set_ok=yes
11067 else
11068   echo "$as_me: failed program was:" >&5
11069 cat conftest.$ac_ext >&5
11070 cf_XOPEN_SOURCE_set_ok=no
11071 fi
11072 rm -f conftest.$ac_objext conftest.$ac_ext
11073                 if test $cf_XOPEN_SOURCE_set_ok = no
11074                 then
11075                         { echo "$as_me:11075: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11076 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11077                 fi
11078         else
11079
11080 echo "$as_me:11080: checking if we should define _XOPEN_SOURCE" >&5
11081 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11082 if test "${cf_cv_xopen_source+set}" = set; then
11083   echo $ECHO_N "(cached) $ECHO_C" >&6
11084 else
11085
11086         cat >conftest.$ac_ext <<_ACEOF
11087 #line 11087 "configure"
11088 #include "confdefs.h"
11089
11090 #include <stdlib.h>
11091 #include <string.h>
11092 #include <sys/types.h>
11093
11094 int
11095 main (void)
11096 {
11097
11098 #ifndef _XOPEN_SOURCE
11099 make an error
11100 #endif
11101   ;
11102   return 0;
11103 }
11104 _ACEOF
11105 rm -f conftest.$ac_objext
11106 if { (eval echo "$as_me:11106: \"$ac_compile\"") >&5
11107   (eval $ac_compile) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); } &&
11111          { ac_try='test -s conftest.$ac_objext'
11112   { (eval echo "$as_me:11112: \"$ac_try\"") >&5
11113   (eval $ac_try) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); }; }; then
11117   cf_cv_xopen_source=no
11118 else
11119   echo "$as_me: failed program was:" >&5
11120 cat conftest.$ac_ext >&5
11121 cf_save="$CPPFLAGS"
11122
11123         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11124         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11125
11126          cat >conftest.$ac_ext <<_ACEOF
11127 #line 11127 "configure"
11128 #include "confdefs.h"
11129
11130 #include <stdlib.h>
11131 #include <string.h>
11132 #include <sys/types.h>
11133
11134 int
11135 main (void)
11136 {
11137
11138 #ifdef _XOPEN_SOURCE
11139 make an error
11140 #endif
11141   ;
11142   return 0;
11143 }
11144 _ACEOF
11145 rm -f conftest.$ac_objext
11146 if { (eval echo "$as_me:11146: \"$ac_compile\"") >&5
11147   (eval $ac_compile) 2>&5
11148   ac_status=$?
11149   echo "$as_me:11149: \$? = $ac_status" >&5
11150   (exit $ac_status); } &&
11151          { ac_try='test -s conftest.$ac_objext'
11152   { (eval echo "$as_me:11152: \"$ac_try\"") >&5
11153   (eval $ac_try) 2>&5
11154   ac_status=$?
11155   echo "$as_me:11155: \$? = $ac_status" >&5
11156   (exit $ac_status); }; }; then
11157   cf_cv_xopen_source=no
11158 else
11159   echo "$as_me: failed program was:" >&5
11160 cat conftest.$ac_ext >&5
11161 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11162 fi
11163 rm -f conftest.$ac_objext conftest.$ac_ext
11164         CPPFLAGS="$cf_save"
11165
11166 fi
11167 rm -f conftest.$ac_objext conftest.$ac_ext
11168
11169 fi
11170 echo "$as_me:11170: result: $cf_cv_xopen_source" >&5
11171 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11172
11173 if test "$cf_cv_xopen_source" != no ; then
11174
11175 CFLAGS=`echo "$CFLAGS" | \
11176         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11177                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11178
11179 CPPFLAGS=`echo "$CPPFLAGS" | \
11180         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11181                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11182
11183         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11184
11185 cf_fix_cppflags=no
11186 cf_new_cflags=
11187 cf_new_cppflags=
11188 cf_new_extra_cppflags=
11189
11190 for cf_add_cflags in $cf_temp_xopen_source
11191 do
11192 case $cf_fix_cppflags in
11193 (no)
11194         case $cf_add_cflags in
11195         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11196                 case $cf_add_cflags in
11197                 (-D*)
11198                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11199
11200                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11201                                 && test -z "${cf_tst_cflags}" \
11202                                 && cf_fix_cppflags=yes
11203
11204                         if test $cf_fix_cppflags = yes ; then
11205
11206         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11207         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11208
11209                                 continue
11210                         elif test "${cf_tst_cflags}" = "\"'" ; then
11211
11212         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11213         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11214
11215                                 continue
11216                         fi
11217                         ;;
11218                 esac
11219                 case "$CPPFLAGS" in
11220                 (*$cf_add_cflags)
11221                         ;;
11222                 (*)
11223                         case $cf_add_cflags in
11224                         (-D*)
11225                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11226
11227 CPPFLAGS=`echo "$CPPFLAGS" | \
11228         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11229                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11230
11231                                 ;;
11232                         esac
11233
11234         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11235         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11236
11237                         ;;
11238                 esac
11239                 ;;
11240         (*)
11241
11242         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11243         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11244
11245                 ;;
11246         esac
11247         ;;
11248 (yes)
11249
11250         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11251         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11252
11253         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11254
11255         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11256                 && test -z "${cf_tst_cflags}" \
11257                 && cf_fix_cppflags=no
11258         ;;
11259 esac
11260 done
11261
11262 if test -n "$cf_new_cflags" ; then
11263
11264         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11265         CFLAGS="${CFLAGS}$cf_new_cflags"
11266
11267 fi
11268
11269 if test -n "$cf_new_cppflags" ; then
11270
11271         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11272         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11273
11274 fi
11275
11276 if test -n "$cf_new_extra_cppflags" ; then
11277
11278         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11279         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11280
11281 fi
11282
11283 fi
11284
11285         fi
11286 fi
11287 fi # cf_cv_posix_visible
11288
11289 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11290
11291 # Work around breakage on OS X
11292
11293 echo "$as_me:11293: checking if SIGWINCH is defined" >&5
11294 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11295 if test "${cf_cv_define_sigwinch+set}" = set; then
11296   echo $ECHO_N "(cached) $ECHO_C" >&6
11297 else
11298
11299         cat >conftest.$ac_ext <<_ACEOF
11300 #line 11300 "configure"
11301 #include "confdefs.h"
11302
11303 #include <sys/types.h>
11304 #include <sys/signal.h>
11305
11306 int
11307 main (void)
11308 {
11309 int x = SIGWINCH; (void)x
11310   ;
11311   return 0;
11312 }
11313 _ACEOF
11314 rm -f conftest.$ac_objext
11315 if { (eval echo "$as_me:11315: \"$ac_compile\"") >&5
11316   (eval $ac_compile) 2>&5
11317   ac_status=$?
11318   echo "$as_me:11318: \$? = $ac_status" >&5
11319   (exit $ac_status); } &&
11320          { ac_try='test -s conftest.$ac_objext'
11321   { (eval echo "$as_me:11321: \"$ac_try\"") >&5
11322   (eval $ac_try) 2>&5
11323   ac_status=$?
11324   echo "$as_me:11324: \$? = $ac_status" >&5
11325   (exit $ac_status); }; }; then
11326   cf_cv_define_sigwinch=yes
11327 else
11328   echo "$as_me: failed program was:" >&5
11329 cat conftest.$ac_ext >&5
11330 cat >conftest.$ac_ext <<_ACEOF
11331 #line 11331 "configure"
11332 #include "confdefs.h"
11333
11334 #undef _XOPEN_SOURCE
11335 #undef _POSIX_SOURCE
11336 #undef _POSIX_C_SOURCE
11337 #include <sys/types.h>
11338 #include <sys/signal.h>
11339
11340 int
11341 main (void)
11342 {
11343 int x = SIGWINCH; (void)x
11344   ;
11345   return 0;
11346 }
11347 _ACEOF
11348 rm -f conftest.$ac_objext
11349 if { (eval echo "$as_me:11349: \"$ac_compile\"") >&5
11350   (eval $ac_compile) 2>&5
11351   ac_status=$?
11352   echo "$as_me:11352: \$? = $ac_status" >&5
11353   (exit $ac_status); } &&
11354          { ac_try='test -s conftest.$ac_objext'
11355   { (eval echo "$as_me:11355: \"$ac_try\"") >&5
11356   (eval $ac_try) 2>&5
11357   ac_status=$?
11358   echo "$as_me:11358: \$? = $ac_status" >&5
11359   (exit $ac_status); }; }; then
11360   cf_cv_define_sigwinch=maybe
11361 else
11362   echo "$as_me: failed program was:" >&5
11363 cat conftest.$ac_ext >&5
11364 cf_cv_define_sigwinch=no
11365 fi
11366 rm -f conftest.$ac_objext conftest.$ac_ext
11367
11368 fi
11369 rm -f conftest.$ac_objext conftest.$ac_ext
11370
11371 fi
11372 echo "$as_me:11372: result: $cf_cv_define_sigwinch" >&5
11373 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11374
11375 if test "$cf_cv_define_sigwinch" = maybe ; then
11376 echo "$as_me:11376: checking for actual SIGWINCH definition" >&5
11377 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11378 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11379   echo $ECHO_N "(cached) $ECHO_C" >&6
11380 else
11381
11382 cf_cv_fixup_sigwinch=unknown
11383 cf_sigwinch=32
11384 while test $cf_sigwinch != 1
11385 do
11386         cat >conftest.$ac_ext <<_ACEOF
11387 #line 11387 "configure"
11388 #include "confdefs.h"
11389
11390 #undef _XOPEN_SOURCE
11391 #undef _POSIX_SOURCE
11392 #undef _POSIX_C_SOURCE
11393 #include <sys/types.h>
11394 #include <sys/signal.h>
11395
11396 int
11397 main (void)
11398 {
11399
11400 #if SIGWINCH != $cf_sigwinch
11401 make an error
11402 #endif
11403 int x = SIGWINCH; (void)x
11404   ;
11405   return 0;
11406 }
11407 _ACEOF
11408 rm -f conftest.$ac_objext
11409 if { (eval echo "$as_me:11409: \"$ac_compile\"") >&5
11410   (eval $ac_compile) 2>&5
11411   ac_status=$?
11412   echo "$as_me:11412: \$? = $ac_status" >&5
11413   (exit $ac_status); } &&
11414          { ac_try='test -s conftest.$ac_objext'
11415   { (eval echo "$as_me:11415: \"$ac_try\"") >&5
11416   (eval $ac_try) 2>&5
11417   ac_status=$?
11418   echo "$as_me:11418: \$? = $ac_status" >&5
11419   (exit $ac_status); }; }; then
11420   cf_cv_fixup_sigwinch=$cf_sigwinch
11421          break
11422 else
11423   echo "$as_me: failed program was:" >&5
11424 cat conftest.$ac_ext >&5
11425 fi
11426 rm -f conftest.$ac_objext conftest.$ac_ext
11427
11428 cf_sigwinch=`expr $cf_sigwinch - 1`
11429 done
11430
11431 fi
11432 echo "$as_me:11432: result: $cf_cv_fixup_sigwinch" >&5
11433 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11434
11435         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11436                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11437         fi
11438 fi
11439
11440 # Checks for CODESET support.
11441
11442 echo "$as_me:11442: checking for nl_langinfo and CODESET" >&5
11443 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11444 if test "${am_cv_langinfo_codeset+set}" = set; then
11445   echo $ECHO_N "(cached) $ECHO_C" >&6
11446 else
11447   cat >conftest.$ac_ext <<_ACEOF
11448 #line 11448 "configure"
11449 #include "confdefs.h"
11450 #include <langinfo.h>
11451 int
11452 main (void)
11453 {
11454 char* cs = nl_langinfo(CODESET); (void)cs
11455   ;
11456   return 0;
11457 }
11458 _ACEOF
11459 rm -f conftest.$ac_objext conftest$ac_exeext
11460 if { (eval echo "$as_me:11460: \"$ac_link\"") >&5
11461   (eval $ac_link) 2>&5
11462   ac_status=$?
11463   echo "$as_me:11463: \$? = $ac_status" >&5
11464   (exit $ac_status); } &&
11465          { ac_try='test -s conftest$ac_exeext'
11466   { (eval echo "$as_me:11466: \"$ac_try\"") >&5
11467   (eval $ac_try) 2>&5
11468   ac_status=$?
11469   echo "$as_me:11469: \$? = $ac_status" >&5
11470   (exit $ac_status); }; }; then
11471   am_cv_langinfo_codeset=yes
11472 else
11473   echo "$as_me: failed program was:" >&5
11474 cat conftest.$ac_ext >&5
11475 am_cv_langinfo_codeset=no
11476 fi
11477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11478
11479 fi
11480 echo "$as_me:11480: result: $am_cv_langinfo_codeset" >&5
11481 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11482         if test $am_cv_langinfo_codeset = yes; then
11483
11484 cat >>confdefs.h <<\EOF
11485 #define HAVE_LANGINFO_CODESET 1
11486 EOF
11487
11488         fi
11489
11490 # use these variables to work around a defect in gcc's fixincludes.
11491 NCURSES_OK_WCHAR_T=
11492 NCURSES_OK_WINT_T=
11493
11494 echo "$as_me:11494: checking if you want wide-character code" >&5
11495 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11496
11497 # Check whether --enable-widec or --disable-widec was given.
11498 if test "${enable_widec+set}" = set; then
11499   enableval="$enable_widec"
11500   with_widec=$enableval
11501 else
11502   with_widec=no
11503 fi;
11504 echo "$as_me:11504: result: $with_widec" >&5
11505 echo "${ECHO_T}$with_widec" >&6
11506
11507 NCURSES_WCWIDTH_GRAPHICS=1
11508
11509 if test "x$with_widec" = xyes ; then
11510         if test "x$disable_lib_suffixes" = xno ; then
11511                 LIB_SUFFIX="w${LIB_SUFFIX}"
11512         fi
11513
11514 cat >>confdefs.h <<\EOF
11515 #define USE_WIDEC_SUPPORT 1
11516 EOF
11517
11518 cat >>confdefs.h <<\EOF
11519 #define NCURSES_WIDECHAR 1
11520 EOF
11521
11522 for ac_header in \
11523 wchar.h \
11524 wctype.h \
11525
11526 do
11527 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11528 echo "$as_me:11528: checking for $ac_header" >&5
11529 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11530 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11531   echo $ECHO_N "(cached) $ECHO_C" >&6
11532 else
11533   cat >conftest.$ac_ext <<_ACEOF
11534 #line 11534 "configure"
11535 #include "confdefs.h"
11536 #include <$ac_header>
11537 _ACEOF
11538 if { (eval echo "$as_me:11538: \"$ac_cpp conftest.$ac_ext\"") >&5
11539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11540   ac_status=$?
11541   egrep -v '^ *\+' conftest.er1 >conftest.err
11542   rm -f conftest.er1
11543   cat conftest.err >&5
11544   echo "$as_me:11544: \$? = $ac_status" >&5
11545   (exit $ac_status); } >/dev/null; then
11546   if test -s conftest.err; then
11547     ac_cpp_err=$ac_c_preproc_warn_flag
11548   else
11549     ac_cpp_err=
11550   fi
11551 else
11552   ac_cpp_err=yes
11553 fi
11554 if test -z "$ac_cpp_err"; then
11555   eval "$as_ac_Header=yes"
11556 else
11557   echo "$as_me: failed program was:" >&5
11558   cat conftest.$ac_ext >&5
11559   eval "$as_ac_Header=no"
11560 fi
11561 rm -f conftest.err conftest.$ac_ext
11562 fi
11563 echo "$as_me:11563: result: `eval echo '${'$as_ac_Header'}'`" >&5
11564 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11565 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11566   cat >>confdefs.h <<EOF
11567 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11568 EOF
11569
11570 fi
11571 done
11572
11573 echo "$as_me:11573: checking if wchar.h can be used as is" >&5
11574 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11575 if test "${cf_cv_wchar_h_okay+set}" = set; then
11576   echo $ECHO_N "(cached) $ECHO_C" >&6
11577 else
11578
11579 cat >conftest.$ac_ext <<_ACEOF
11580 #line 11580 "configure"
11581 #include "confdefs.h"
11582
11583 #include <stdlib.h>
11584 #ifdef HAVE_WCHAR_H
11585 #include <wchar.h>
11586 #endif
11587 #ifdef HAVE_WCTYPE_H
11588 #include <wctype.h>
11589 #endif
11590
11591 int
11592 main (void)
11593 {
11594
11595         wint_t foo = 0;
11596         int bar = iswpunct(foo)
11597   ;
11598   return 0;
11599 }
11600 _ACEOF
11601 rm -f conftest.$ac_objext
11602 if { (eval echo "$as_me:11602: \"$ac_compile\"") >&5
11603   (eval $ac_compile) 2>&5
11604   ac_status=$?
11605   echo "$as_me:11605: \$? = $ac_status" >&5
11606   (exit $ac_status); } &&
11607          { ac_try='test -s conftest.$ac_objext'
11608   { (eval echo "$as_me:11608: \"$ac_try\"") >&5
11609   (eval $ac_try) 2>&5
11610   ac_status=$?
11611   echo "$as_me:11611: \$? = $ac_status" >&5
11612   (exit $ac_status); }; }; then
11613   cf_cv_wchar_h_okay=yes
11614 else
11615   echo "$as_me: failed program was:" >&5
11616 cat conftest.$ac_ext >&5
11617 cf_cv_wchar_h_okay=no
11618 fi
11619 rm -f conftest.$ac_objext conftest.$ac_ext
11620 fi
11621 echo "$as_me:11621: result: $cf_cv_wchar_h_okay" >&5
11622 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11623
11624 if test $cf_cv_wchar_h_okay = no
11625 then
11626
11627 echo "$as_me:11627: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11628 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11629 cat >conftest.$ac_ext <<_ACEOF
11630 #line 11630 "configure"
11631 #include "confdefs.h"
11632 #include <sys/types.h>
11633
11634 int
11635 main (void)
11636 {
11637
11638 #ifndef _XOPEN_SOURCE_EXTENDED
11639 make an error
11640 #endif
11641   ;
11642   return 0;
11643 }
11644 _ACEOF
11645 rm -f conftest.$ac_objext
11646 if { (eval echo "$as_me:11646: \"$ac_compile\"") >&5
11647   (eval $ac_compile) 2>&5
11648   ac_status=$?
11649   echo "$as_me:11649: \$? = $ac_status" >&5
11650   (exit $ac_status); } &&
11651          { ac_try='test -s conftest.$ac_objext'
11652   { (eval echo "$as_me:11652: \"$ac_try\"") >&5
11653   (eval $ac_try) 2>&5
11654   ac_status=$?
11655   echo "$as_me:11655: \$? = $ac_status" >&5
11656   (exit $ac_status); }; }; then
11657   cf_result=no
11658 else
11659   echo "$as_me: failed program was:" >&5
11660 cat conftest.$ac_ext >&5
11661 cf_result=yes
11662 fi
11663 rm -f conftest.$ac_objext conftest.$ac_ext
11664 echo "$as_me:11664: result: $cf_result" >&5
11665 echo "${ECHO_T}$cf_result" >&6
11666
11667 if test "$cf_result" = yes ; then
11668         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11669 elif test "x" != "x" ; then
11670         echo "$as_me:11670: checking checking for compatible value versus " >&5
11671 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11672         cat >conftest.$ac_ext <<_ACEOF
11673 #line 11673 "configure"
11674 #include "confdefs.h"
11675 #include <sys/types.h>
11676
11677 int
11678 main (void)
11679 {
11680
11681 #if _XOPEN_SOURCE_EXTENDED- < 0
11682 make an error
11683 #endif
11684   ;
11685   return 0;
11686 }
11687 _ACEOF
11688 rm -f conftest.$ac_objext
11689 if { (eval echo "$as_me:11689: \"$ac_compile\"") >&5
11690   (eval $ac_compile) 2>&5
11691   ac_status=$?
11692   echo "$as_me:11692: \$? = $ac_status" >&5
11693   (exit $ac_status); } &&
11694          { ac_try='test -s conftest.$ac_objext'
11695   { (eval echo "$as_me:11695: \"$ac_try\"") >&5
11696   (eval $ac_try) 2>&5
11697   ac_status=$?
11698   echo "$as_me:11698: \$? = $ac_status" >&5
11699   (exit $ac_status); }; }; then
11700   cf_result=yes
11701 else
11702   echo "$as_me: failed program was:" >&5
11703 cat conftest.$ac_ext >&5
11704 cf_result=no
11705 fi
11706 rm -f conftest.$ac_objext conftest.$ac_ext
11707         echo "$as_me:11707: result: $cf_result" >&5
11708 echo "${ECHO_T}$cf_result" >&6
11709         if test "$cf_result" = no ; then
11710                 # perhaps we can override it - try...
11711                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11712         fi
11713 fi
11714
11715 fi
11716
11717 echo "$as_me:11717: checking if wcwidth agrees graphics are single-width" >&5
11718 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11719 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11720   echo $ECHO_N "(cached) $ECHO_C" >&6
11721 else
11722
11723 cat >conftest.in <<CF_EOF
11724 -       VT100 symbols
11725 0x250c  upper left corner
11726 0x2514  lower left corner
11727 0x2510  upper right corner
11728 0x2518  lower right corner
11729 0x251c  tee pointing left
11730 0x2524  tee pointing right
11731 0x2534  tee pointing up
11732 0x252c  tee pointing down
11733 0x2500  horizontal line
11734 0x2502  vertical line
11735 0x253c  large plus or crossover
11736 0x23ba  scan line 1
11737 0x23bd  scan line 9
11738 0x25c6  diamond
11739 0x2592  checker board (stipple)
11740 0x00b0  degree symbol
11741 0x00b1  plus/minus
11742 0x00b7  bullet
11743 -       Teletype 5410v1 symbols
11744 0x2190  arrow pointing left
11745 0x2192  arrow pointing right
11746 0x2193  arrow pointing down
11747 0x2191  arrow pointing up
11748 0x2592  board of squares
11749 0x2603  lantern symbol
11750 0x25ae  solid square block
11751 -       these defaults were invented for ncurses
11752 0x23bb  scan line 3
11753 0x23bc  scan line 7
11754 0x2264  less-than-or-equal-to
11755 0x2265  greater-than-or-equal-to
11756 0x03c0  greek pi
11757 0x2260  not-equal
11758 0x00a3  pound-sterling symbol
11759 -       thick-line-drawing
11760 0x250f  upper left corner
11761 0x2517  lower left corner
11762 0x2513  upper right corner
11763 0x251b  lower right corner
11764 0x2523  tee pointing left
11765 0x252b  tee pointing right
11766 0x253b  tee pointing up
11767 0x2533  tee pointing down
11768 0x2501  horizontal line
11769 0x2503  vertical line
11770 0x254b  large plus or crossover
11771 -       double-line-drawing
11772 0x2554  upper left corner
11773 0x255a  lower left corner
11774 0x2557  upper right corner
11775 0x255d  lower right corner
11776 0x2563  tee pointing left
11777 0x2560  tee pointing right
11778 0x2569  tee pointing up
11779 0x2566  tee pointing down
11780 0x2550  horizontal line
11781 0x2551  vertical line
11782 0x256c  large plus or crossover
11783 CF_EOF
11784 if test "$cross_compiling" = yes; then
11785   cf_cv_wcwidth_graphics=unknown
11786 else
11787   cat >conftest.$ac_ext <<_ACEOF
11788 #line 11788 "configure"
11789 #include "confdefs.h"
11790
11791 #include <locale.h>
11792 #include <stdio.h>
11793 #include <wchar.h>
11794
11795 #define MY_LEN 80
11796
11797 int
11798 main(void)
11799 {
11800         FILE *fp;
11801         int value;
11802         char buffer[MY_LEN + 1];
11803         char notes[MY_LEN + 1];
11804         int totals = 0;
11805         int passed = 0;
11806
11807         if (setlocale(LC_ALL, "en_US.UTF8") ||
11808                 setlocale(LC_ALL, "en_US.UTF-8") ||
11809                 setlocale(LC_ALL, "en_US.utf8") ||
11810                 setlocale(LC_ALL, "en_US.utf-8")) {
11811                 if ((fp = fopen("conftest.in", "r")) != 0) {
11812                         while (fgets(buffer, MY_LEN, fp) != 0) {
11813                                 if (*buffer == '-') {
11814                                         fprintf(stderr, "\t%s", buffer);
11815                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11816                                         ++totals;
11817                                         if (wcwidth(value) == 1)
11818                                                 ++passed;
11819                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11820                                 } else {
11821                                         fprintf(stderr, "?\t%s", buffer);
11822                                 }
11823                         }
11824                 }
11825         }
11826         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11827         return (totals == passed) ? 0 : 1;
11828 }
11829
11830 _ACEOF
11831 rm -f conftest$ac_exeext
11832 if { (eval echo "$as_me:11832: \"$ac_link\"") >&5
11833   (eval $ac_link) 2>&5
11834   ac_status=$?
11835   echo "$as_me:11835: \$? = $ac_status" >&5
11836   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11837   { (eval echo "$as_me:11837: \"$ac_try\"") >&5
11838   (eval $ac_try) 2>&5
11839   ac_status=$?
11840   echo "$as_me:11840: \$? = $ac_status" >&5
11841   (exit $ac_status); }; }; then
11842   cf_cv_wcwidth_graphics=yes
11843 else
11844   echo "$as_me: program exited with status $ac_status" >&5
11845 echo "$as_me: failed program was:" >&5
11846 cat conftest.$ac_ext >&5
11847 cf_cv_wcwidth_graphics=no
11848 fi
11849 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11850 fi
11851
11852 fi
11853 echo "$as_me:11853: result: $cf_cv_wcwidth_graphics" >&5
11854 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11855
11856         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11857
11858         # with_overwrite=no
11859         NCURSES_CH_T=cchar_t
11860
11861 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11862 do
11863 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11864 echo "$as_me:11864: checking for $ac_func" >&5
11865 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11866 if eval "test \"\${$as_ac_var+set}\" = set"; then
11867   echo $ECHO_N "(cached) $ECHO_C" >&6
11868 else
11869   cat >conftest.$ac_ext <<_ACEOF
11870 #line 11870 "configure"
11871 #include "confdefs.h"
11872 #define $ac_func autoconf_temporary
11873 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11874 #undef $ac_func
11875
11876 #ifdef __cplusplus
11877 extern "C"
11878 #endif
11879
11880 /* We use char because int might match the return type of a gcc2
11881    builtin and then its argument prototype would still apply.  */
11882 char $ac_func (void);
11883
11884 int
11885 main (void)
11886 {
11887
11888 /* The GNU C library defines stubs for functions which it implements
11889     to always fail with ENOSYS.  Some functions are actually named
11890     something starting with __ and the normal name is an alias.  */
11891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11892 #error found stub for $ac_func
11893 #endif
11894
11895         return $ac_func ();
11896   ;
11897   return 0;
11898 }
11899 _ACEOF
11900 rm -f conftest.$ac_objext conftest$ac_exeext
11901 if { (eval echo "$as_me:11901: \"$ac_link\"") >&5
11902   (eval $ac_link) 2>&5
11903   ac_status=$?
11904   echo "$as_me:11904: \$? = $ac_status" >&5
11905   (exit $ac_status); } &&
11906          { ac_try='test -s conftest$ac_exeext'
11907   { (eval echo "$as_me:11907: \"$ac_try\"") >&5
11908   (eval $ac_try) 2>&5
11909   ac_status=$?
11910   echo "$as_me:11910: \$? = $ac_status" >&5
11911   (exit $ac_status); }; }; then
11912   eval "$as_ac_var=yes"
11913 else
11914   echo "$as_me: failed program was:" >&5
11915 cat conftest.$ac_ext >&5
11916 eval "$as_ac_var=no"
11917 fi
11918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11919 fi
11920 echo "$as_me:11920: result: `eval echo '${'$as_ac_var'}'`" >&5
11921 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11922 if test `eval echo '${'$as_ac_var'}'` = yes; then
11923   cat >>confdefs.h <<EOF
11924 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11925 EOF
11926
11927 fi
11928 done
11929
11930         if test "x$ac_cv_func_putwc" != xyes ; then
11931
11932 echo "$as_me:11932: checking for multibyte character support" >&5
11933 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11934 if test "${cf_cv_utf8_lib+set}" = set; then
11935   echo $ECHO_N "(cached) $ECHO_C" >&6
11936 else
11937
11938         cf_save_LIBS="$LIBS"
11939         cat >conftest.$ac_ext <<_ACEOF
11940 #line 11940 "configure"
11941 #include "confdefs.h"
11942
11943 #include <stdlib.h>
11944 int
11945 main (void)
11946 {
11947 putwc(0,0);
11948   ;
11949   return 0;
11950 }
11951 _ACEOF
11952 rm -f conftest.$ac_objext conftest$ac_exeext
11953 if { (eval echo "$as_me:11953: \"$ac_link\"") >&5
11954   (eval $ac_link) 2>&5
11955   ac_status=$?
11956   echo "$as_me:11956: \$? = $ac_status" >&5
11957   (exit $ac_status); } &&
11958          { ac_try='test -s conftest$ac_exeext'
11959   { (eval echo "$as_me:11959: \"$ac_try\"") >&5
11960   (eval $ac_try) 2>&5
11961   ac_status=$?
11962   echo "$as_me:11962: \$? = $ac_status" >&5
11963   (exit $ac_status); }; }; then
11964   cf_cv_utf8_lib=yes
11965 else
11966   echo "$as_me: failed program was:" >&5
11967 cat conftest.$ac_ext >&5
11968
11969 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11970 # will be set on completion of the AC_TRY_LINK below.
11971 cf_cv_header_path_utf8=
11972 cf_cv_library_path_utf8=
11973
11974 echo "${as_me:-configure}:11974: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11975
11976 cf_save_LIBS="$LIBS"
11977
11978 cat >conftest.$ac_ext <<_ACEOF
11979 #line 11979 "configure"
11980 #include "confdefs.h"
11981
11982 #include <libutf8.h>
11983 int
11984 main (void)
11985 {
11986 putwc(0,0);
11987   ;
11988   return 0;
11989 }
11990 _ACEOF
11991 rm -f conftest.$ac_objext conftest$ac_exeext
11992 if { (eval echo "$as_me:11992: \"$ac_link\"") >&5
11993   (eval $ac_link) 2>&5
11994   ac_status=$?
11995   echo "$as_me:11995: \$? = $ac_status" >&5
11996   (exit $ac_status); } &&
11997          { ac_try='test -s conftest$ac_exeext'
11998   { (eval echo "$as_me:11998: \"$ac_try\"") >&5
11999   (eval $ac_try) 2>&5
12000   ac_status=$?
12001   echo "$as_me:12001: \$? = $ac_status" >&5
12002   (exit $ac_status); }; }; then
12003
12004         cf_cv_find_linkage_utf8=yes
12005         cf_cv_header_path_utf8=/usr/include
12006         cf_cv_library_path_utf8=/usr/lib
12007
12008 else
12009   echo "$as_me: failed program was:" >&5
12010 cat conftest.$ac_ext >&5
12011
12012 LIBS="-lutf8  $cf_save_LIBS"
12013
12014 cat >conftest.$ac_ext <<_ACEOF
12015 #line 12015 "configure"
12016 #include "confdefs.h"
12017
12018 #include <libutf8.h>
12019 int
12020 main (void)
12021 {
12022 putwc(0,0);
12023   ;
12024   return 0;
12025 }
12026 _ACEOF
12027 rm -f conftest.$ac_objext conftest$ac_exeext
12028 if { (eval echo "$as_me:12028: \"$ac_link\"") >&5
12029   (eval $ac_link) 2>&5
12030   ac_status=$?
12031   echo "$as_me:12031: \$? = $ac_status" >&5
12032   (exit $ac_status); } &&
12033          { ac_try='test -s conftest$ac_exeext'
12034   { (eval echo "$as_me:12034: \"$ac_try\"") >&5
12035   (eval $ac_try) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit $ac_status); }; }; then
12039
12040         cf_cv_find_linkage_utf8=yes
12041         cf_cv_header_path_utf8=/usr/include
12042         cf_cv_library_path_utf8=/usr/lib
12043         cf_cv_library_file_utf8="-lutf8"
12044
12045 else
12046   echo "$as_me: failed program was:" >&5
12047 cat conftest.$ac_ext >&5
12048
12049         cf_cv_find_linkage_utf8=no
12050         LIBS="$cf_save_LIBS"
12051
12052         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12053
12054 echo "${as_me:-configure}:12054: testing find linkage for utf8 library ..." 1>&5
12055
12056 echo "${as_me:-configure}:12056: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12057
12058         cf_save_CPPFLAGS="$CPPFLAGS"
12059         cf_test_CPPFLAGS="$CPPFLAGS"
12060
12061 cf_search=
12062
12063 # collect the current set of include-directories from compiler flags
12064 cf_header_path_list=""
12065 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12066         for cf_header_path in $CPPFLAGS $CFLAGS
12067         do
12068                 case $cf_header_path in
12069                 (-I*)
12070                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12071
12072 test "x$cf_header_path" != "xNONE" && \
12073 test -d "$cf_header_path" && \
12074  {
12075         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12076         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
12077         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
12078         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12079         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
12080         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12081 }
12082
12083                         cf_header_path_list="$cf_header_path_list $cf_search"
12084                         ;;
12085                 esac
12086         done
12087 fi
12088
12089 # add the variations for the package we are looking for
12090
12091 cf_search=
12092
12093 test "x$prefix" != "xNONE" && \
12094 test -d "$prefix" && \
12095  {
12096         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12097         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
12098         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
12099         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
12100         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
12101         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12102 }
12103
12104 for cf_subdir_prefix in \
12105         /usr \
12106         /usr/local \
12107         /usr/pkg \
12108         /opt \
12109         /opt/local \
12110         $HOME
12111 do
12112
12113 test "x$cf_subdir_prefix" != "x$prefix" && \
12114 test -d "$cf_subdir_prefix" && \
12115 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12116         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12117         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
12118         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12119         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12120         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12121         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12122 }
12123
12124 done
12125
12126 test "$includedir" != NONE && \
12127 test "$includedir" != "/usr/include" && \
12128 test -d "$includedir" && {
12129         test -d $includedir &&    cf_search="$cf_search $includedir"
12130         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
12131 }
12132
12133 test "$oldincludedir" != NONE && \
12134 test "$oldincludedir" != "/usr/include" && \
12135 test -d "$oldincludedir" && {
12136         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
12137         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
12138 }
12139
12140 cf_search="$cf_search $cf_header_path_list"
12141
12142         for cf_cv_header_path_utf8 in $cf_search
12143         do
12144                 if test -d $cf_cv_header_path_utf8 ; then
12145                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12146
12147 echo "${as_me:-configure}:12147: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12148
12149                         CPPFLAGS="$cf_save_CPPFLAGS"
12150
12151         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12152         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12153
12154                         cat >conftest.$ac_ext <<_ACEOF
12155 #line 12155 "configure"
12156 #include "confdefs.h"
12157
12158 #include <libutf8.h>
12159 int
12160 main (void)
12161 {
12162 putwc(0,0);
12163   ;
12164   return 0;
12165 }
12166 _ACEOF
12167 rm -f conftest.$ac_objext
12168 if { (eval echo "$as_me:12168: \"$ac_compile\"") >&5
12169   (eval $ac_compile) 2>&5
12170   ac_status=$?
12171   echo "$as_me:12171: \$? = $ac_status" >&5
12172   (exit $ac_status); } &&
12173          { ac_try='test -s conftest.$ac_objext'
12174   { (eval echo "$as_me:12174: \"$ac_try\"") >&5
12175   (eval $ac_try) 2>&5
12176   ac_status=$?
12177   echo "$as_me:12177: \$? = $ac_status" >&5
12178   (exit $ac_status); }; }; then
12179
12180                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12181
12182 echo "${as_me:-configure}:12182: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12183
12184                                 cf_cv_find_linkage_utf8=maybe
12185                                 cf_test_CPPFLAGS="$CPPFLAGS"
12186                                 break
12187 else
12188   echo "$as_me: failed program was:" >&5
12189 cat conftest.$ac_ext >&5
12190
12191                                 CPPFLAGS="$cf_save_CPPFLAGS"
12192
12193 fi
12194 rm -f conftest.$ac_objext conftest.$ac_ext
12195                 fi
12196         done
12197
12198         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12199
12200 echo "${as_me:-configure}:12200: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12201
12202                 cf_save_LIBS="$LIBS"
12203                 cf_save_LDFLAGS="$LDFLAGS"
12204
12205                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12206
12207 cf_search=
12208 cf_library_path_list=""
12209 if test -n "${LDFLAGS}${LIBS}" ; then
12210         for cf_library_path in $LDFLAGS $LIBS
12211         do
12212                 case $cf_library_path in
12213                 (-L*)
12214                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12215
12216 test "x$cf_library_path" != "xNONE" && \
12217 test -d "$cf_library_path" && \
12218  {
12219         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12220         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12221         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12222         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12223         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12224         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12225 }
12226
12227                         cf_library_path_list="$cf_library_path_list $cf_search"
12228                         ;;
12229                 esac
12230         done
12231 fi
12232
12233 cf_search=
12234
12235 test "x$prefix" != "xNONE" && \
12236 test -d "$prefix" && \
12237  {
12238         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12239         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12240         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12241         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12242         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12243         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12244 }
12245
12246 for cf_subdir_prefix in \
12247         /usr \
12248         /usr/local \
12249         /usr/pkg \
12250         /opt \
12251         /opt/local \
12252         $HOME
12253 do
12254
12255 test "x$cf_subdir_prefix" != "x$prefix" && \
12256 test -d "$cf_subdir_prefix" && \
12257 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12258         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12259         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12260         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12261         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12262         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12263         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12264 }
12265
12266 done
12267
12268 cf_search="$cf_library_path_list $cf_search"
12269
12270                         for cf_cv_library_path_utf8 in $cf_search
12271                         do
12272                                 if test -d $cf_cv_library_path_utf8 ; then
12273                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12274
12275 echo "${as_me:-configure}:12275: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12276
12277                                         CPPFLAGS="$cf_test_CPPFLAGS"
12278                                         LIBS="-lutf8  $cf_save_LIBS"
12279                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12280                                         cat >conftest.$ac_ext <<_ACEOF
12281 #line 12281 "configure"
12282 #include "confdefs.h"
12283
12284 #include <libutf8.h>
12285 int
12286 main (void)
12287 {
12288 putwc(0,0);
12289   ;
12290   return 0;
12291 }
12292 _ACEOF
12293 rm -f conftest.$ac_objext conftest$ac_exeext
12294 if { (eval echo "$as_me:12294: \"$ac_link\"") >&5
12295   (eval $ac_link) 2>&5
12296   ac_status=$?
12297   echo "$as_me:12297: \$? = $ac_status" >&5
12298   (exit $ac_status); } &&
12299          { ac_try='test -s conftest$ac_exeext'
12300   { (eval echo "$as_me:12300: \"$ac_try\"") >&5
12301   (eval $ac_try) 2>&5
12302   ac_status=$?
12303   echo "$as_me:12303: \$? = $ac_status" >&5
12304   (exit $ac_status); }; }; then
12305
12306                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12307
12308 echo "${as_me:-configure}:12308: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12309
12310                                         cf_cv_find_linkage_utf8=yes
12311                                         cf_cv_library_file_utf8="-lutf8"
12312                                         break
12313 else
12314   echo "$as_me: failed program was:" >&5
12315 cat conftest.$ac_ext >&5
12316
12317                                         CPPFLAGS="$cf_save_CPPFLAGS"
12318                                         LIBS="$cf_save_LIBS"
12319                                         LDFLAGS="$cf_save_LDFLAGS"
12320
12321 fi
12322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12323                                 fi
12324                         done
12325                         CPPFLAGS="$cf_save_CPPFLAGS"
12326                         LDFLAGS="$cf_save_LDFLAGS"
12327                 fi
12328
12329         else
12330                 cf_cv_find_linkage_utf8=no
12331         fi
12332
12333 fi
12334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12335
12336 fi
12337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12338
12339 LIBS="$cf_save_LIBS"
12340
12341 if test "$cf_cv_find_linkage_utf8" = yes ; then
12342 cf_cv_utf8_lib=add-on
12343 else
12344 cf_cv_utf8_lib=no
12345 fi
12346
12347 fi
12348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12349 fi
12350 echo "$as_me:12350: result: $cf_cv_utf8_lib" >&5
12351 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12352
12353 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12354 # ncurses/ncursesw:
12355 if test "$cf_cv_utf8_lib" = "add-on" ; then
12356
12357 cat >>confdefs.h <<\EOF
12358 #define HAVE_LIBUTF8_H 1
12359 EOF
12360
12361 if test -n "$cf_cv_header_path_utf8" ; then
12362   for cf_add_incdir in $cf_cv_header_path_utf8
12363   do
12364         while test $cf_add_incdir != /usr/include
12365         do
12366           if test -d $cf_add_incdir
12367           then
12368                 cf_have_incdir=no
12369                 if test -n "$CFLAGS$CPPFLAGS" ; then
12370                   # a loop is needed to ensure we can add subdirs of existing dirs
12371                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12372                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12373                           cf_have_incdir=yes; break
12374                         fi
12375                   done
12376                 fi
12377
12378                 if test "$cf_have_incdir" = no ; then
12379                   if test "$cf_add_incdir" = /usr/local/include ; then
12380                         if test "$GCC" = yes
12381                         then
12382                           cf_save_CPPFLAGS=$CPPFLAGS
12383
12384         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12385         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12386
12387                           cat >conftest.$ac_ext <<_ACEOF
12388 #line 12388 "configure"
12389 #include "confdefs.h"
12390 #include <stdio.h>
12391 int
12392 main (void)
12393 {
12394 printf("Hello")
12395   ;
12396   return 0;
12397 }
12398 _ACEOF
12399 rm -f conftest.$ac_objext
12400 if { (eval echo "$as_me:12400: \"$ac_compile\"") >&5
12401   (eval $ac_compile) 2>&5
12402   ac_status=$?
12403   echo "$as_me:12403: \$? = $ac_status" >&5
12404   (exit $ac_status); } &&
12405          { ac_try='test -s conftest.$ac_objext'
12406   { (eval echo "$as_me:12406: \"$ac_try\"") >&5
12407   (eval $ac_try) 2>&5
12408   ac_status=$?
12409   echo "$as_me:12409: \$? = $ac_status" >&5
12410   (exit $ac_status); }; }; then
12411   :
12412 else
12413   echo "$as_me: failed program was:" >&5
12414 cat conftest.$ac_ext >&5
12415 cf_have_incdir=yes
12416 fi
12417 rm -f conftest.$ac_objext conftest.$ac_ext
12418                           CPPFLAGS=$cf_save_CPPFLAGS
12419                         fi
12420                   fi
12421                 fi
12422
12423                 if test "$cf_have_incdir" = no ; then
12424                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12425
12426 echo "${as_me:-configure}:12426: testing adding $cf_add_incdir to include-path ..." 1>&5
12427
12428                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12429
12430                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12431                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12432                   cf_add_incdir="$cf_top_incdir"
12433                 else
12434                   break
12435                 fi
12436           else
12437                 break
12438           fi
12439         done
12440   done
12441 fi
12442
12443 if test -n "$cf_cv_library_path_utf8" ; then
12444         for cf_add_libdir in $cf_cv_library_path_utf8
12445         do
12446                 if test $cf_add_libdir = /usr/lib ; then
12447                         :
12448                 elif test -d $cf_add_libdir
12449                 then
12450                         cf_have_libdir=no
12451                         if test -n "$LDFLAGS$LIBS" ; then
12452                                 # a loop is needed to ensure we can add subdirs of existing dirs
12453                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12454                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12455                                                 cf_have_libdir=yes; break
12456                                         fi
12457                                 done
12458                         fi
12459                         if test "$cf_have_libdir" = no ; then
12460                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12461
12462 echo "${as_me:-configure}:12462: testing adding $cf_add_libdir to library-path ..." 1>&5
12463
12464                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12465                         fi
12466                 fi
12467         done
12468 fi
12469
12470 cf_add_libs="$LIBS"
12471 # reverse order
12472 cf_add_0lib=
12473 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12474 # filter duplicates
12475 for cf_add_1lib in $cf_add_0lib; do
12476         for cf_add_2lib in $cf_add_libs; do
12477                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12478                         cf_add_1lib=
12479                         break
12480                 fi
12481         done
12482         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12483 done
12484 LIBS="$cf_add_libs"
12485
12486 fi
12487
12488                 if test "$cf_cv_utf8_lib" != no ; then
12489                         NCURSES_LIBUTF8=1
12490                 fi
12491         fi
12492
12493 # This is needed on Tru64 5.0 to declare mbstate_t
12494 echo "$as_me:12494: checking if we must include wchar.h to declare mbstate_t" >&5
12495 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12496 if test "${cf_cv_mbstate_t+set}" = set; then
12497   echo $ECHO_N "(cached) $ECHO_C" >&6
12498 else
12499
12500 cat >conftest.$ac_ext <<_ACEOF
12501 #line 12501 "configure"
12502 #include "confdefs.h"
12503
12504 #include <stdlib.h>
12505 #include <stdarg.h>
12506 #include <stdio.h>
12507 #ifdef HAVE_LIBUTF8_H
12508 #include <libutf8.h>
12509 #endif
12510 int
12511 main (void)
12512 {
12513 mbstate_t state
12514   ;
12515   return 0;
12516 }
12517 _ACEOF
12518 rm -f conftest.$ac_objext
12519 if { (eval echo "$as_me:12519: \"$ac_compile\"") >&5
12520   (eval $ac_compile) 2>&5
12521   ac_status=$?
12522   echo "$as_me:12522: \$? = $ac_status" >&5
12523   (exit $ac_status); } &&
12524          { ac_try='test -s conftest.$ac_objext'
12525   { (eval echo "$as_me:12525: \"$ac_try\"") >&5
12526   (eval $ac_try) 2>&5
12527   ac_status=$?
12528   echo "$as_me:12528: \$? = $ac_status" >&5
12529   (exit $ac_status); }; }; then
12530   cf_cv_mbstate_t=no
12531 else
12532   echo "$as_me: failed program was:" >&5
12533 cat conftest.$ac_ext >&5
12534 cat >conftest.$ac_ext <<_ACEOF
12535 #line 12535 "configure"
12536 #include "confdefs.h"
12537
12538 #include <stdlib.h>
12539 #include <stdarg.h>
12540 #include <stdio.h>
12541 #include <wchar.h>
12542 #ifdef HAVE_LIBUTF8_H
12543 #include <libutf8.h>
12544 #endif
12545 int
12546 main (void)
12547 {
12548 mbstate_t value
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_mbstate_t=yes
12566 else
12567   echo "$as_me: failed program was:" >&5
12568 cat conftest.$ac_ext >&5
12569 cf_cv_mbstate_t=unknown
12570 fi
12571 rm -f conftest.$ac_objext conftest.$ac_ext
12572 fi
12573 rm -f conftest.$ac_objext conftest.$ac_ext
12574 fi
12575 echo "$as_me:12575: result: $cf_cv_mbstate_t" >&5
12576 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12577
12578 if test "$cf_cv_mbstate_t" = yes ; then
12579
12580 cat >>confdefs.h <<\EOF
12581 #define NEED_WCHAR_H 1
12582 EOF
12583
12584         NEED_WCHAR_H=1
12585 fi
12586
12587 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12588 if test "$cf_cv_mbstate_t" = unknown ; then
12589         NCURSES_MBSTATE_T=1
12590 fi
12591
12592 # This is needed on Tru64 5.0 to declare wchar_t
12593 echo "$as_me:12593: checking if we must include wchar.h to declare wchar_t" >&5
12594 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12595 if test "${cf_cv_wchar_t+set}" = set; then
12596   echo $ECHO_N "(cached) $ECHO_C" >&6
12597 else
12598
12599 cat >conftest.$ac_ext <<_ACEOF
12600 #line 12600 "configure"
12601 #include "confdefs.h"
12602
12603 #include <stdlib.h>
12604 #include <stdarg.h>
12605 #include <stdio.h>
12606 #ifdef HAVE_LIBUTF8_H
12607 #include <libutf8.h>
12608 #endif
12609 int
12610 main (void)
12611 {
12612 wchar_t state
12613   ;
12614   return 0;
12615 }
12616 _ACEOF
12617 rm -f conftest.$ac_objext
12618 if { (eval echo "$as_me:12618: \"$ac_compile\"") >&5
12619   (eval $ac_compile) 2>&5
12620   ac_status=$?
12621   echo "$as_me:12621: \$? = $ac_status" >&5
12622   (exit $ac_status); } &&
12623          { ac_try='test -s conftest.$ac_objext'
12624   { (eval echo "$as_me:12624: \"$ac_try\"") >&5
12625   (eval $ac_try) 2>&5
12626   ac_status=$?
12627   echo "$as_me:12627: \$? = $ac_status" >&5
12628   (exit $ac_status); }; }; then
12629   cf_cv_wchar_t=no
12630 else
12631   echo "$as_me: failed program was:" >&5
12632 cat conftest.$ac_ext >&5
12633 cat >conftest.$ac_ext <<_ACEOF
12634 #line 12634 "configure"
12635 #include "confdefs.h"
12636
12637 #include <stdlib.h>
12638 #include <stdarg.h>
12639 #include <stdio.h>
12640 #include <wchar.h>
12641 #ifdef HAVE_LIBUTF8_H
12642 #include <libutf8.h>
12643 #endif
12644 int
12645 main (void)
12646 {
12647 wchar_t value
12648   ;
12649   return 0;
12650 }
12651 _ACEOF
12652 rm -f conftest.$ac_objext
12653 if { (eval echo "$as_me:12653: \"$ac_compile\"") >&5
12654   (eval $ac_compile) 2>&5
12655   ac_status=$?
12656   echo "$as_me:12656: \$? = $ac_status" >&5
12657   (exit $ac_status); } &&
12658          { ac_try='test -s conftest.$ac_objext'
12659   { (eval echo "$as_me:12659: \"$ac_try\"") >&5
12660   (eval $ac_try) 2>&5
12661   ac_status=$?
12662   echo "$as_me:12662: \$? = $ac_status" >&5
12663   (exit $ac_status); }; }; then
12664   cf_cv_wchar_t=yes
12665 else
12666   echo "$as_me: failed program was:" >&5
12667 cat conftest.$ac_ext >&5
12668 cf_cv_wchar_t=unknown
12669 fi
12670 rm -f conftest.$ac_objext conftest.$ac_ext
12671 fi
12672 rm -f conftest.$ac_objext conftest.$ac_ext
12673 fi
12674 echo "$as_me:12674: result: $cf_cv_wchar_t" >&5
12675 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12676
12677 if test "$cf_cv_wchar_t" = yes ; then
12678
12679 cat >>confdefs.h <<\EOF
12680 #define NEED_WCHAR_H 1
12681 EOF
12682
12683         NEED_WCHAR_H=1
12684 fi
12685
12686 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12687 if test "$cf_cv_wchar_t" = unknown ; then
12688         NCURSES_WCHAR_T=1
12689 fi
12690
12691 # if we find wchar_t in either place, use substitution to provide a fallback.
12692 if test "$cf_cv_wchar_t" != unknown ; then
12693         NCURSES_OK_WCHAR_T=1
12694 fi
12695
12696 # This is needed on Tru64 5.0 to declare wint_t
12697 echo "$as_me:12697: checking if we must include wchar.h to declare wint_t" >&5
12698 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12699 if test "${cf_cv_wint_t+set}" = set; then
12700   echo $ECHO_N "(cached) $ECHO_C" >&6
12701 else
12702
12703 cat >conftest.$ac_ext <<_ACEOF
12704 #line 12704 "configure"
12705 #include "confdefs.h"
12706
12707 #include <stdlib.h>
12708 #include <stdarg.h>
12709 #include <stdio.h>
12710 #ifdef HAVE_LIBUTF8_H
12711 #include <libutf8.h>
12712 #endif
12713 int
12714 main (void)
12715 {
12716 wint_t state
12717   ;
12718   return 0;
12719 }
12720 _ACEOF
12721 rm -f conftest.$ac_objext
12722 if { (eval echo "$as_me:12722: \"$ac_compile\"") >&5
12723   (eval $ac_compile) 2>&5
12724   ac_status=$?
12725   echo "$as_me:12725: \$? = $ac_status" >&5
12726   (exit $ac_status); } &&
12727          { ac_try='test -s conftest.$ac_objext'
12728   { (eval echo "$as_me:12728: \"$ac_try\"") >&5
12729   (eval $ac_try) 2>&5
12730   ac_status=$?
12731   echo "$as_me:12731: \$? = $ac_status" >&5
12732   (exit $ac_status); }; }; then
12733   cf_cv_wint_t=no
12734 else
12735   echo "$as_me: failed program was:" >&5
12736 cat conftest.$ac_ext >&5
12737 cat >conftest.$ac_ext <<_ACEOF
12738 #line 12738 "configure"
12739 #include "confdefs.h"
12740
12741 #include <stdlib.h>
12742 #include <stdarg.h>
12743 #include <stdio.h>
12744 #include <wchar.h>
12745 #ifdef HAVE_LIBUTF8_H
12746 #include <libutf8.h>
12747 #endif
12748 int
12749 main (void)
12750 {
12751 wint_t value
12752   ;
12753   return 0;
12754 }
12755 _ACEOF
12756 rm -f conftest.$ac_objext
12757 if { (eval echo "$as_me:12757: \"$ac_compile\"") >&5
12758   (eval $ac_compile) 2>&5
12759   ac_status=$?
12760   echo "$as_me:12760: \$? = $ac_status" >&5
12761   (exit $ac_status); } &&
12762          { ac_try='test -s conftest.$ac_objext'
12763   { (eval echo "$as_me:12763: \"$ac_try\"") >&5
12764   (eval $ac_try) 2>&5
12765   ac_status=$?
12766   echo "$as_me:12766: \$? = $ac_status" >&5
12767   (exit $ac_status); }; }; then
12768   cf_cv_wint_t=yes
12769 else
12770   echo "$as_me: failed program was:" >&5
12771 cat conftest.$ac_ext >&5
12772 cf_cv_wint_t=unknown
12773 fi
12774 rm -f conftest.$ac_objext conftest.$ac_ext
12775 fi
12776 rm -f conftest.$ac_objext conftest.$ac_ext
12777 fi
12778 echo "$as_me:12778: result: $cf_cv_wint_t" >&5
12779 echo "${ECHO_T}$cf_cv_wint_t" >&6
12780
12781 if test "$cf_cv_wint_t" = yes ; then
12782
12783 cat >>confdefs.h <<\EOF
12784 #define NEED_WCHAR_H 1
12785 EOF
12786
12787         NEED_WCHAR_H=1
12788 fi
12789
12790 # if we do not find wint_t in either place, use substitution to provide a fallback.
12791 if test "$cf_cv_wint_t" = unknown ; then
12792         NCURSES_WINT_T=1
12793 fi
12794
12795 # if we find wint_t in either place, use substitution to provide a fallback.
12796 if test "$cf_cv_wint_t" != unknown ; then
12797         NCURSES_OK_WINT_T=1
12798 fi
12799
12800         if test "$NCURSES_MBSTATE_T" != 0; then
12801
12802 cat >>confdefs.h <<\EOF
12803 #define NEED_MBSTATE_T_DEF 1
12804 EOF
12805
12806         fi
12807 fi
12808
12809 ###   use option --disable-lp64 to allow long chtype
12810 echo "$as_me:12810: checking whether to enable _LP64 definition in curses.h" >&5
12811 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12812
12813 # Check whether --enable-lp64 or --disable-lp64 was given.
12814 if test "${enable_lp64+set}" = set; then
12815   enableval="$enable_lp64"
12816   with_lp64=$enableval
12817 else
12818   with_lp64=$cf_dft_with_lp64
12819 fi;
12820 echo "$as_me:12820: result: $with_lp64" >&5
12821 echo "${ECHO_T}$with_lp64" >&6
12822
12823 if test "x$with_lp64" = xyes ; then
12824         cf_cv_enable_lp64=1
12825 else
12826         cf_cv_enable_lp64=0
12827 fi
12828
12829 # Check whether --enable-largefile or --disable-largefile was given.
12830 if test "${enable_largefile+set}" = set; then
12831   enableval="$enable_largefile"
12832
12833 fi;
12834 if test "$enable_largefile" != no; then
12835
12836   echo "$as_me:12836: checking for special C compiler options needed for large files" >&5
12837 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12838 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12839   echo $ECHO_N "(cached) $ECHO_C" >&6
12840 else
12841   ac_cv_sys_largefile_CC=no
12842      if test "$GCC" != yes; then
12843        ac_save_CC=$CC
12844        while :; do
12845          # IRIX 6.2 and later do not support large files by default,
12846          # so use the C compiler's -n32 option if that helps.
12847          cat >conftest.$ac_ext <<_ACEOF
12848 #line 12848 "configure"
12849 #include "confdefs.h"
12850 #include <sys/types.h>
12851  /* Check that off_t can represent 2**63 - 1 correctly.
12852     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12853     since some C++ compilers masquerading as C compilers
12854     incorrectly reject 9223372036854775807.  */
12855 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12856   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12857                        && LARGE_OFF_T % 2147483647 == 1)
12858                       ? 1 : -1];
12859 int
12860 main (void)
12861 {
12862
12863   ;
12864   return 0;
12865 }
12866 _ACEOF
12867          rm -f conftest.$ac_objext
12868 if { (eval echo "$as_me:12868: \"$ac_compile\"") >&5
12869   (eval $ac_compile) 2>&5
12870   ac_status=$?
12871   echo "$as_me:12871: \$? = $ac_status" >&5
12872   (exit $ac_status); } &&
12873          { ac_try='test -s conftest.$ac_objext'
12874   { (eval echo "$as_me:12874: \"$ac_try\"") >&5
12875   (eval $ac_try) 2>&5
12876   ac_status=$?
12877   echo "$as_me:12877: \$? = $ac_status" >&5
12878   (exit $ac_status); }; }; then
12879   break
12880 else
12881   echo "$as_me: failed program was:" >&5
12882 cat conftest.$ac_ext >&5
12883 fi
12884 rm -f conftest.$ac_objext
12885          CC="$CC -n32"
12886          rm -f conftest.$ac_objext
12887 if { (eval echo "$as_me:12887: \"$ac_compile\"") >&5
12888   (eval $ac_compile) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); } &&
12892          { ac_try='test -s conftest.$ac_objext'
12893   { (eval echo "$as_me:12893: \"$ac_try\"") >&5
12894   (eval $ac_try) 2>&5
12895   ac_status=$?
12896   echo "$as_me:12896: \$? = $ac_status" >&5
12897   (exit $ac_status); }; }; then
12898   ac_cv_sys_largefile_CC=' -n32'; break
12899 else
12900   echo "$as_me: failed program was:" >&5
12901 cat conftest.$ac_ext >&5
12902 fi
12903 rm -f conftest.$ac_objext
12904          break
12905        done
12906        CC=$ac_save_CC
12907        rm -f conftest.$ac_ext
12908     fi
12909 fi
12910 echo "$as_me:12910: result: $ac_cv_sys_largefile_CC" >&5
12911 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12912   if test "$ac_cv_sys_largefile_CC" != no; then
12913     CC=$CC$ac_cv_sys_largefile_CC
12914   fi
12915
12916   echo "$as_me:12916: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12917 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12918 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12919   echo $ECHO_N "(cached) $ECHO_C" >&6
12920 else
12921   while :; do
12922   ac_cv_sys_file_offset_bits=no
12923   cat >conftest.$ac_ext <<_ACEOF
12924 #line 12924 "configure"
12925 #include "confdefs.h"
12926 #include <sys/types.h>
12927  /* Check that off_t can represent 2**63 - 1 correctly.
12928     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12929     since some C++ compilers masquerading as C compilers
12930     incorrectly reject 9223372036854775807.  */
12931 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12932   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12933                        && LARGE_OFF_T % 2147483647 == 1)
12934                       ? 1 : -1];
12935 int
12936 main (void)
12937 {
12938
12939   ;
12940   return 0;
12941 }
12942 _ACEOF
12943 rm -f conftest.$ac_objext
12944 if { (eval echo "$as_me:12944: \"$ac_compile\"") >&5
12945   (eval $ac_compile) 2>&5
12946   ac_status=$?
12947   echo "$as_me:12947: \$? = $ac_status" >&5
12948   (exit $ac_status); } &&
12949          { ac_try='test -s conftest.$ac_objext'
12950   { (eval echo "$as_me:12950: \"$ac_try\"") >&5
12951   (eval $ac_try) 2>&5
12952   ac_status=$?
12953   echo "$as_me:12953: \$? = $ac_status" >&5
12954   (exit $ac_status); }; }; then
12955   break
12956 else
12957   echo "$as_me: failed program was:" >&5
12958 cat conftest.$ac_ext >&5
12959 fi
12960 rm -f conftest.$ac_objext conftest.$ac_ext
12961   cat >conftest.$ac_ext <<_ACEOF
12962 #line 12962 "configure"
12963 #include "confdefs.h"
12964 #define _FILE_OFFSET_BITS 64
12965 #include <sys/types.h>
12966  /* Check that off_t can represent 2**63 - 1 correctly.
12967     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12968     since some C++ compilers masquerading as C compilers
12969     incorrectly reject 9223372036854775807.  */
12970 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12971   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12972                        && LARGE_OFF_T % 2147483647 == 1)
12973                       ? 1 : -1];
12974 int
12975 main (void)
12976 {
12977
12978   ;
12979   return 0;
12980 }
12981 _ACEOF
12982 rm -f conftest.$ac_objext
12983 if { (eval echo "$as_me:12983: \"$ac_compile\"") >&5
12984   (eval $ac_compile) 2>&5
12985   ac_status=$?
12986   echo "$as_me:12986: \$? = $ac_status" >&5
12987   (exit $ac_status); } &&
12988          { ac_try='test -s conftest.$ac_objext'
12989   { (eval echo "$as_me:12989: \"$ac_try\"") >&5
12990   (eval $ac_try) 2>&5
12991   ac_status=$?
12992   echo "$as_me:12992: \$? = $ac_status" >&5
12993   (exit $ac_status); }; }; then
12994   ac_cv_sys_file_offset_bits=64; break
12995 else
12996   echo "$as_me: failed program was:" >&5
12997 cat conftest.$ac_ext >&5
12998 fi
12999 rm -f conftest.$ac_objext conftest.$ac_ext
13000   break
13001 done
13002 fi
13003 echo "$as_me:13003: result: $ac_cv_sys_file_offset_bits" >&5
13004 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13005 if test "$ac_cv_sys_file_offset_bits" != no; then
13006
13007 cat >>confdefs.h <<EOF
13008 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13009 EOF
13010
13011 fi
13012 rm -rf conftest*
13013   echo "$as_me:13013: checking for _LARGE_FILES value needed for large files" >&5
13014 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13015 if test "${ac_cv_sys_large_files+set}" = set; then
13016   echo $ECHO_N "(cached) $ECHO_C" >&6
13017 else
13018   while :; do
13019   ac_cv_sys_large_files=no
13020   cat >conftest.$ac_ext <<_ACEOF
13021 #line 13021 "configure"
13022 #include "confdefs.h"
13023 #include <sys/types.h>
13024  /* Check that off_t can represent 2**63 - 1 correctly.
13025     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13026     since some C++ compilers masquerading as C compilers
13027     incorrectly reject 9223372036854775807.  */
13028 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13029   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13030                        && LARGE_OFF_T % 2147483647 == 1)
13031                       ? 1 : -1];
13032 int
13033 main (void)
13034 {
13035
13036   ;
13037   return 0;
13038 }
13039 _ACEOF
13040 rm -f conftest.$ac_objext
13041 if { (eval echo "$as_me:13041: \"$ac_compile\"") >&5
13042   (eval $ac_compile) 2>&5
13043   ac_status=$?
13044   echo "$as_me:13044: \$? = $ac_status" >&5
13045   (exit $ac_status); } &&
13046          { ac_try='test -s conftest.$ac_objext'
13047   { (eval echo "$as_me:13047: \"$ac_try\"") >&5
13048   (eval $ac_try) 2>&5
13049   ac_status=$?
13050   echo "$as_me:13050: \$? = $ac_status" >&5
13051   (exit $ac_status); }; }; then
13052   break
13053 else
13054   echo "$as_me: failed program was:" >&5
13055 cat conftest.$ac_ext >&5
13056 fi
13057 rm -f conftest.$ac_objext conftest.$ac_ext
13058   cat >conftest.$ac_ext <<_ACEOF
13059 #line 13059 "configure"
13060 #include "confdefs.h"
13061 #define _LARGE_FILES 1
13062 #include <sys/types.h>
13063  /* Check that off_t can represent 2**63 - 1 correctly.
13064     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13065     since some C++ compilers masquerading as C compilers
13066     incorrectly reject 9223372036854775807.  */
13067 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13068   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13069                        && LARGE_OFF_T % 2147483647 == 1)
13070                       ? 1 : -1];
13071 int
13072 main (void)
13073 {
13074
13075   ;
13076   return 0;
13077 }
13078 _ACEOF
13079 rm -f conftest.$ac_objext
13080 if { (eval echo "$as_me:13080: \"$ac_compile\"") >&5
13081   (eval $ac_compile) 2>&5
13082   ac_status=$?
13083   echo "$as_me:13083: \$? = $ac_status" >&5
13084   (exit $ac_status); } &&
13085          { ac_try='test -s conftest.$ac_objext'
13086   { (eval echo "$as_me:13086: \"$ac_try\"") >&5
13087   (eval $ac_try) 2>&5
13088   ac_status=$?
13089   echo "$as_me:13089: \$? = $ac_status" >&5
13090   (exit $ac_status); }; }; then
13091   ac_cv_sys_large_files=1; break
13092 else
13093   echo "$as_me: failed program was:" >&5
13094 cat conftest.$ac_ext >&5
13095 fi
13096 rm -f conftest.$ac_objext conftest.$ac_ext
13097   break
13098 done
13099 fi
13100 echo "$as_me:13100: result: $ac_cv_sys_large_files" >&5
13101 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13102 if test "$ac_cv_sys_large_files" != no; then
13103
13104 cat >>confdefs.h <<EOF
13105 #define _LARGE_FILES $ac_cv_sys_large_files
13106 EOF
13107
13108 fi
13109 rm -rf conftest*
13110 fi
13111
13112         if test "$enable_largefile" != no ; then
13113         echo "$as_me:13113: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13114 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13115 if test "${ac_cv_sys_largefile_source+set}" = set; then
13116   echo $ECHO_N "(cached) $ECHO_C" >&6
13117 else
13118   while :; do
13119   ac_cv_sys_largefile_source=no
13120   cat >conftest.$ac_ext <<_ACEOF
13121 #line 13121 "configure"
13122 #include "confdefs.h"
13123 #include <stdio.h>
13124 int
13125 main (void)
13126 {
13127 return !fseeko;
13128   ;
13129   return 0;
13130 }
13131 _ACEOF
13132 rm -f conftest.$ac_objext
13133 if { (eval echo "$as_me:13133: \"$ac_compile\"") >&5
13134   (eval $ac_compile) 2>&5
13135   ac_status=$?
13136   echo "$as_me:13136: \$? = $ac_status" >&5
13137   (exit $ac_status); } &&
13138          { ac_try='test -s conftest.$ac_objext'
13139   { (eval echo "$as_me:13139: \"$ac_try\"") >&5
13140   (eval $ac_try) 2>&5
13141   ac_status=$?
13142   echo "$as_me:13142: \$? = $ac_status" >&5
13143   (exit $ac_status); }; }; then
13144   break
13145 else
13146   echo "$as_me: failed program was:" >&5
13147 cat conftest.$ac_ext >&5
13148 fi
13149 rm -f conftest.$ac_objext conftest.$ac_ext
13150   cat >conftest.$ac_ext <<_ACEOF
13151 #line 13151 "configure"
13152 #include "confdefs.h"
13153 #define _LARGEFILE_SOURCE 1
13154 #include <stdio.h>
13155 int
13156 main (void)
13157 {
13158 return !fseeko;
13159   ;
13160   return 0;
13161 }
13162 _ACEOF
13163 rm -f conftest.$ac_objext
13164 if { (eval echo "$as_me:13164: \"$ac_compile\"") >&5
13165   (eval $ac_compile) 2>&5
13166   ac_status=$?
13167   echo "$as_me:13167: \$? = $ac_status" >&5
13168   (exit $ac_status); } &&
13169          { ac_try='test -s conftest.$ac_objext'
13170   { (eval echo "$as_me:13170: \"$ac_try\"") >&5
13171   (eval $ac_try) 2>&5
13172   ac_status=$?
13173   echo "$as_me:13173: \$? = $ac_status" >&5
13174   (exit $ac_status); }; }; then
13175   ac_cv_sys_largefile_source=1; break
13176 else
13177   echo "$as_me: failed program was:" >&5
13178 cat conftest.$ac_ext >&5
13179 fi
13180 rm -f conftest.$ac_objext conftest.$ac_ext
13181   break
13182 done
13183 fi
13184 echo "$as_me:13184: result: $ac_cv_sys_largefile_source" >&5
13185 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13186 if test "$ac_cv_sys_largefile_source" != no; then
13187
13188 cat >>confdefs.h <<EOF
13189 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13190 EOF
13191
13192 fi
13193 rm -rf conftest*
13194
13195 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13196 # in glibc 2.1.3, but that breaks too many other things.
13197 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13198 echo "$as_me:13198: checking for fseeko" >&5
13199 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13200 if test "${ac_cv_func_fseeko+set}" = set; then
13201   echo $ECHO_N "(cached) $ECHO_C" >&6
13202 else
13203   cat >conftest.$ac_ext <<_ACEOF
13204 #line 13204 "configure"
13205 #include "confdefs.h"
13206 #include <stdio.h>
13207 int
13208 main (void)
13209 {
13210 return fseeko && fseeko (stdin, 0, 0);
13211   ;
13212   return 0;
13213 }
13214 _ACEOF
13215 rm -f conftest.$ac_objext conftest$ac_exeext
13216 if { (eval echo "$as_me:13216: \"$ac_link\"") >&5
13217   (eval $ac_link) 2>&5
13218   ac_status=$?
13219   echo "$as_me:13219: \$? = $ac_status" >&5
13220   (exit $ac_status); } &&
13221          { ac_try='test -s conftest$ac_exeext'
13222   { (eval echo "$as_me:13222: \"$ac_try\"") >&5
13223   (eval $ac_try) 2>&5
13224   ac_status=$?
13225   echo "$as_me:13225: \$? = $ac_status" >&5
13226   (exit $ac_status); }; }; then
13227   ac_cv_func_fseeko=yes
13228 else
13229   echo "$as_me: failed program was:" >&5
13230 cat conftest.$ac_ext >&5
13231 ac_cv_func_fseeko=no
13232 fi
13233 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13234 fi
13235 echo "$as_me:13235: result: $ac_cv_func_fseeko" >&5
13236 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13237 if test $ac_cv_func_fseeko = yes; then
13238
13239 cat >>confdefs.h <<\EOF
13240 #define HAVE_FSEEKO 1
13241 EOF
13242
13243 fi
13244
13245         # Normally we would collect these definitions in the config.h,
13246         # but (like _XOPEN_SOURCE), some environments rely on having these
13247         # defined before any of the system headers are included.  Another
13248         # case comes up with C++, e.g., on AIX the compiler compiles the
13249         # header files by themselves before looking at the body files it is
13250         # told to compile.  For ncurses, those header files do not include
13251         # the config.h
13252         if test "$ac_cv_sys_large_files" != no
13253         then
13254
13255         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13256         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13257
13258         fi
13259         if test "$ac_cv_sys_largefile_source" != no
13260         then
13261
13262         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13263         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13264
13265         fi
13266         if test "$ac_cv_sys_file_offset_bits" != no
13267         then
13268
13269         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13270         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13271
13272         fi
13273
13274         echo "$as_me:13274: checking whether to use struct dirent64" >&5
13275 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13276 if test "${cf_cv_struct_dirent64+set}" = set; then
13277   echo $ECHO_N "(cached) $ECHO_C" >&6
13278 else
13279
13280                 cat >conftest.$ac_ext <<_ACEOF
13281 #line 13281 "configure"
13282 #include "confdefs.h"
13283
13284 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13285 #include <sys/types.h>
13286 #include <dirent.h>
13287
13288 int
13289 main (void)
13290 {
13291
13292                 /* if transitional largefile support is setup, this is true */
13293                 extern struct dirent64 * readdir(DIR *);
13294                 struct dirent64 *x = readdir((DIR *)0);
13295                 struct dirent *y = readdir((DIR *)0);
13296                 int z = x - y;
13297                 (void)z;
13298
13299   ;
13300   return 0;
13301 }
13302 _ACEOF
13303 rm -f conftest.$ac_objext
13304 if { (eval echo "$as_me:13304: \"$ac_compile\"") >&5
13305   (eval $ac_compile) 2>&5
13306   ac_status=$?
13307   echo "$as_me:13307: \$? = $ac_status" >&5
13308   (exit $ac_status); } &&
13309          { ac_try='test -s conftest.$ac_objext'
13310   { (eval echo "$as_me:13310: \"$ac_try\"") >&5
13311   (eval $ac_try) 2>&5
13312   ac_status=$?
13313   echo "$as_me:13313: \$? = $ac_status" >&5
13314   (exit $ac_status); }; }; then
13315   cf_cv_struct_dirent64=yes
13316 else
13317   echo "$as_me: failed program was:" >&5
13318 cat conftest.$ac_ext >&5
13319 cf_cv_struct_dirent64=no
13320 fi
13321 rm -f conftest.$ac_objext conftest.$ac_ext
13322
13323 fi
13324 echo "$as_me:13324: result: $cf_cv_struct_dirent64" >&5
13325 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13326         test "$cf_cv_struct_dirent64" = yes &&
13327 cat >>confdefs.h <<\EOF
13328 #define HAVE_STRUCT_DIRENT64 1
13329 EOF
13330
13331         fi
13332
13333 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13334 echo "$as_me:13334: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13335 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13336
13337 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13338 if test "${enable_tparm_varargs+set}" = set; then
13339   enableval="$enable_tparm_varargs"
13340   with_tparm_varargs=$enableval
13341 else
13342   with_tparm_varargs=yes
13343 fi;
13344 echo "$as_me:13344: result: $with_tparm_varargs" >&5
13345 echo "${ECHO_T}$with_tparm_varargs" >&6
13346 NCURSES_TPARM_VARARGS=0
13347 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13348
13349 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13350 if test "$with_ticlib" != no ; then
13351 echo "$as_me:13351: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13352 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13353
13354 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13355 if test "${enable_tic_depends+set}" = set; then
13356   enableval="$enable_tic_depends"
13357   with_tic_depends=$enableval
13358 else
13359   with_tic_depends=yes
13360 fi;
13361 echo "$as_me:13361: result: $with_tic_depends" >&5
13362 echo "${ECHO_T}$with_tic_depends" >&6
13363 else
13364         with_tic_depends=no
13365 fi
13366
13367 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13368 echo "$as_me:13368: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13369 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13370
13371 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13372 if test "${enable_wattr_macros+set}" = set; then
13373   enableval="$enable_wattr_macros"
13374   with_wattr_macros=$enableval
13375 else
13376   with_wattr_macros=yes
13377 fi;
13378 if [ "x$with_wattr_macros" != xyes ]; then
13379         NCURSES_WATTR_MACROS=0
13380         echo "$as_me:13380: result: yes" >&5
13381 echo "${ECHO_T}yes" >&6
13382 else
13383         NCURSES_WATTR_MACROS=1
13384         echo "$as_me:13384: result: no" >&5
13385 echo "${ECHO_T}no" >&6
13386 fi
13387
13388 echo "$as_me:13388: checking for X11 rgb file" >&5
13389 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13390
13391 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13392 if test "${with_x11_rgb+set}" = set; then
13393   withval="$with_x11_rgb"
13394   RGB_PATH=$withval
13395 else
13396   RGB_PATH=auto
13397 fi;
13398
13399 if test "x$RGB_PATH" = xauto
13400 then
13401         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13402         for cf_path in \
13403                 /opt/local/share/X11/rgb.txt \
13404                 /opt/X11/share/X11/rgb.txt \
13405                 /usr/share/X11/rgb.txt \
13406                 /usr/X11/share/X11/rgb.txt \
13407                 /usr/X11/lib/X11/rgb.txt \
13408                 /usr/lib/X11/rgb.txt \
13409                 /etc/X11/rgb.txt \
13410                 /usr/pkg/lib/X11/rgb.txt \
13411                 /usr/X11R7/lib/X11/rgb.txt \
13412                 /usr/X11R6/lib/X11/rgb.txt \
13413                 /usr/X11R5/lib/X11/rgb.txt \
13414                 /usr/X11R4/lib/X11/rgb.txt \
13415                 /usr/local/lib/X11/rgb.txt \
13416                 /usr/local/share/X11/rgb.txt \
13417                 /usr/lib64/X11/rgb.txt
13418         do
13419                 if test -f "$cf_path" ; then
13420                         RGB_PATH="$cf_path"
13421                         break
13422                 fi
13423         done
13424 else
13425         cf_path=$RGB_PATH
13426
13427 if test "x$prefix" != xNONE; then
13428         cf_path_syntax="$prefix"
13429 else
13430         cf_path_syntax="$ac_default_prefix"
13431 fi
13432
13433 case ".$cf_path" in
13434 (.\$\(*\)*|.\'*\'*)
13435         ;;
13436 (..|./*|.\\*)
13437         ;;
13438 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13439         ;;
13440 (.\${*prefix}*|.\${*dir}*)
13441         eval cf_path="$cf_path"
13442         case ".$cf_path" in
13443         (.NONE/*)
13444                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13445                 ;;
13446         esac
13447         ;;
13448 (.no|.NONE/*)
13449         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13450         ;;
13451 (*)
13452         { { echo "$as_me:13452: error: expected a pathname, not \"$cf_path\"" >&5
13453 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13454    { (exit 1); exit 1; }; }
13455         ;;
13456 esac
13457
13458 fi
13459
13460 echo "$as_me:13460: result: $RGB_PATH" >&5
13461 echo "${ECHO_T}$RGB_PATH" >&6
13462
13463 cat >>confdefs.h <<EOF
13464 #define RGB_PATH "$cf_path"
13465 EOF
13466
13467 no_x11_rgb=
13468 if test "$RGB_PATH" = no
13469 then
13470         no_x11_rgb="#"
13471 fi
13472
13473 ###   use option --with-bool to override bool's type
13474 echo "$as_me:13474: checking for type of bool" >&5
13475 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13476
13477 # Check whether --with-bool or --without-bool was given.
13478 if test "${with_bool+set}" = set; then
13479   withval="$with_bool"
13480   NCURSES_BOOL="$withval"
13481 else
13482   NCURSES_BOOL=auto
13483 fi;
13484 echo "$as_me:13484: result: $NCURSES_BOOL" >&5
13485 echo "${ECHO_T}$NCURSES_BOOL" >&6
13486
13487 echo "$as_me:13487: checking for alternate terminal capabilities file" >&5
13488 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13489
13490 # Check whether --with-caps or --without-caps was given.
13491 if test "${with_caps+set}" = set; then
13492   withval="$with_caps"
13493   TERMINFO_CAPS=Caps.$withval
13494 else
13495   TERMINFO_CAPS=Caps
13496 fi;
13497 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13498 echo "$as_me:13498: result: $TERMINFO_CAPS" >&5
13499 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13500
13501 ###   use option --with-chtype to override chtype's type
13502 echo "$as_me:13502: checking for type of chtype" >&5
13503 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13504
13505 # Check whether --with-chtype or --without-chtype was given.
13506 if test "${with_chtype+set}" = set; then
13507   withval="$with_chtype"
13508   NCURSES_CHTYPE="$withval"
13509 else
13510   NCURSES_CHTYPE=$cf_dft_chtype
13511 fi;
13512 echo "$as_me:13512: result: $NCURSES_CHTYPE" >&5
13513 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13514
13515 ###   use option --with-ospeed to override ospeed's type
13516 echo "$as_me:13516: checking for type of ospeed" >&5
13517 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13518
13519 # Check whether --with-ospeed or --without-ospeed was given.
13520 if test "${with_ospeed+set}" = set; then
13521   withval="$with_ospeed"
13522   NCURSES_OSPEED="$withval"
13523 else
13524   NCURSES_OSPEED=short
13525 fi;
13526 echo "$as_me:13526: result: $NCURSES_OSPEED" >&5
13527 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13528
13529 ###   use option --with-mmask-t to override mmask_t's type
13530 echo "$as_me:13530: checking for type of mmask_t" >&5
13531 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13532
13533 # Check whether --with-mmask-t or --without-mmask-t was given.
13534 if test "${with_mmask_t+set}" = set; then
13535   withval="$with_mmask_t"
13536   NCURSES_MMASK_T="$withval"
13537 else
13538   NCURSES_MMASK_T=$cf_dft_mmask_t
13539 fi;
13540 echo "$as_me:13540: result: $NCURSES_MMASK_T" >&5
13541 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13542
13543 ###   use option --with-ccharw-max to override CCHARW_MAX size
13544 echo "$as_me:13544: checking for size CCHARW_MAX" >&5
13545 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13546
13547 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13548 if test "${with_ccharw_max+set}" = set; then
13549   withval="$with_ccharw_max"
13550   NCURSES_CCHARW_MAX="$withval"
13551 else
13552   NCURSES_CCHARW_MAX=5
13553 fi;
13554 echo "$as_me:13554: result: $NCURSES_CCHARW_MAX" >&5
13555 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13556
13557 echo "$as_me:13557: checking for ANSI C header files" >&5
13558 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13559 if test "${ac_cv_header_stdc+set}" = set; then
13560   echo $ECHO_N "(cached) $ECHO_C" >&6
13561 else
13562   cat >conftest.$ac_ext <<_ACEOF
13563 #line 13563 "configure"
13564 #include "confdefs.h"
13565 #include <stdlib.h>
13566 #include <stdarg.h>
13567 #include <string.h>
13568 #include <float.h>
13569
13570 _ACEOF
13571 if { (eval echo "$as_me:13571: \"$ac_cpp conftest.$ac_ext\"") >&5
13572   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13573   ac_status=$?
13574   egrep -v '^ *\+' conftest.er1 >conftest.err
13575   rm -f conftest.er1
13576   cat conftest.err >&5
13577   echo "$as_me:13577: \$? = $ac_status" >&5
13578   (exit $ac_status); } >/dev/null; then
13579   if test -s conftest.err; then
13580     ac_cpp_err=$ac_c_preproc_warn_flag
13581   else
13582     ac_cpp_err=
13583   fi
13584 else
13585   ac_cpp_err=yes
13586 fi
13587 if test -z "$ac_cpp_err"; then
13588   ac_cv_header_stdc=yes
13589 else
13590   echo "$as_me: failed program was:" >&5
13591   cat conftest.$ac_ext >&5
13592   ac_cv_header_stdc=no
13593 fi
13594 rm -f conftest.err conftest.$ac_ext
13595
13596 if test $ac_cv_header_stdc = yes; then
13597   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13598   cat >conftest.$ac_ext <<_ACEOF
13599 #line 13599 "configure"
13600 #include "confdefs.h"
13601 #include <string.h>
13602
13603 _ACEOF
13604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13605   egrep "memchr" >/dev/null 2>&1; then
13606   :
13607 else
13608   ac_cv_header_stdc=no
13609 fi
13610 rm -rf conftest*
13611
13612 fi
13613
13614 if test $ac_cv_header_stdc = yes; then
13615   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13616   cat >conftest.$ac_ext <<_ACEOF
13617 #line 13617 "configure"
13618 #include "confdefs.h"
13619 #include <stdlib.h>
13620
13621 _ACEOF
13622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13623   egrep "free" >/dev/null 2>&1; then
13624   :
13625 else
13626   ac_cv_header_stdc=no
13627 fi
13628 rm -rf conftest*
13629
13630 fi
13631
13632 if test $ac_cv_header_stdc = yes; then
13633   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13634   if test "$cross_compiling" = yes; then
13635   :
13636 else
13637   cat >conftest.$ac_ext <<_ACEOF
13638 #line 13638 "configure"
13639 #include "confdefs.h"
13640 #include <ctype.h>
13641 #if ((' ' & 0x0FF) == 0x020)
13642 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13643 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13644 #else
13645 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13646                      || ('j' <= (c) && (c) <= 'r') \
13647                      || ('s' <= (c) && (c) <= 'z'))
13648 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13649 #endif
13650
13651 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13652 int
13653 main (void)
13654 {
13655   int i;
13656   for (i = 0; i < 256; i++)
13657     if (XOR (islower (i), ISLOWER (i))
13658         || toupper (i) != TOUPPER (i))
13659       $ac_main_return(2);
13660   $ac_main_return (0);
13661 }
13662 _ACEOF
13663 rm -f conftest$ac_exeext
13664 if { (eval echo "$as_me:13664: \"$ac_link\"") >&5
13665   (eval $ac_link) 2>&5
13666   ac_status=$?
13667   echo "$as_me:13667: \$? = $ac_status" >&5
13668   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13669   { (eval echo "$as_me:13669: \"$ac_try\"") >&5
13670   (eval $ac_try) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); }; }; then
13674   :
13675 else
13676   echo "$as_me: program exited with status $ac_status" >&5
13677 echo "$as_me: failed program was:" >&5
13678 cat conftest.$ac_ext >&5
13679 ac_cv_header_stdc=no
13680 fi
13681 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13682 fi
13683 fi
13684 fi
13685 echo "$as_me:13685: result: $ac_cv_header_stdc" >&5
13686 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13687 if test $ac_cv_header_stdc = yes; then
13688
13689 cat >>confdefs.h <<\EOF
13690 #define STDC_HEADERS 1
13691 EOF
13692
13693 fi
13694
13695 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13696
13697 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13698                   inttypes.h stdint.h unistd.h
13699 do
13700 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13701 echo "$as_me:13701: checking for $ac_header" >&5
13702 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13703 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13704   echo $ECHO_N "(cached) $ECHO_C" >&6
13705 else
13706   cat >conftest.$ac_ext <<_ACEOF
13707 #line 13707 "configure"
13708 #include "confdefs.h"
13709 $ac_includes_default
13710 #include <$ac_header>
13711 _ACEOF
13712 rm -f conftest.$ac_objext
13713 if { (eval echo "$as_me:13713: \"$ac_compile\"") >&5
13714   (eval $ac_compile) 2>&5
13715   ac_status=$?
13716   echo "$as_me:13716: \$? = $ac_status" >&5
13717   (exit $ac_status); } &&
13718          { ac_try='test -s conftest.$ac_objext'
13719   { (eval echo "$as_me:13719: \"$ac_try\"") >&5
13720   (eval $ac_try) 2>&5
13721   ac_status=$?
13722   echo "$as_me:13722: \$? = $ac_status" >&5
13723   (exit $ac_status); }; }; then
13724   eval "$as_ac_Header=yes"
13725 else
13726   echo "$as_me: failed program was:" >&5
13727 cat conftest.$ac_ext >&5
13728 eval "$as_ac_Header=no"
13729 fi
13730 rm -f conftest.$ac_objext conftest.$ac_ext
13731 fi
13732 echo "$as_me:13732: result: `eval echo '${'$as_ac_Header'}'`" >&5
13733 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13734 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13735   cat >>confdefs.h <<EOF
13736 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13737 EOF
13738
13739 fi
13740 done
13741
13742 echo "$as_me:13742: checking for signed char" >&5
13743 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13744 if test "${ac_cv_type_signed_char+set}" = set; then
13745   echo $ECHO_N "(cached) $ECHO_C" >&6
13746 else
13747   cat >conftest.$ac_ext <<_ACEOF
13748 #line 13748 "configure"
13749 #include "confdefs.h"
13750 $ac_includes_default
13751 int
13752 main (void)
13753 {
13754 if ((signed char *) 0)
13755   return 0;
13756 if (sizeof (signed char))
13757   return 0;
13758   ;
13759   return 0;
13760 }
13761 _ACEOF
13762 rm -f conftest.$ac_objext
13763 if { (eval echo "$as_me:13763: \"$ac_compile\"") >&5
13764   (eval $ac_compile) 2>&5
13765   ac_status=$?
13766   echo "$as_me:13766: \$? = $ac_status" >&5
13767   (exit $ac_status); } &&
13768          { ac_try='test -s conftest.$ac_objext'
13769   { (eval echo "$as_me:13769: \"$ac_try\"") >&5
13770   (eval $ac_try) 2>&5
13771   ac_status=$?
13772   echo "$as_me:13772: \$? = $ac_status" >&5
13773   (exit $ac_status); }; }; then
13774   ac_cv_type_signed_char=yes
13775 else
13776   echo "$as_me: failed program was:" >&5
13777 cat conftest.$ac_ext >&5
13778 ac_cv_type_signed_char=no
13779 fi
13780 rm -f conftest.$ac_objext conftest.$ac_ext
13781 fi
13782 echo "$as_me:13782: result: $ac_cv_type_signed_char" >&5
13783 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13784
13785 echo "$as_me:13785: checking size of signed char" >&5
13786 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13787 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13788   echo $ECHO_N "(cached) $ECHO_C" >&6
13789 else
13790   if test "$ac_cv_type_signed_char" = yes; then
13791   if test "$cross_compiling" = yes; then
13792   # Depending upon the size, compute the lo and hi bounds.
13793 cat >conftest.$ac_ext <<_ACEOF
13794 #line 13794 "configure"
13795 #include "confdefs.h"
13796 $ac_includes_default
13797 int
13798 main (void)
13799 {
13800 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13801   ;
13802   return 0;
13803 }
13804 _ACEOF
13805 rm -f conftest.$ac_objext
13806 if { (eval echo "$as_me:13806: \"$ac_compile\"") >&5
13807   (eval $ac_compile) 2>&5
13808   ac_status=$?
13809   echo "$as_me:13809: \$? = $ac_status" >&5
13810   (exit $ac_status); } &&
13811          { ac_try='test -s conftest.$ac_objext'
13812   { (eval echo "$as_me:13812: \"$ac_try\"") >&5
13813   (eval $ac_try) 2>&5
13814   ac_status=$?
13815   echo "$as_me:13815: \$? = $ac_status" >&5
13816   (exit $ac_status); }; }; then
13817   ac_lo=0 ac_mid=0
13818   while :; do
13819     cat >conftest.$ac_ext <<_ACEOF
13820 #line 13820 "configure"
13821 #include "confdefs.h"
13822 $ac_includes_default
13823 int
13824 main (void)
13825 {
13826 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13827   ;
13828   return 0;
13829 }
13830 _ACEOF
13831 rm -f conftest.$ac_objext
13832 if { (eval echo "$as_me:13832: \"$ac_compile\"") >&5
13833   (eval $ac_compile) 2>&5
13834   ac_status=$?
13835   echo "$as_me:13835: \$? = $ac_status" >&5
13836   (exit $ac_status); } &&
13837          { ac_try='test -s conftest.$ac_objext'
13838   { (eval echo "$as_me:13838: \"$ac_try\"") >&5
13839   (eval $ac_try) 2>&5
13840   ac_status=$?
13841   echo "$as_me:13841: \$? = $ac_status" >&5
13842   (exit $ac_status); }; }; then
13843   ac_hi=$ac_mid; break
13844 else
13845   echo "$as_me: failed program was:" >&5
13846 cat conftest.$ac_ext >&5
13847 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13848 fi
13849 rm -f conftest.$ac_objext conftest.$ac_ext
13850   done
13851 else
13852   echo "$as_me: failed program was:" >&5
13853 cat conftest.$ac_ext >&5
13854 ac_hi=-1 ac_mid=-1
13855   while :; do
13856     cat >conftest.$ac_ext <<_ACEOF
13857 #line 13857 "configure"
13858 #include "confdefs.h"
13859 $ac_includes_default
13860 int
13861 main (void)
13862 {
13863 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13864   ;
13865   return 0;
13866 }
13867 _ACEOF
13868 rm -f conftest.$ac_objext
13869 if { (eval echo "$as_me:13869: \"$ac_compile\"") >&5
13870   (eval $ac_compile) 2>&5
13871   ac_status=$?
13872   echo "$as_me:13872: \$? = $ac_status" >&5
13873   (exit $ac_status); } &&
13874          { ac_try='test -s conftest.$ac_objext'
13875   { (eval echo "$as_me:13875: \"$ac_try\"") >&5
13876   (eval $ac_try) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit $ac_status); }; }; then
13880   ac_lo=$ac_mid; break
13881 else
13882   echo "$as_me: failed program was:" >&5
13883 cat conftest.$ac_ext >&5
13884 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13885 fi
13886 rm -f conftest.$ac_objext conftest.$ac_ext
13887   done
13888 fi
13889 rm -f conftest.$ac_objext conftest.$ac_ext
13890 # Binary search between lo and hi bounds.
13891 while test "x$ac_lo" != "x$ac_hi"; do
13892   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13893   cat >conftest.$ac_ext <<_ACEOF
13894 #line 13894 "configure"
13895 #include "confdefs.h"
13896 $ac_includes_default
13897 int
13898 main (void)
13899 {
13900 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13901   ;
13902   return 0;
13903 }
13904 _ACEOF
13905 rm -f conftest.$ac_objext
13906 if { (eval echo "$as_me:13906: \"$ac_compile\"") >&5
13907   (eval $ac_compile) 2>&5
13908   ac_status=$?
13909   echo "$as_me:13909: \$? = $ac_status" >&5
13910   (exit $ac_status); } &&
13911          { ac_try='test -s conftest.$ac_objext'
13912   { (eval echo "$as_me:13912: \"$ac_try\"") >&5
13913   (eval $ac_try) 2>&5
13914   ac_status=$?
13915   echo "$as_me:13915: \$? = $ac_status" >&5
13916   (exit $ac_status); }; }; then
13917   ac_hi=$ac_mid
13918 else
13919   echo "$as_me: failed program was:" >&5
13920 cat conftest.$ac_ext >&5
13921 ac_lo=`expr $ac_mid + 1`
13922 fi
13923 rm -f conftest.$ac_objext conftest.$ac_ext
13924 done
13925 ac_cv_sizeof_signed_char=$ac_lo
13926 else
13927   if test "$cross_compiling" = yes; then
13928   { { echo "$as_me:13928: error: cannot run test program while cross compiling" >&5
13929 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13930    { (exit 1); exit 1; }; }
13931 else
13932   cat >conftest.$ac_ext <<_ACEOF
13933 #line 13933 "configure"
13934 #include "confdefs.h"
13935 $ac_includes_default
13936 int
13937 main (void)
13938 {
13939 FILE *f = fopen ("conftest.val", "w");
13940 if (!f)
13941   $ac_main_return (1);
13942 fprintf (f, "%d", (sizeof (signed char)));
13943 fclose (f);
13944   ;
13945   return 0;
13946 }
13947 _ACEOF
13948 rm -f conftest$ac_exeext
13949 if { (eval echo "$as_me:13949: \"$ac_link\"") >&5
13950   (eval $ac_link) 2>&5
13951   ac_status=$?
13952   echo "$as_me:13952: \$? = $ac_status" >&5
13953   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13954   { (eval echo "$as_me:13954: \"$ac_try\"") >&5
13955   (eval $ac_try) 2>&5
13956   ac_status=$?
13957   echo "$as_me:13957: \$? = $ac_status" >&5
13958   (exit $ac_status); }; }; then
13959   ac_cv_sizeof_signed_char=`cat conftest.val`
13960 else
13961   echo "$as_me: program exited with status $ac_status" >&5
13962 echo "$as_me: failed program was:" >&5
13963 cat conftest.$ac_ext >&5
13964 fi
13965 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13966 fi
13967 fi
13968 rm -f conftest.val
13969 else
13970   ac_cv_sizeof_signed_char=0
13971 fi
13972 fi
13973 echo "$as_me:13973: result: $ac_cv_sizeof_signed_char" >&5
13974 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13975 cat >>confdefs.h <<EOF
13976 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13977 EOF
13978
13979 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13980         NCURSES_SBOOL="signed char"
13981 else
13982         NCURSES_SBOOL="char"
13983 fi
13984 echo "$as_me:13984: checking if you want to use signed Boolean array in term.h" >&5
13985 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13986
13987 # Check whether --enable-signed-char or --disable-signed-char was given.
13988 if test "${enable_signed_char+set}" = set; then
13989   enableval="$enable_signed_char"
13990   with_signed_char=$enableval
13991 else
13992   with_signed_char=no
13993 fi;
13994 echo "$as_me:13994: result: $with_signed_char" >&5
13995 echo "${ECHO_T}$with_signed_char" >&6
13996 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13997
13998 ###   use option --with-tparm-arg to override tparm's argument type
13999 echo "$as_me:13999: checking for type of tparm args" >&5
14000 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14001
14002 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14003 if test "${with_tparm_arg+set}" = set; then
14004   withval="$with_tparm_arg"
14005   NCURSES_TPARM_ARG="$withval"
14006 else
14007   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14008 fi;
14009 echo "$as_me:14009: result: $NCURSES_TPARM_ARG" >&5
14010 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14011
14012 ### Enable compiling-in rcs id's
14013 echo "$as_me:14013: checking if RCS identifiers should be compiled-in" >&5
14014 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14015
14016 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14017 if test "${with_rcs_ids+set}" = set; then
14018   withval="$with_rcs_ids"
14019   with_rcs_ids=$withval
14020 else
14021   with_rcs_ids=no
14022 fi;
14023 echo "$as_me:14023: result: $with_rcs_ids" >&5
14024 echo "${ECHO_T}$with_rcs_ids" >&6
14025 test "x$with_rcs_ids" = xyes &&
14026 cat >>confdefs.h <<\EOF
14027 #define USE_RCS_IDS 1
14028 EOF
14029
14030 ###############################################################################
14031
14032 echo "$as_me:14032: checking format of man-pages" >&5
14033 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14034
14035 # Check whether --with-manpage-format or --without-manpage-format was given.
14036 if test "${with_manpage_format+set}" = set; then
14037   withval="$with_manpage_format"
14038   MANPAGE_FORMAT=$withval
14039 else
14040   MANPAGE_FORMAT=unknown
14041 fi;
14042
14043 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14044 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14045
14046 cf_unknown=
14047
14048 case $MANPAGE_FORMAT in
14049 (unknown)
14050         if test -z "$MANPATH" ; then
14051                 MANPATH="/usr/man:/usr/share/man"
14052         fi
14053
14054         # look for the 'date' man-page (it's most likely to be installed!)
14055         MANPAGE_FORMAT=
14056         cf_preform=no
14057         cf_catonly=yes
14058         cf_example=date
14059
14060         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14061         for cf_dir in $MANPATH; do
14062                 test -z "$cf_dir" && cf_dir=/usr/man
14063                 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
14064                 do
14065                         cf_test=`echo $cf_name | sed -e 's/*//'`
14066                         if test "x$cf_test" = "x$cf_name" ; then
14067
14068                                 case "$cf_name" in
14069                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14070                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14071                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14072                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14073                                 esac
14074
14075                                 case "$cf_name" in
14076                                 ($cf_dir/man*)
14077                                         cf_catonly=no
14078                                         ;;
14079                                 ($cf_dir/cat*)
14080                                         cf_preform=yes
14081                                         ;;
14082                                 esac
14083                                 break
14084                         fi
14085
14086                         # if we found a match in either man* or cat*, stop looking
14087                         if test -n "$MANPAGE_FORMAT" ; then
14088                                 cf_found=no
14089                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14090                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14091                                 case "$cf_name" in
14092                                 ($cf_dir/cat*)
14093                                         cf_found=yes
14094                                         ;;
14095                                 esac
14096                                 test $cf_found=yes && break
14097                         fi
14098                 done
14099                 # only check the first directory in $MANPATH where we find manpages
14100                 if test -n "$MANPAGE_FORMAT" ; then
14101                         break
14102                 fi
14103         done
14104         # if we did not find the example, just assume it is normal
14105         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14106         IFS="$ac_save_ifs"
14107         ;;
14108 (*)
14109         for cf_option in $MANPAGE_FORMAT; do
14110         case $cf_option in
14111         (gzip|compress|BSDI|normal|formatted|catonly)
14112                 ;;
14113         (*)
14114                 cf_unknown="$cf_unknown $cf_option"
14115                 ;;
14116         esac
14117         done
14118         ;;
14119 esac
14120
14121 echo "$as_me:14121: result: $MANPAGE_FORMAT" >&5
14122 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14123 if test -n "$cf_unknown" ; then
14124         { echo "$as_me:14124: WARNING: Unexpected manpage-format $cf_unknown" >&5
14125 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14126 fi
14127
14128 echo "$as_me:14128: checking for manpage renaming" >&5
14129 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14130
14131 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14132 if test "${with_manpage_renames+set}" = set; then
14133   withval="$with_manpage_renames"
14134   MANPAGE_RENAMES=$withval
14135 else
14136   MANPAGE_RENAMES=yes
14137 fi;
14138
14139 case ".$MANPAGE_RENAMES" in
14140 (.no)
14141         ;;
14142 (.|.yes)
14143         # Debian 'man' program?
14144         if test -f /etc/debian_version ; then
14145                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
14146         else
14147                 MANPAGE_RENAMES=no
14148         fi
14149         ;;
14150 esac
14151
14152 if test "$MANPAGE_RENAMES" != no ; then
14153         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
14154                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
14155         elif test ! -f $MANPAGE_RENAMES ; then
14156                 { { echo "$as_me:14156: error: not a filename: $MANPAGE_RENAMES" >&5
14157 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14158    { (exit 1); exit 1; }; }
14159         fi
14160
14161         test ! -d man && mkdir man
14162
14163         # Construct a sed-script to perform renaming within man-pages
14164         if test -n "$MANPAGE_RENAMES" ; then
14165                 test ! -d man && mkdir man
14166                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
14167         fi
14168 fi
14169
14170 echo "$as_me:14170: result: $MANPAGE_RENAMES" >&5
14171 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14172
14173 echo "$as_me:14173: checking if manpage aliases will be installed" >&5
14174 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14175
14176 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14177 if test "${with_manpage_aliases+set}" = set; then
14178   withval="$with_manpage_aliases"
14179   MANPAGE_ALIASES=$withval
14180 else
14181   MANPAGE_ALIASES=yes
14182 fi;
14183
14184 echo "$as_me:14184: result: $MANPAGE_ALIASES" >&5
14185 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14186
14187 case "x$LN_S" in
14188 (xln*)
14189         cf_use_symlinks=yes
14190         ;;
14191 (*)
14192         cf_use_symlinks=no
14193         ;;
14194 esac
14195
14196 MANPAGE_SYMLINKS=no
14197 if test "$MANPAGE_ALIASES" = yes ; then
14198 echo "$as_me:14198: checking if manpage symlinks should be used" >&5
14199 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14200
14201 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14202 if test "${with_manpage_symlinks+set}" = set; then
14203   withval="$with_manpage_symlinks"
14204   MANPAGE_SYMLINKS=$withval
14205 else
14206   MANPAGE_SYMLINKS=$cf_use_symlinks
14207 fi;
14208
14209 if test "$$cf_use_symlinks" = no; then
14210 if test "$MANPAGE_SYMLINKS" = yes ; then
14211         { echo "$as_me:14211: WARNING: cannot make symlinks" >&5
14212 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14213         MANPAGE_SYMLINKS=no
14214 fi
14215 fi
14216
14217 echo "$as_me:14217: result: $MANPAGE_SYMLINKS" >&5
14218 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14219 fi
14220
14221 echo "$as_me:14221: checking for manpage tbl" >&5
14222 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14223
14224 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14225 if test "${with_manpage_tbl+set}" = set; then
14226   withval="$with_manpage_tbl"
14227   MANPAGE_TBL=$withval
14228 else
14229   MANPAGE_TBL=no
14230 fi;
14231
14232 echo "$as_me:14232: result: $MANPAGE_TBL" >&5
14233 echo "${ECHO_T}$MANPAGE_TBL" >&6
14234
14235 if test "$prefix" = "NONE" ; then
14236         cf_prefix="$ac_default_prefix"
14237 else
14238         cf_prefix="$prefix"
14239 fi
14240
14241 case "$MANPAGE_FORMAT" in
14242 (*catonly*)
14243         cf_format=yes
14244         cf_inboth=no
14245         ;;
14246 (*formatted*)
14247         cf_format=yes
14248         cf_inboth=yes
14249         ;;
14250 (*)
14251         cf_format=no
14252         cf_inboth=no
14253         ;;
14254 esac
14255
14256 test ! -d man && mkdir man
14257
14258 cf_so_strip=
14259 cf_compress=
14260 case "$MANPAGE_FORMAT" in
14261 (*compress*)
14262         cf_so_strip="Z"
14263         cf_compress=compress
14264         ;;
14265 (*gzip*)
14266         cf_so_strip="gz"
14267         cf_compress=gzip
14268         ;;
14269 esac
14270
14271 cf_edit_man=./edit_man.sh
14272 cf_man_alias=`pwd`/man_alias.sed
14273
14274 cat >$cf_edit_man <<CF_EOF
14275 #! $SHELL
14276 # this script is generated by the configure-script CF_MAN_PAGES macro.
14277
14278 prefix="$cf_prefix"
14279 datarootdir="$datarootdir"
14280 datadir="$datadir"
14281
14282 NCURSES_MAJOR="$NCURSES_MAJOR"
14283 NCURSES_MINOR="$NCURSES_MINOR"
14284 NCURSES_PATCH="$NCURSES_PATCH"
14285
14286 NCURSES_OSPEED="$NCURSES_OSPEED"
14287 TERMINFO="$TERMINFO"
14288
14289 INSTALL="$INSTALL"
14290 INSTALL_DATA="$INSTALL_DATA"
14291
14292 transform="$program_transform_name"
14293
14294 TMP=\${TMPDIR:=/tmp}/man\$\$
14295 trap "rm -f \$TMP" 0 1 2 3 15
14296
14297 form=\$1
14298 shift || exit 1
14299
14300 verb=\$1
14301 shift || exit 1
14302
14303 mandir=\$1
14304 shift || exit 1
14305
14306 srcdir=\$1
14307 top_srcdir=\$srcdir/..
14308 shift || exit 1
14309
14310 if test "\$form" = normal ; then
14311         if test "$cf_format" = yes ; then
14312         if test "$cf_inboth" = no ; then
14313                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14314                 exit $?
14315         fi
14316         fi
14317         cf_subdir=\$mandir/man
14318         cf_tables=$MANPAGE_TBL
14319 else
14320         cf_subdir=\$mandir/cat
14321         cf_tables=yes
14322 fi
14323
14324 # process the list of source-files
14325 for i in \$* ; do
14326 case \$i in
14327 (*.orig|*.rej) ;;
14328 (*.[0-9]*)
14329         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14330         if test \$verb = installing ; then
14331         if test ! -d \$cf_subdir\${section} ; then
14332                 mkdir -p \$cf_subdir\$section
14333         fi
14334         fi
14335
14336         # replace variables in man page
14337         if test ! -f $cf_man_alias ; then
14338 cat >>$cf_man_alias <<-CF_EOF2
14339                 s,@DATADIR@,\$datadir,g
14340                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14341                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14342                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14343                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14344                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14345                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14346 CF_EOF
14347
14348         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14349         do
14350                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14351                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14352 cat >>$cf_edit_man <<-CF_EOF
14353                 s,@$cf_NAME@,$cf_name,g
14354 CF_EOF
14355         done
14356
14357 cat >>$cf_edit_man <<CF_EOF
14358 CF_EOF2
14359                 echo "...made $cf_man_alias"
14360         fi
14361
14362         aliases=
14363         cf_source=\`basename \$i\`
14364         inalias=\$cf_source
14365         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14366         if test ! -f \$inalias ; then
14367                 echo .. skipped \$cf_source
14368                 continue
14369         fi
14370 CF_EOF
14371
14372 if test "$MANPAGE_ALIASES" != no ; then
14373 cat >>$cf_edit_man <<CF_EOF
14374         nCurses=ignore.3x
14375         test $with_curses_h = yes && nCurses=ncurses.3x
14376         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14377 CF_EOF
14378 fi
14379
14380 if test "$MANPAGE_RENAMES" = no ; then
14381 cat >>$cf_edit_man <<CF_EOF
14382         # perform program transformations for section 1 man pages
14383         if test \$section = 1 ; then
14384                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14385         else
14386                 cf_target=\$cf_subdir\${section}/\$cf_source
14387         fi
14388 CF_EOF
14389 else
14390 cat >>$cf_edit_man <<CF_EOF
14391         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14392         if test -z "\$cf_target" ; then
14393                 echo '? missing rename for '\$cf_source
14394                 cf_target="\$cf_source"
14395         fi
14396         cf_target="\$cf_subdir\${section}/\${cf_target}"
14397
14398 CF_EOF
14399 fi
14400
14401 cat >>$cf_edit_man <<CF_EOF
14402         sed     -f $cf_man_alias \\
14403 CF_EOF
14404
14405 if test -f $MANPAGE_RENAMES ; then
14406 cat >>$cf_edit_man <<CF_EOF
14407                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14408 CF_EOF
14409 else
14410 cat >>$cf_edit_man <<CF_EOF
14411                 < \$i >\$TMP
14412 CF_EOF
14413 fi
14414
14415 cat >>$cf_edit_man <<CF_EOF
14416 if test \$cf_tables = yes ; then
14417         tbl \$TMP >\$TMP.out
14418         mv \$TMP.out \$TMP
14419 fi
14420 CF_EOF
14421
14422 if test $with_overwrite != yes ; then
14423 cat >>$cf_edit_man <<CF_EOF
14424         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14425         mv \$TMP.out \$TMP
14426 CF_EOF
14427 fi
14428
14429 if test $with_curses_h != yes ; then
14430 cat >>$cf_edit_man <<CF_EOF
14431         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14432         mv \$TMP.out \$TMP
14433 CF_EOF
14434 fi
14435
14436 cat >>$cf_edit_man <<CF_EOF
14437         if test \$form = format ; then
14438                 nroff -man \$TMP >\$TMP.out
14439                 mv \$TMP.out \$TMP
14440         fi
14441 CF_EOF
14442
14443 if test -n "$cf_compress" ; then
14444 cat >>$cf_edit_man <<CF_EOF
14445         if test \$verb = installing ; then
14446         if ( $cf_compress -f \$TMP )
14447         then
14448                 mv \$TMP.$cf_so_strip \$TMP
14449         fi
14450         fi
14451         cf_target="\$cf_target.$cf_so_strip"
14452 CF_EOF
14453 fi
14454
14455 case "$MANPAGE_FORMAT" in
14456 (*BSDI*)
14457 cat >>$cf_edit_man <<CF_EOF
14458         if test \$form = format ; then
14459                 # BSDI installs only .0 suffixes in the cat directories
14460                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14461         fi
14462 CF_EOF
14463   ;;
14464 esac
14465
14466 cat >>$cf_edit_man <<CF_EOF
14467         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14468         if test \$verb = installing ; then
14469                 echo \$verb \$cf_target
14470                 \$INSTALL_DATA \$TMP \$cf_target
14471                 test -d \$cf_subdir\${section} &&
14472                 test -n "\$aliases" && (
14473                         cd \$cf_subdir\${section} && (
14474                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14475                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14476                                 cf_target=\`basename \$cf_target\`
14477                                 for cf_alias in \$aliases
14478                                 do
14479                                         if test \$section = 1 ; then
14480                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14481                                         fi
14482
14483                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14484                                                 if test -f \$cf_alias\${suffix} ; then
14485                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14486                                                         then
14487                                                                 continue
14488                                                         fi
14489                                                 fi
14490                                                 echo .. \$verb alias \$cf_alias\${suffix}
14491 CF_EOF
14492 case "x$LN_S" in
14493 (*-f)
14494 cat >>$cf_edit_man <<CF_EOF
14495                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14496 CF_EOF
14497         ;;
14498 (*)
14499 cat >>$cf_edit_man <<CF_EOF
14500                                                 rm -f \$cf_alias\${suffix}
14501                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14502 CF_EOF
14503         ;;
14504 esac
14505 cat >>$cf_edit_man <<CF_EOF
14506                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14507                                                 echo ".so \$cf_source" >\$TMP
14508 CF_EOF
14509 if test -n "$cf_compress" ; then
14510 cat >>$cf_edit_man <<CF_EOF
14511                                                 if test -n "$cf_so_strip" ; then
14512                                                         $cf_compress -f \$TMP
14513                                                         mv \$TMP.$cf_so_strip \$TMP
14514                                                 fi
14515 CF_EOF
14516 fi
14517 cat >>$cf_edit_man <<CF_EOF
14518                                                 echo .. \$verb alias \$cf_alias\${suffix}
14519                                                 rm -f \$cf_alias\${suffix}
14520                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14521                                         fi
14522                                 done
14523                         )
14524                 )
14525         elif test \$verb = removing ; then
14526                 test -f \$cf_target && (
14527                         echo \$verb \$cf_target
14528                         rm -f \$cf_target
14529                 )
14530                 test -d \$cf_subdir\${section} &&
14531                 test -n "\$aliases" && (
14532                         cd \$cf_subdir\${section} && (
14533                                 for cf_alias in \$aliases
14534                                 do
14535                                         if test \$section = 1 ; then
14536                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14537                                         fi
14538
14539                                         echo .. \$verb alias \$cf_alias\${suffix}
14540                                         rm -f \$cf_alias\${suffix}
14541                                 done
14542                         )
14543                 )
14544         else
14545 #               echo ".hy 0"
14546                 cat \$TMP
14547         fi
14548         ;;
14549 esac
14550 done
14551
14552 if test $cf_inboth = yes ; then
14553 if test \$form != format ; then
14554         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14555 fi
14556 fi
14557
14558 exit 0
14559 CF_EOF
14560 chmod 755 $cf_edit_man
14561
14562 ###############################################################################
14563
14564 ### Note that some functions (such as const) are normally disabled anyway.
14565 echo "$as_me:14565: checking if you want to build with function extensions" >&5
14566 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14567
14568 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14569 if test "${enable_ext_funcs+set}" = set; then
14570   enableval="$enable_ext_funcs"
14571   with_ext_funcs=$enableval
14572 else
14573   with_ext_funcs=yes
14574 fi;
14575 echo "$as_me:14575: result: $with_ext_funcs" >&5
14576 echo "${ECHO_T}$with_ext_funcs" >&6
14577 if test "x$with_ext_funcs" = xyes ; then
14578         NCURSES_EXT_FUNCS=1
14579
14580 cat >>confdefs.h <<\EOF
14581 #define NCURSES_EXT_FUNCS 1
14582 EOF
14583
14584 cat >>confdefs.h <<\EOF
14585 #define HAVE_ASSUME_DEFAULT_COLORS 1
14586 EOF
14587
14588 cat >>confdefs.h <<\EOF
14589 #define HAVE_CURSES_VERSION 1
14590 EOF
14591
14592 cat >>confdefs.h <<\EOF
14593 #define HAVE_HAS_KEY 1
14594 EOF
14595
14596 cat >>confdefs.h <<\EOF
14597 #define HAVE_RESIZETERM 1
14598 EOF
14599
14600 cat >>confdefs.h <<\EOF
14601 #define HAVE_RESIZE_TERM 1
14602 EOF
14603
14604 cat >>confdefs.h <<\EOF
14605 #define HAVE_TERM_ENTRY_H 1
14606 EOF
14607
14608 cat >>confdefs.h <<\EOF
14609 #define HAVE_USE_DEFAULT_COLORS 1
14610 EOF
14611
14612 cat >>confdefs.h <<\EOF
14613 #define HAVE_USE_EXTENDED_NAMES 1
14614 EOF
14615
14616 cat >>confdefs.h <<\EOF
14617 #define HAVE_USE_SCREEN 1
14618 EOF
14619
14620 cat >>confdefs.h <<\EOF
14621 #define HAVE_USE_WINDOW 1
14622 EOF
14623
14624 cat >>confdefs.h <<\EOF
14625 #define HAVE_WRESIZE 1
14626 EOF
14627
14628         GENERATED_EXT_FUNCS=generated
14629         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14630 else
14631         NCURSES_EXT_FUNCS=0
14632         GENERATED_EXT_FUNCS=
14633 fi
14634
14635 echo "$as_me:14635: checking if you want to build with SCREEN extensions" >&5
14636 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14637
14638 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14639 if test "${enable_sp_funcs+set}" = set; then
14640   enableval="$enable_sp_funcs"
14641   with_sp_funcs=$enableval
14642 else
14643   with_sp_funcs=$cf_dft_ext_spfuncs
14644 fi;
14645 echo "$as_me:14645: result: $with_sp_funcs" >&5
14646 echo "${ECHO_T}$with_sp_funcs" >&6
14647 if test "x$with_sp_funcs" = xyes ; then
14648         NCURSES_SP_FUNCS=1
14649
14650 cat >>confdefs.h <<\EOF
14651 #define NCURSES_SP_FUNCS 1
14652 EOF
14653
14654 cat >>confdefs.h <<\EOF
14655 #define HAVE_TPUTS_SP 1
14656 EOF
14657
14658         GENERATED_SP_FUNCS=generated
14659 else
14660         NCURSES_SP_FUNCS=0
14661         GENERATED_SP_FUNCS=
14662 fi
14663
14664 echo "$as_me:14664: checking if you want to build with terminal-driver" >&5
14665 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14666
14667 # Check whether --enable-term-driver or --disable-term-driver was given.
14668 if test "${enable_term_driver+set}" = set; then
14669   enableval="$enable_term_driver"
14670   with_term_driver=$enableval
14671 else
14672   with_term_driver=no
14673 fi;
14674 echo "$as_me:14674: result: $with_term_driver" >&5
14675 echo "${ECHO_T}$with_term_driver" >&6
14676 if test "x$with_term_driver" = xyes ; then
14677
14678 cat >>confdefs.h <<\EOF
14679 #define USE_TERM_DRIVER 1
14680 EOF
14681
14682         if test "x$with_termlib" != xno ; then
14683                 { { echo "$as_me:14683: error: The term-driver option conflicts with the termlib option" >&5
14684 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14685    { (exit 1); exit 1; }; }
14686         fi
14687         if test "x$with_sp_funcs" != xyes ; then
14688                 { { echo "$as_me:14688: error: The term-driver option relies upon sp-funcs" >&5
14689 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14690    { (exit 1); exit 1; }; }
14691         fi
14692 fi
14693
14694 ###   use option --enable-const to turn on use of const beyond that in XSI.
14695 echo "$as_me:14695: checking for extended use of const keyword" >&5
14696 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14697
14698 # Check whether --enable-const or --disable-const was given.
14699 if test "${enable_const+set}" = set; then
14700   enableval="$enable_const"
14701   with_ext_const=$enableval
14702 else
14703   with_ext_const=$cf_dft_ext_const
14704 fi;
14705 echo "$as_me:14705: result: $with_ext_const" >&5
14706 echo "${ECHO_T}$with_ext_const" >&6
14707 NCURSES_CONST='/*nothing*/'
14708 if test "x$with_ext_const" = xyes ; then
14709         NCURSES_CONST=const
14710 fi
14711
14712 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14713 echo "$as_me:14713: checking if you want to use extended colors" >&5
14714 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14715
14716 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14717 if test "${enable_ext_colors+set}" = set; then
14718   enableval="$enable_ext_colors"
14719   with_ext_colors=$enableval
14720 else
14721   with_ext_colors=$cf_dft_ext_colors
14722 fi;
14723 echo "$as_me:14723: result: $with_ext_colors" >&5
14724 echo "${ECHO_T}$with_ext_colors" >&6
14725 NCURSES_EXT_COLORS=0
14726 if test "x$with_ext_colors" = xyes ; then
14727         if test "x$with_widec" != xyes ; then
14728                 { echo "$as_me:14728: WARNING: This option applies only to wide-character library" >&5
14729 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14730         else
14731                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14732
14733 if test "${with_abi_version+set}" != set; then
14734         case $cf_cv_rel_version in
14735         (5.*)
14736                 cf_cv_rel_version=6.0
14737                 cf_cv_abi_version=6
14738                 { echo "$as_me:14738: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14739 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14740                 ;;
14741         esac
14742 fi
14743
14744                 NCURSES_EXT_COLORS=1
14745
14746 cat >>confdefs.h <<\EOF
14747 #define NCURSES_EXT_COLORS 1
14748 EOF
14749
14750 cat >>confdefs.h <<\EOF
14751 #define HAVE_ALLOC_PAIR 1
14752 EOF
14753
14754 cat >>confdefs.h <<\EOF
14755 #define HAVE_INIT_EXTENDED_COLOR 1
14756 EOF
14757
14758 cat >>confdefs.h <<\EOF
14759 #define HAVE_RESET_COLOR_PAIRS 1
14760 EOF
14761
14762         fi
14763 fi
14764
14765 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14766 echo "$as_me:14766: checking if you want to use extended mouse encoding" >&5
14767 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14768
14769 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14770 if test "${enable_ext_mouse+set}" = set; then
14771   enableval="$enable_ext_mouse"
14772   with_ext_mouse=$enableval
14773 else
14774   with_ext_mouse=$cf_dft_ext_mouse
14775 fi;
14776 echo "$as_me:14776: result: $with_ext_mouse" >&5
14777 echo "${ECHO_T}$with_ext_mouse" >&6
14778 NCURSES_MOUSE_VERSION=1
14779 if test "x$with_ext_mouse" = xyes ; then
14780         NCURSES_MOUSE_VERSION=2
14781
14782 if test "${with_abi_version+set}" != set; then
14783         case $cf_cv_rel_version in
14784         (5.*)
14785                 cf_cv_rel_version=6.0
14786                 cf_cv_abi_version=6
14787                 { echo "$as_me:14787: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14788 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14789                 ;;
14790         esac
14791 fi
14792
14793 fi
14794
14795 ###   use option --enable-ext-putwin to turn on extended screendumps
14796 echo "$as_me:14796: checking if you want to use extended putwin/screendump" >&5
14797 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14798
14799 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14800 if test "${enable_ext_putwin+set}" = set; then
14801   enableval="$enable_ext_putwin"
14802   with_ext_putwin=$enableval
14803 else
14804   with_ext_putwin=$cf_dft_ext_putwin
14805 fi;
14806 echo "$as_me:14806: result: $with_ext_putwin" >&5
14807 echo "${ECHO_T}$with_ext_putwin" >&6
14808 if test "x$with_ext_putwin" = xyes ; then
14809
14810 cat >>confdefs.h <<\EOF
14811 #define NCURSES_EXT_PUTWIN 1
14812 EOF
14813
14814 fi
14815
14816 echo "$as_me:14816: checking if you want \$NCURSES_NO_PADDING code" >&5
14817 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14818
14819 # Check whether --enable-no-padding or --disable-no-padding was given.
14820 if test "${enable_no_padding+set}" = set; then
14821   enableval="$enable_no_padding"
14822   with_no_padding=$enableval
14823 else
14824   with_no_padding=$with_ext_funcs
14825 fi;
14826 echo "$as_me:14826: result: $with_no_padding" >&5
14827 echo "${ECHO_T}$with_no_padding" >&6
14828 test "x$with_no_padding" = xyes &&
14829 cat >>confdefs.h <<\EOF
14830 #define NCURSES_NO_PADDING 1
14831 EOF
14832
14833 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14834 echo "$as_me:14834: checking if you want SIGWINCH handler" >&5
14835 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14836
14837 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14838 if test "${enable_sigwinch+set}" = set; then
14839   enableval="$enable_sigwinch"
14840   with_sigwinch=$enableval
14841 else
14842   with_sigwinch=$with_ext_funcs
14843 fi;
14844 echo "$as_me:14844: result: $with_sigwinch" >&5
14845 echo "${ECHO_T}$with_sigwinch" >&6
14846 test "x$with_sigwinch" = xyes &&
14847 cat >>confdefs.h <<\EOF
14848 #define USE_SIGWINCH 1
14849 EOF
14850
14851 ###   use option --enable-tcap-names to allow user to define new capabilities
14852 echo "$as_me:14852: checking if you want user-definable terminal capabilities like termcap" >&5
14853 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14854
14855 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14856 if test "${enable_tcap_names+set}" = set; then
14857   enableval="$enable_tcap_names"
14858   with_tcap_names=$enableval
14859 else
14860   with_tcap_names=$with_ext_funcs
14861 fi;
14862 echo "$as_me:14862: result: $with_tcap_names" >&5
14863 echo "${ECHO_T}$with_tcap_names" >&6
14864 NCURSES_XNAMES=0
14865 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14866
14867 ##############################################################################
14868
14869 echo "$as_me:14869: checking if you want to link with the pthread library" >&5
14870 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14871
14872 # Check whether --with-pthread or --without-pthread was given.
14873 if test "${with_pthread+set}" = set; then
14874   withval="$with_pthread"
14875   with_pthread=$withval
14876 else
14877   with_pthread=no
14878 fi;
14879 echo "$as_me:14879: result: $with_pthread" >&5
14880 echo "${ECHO_T}$with_pthread" >&6
14881
14882 if test "$with_pthread" != no ; then
14883         echo "$as_me:14883: checking for pthread.h" >&5
14884 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14885 if test "${ac_cv_header_pthread_h+set}" = set; then
14886   echo $ECHO_N "(cached) $ECHO_C" >&6
14887 else
14888   cat >conftest.$ac_ext <<_ACEOF
14889 #line 14889 "configure"
14890 #include "confdefs.h"
14891 #include <pthread.h>
14892 _ACEOF
14893 if { (eval echo "$as_me:14893: \"$ac_cpp conftest.$ac_ext\"") >&5
14894   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14895   ac_status=$?
14896   egrep -v '^ *\+' conftest.er1 >conftest.err
14897   rm -f conftest.er1
14898   cat conftest.err >&5
14899   echo "$as_me:14899: \$? = $ac_status" >&5
14900   (exit $ac_status); } >/dev/null; then
14901   if test -s conftest.err; then
14902     ac_cpp_err=$ac_c_preproc_warn_flag
14903   else
14904     ac_cpp_err=
14905   fi
14906 else
14907   ac_cpp_err=yes
14908 fi
14909 if test -z "$ac_cpp_err"; then
14910   ac_cv_header_pthread_h=yes
14911 else
14912   echo "$as_me: failed program was:" >&5
14913   cat conftest.$ac_ext >&5
14914   ac_cv_header_pthread_h=no
14915 fi
14916 rm -f conftest.err conftest.$ac_ext
14917 fi
14918 echo "$as_me:14918: result: $ac_cv_header_pthread_h" >&5
14919 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14920 if test $ac_cv_header_pthread_h = yes; then
14921
14922 cat >>confdefs.h <<\EOF
14923 #define HAVE_PTHREADS_H 1
14924 EOF
14925
14926         for cf_lib_pthread in pthread c_r
14927         do
14928             echo "$as_me:14928: checking if we can link with the $cf_lib_pthread library" >&5
14929 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14930             cf_save_LIBS="$LIBS"
14931
14932 cf_add_libs="$LIBS"
14933 # reverse order
14934 cf_add_0lib=
14935 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14936 # filter duplicates
14937 for cf_add_1lib in $cf_add_0lib; do
14938         for cf_add_2lib in $cf_add_libs; do
14939                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14940                         cf_add_1lib=
14941                         break
14942                 fi
14943         done
14944         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14945 done
14946 LIBS="$cf_add_libs"
14947
14948             cat >conftest.$ac_ext <<_ACEOF
14949 #line 14949 "configure"
14950 #include "confdefs.h"
14951
14952 #include <pthread.h>
14953
14954 int
14955 main (void)
14956 {
14957
14958                 int rc = pthread_create(0,0,0,0);
14959                 int r2 = pthread_mutexattr_settype(0, 0);
14960
14961   ;
14962   return 0;
14963 }
14964 _ACEOF
14965 rm -f conftest.$ac_objext conftest$ac_exeext
14966 if { (eval echo "$as_me:14966: \"$ac_link\"") >&5
14967   (eval $ac_link) 2>&5
14968   ac_status=$?
14969   echo "$as_me:14969: \$? = $ac_status" >&5
14970   (exit $ac_status); } &&
14971          { ac_try='test -s conftest$ac_exeext'
14972   { (eval echo "$as_me:14972: \"$ac_try\"") >&5
14973   (eval $ac_try) 2>&5
14974   ac_status=$?
14975   echo "$as_me:14975: \$? = $ac_status" >&5
14976   (exit $ac_status); }; }; then
14977   with_pthread=yes
14978 else
14979   echo "$as_me: failed program was:" >&5
14980 cat conftest.$ac_ext >&5
14981 with_pthread=no
14982 fi
14983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14984             LIBS="$cf_save_LIBS"
14985             echo "$as_me:14985: result: $with_pthread" >&5
14986 echo "${ECHO_T}$with_pthread" >&6
14987             test "$with_pthread" = yes && break
14988         done
14989
14990         if test "$with_pthread" = yes ; then
14991
14992 cf_add_libs="$LIBS"
14993 # reverse order
14994 cf_add_0lib=
14995 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14996 # filter duplicates
14997 for cf_add_1lib in $cf_add_0lib; do
14998         for cf_add_2lib in $cf_add_libs; do
14999                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15000                         cf_add_1lib=
15001                         break
15002                 fi
15003         done
15004         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15005 done
15006 LIBS="$cf_add_libs"
15007
15008 cat >>confdefs.h <<\EOF
15009 #define HAVE_LIBPTHREADS 1
15010 EOF
15011
15012         else
15013             { { echo "$as_me:15013: error: Cannot link with pthread library" >&5
15014 echo "$as_me: error: Cannot link with pthread library" >&2;}
15015    { (exit 1); exit 1; }; }
15016         fi
15017
15018 fi
15019
15020 fi
15021
15022 if test "x$with_pthread" != xno; then
15023         echo "$as_me:15023: checking for pthread_kill" >&5
15024 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15025 if test "${ac_cv_func_pthread_kill+set}" = set; then
15026   echo $ECHO_N "(cached) $ECHO_C" >&6
15027 else
15028   cat >conftest.$ac_ext <<_ACEOF
15029 #line 15029 "configure"
15030 #include "confdefs.h"
15031 #define pthread_kill autoconf_temporary
15032 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15033 #undef pthread_kill
15034
15035 #ifdef __cplusplus
15036 extern "C"
15037 #endif
15038
15039 /* We use char because int might match the return type of a gcc2
15040    builtin and then its argument prototype would still apply.  */
15041 char pthread_kill (void);
15042
15043 int
15044 main (void)
15045 {
15046
15047 /* The GNU C library defines stubs for functions which it implements
15048     to always fail with ENOSYS.  Some functions are actually named
15049     something starting with __ and the normal name is an alias.  */
15050 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15051 #error found stub for pthread_kill
15052 #endif
15053
15054         return pthread_kill ();
15055   ;
15056   return 0;
15057 }
15058 _ACEOF
15059 rm -f conftest.$ac_objext conftest$ac_exeext
15060 if { (eval echo "$as_me:15060: \"$ac_link\"") >&5
15061   (eval $ac_link) 2>&5
15062   ac_status=$?
15063   echo "$as_me:15063: \$? = $ac_status" >&5
15064   (exit $ac_status); } &&
15065          { ac_try='test -s conftest$ac_exeext'
15066   { (eval echo "$as_me:15066: \"$ac_try\"") >&5
15067   (eval $ac_try) 2>&5
15068   ac_status=$?
15069   echo "$as_me:15069: \$? = $ac_status" >&5
15070   (exit $ac_status); }; }; then
15071   ac_cv_func_pthread_kill=yes
15072 else
15073   echo "$as_me: failed program was:" >&5
15074 cat conftest.$ac_ext >&5
15075 ac_cv_func_pthread_kill=no
15076 fi
15077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15078 fi
15079 echo "$as_me:15079: result: $ac_cv_func_pthread_kill" >&5
15080 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15081 if test $ac_cv_func_pthread_kill = yes; then
15082
15083                 echo "$as_me:15083: checking if you want to allow EINTR in wgetch with pthreads" >&5
15084 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15085
15086 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15087 if test "${enable_pthreads_eintr+set}" = set; then
15088   enableval="$enable_pthreads_eintr"
15089   use_pthreads_eintr=$enableval
15090 else
15091   use_pthreads_eintr=no
15092 fi;
15093                 echo "$as_me:15093: result: $use_pthreads_eintr" >&5
15094 echo "${ECHO_T}$use_pthreads_eintr" >&6
15095                 if test "x$use_pthreads_eintr" = xyes ; then
15096
15097 cat >>confdefs.h <<\EOF
15098 #define USE_PTHREADS_EINTR 1
15099 EOF
15100
15101                 fi
15102 fi
15103
15104         echo "$as_me:15104: checking if you want to use weak-symbols for pthreads" >&5
15105 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15106
15107 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15108 if test "${enable_weak_symbols+set}" = set; then
15109   enableval="$enable_weak_symbols"
15110   use_weak_symbols=$enableval
15111 else
15112   use_weak_symbols=no
15113 fi;
15114         echo "$as_me:15114: result: $use_weak_symbols" >&5
15115 echo "${ECHO_T}$use_weak_symbols" >&6
15116         if test "x$use_weak_symbols" = xyes ; then
15117
15118 echo "$as_me:15118: checking if $CC supports weak symbols" >&5
15119 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15120 if test "${cf_cv_weak_symbols+set}" = set; then
15121   echo $ECHO_N "(cached) $ECHO_C" >&6
15122 else
15123
15124 cat >conftest.$ac_ext <<_ACEOF
15125 #line 15125 "configure"
15126 #include "confdefs.h"
15127
15128 #include <stdio.h>
15129 int
15130 main (void)
15131 {
15132
15133 #if defined(__GNUC__)
15134 #  if defined __USE_ISOC99
15135 #    define _cat_pragma(exp)    _Pragma(#exp)
15136 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15137 #  else
15138 #    define _weak_pragma(exp)
15139 #  endif
15140 #  define _declare(name)        __extension__ extern __typeof__(name) name
15141 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15142 #endif
15143
15144 weak_symbol(fopen);
15145
15146   ;
15147   return 0;
15148 }
15149 _ACEOF
15150 rm -f conftest.$ac_objext
15151 if { (eval echo "$as_me:15151: \"$ac_compile\"") >&5
15152   (eval $ac_compile) 2>&5
15153   ac_status=$?
15154   echo "$as_me:15154: \$? = $ac_status" >&5
15155   (exit $ac_status); } &&
15156          { ac_try='test -s conftest.$ac_objext'
15157   { (eval echo "$as_me:15157: \"$ac_try\"") >&5
15158   (eval $ac_try) 2>&5
15159   ac_status=$?
15160   echo "$as_me:15160: \$? = $ac_status" >&5
15161   (exit $ac_status); }; }; then
15162   cf_cv_weak_symbols=yes
15163 else
15164   echo "$as_me: failed program was:" >&5
15165 cat conftest.$ac_ext >&5
15166 cf_cv_weak_symbols=no
15167 fi
15168 rm -f conftest.$ac_objext conftest.$ac_ext
15169
15170 fi
15171 echo "$as_me:15171: result: $cf_cv_weak_symbols" >&5
15172 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15173
15174         else
15175                 cf_cv_weak_symbols=no
15176         fi
15177
15178         if test "x$cf_cv_weak_symbols" = xyes ; then
15179
15180 cat >>confdefs.h <<\EOF
15181 #define USE_WEAK_SYMBOLS 1
15182 EOF
15183
15184         fi
15185 fi
15186
15187 PTHREAD=
15188 if test "x$with_pthread" = "xyes" ; then
15189
15190 cat >>confdefs.h <<\EOF
15191 #define USE_PTHREADS 1
15192 EOF
15193
15194         enable_reentrant=yes
15195         if test "x$cf_cv_weak_symbols" = xyes ; then
15196                 PTHREAD=-lpthread
15197
15198 cf_add_libs="$PRIVATE_LIBS"
15199 # reverse order
15200 cf_add_0lib=
15201 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15202 # filter duplicates
15203 for cf_add_1lib in $cf_add_0lib; do
15204         for cf_add_2lib in $cf_add_libs; do
15205                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15206                         cf_add_1lib=
15207                         break
15208                 fi
15209         done
15210         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15211 done
15212 PRIVATE_LIBS="$cf_add_libs"
15213
15214         fi
15215 fi
15216
15217 # Reentrant code has to be opaque; there's little advantage to making ncurses
15218 # opaque outside of that, so there is no --enable-opaque option.  We can use
15219 # this option without --with-pthreads, but this will be always set for
15220 # pthreads.
15221 echo "$as_me:15221: checking if you want reentrant code" >&5
15222 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15223
15224 # Check whether --enable-reentrant or --disable-reentrant was given.
15225 if test "${enable_reentrant+set}" = set; then
15226   enableval="$enable_reentrant"
15227   with_reentrant=$enableval
15228 else
15229   with_reentrant=no
15230 fi;
15231 echo "$as_me:15231: result: $with_reentrant" >&5
15232 echo "${ECHO_T}$with_reentrant" >&6
15233 if test "x$with_reentrant" = xyes ; then
15234         cf_cv_enable_reentrant=1
15235         cf_cv_enable_opaque="NCURSES_INTERNALS"
15236         NCURSES_SIZE_T=int
15237         if test "x$cf_cv_weak_symbols" = xyes ; then
15238
15239 # remove pthread library from $LIBS
15240 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15241
15242 cf_add_libs="$TEST_LIBS"
15243 # reverse order
15244 cf_add_0lib=
15245 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15246 # filter duplicates
15247 for cf_add_1lib in $cf_add_0lib; do
15248         for cf_add_2lib in $cf_add_libs; do
15249                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15250                         cf_add_1lib=
15251                         break
15252                 fi
15253         done
15254         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15255 done
15256 TEST_LIBS="$cf_add_libs"
15257
15258 cf_add_libs="$TEST_LIBS2"
15259 # reverse order
15260 cf_add_0lib=
15261 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15262 # filter duplicates
15263 for cf_add_1lib in $cf_add_0lib; do
15264         for cf_add_2lib in $cf_add_libs; do
15265                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15266                         cf_add_1lib=
15267                         break
15268                 fi
15269         done
15270         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15271 done
15272 TEST_LIBS2="$cf_add_libs"
15273
15274 cf_add_libs="$PRIVATE_LIBS"
15275 # reverse order
15276 cf_add_0lib=
15277 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15278 # filter duplicates
15279 for cf_add_1lib in $cf_add_0lib; do
15280         for cf_add_2lib in $cf_add_libs; do
15281                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15282                         cf_add_1lib=
15283                         break
15284                 fi
15285         done
15286         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15287 done
15288 PRIVATE_LIBS="$cf_add_libs"
15289
15290         else
15291                 # when not using weak symbols but with_reentrant,
15292                 # add 't' to the library suffix on all platforms
15293                 # except cygwin, where we only do that if ALSO
15294                 # compiling with full thread support.
15295                 case "$host" in
15296                 (*cygwin* | *msys*)
15297                         if test "$with_pthread" = "yes" ; then
15298                                 if test "x$disable_lib_suffixes" = "xno" ; then
15299                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15300                                 fi
15301                         fi ;;
15302                 (*)
15303                         if test "x$disable_lib_suffixes" = "xno" ; then
15304                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15305                         fi
15306                         ;;
15307                 esac
15308         fi
15309
15310 cat >>confdefs.h <<\EOF
15311 #define USE_REENTRANT 1
15312 EOF
15313
15314 if test "${with_abi_version+set}" != set; then
15315         case $cf_cv_rel_version in
15316         (5.*)
15317                 cf_cv_rel_version=6.0
15318                 cf_cv_abi_version=6
15319                 { echo "$as_me:15319: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15320 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15321                 ;;
15322         esac
15323 fi
15324
15325 else
15326         cf_cv_enable_reentrant=0
15327         cf_cv_enable_opaque="NCURSES_OPAQUE"
15328         NCURSES_SIZE_T=short
15329 fi
15330
15331 echo "$as_me:15331: checking if you want opaque curses-library structures" >&5
15332 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15333
15334 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15335 if test "${enable_opaque_curses+set}" = set; then
15336   enableval="$enable_opaque_curses"
15337   test "$enableval" != yes && enableval=no
15338         if test "$enableval" != "no" ; then
15339     enable_opaque_curses=yes
15340         else
15341
15342          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15343          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15344
15345         fi
15346 else
15347   enableval=no
15348
15349          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15350          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15351
15352 fi;
15353 echo "$as_me:15353: result: $enable_opaque_curses" >&5
15354 echo "${ECHO_T}$enable_opaque_curses" >&6
15355
15356 test "$cf_cv_enable_reentrant" = 1 && \
15357 test "$enable_opaque_curses" = no && \
15358 { { echo "$as_me:15358: error: reentrant configuration requires opaque library" >&5
15359 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15360    { (exit 1); exit 1; }; }
15361
15362 echo "$as_me:15362: checking if you want opaque form-library structures" >&5
15363 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15364
15365 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15366 if test "${enable_opaque_form+set}" = set; then
15367   enableval="$enable_opaque_form"
15368   enable_opaque_form=yes
15369 else
15370   enable_opaque_form=no
15371 fi;
15372 echo "$as_me:15372: result: $enable_opaque_form" >&5
15373 echo "${ECHO_T}$enable_opaque_form" >&6
15374
15375 echo "$as_me:15375: checking if you want opaque menu-library structures" >&5
15376 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15377
15378 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15379 if test "${enable_opaque_menu+set}" = set; then
15380   enableval="$enable_opaque_menu"
15381   enable_opaque_menu=yes
15382 else
15383   enable_opaque_menu=no
15384 fi;
15385 echo "$as_me:15385: result: $enable_opaque_menu" >&5
15386 echo "${ECHO_T}$enable_opaque_menu" >&6
15387
15388 echo "$as_me:15388: checking if you want opaque panel-library structures" >&5
15389 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15390
15391 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15392 if test "${enable_opaque_panel+set}" = set; then
15393   enableval="$enable_opaque_panel"
15394   enable_opaque_panel=yes
15395 else
15396   enable_opaque_panel=no
15397 fi;
15398 echo "$as_me:15398: result: $enable_opaque_panel" >&5
15399 echo "${ECHO_T}$enable_opaque_panel" >&6
15400
15401 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15402 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15403 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15404 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15405
15406 ### Allow using a different wrap-prefix
15407 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15408         echo "$as_me:15408: checking for prefix used to wrap public variables" >&5
15409 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15410
15411 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15412 if test "${with_wrap_prefix+set}" = set; then
15413   withval="$with_wrap_prefix"
15414   NCURSES_WRAP_PREFIX=$withval
15415 else
15416   NCURSES_WRAP_PREFIX=_nc_
15417 fi;
15418         echo "$as_me:15418: result: $NCURSES_WRAP_PREFIX" >&5
15419 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15420 else
15421         NCURSES_WRAP_PREFIX=_nc_
15422 fi
15423
15424 cat >>confdefs.h <<EOF
15425 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15426 EOF
15427
15428 ###############################################################################
15429 # These options are relatively safe to experiment with.
15430
15431 echo "$as_me:15431: checking if you want all development code" >&5
15432 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15433
15434 # Check whether --with-develop or --without-develop was given.
15435 if test "${with_develop+set}" = set; then
15436   withval="$with_develop"
15437   with_develop=$withval
15438 else
15439   with_develop=no
15440 fi;
15441 echo "$as_me:15441: result: $with_develop" >&5
15442 echo "${ECHO_T}$with_develop" >&6
15443
15444 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15445 echo "$as_me:15445: checking if you want hard-tabs code" >&5
15446 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15447
15448 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15449 if test "${enable_hard_tabs+set}" = set; then
15450   enableval="$enable_hard_tabs"
15451
15452 else
15453   enable_hard_tabs=$with_develop
15454 fi;
15455 echo "$as_me:15455: result: $enable_hard_tabs" >&5
15456 echo "${ECHO_T}$enable_hard_tabs" >&6
15457 test "x$enable_hard_tabs" = xyes &&
15458 cat >>confdefs.h <<\EOF
15459 #define USE_HARD_TABS 1
15460 EOF
15461
15462 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15463 echo "$as_me:15463: checking if you want limited support for xmc" >&5
15464 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15465
15466 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15467 if test "${enable_xmc_glitch+set}" = set; then
15468   enableval="$enable_xmc_glitch"
15469
15470 else
15471   enable_xmc_glitch=$with_develop
15472 fi;
15473 echo "$as_me:15473: result: $enable_xmc_glitch" >&5
15474 echo "${ECHO_T}$enable_xmc_glitch" >&6
15475 test "x$enable_xmc_glitch" = xyes &&
15476 cat >>confdefs.h <<\EOF
15477 #define USE_XMC_SUPPORT 1
15478 EOF
15479
15480 ###############################################################################
15481 # These are just experimental, probably should not be in a package:
15482
15483 echo "$as_me:15483: checking if you do not want to assume colors are white-on-black" >&5
15484 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15485
15486 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15487 if test "${enable_assumed_color+set}" = set; then
15488   enableval="$enable_assumed_color"
15489   with_assumed_color=$enableval
15490 else
15491   with_assumed_color=yes
15492 fi;
15493 echo "$as_me:15493: result: $with_assumed_color" >&5
15494 echo "${ECHO_T}$with_assumed_color" >&6
15495 test "x$with_assumed_color" = xyes &&
15496 cat >>confdefs.h <<\EOF
15497 #define USE_ASSUMED_COLOR 1
15498 EOF
15499
15500 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15501 echo "$as_me:15501: checking if you want hashmap scrolling-optimization code" >&5
15502 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15503
15504 # Check whether --enable-hashmap or --disable-hashmap was given.
15505 if test "${enable_hashmap+set}" = set; then
15506   enableval="$enable_hashmap"
15507   with_hashmap=$enableval
15508 else
15509   with_hashmap=yes
15510 fi;
15511 echo "$as_me:15511: result: $with_hashmap" >&5
15512 echo "${ECHO_T}$with_hashmap" >&6
15513 test "x$with_hashmap" = xyes &&
15514 cat >>confdefs.h <<\EOF
15515 #define USE_HASHMAP 1
15516 EOF
15517
15518 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15519 echo "$as_me:15519: checking if you want colorfgbg code" >&5
15520 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15521
15522 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15523 if test "${enable_colorfgbg+set}" = set; then
15524   enableval="$enable_colorfgbg"
15525   with_colorfgbg=$enableval
15526 else
15527   with_colorfgbg=no
15528 fi;
15529 echo "$as_me:15529: result: $with_colorfgbg" >&5
15530 echo "${ECHO_T}$with_colorfgbg" >&6
15531 test "x$with_colorfgbg" = xyes &&
15532 cat >>confdefs.h <<\EOF
15533 #define USE_COLORFGBG 1
15534 EOF
15535
15536 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15537 echo "$as_me:15537: checking if you want to use gcc -fvisibility option" >&5
15538 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15539
15540 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15541 if test "${enable_fvisibility+set}" = set; then
15542   enableval="$enable_fvisibility"
15543   cf_with_fvisibility=$enableval
15544 else
15545   cf_with_fvisibility=no
15546 fi;
15547 echo "$as_me:15547: result: $cf_with_fvisibility" >&5
15548 echo "${ECHO_T}$cf_with_fvisibility" >&6
15549
15550 NCURSES_IMPEXP=
15551 NCURSES_CXX_IMPEXP=
15552 if test "x$cf_with_fvisibility" = xyes; then
15553
15554 echo "$as_me:15554: checking if $CC -fvisibility=hidden option works" >&5
15555 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15556 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15557   echo $ECHO_N "(cached) $ECHO_C" >&6
15558 else
15559
15560     cf_save_cflags="$CFLAGS"
15561     CFLAGS="$CFLAGS -fvisibility=hidden"
15562     cat >conftest.$ac_ext <<_ACEOF
15563 #line 15563 "configure"
15564 #include "confdefs.h"
15565
15566 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15567
15568 int
15569 main (void)
15570 {
15571
15572         if (somefunc()) return 1;
15573
15574   ;
15575   return 0;
15576 }
15577 _ACEOF
15578 rm -f conftest.$ac_objext conftest$ac_exeext
15579 if { (eval echo "$as_me:15579: \"$ac_link\"") >&5
15580   (eval $ac_link) 2>&5
15581   ac_status=$?
15582   echo "$as_me:15582: \$? = $ac_status" >&5
15583   (exit $ac_status); } &&
15584          { ac_try='test -s conftest$ac_exeext'
15585   { (eval echo "$as_me:15585: \"$ac_try\"") >&5
15586   (eval $ac_try) 2>&5
15587   ac_status=$?
15588   echo "$as_me:15588: \$? = $ac_status" >&5
15589   (exit $ac_status); }; }; then
15590   cf_cv_fvisibility_hidden=yes
15591 else
15592   echo "$as_me: failed program was:" >&5
15593 cat conftest.$ac_ext >&5
15594 cf_cv_fvisibility_hidden=no
15595 fi
15596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15597     CFLAGS=$cf_save_cflags
15598
15599 fi
15600 echo "$as_me:15600: result: $cf_cv_fvisibility_hidden" >&5
15601 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15602
15603         if test "x$cf_cv_fvisibility_hidden" = xyes
15604         then
15605
15606 cf_fix_cppflags=no
15607 cf_new_cflags=
15608 cf_new_cppflags=
15609 cf_new_extra_cppflags=
15610
15611 for cf_add_cflags in -fvisibility=hidden
15612 do
15613 case $cf_fix_cppflags in
15614 (no)
15615         case $cf_add_cflags in
15616         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15617                 case $cf_add_cflags in
15618                 (-D*)
15619                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15620
15621                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15622                                 && test -z "${cf_tst_cflags}" \
15623                                 && cf_fix_cppflags=yes
15624
15625                         if test $cf_fix_cppflags = yes ; then
15626
15627         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15628         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15629
15630                                 continue
15631                         elif test "${cf_tst_cflags}" = "\"'" ; then
15632
15633         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15634         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15635
15636                                 continue
15637                         fi
15638                         ;;
15639                 esac
15640                 case "$CPPFLAGS" in
15641                 (*$cf_add_cflags)
15642                         ;;
15643                 (*)
15644                         case $cf_add_cflags in
15645                         (-D*)
15646                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15647
15648 CPPFLAGS=`echo "$CPPFLAGS" | \
15649         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15650                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15651
15652                                 ;;
15653                         esac
15654
15655         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15656         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15657
15658                         ;;
15659                 esac
15660                 ;;
15661         (*)
15662
15663         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15664         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15665
15666                 ;;
15667         esac
15668         ;;
15669 (yes)
15670
15671         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15672         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15673
15674         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15675
15676         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15677                 && test -z "${cf_tst_cflags}" \
15678                 && cf_fix_cppflags=no
15679         ;;
15680 esac
15681 done
15682
15683 if test -n "$cf_new_cflags" ; then
15684
15685         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15686         CFLAGS="${CFLAGS}$cf_new_cflags"
15687
15688 fi
15689
15690 if test -n "$cf_new_cppflags" ; then
15691
15692         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15693         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15694
15695 fi
15696
15697 if test -n "$cf_new_extra_cppflags" ; then
15698
15699         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15700         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15701
15702 fi
15703
15704                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15705         fi
15706         if test -n "$CXX"
15707         then
15708                 ac_ext=cc
15709 ac_cpp='$CXXCPP $CPPFLAGS'
15710 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15711 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15712 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15713 ac_main_return=return
15714
15715 echo "$as_me:15715: checking if $CXX -fvisibility=hidden option works" >&5
15716 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15717 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15718   echo $ECHO_N "(cached) $ECHO_C" >&6
15719 else
15720
15721     cf_save_cflags="$CXXFLAGS"
15722     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15723     cat >conftest.$ac_ext <<_ACEOF
15724 #line 15724 "configure"
15725 #include "confdefs.h"
15726
15727 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15728
15729 int
15730 main (void)
15731 {
15732
15733         if (somefunc()) return 1;
15734
15735   ;
15736   return 0;
15737 }
15738 _ACEOF
15739 rm -f conftest.$ac_objext conftest$ac_exeext
15740 if { (eval echo "$as_me:15740: \"$ac_link\"") >&5
15741   (eval $ac_link) 2>&5
15742   ac_status=$?
15743   echo "$as_me:15743: \$? = $ac_status" >&5
15744   (exit $ac_status); } &&
15745          { ac_try='test -s conftest$ac_exeext'
15746   { (eval echo "$as_me:15746: \"$ac_try\"") >&5
15747   (eval $ac_try) 2>&5
15748   ac_status=$?
15749   echo "$as_me:15749: \$? = $ac_status" >&5
15750   (exit $ac_status); }; }; then
15751   cf_cv_fvisibility_hidden2=yes
15752 else
15753   echo "$as_me: failed program was:" >&5
15754 cat conftest.$ac_ext >&5
15755 cf_cv_fvisibility_hidden2=no
15756 fi
15757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15758     CXXFLAGS=$cf_save_cflags
15759
15760 fi
15761 echo "$as_me:15761: result: $cf_cv_fvisibility_hidden2" >&5
15762 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15763
15764                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15765                 then
15766
15767 cf_save_CXXFLAGS="$CFLAGS"
15768 CFLAGS="$CXXFLAGS"
15769
15770 cf_fix_cppflags=no
15771 cf_new_cflags=
15772 cf_new_cppflags=
15773 cf_new_extra_cppflags=
15774
15775 for cf_add_cflags in -fvisibility=hidden
15776 do
15777 case $cf_fix_cppflags in
15778 (no)
15779         case $cf_add_cflags in
15780         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15781                 case $cf_add_cflags in
15782                 (-D*)
15783                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15784
15785                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15786                                 && test -z "${cf_tst_cflags}" \
15787                                 && cf_fix_cppflags=yes
15788
15789                         if test $cf_fix_cppflags = yes ; then
15790
15791         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15792         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15793
15794                                 continue
15795                         elif test "${cf_tst_cflags}" = "\"'" ; then
15796
15797         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15798         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15799
15800                                 continue
15801                         fi
15802                         ;;
15803                 esac
15804                 case "$CPPFLAGS" in
15805                 (*$cf_add_cflags)
15806                         ;;
15807                 (*)
15808                         case $cf_add_cflags in
15809                         (-D*)
15810                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15811
15812 CPPFLAGS=`echo "$CPPFLAGS" | \
15813         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15814                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15815
15816                                 ;;
15817                         esac
15818
15819         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15820         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15821
15822                         ;;
15823                 esac
15824                 ;;
15825         (*)
15826
15827         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15828         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15829
15830                 ;;
15831         esac
15832         ;;
15833 (yes)
15834
15835         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15836         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15837
15838         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15839
15840         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15841                 && test -z "${cf_tst_cflags}" \
15842                 && cf_fix_cppflags=no
15843         ;;
15844 esac
15845 done
15846
15847 if test -n "$cf_new_cflags" ; then
15848
15849         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15850         CFLAGS="${CFLAGS}$cf_new_cflags"
15851
15852 fi
15853
15854 if test -n "$cf_new_cppflags" ; then
15855
15856         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15857         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15858
15859 fi
15860
15861 if test -n "$cf_new_extra_cppflags" ; then
15862
15863         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15864         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15865
15866 fi
15867
15868 CXXFLAGS="$CFLAGS"
15869 CFLAGS="$cf_save_CXXFLAGS"
15870
15871                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15872                 fi
15873                 ac_ext=c
15874 ac_cpp='$CPP $CPPFLAGS'
15875 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15876 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15877 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15878 ac_main_return=return
15879
15880         fi
15881 fi
15882
15883 ###   use option --enable-interop to turn on use of bindings used for interop
15884 echo "$as_me:15884: checking if you want interop bindings" >&5
15885 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15886
15887 # Check whether --enable-interop or --disable-interop was given.
15888 if test "${enable_interop+set}" = set; then
15889   enableval="$enable_interop"
15890   with_exp_interop=$enableval
15891 else
15892   with_exp_interop=$cf_dft_interop
15893 fi;
15894 echo "$as_me:15894: result: $with_exp_interop" >&5
15895 echo "${ECHO_T}$with_exp_interop" >&6
15896
15897 NCURSES_INTEROP_FUNCS=0
15898 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15899
15900 echo "$as_me:15900: checking if you want experimental safe-sprintf code" >&5
15901 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15902
15903 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15904 if test "${enable_safe_sprintf+set}" = set; then
15905   enableval="$enable_safe_sprintf"
15906   with_safe_sprintf=$enableval
15907 else
15908   with_safe_sprintf=no
15909 fi;
15910 echo "$as_me:15910: result: $with_safe_sprintf" >&5
15911 echo "${ECHO_T}$with_safe_sprintf" >&6
15912
15913 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15914 # when hashmap is used scroll hints are useless
15915 if test "$with_hashmap" = no ; then
15916 echo "$as_me:15916: checking if you want to experiment without scrolling-hints code" >&5
15917 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15918
15919 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15920 if test "${enable_scroll_hints+set}" = set; then
15921   enableval="$enable_scroll_hints"
15922   with_scroll_hints=$enableval
15923 else
15924   with_scroll_hints=yes
15925 fi;
15926 echo "$as_me:15926: result: $with_scroll_hints" >&5
15927 echo "${ECHO_T}$with_scroll_hints" >&6
15928 test "x$with_scroll_hints" = xyes &&
15929 cat >>confdefs.h <<\EOF
15930 #define USE_SCROLL_HINTS 1
15931 EOF
15932
15933 fi
15934
15935 echo "$as_me:15935: checking if you want wgetch-events code" >&5
15936 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15937
15938 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15939 if test "${enable_wgetch_events+set}" = set; then
15940   enableval="$enable_wgetch_events"
15941   with_wgetch_events=$enableval
15942 else
15943   with_wgetch_events=no
15944 fi;
15945 echo "$as_me:15945: result: $with_wgetch_events" >&5
15946 echo "${ECHO_T}$with_wgetch_events" >&6
15947 test "x$with_wgetch_events" = xyes &&
15948 cat >>confdefs.h <<\EOF
15949 #define NCURSES_WGETCH_EVENTS 1
15950 EOF
15951
15952 ###############################################################################
15953
15954 ###     use option --disable-echo to suppress full display compiling commands
15955
15956 echo "$as_me:15956: checking if you want to see long compiling messages" >&5
15957 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15958
15959 # Check whether --enable-echo or --disable-echo was given.
15960 if test "${enable_echo+set}" = set; then
15961   enableval="$enable_echo"
15962   test "$enableval" != no && enableval=yes
15963         if test "$enableval" != "yes" ; then
15964
15965         ECHO_LT='--silent'
15966         ECHO_LD='@echo linking $@;'
15967         RULE_CC='@echo compiling $<'
15968         SHOW_CC='@echo compiling $@'
15969         ECHO_CC='@'
15970
15971         else
15972
15973         ECHO_LT=''
15974         ECHO_LD=''
15975         RULE_CC=''
15976         SHOW_CC=''
15977         ECHO_CC=''
15978
15979         fi
15980 else
15981   enableval=yes
15982
15983         ECHO_LT=''
15984         ECHO_LD=''
15985         RULE_CC=''
15986         SHOW_CC=''
15987         ECHO_CC=''
15988
15989 fi;
15990 echo "$as_me:15990: result: $enableval" >&5
15991 echo "${ECHO_T}$enableval" >&6
15992
15993 if test "x$enable_echo" = xyes; then
15994         ECHO_LINK=
15995 else
15996         ECHO_LINK='@ echo linking $@ ... ;'
15997         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15998         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15999 fi
16000
16001 # --disable-stripping is used for debugging
16002
16003 echo "$as_me:16003: checking if you want to install stripped executables" >&5
16004 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16005
16006 # Check whether --enable-stripping or --disable-stripping was given.
16007 if test "${enable_stripping+set}" = set; then
16008   enableval="$enable_stripping"
16009   test "$enableval" != no && enableval=yes
16010         if test "$enableval" != "yes" ; then
16011     with_stripping=no
16012         else
16013                 with_stripping=yes
16014         fi
16015 else
16016   enableval=yes
16017         with_stripping=yes
16018
16019 fi;
16020 echo "$as_me:16020: result: $with_stripping" >&5
16021 echo "${ECHO_T}$with_stripping" >&6
16022
16023 if test "$with_stripping" = yes
16024 then
16025         INSTALL_OPT_S="-s"
16026 else
16027         INSTALL_OPT_S=
16028 fi
16029
16030 : ${INSTALL:=install}
16031 echo "$as_me:16031: checking if install accepts -p option" >&5
16032 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16033 if test "${cf_cv_install_p+set}" = set; then
16034   echo $ECHO_N "(cached) $ECHO_C" >&6
16035 else
16036
16037         rm -rf conftest*
16038         date >conftest.in
16039         mkdir conftest.out
16040         sleep 3
16041         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16042         then
16043                 if test -f conftest.out/conftest.in
16044                 then
16045                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16046                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16047                         if test -s conftest.err
16048                         then
16049                                 cf_cv_install_p=no
16050                         else
16051                                 cf_cv_install_p=yes
16052                         fi
16053                 else
16054                         cf_cv_install_p=no
16055                 fi
16056         else
16057                 cf_cv_install_p=no
16058         fi
16059         rm -rf conftest*
16060
16061 fi
16062 echo "$as_me:16062: result: $cf_cv_install_p" >&5
16063 echo "${ECHO_T}$cf_cv_install_p" >&6
16064
16065 echo "$as_me:16065: checking if install needs to be told about ownership" >&5
16066 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16067 case `$ac_config_guess` in
16068 (*minix)
16069         with_install_o=yes
16070         ;;
16071 (*)
16072         with_install_o=no
16073         ;;
16074 esac
16075
16076 echo "$as_me:16076: result: $with_install_o" >&5
16077 echo "${ECHO_T}$with_install_o" >&6
16078 if test "x$with_install_o" = xyes
16079 then
16080         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'`
16081 else
16082         INSTALL_OPT_O=
16083 fi
16084
16085 # If we're avoiding relinking of shared libraries during install, that is to
16086 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16087 # the install program has "-p" (for preserving timestamps).
16088 cf_cv_do_reranlib=yes
16089 if test "x$cf_cv_install_p" = xyes
16090 then
16091         if test "x$cf_cv_do_relink" != xyes
16092         then
16093                 cf_cv_do_reranlib=no
16094                 INSTALL_OPT_P="-p"
16095                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16096         fi
16097 fi
16098
16099 ###     use option --enable-warnings to turn on all gcc warnings
16100 echo "$as_me:16100: checking if you want to see compiler warnings" >&5
16101 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
16102
16103 # Check whether --enable-warnings or --disable-warnings was given.
16104 if test "${enable_warnings+set}" = set; then
16105   enableval="$enable_warnings"
16106   with_warnings=$enableval
16107 fi;
16108 echo "$as_me:16108: result: $with_warnings" >&5
16109 echo "${ECHO_T}$with_warnings" >&6
16110
16111 if test "x$with_warnings" = "xyes"; then
16112
16113         ADAFLAGS="$ADAFLAGS -gnatg"
16114
16115 if test "x$have_x" = xyes; then
16116
16117 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16118 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16119 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16120 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16121 for cf_X_CFLAGS in $X_CFLAGS
16122 do
16123         case "x$cf_X_CFLAGS" in
16124         x-[IUD]*)
16125                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16126                 ;;
16127         *)
16128                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16129                 ;;
16130         esac
16131 done
16132
16133 cat >conftest.$ac_ext <<_ACEOF
16134 #line 16134 "configure"
16135 #include "confdefs.h"
16136
16137 #include <stdlib.h>
16138 #include <X11/Intrinsic.h>
16139
16140 int
16141 main (void)
16142 {
16143 String foo = malloc(1); (void)foo
16144   ;
16145   return 0;
16146 }
16147 _ACEOF
16148 rm -f conftest.$ac_objext
16149 if { (eval echo "$as_me:16149: \"$ac_compile\"") >&5
16150   (eval $ac_compile) 2>&5
16151   ac_status=$?
16152   echo "$as_me:16152: \$? = $ac_status" >&5
16153   (exit $ac_status); } &&
16154          { ac_try='test -s conftest.$ac_objext'
16155   { (eval echo "$as_me:16155: \"$ac_try\"") >&5
16156   (eval $ac_try) 2>&5
16157   ac_status=$?
16158   echo "$as_me:16158: \$? = $ac_status" >&5
16159   (exit $ac_status); }; }; then
16160
16161 echo "$as_me:16161: checking for X11/Xt const-feature" >&5
16162 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16163 if test "${cf_cv_const_x_string+set}" = set; then
16164   echo $ECHO_N "(cached) $ECHO_C" >&6
16165 else
16166
16167         cat >conftest.$ac_ext <<_ACEOF
16168 #line 16168 "configure"
16169 #include "confdefs.h"
16170
16171 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16172 #undef  XTSTRINGDEFINES /* X11R5 and later */
16173 #include <stdlib.h>
16174 #include <X11/Intrinsic.h>
16175
16176 int
16177 main (void)
16178 {
16179 String foo = malloc(1); *foo = 0
16180   ;
16181   return 0;
16182 }
16183 _ACEOF
16184 rm -f conftest.$ac_objext
16185 if { (eval echo "$as_me:16185: \"$ac_compile\"") >&5
16186   (eval $ac_compile) 2>&5
16187   ac_status=$?
16188   echo "$as_me:16188: \$? = $ac_status" >&5
16189   (exit $ac_status); } &&
16190          { ac_try='test -s conftest.$ac_objext'
16191   { (eval echo "$as_me:16191: \"$ac_try\"") >&5
16192   (eval $ac_try) 2>&5
16193   ac_status=$?
16194   echo "$as_me:16194: \$? = $ac_status" >&5
16195   (exit $ac_status); }; }; then
16196
16197                         cf_cv_const_x_string=no
16198
16199 else
16200   echo "$as_me: failed program was:" >&5
16201 cat conftest.$ac_ext >&5
16202
16203                         cf_cv_const_x_string=yes
16204
16205 fi
16206 rm -f conftest.$ac_objext conftest.$ac_ext
16207
16208 fi
16209 echo "$as_me:16209: result: $cf_cv_const_x_string" >&5
16210 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16211
16212 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16213 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16214 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16215
16216 case $cf_cv_const_x_string in
16217 (no)
16218
16219         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16220         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16221
16222         ;;
16223 (*)
16224
16225         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16226         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16227
16228         ;;
16229 esac
16230
16231 else
16232   echo "$as_me: failed program was:" >&5
16233 cat conftest.$ac_ext >&5
16234 fi
16235 rm -f conftest.$ac_objext conftest.$ac_ext
16236  fi
16237 cat > conftest.$ac_ext <<EOF
16238 #line 16238 "${as_me:-configure}"
16239 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16240 EOF
16241 if test "$INTEL_COMPILER" = yes
16242 then
16243 # The "-wdXXX" options suppress warnings:
16244 # remark #1419: external declaration in primary source file
16245 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16246 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16247 # remark #193: zero used for undefined preprocessing identifier
16248 # remark #593: variable "curs_sb_left_arrow" was set but never used
16249 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16250 # remark #869: parameter "tw" was never referenced
16251 # remark #981: operands are evaluated in unspecified order
16252 # warning #279: controlling expression is constant
16253
16254         { echo "$as_me:16254: checking for $CC warning options..." >&5
16255 echo "$as_me: checking for $CC warning options..." >&6;}
16256         cf_save_CFLAGS="$CFLAGS"
16257         EXTRA_CFLAGS="-Wall"
16258         for cf_opt in \
16259                 wd1419 \
16260                 wd1683 \
16261                 wd1684 \
16262                 wd193 \
16263                 wd593 \
16264                 wd279 \
16265                 wd810 \
16266                 wd869 \
16267                 wd981
16268         do
16269                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16270                 if { (eval echo "$as_me:16270: \"$ac_compile\"") >&5
16271   (eval $ac_compile) 2>&5
16272   ac_status=$?
16273   echo "$as_me:16273: \$? = $ac_status" >&5
16274   (exit $ac_status); }; then
16275                         test -n "$verbose" && echo "$as_me:16275: result: ... -$cf_opt" >&5
16276 echo "${ECHO_T}... -$cf_opt" >&6
16277                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16278                 fi
16279         done
16280         CFLAGS="$cf_save_CFLAGS"
16281 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16282 then
16283         { echo "$as_me:16283: checking for $CC warning options..." >&5
16284 echo "$as_me: checking for $CC warning options..." >&6;}
16285         cf_save_CFLAGS="$CFLAGS"
16286         EXTRA_CFLAGS=
16287         cf_warn_CONST=""
16288         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16289         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16290         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16291         for cf_opt in W Wall \
16292                 Wbad-function-cast \
16293                 Wcast-align \
16294                 Wcast-qual \
16295                 Wdeclaration-after-statement \
16296                 Wextra \
16297                 Winline \
16298                 Wmissing-declarations \
16299                 Wmissing-prototypes \
16300                 Wnested-externs \
16301                 Wpointer-arith \
16302                 Wshadow \
16303                 Wstrict-prototypes \
16304                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16305         do
16306                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16307                 if { (eval echo "$as_me:16307: \"$ac_compile\"") >&5
16308   (eval $ac_compile) 2>&5
16309   ac_status=$?
16310   echo "$as_me:16310: \$? = $ac_status" >&5
16311   (exit $ac_status); }; then
16312                         test -n "$verbose" && echo "$as_me:16312: result: ... -$cf_opt" >&5
16313 echo "${ECHO_T}... -$cf_opt" >&6
16314                         case $cf_opt in
16315                         (Winline)
16316                                 case $GCC_VERSION in
16317                                 ([34].*)
16318                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16319
16320 echo "${as_me:-configure}:16320: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16321
16322                                         continue;;
16323                                 esac
16324                                 ;;
16325                         (Wpointer-arith)
16326                                 case $GCC_VERSION in
16327                                 ([12].*)
16328                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16329
16330 echo "${as_me:-configure}:16330: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16331
16332                                         continue;;
16333                                 esac
16334                                 ;;
16335                         esac
16336                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16337                 fi
16338         done
16339         CFLAGS="$cf_save_CFLAGS"
16340 fi
16341 rm -rf conftest*
16342
16343         if test "x$cf_with_cxx" = xyes ; then
16344
16345 INTEL_CPLUSPLUS=no
16346
16347 if test "$GCC" = yes ; then
16348         case $host_os in
16349         (linux*|gnu*)
16350                 echo "$as_me:16350: checking if this is really Intel C++ compiler" >&5
16351 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16352                 cf_save_CFLAGS="$CXXFLAGS"
16353                 CXXFLAGS="$CXXFLAGS -no-gcc"
16354                 cat >conftest.$ac_ext <<_ACEOF
16355 #line 16355 "configure"
16356 #include "confdefs.h"
16357
16358 int
16359 main (void)
16360 {
16361
16362 #ifdef __INTEL_COMPILER
16363 #else
16364 make an error
16365 #endif
16366
16367   ;
16368   return 0;
16369 }
16370 _ACEOF
16371 rm -f conftest.$ac_objext
16372 if { (eval echo "$as_me:16372: \"$ac_compile\"") >&5
16373   (eval $ac_compile) 2>&5
16374   ac_status=$?
16375   echo "$as_me:16375: \$? = $ac_status" >&5
16376   (exit $ac_status); } &&
16377          { ac_try='test -s conftest.$ac_objext'
16378   { (eval echo "$as_me:16378: \"$ac_try\"") >&5
16379   (eval $ac_try) 2>&5
16380   ac_status=$?
16381   echo "$as_me:16381: \$? = $ac_status" >&5
16382   (exit $ac_status); }; }; then
16383   INTEL_CPLUSPLUS=yes
16384 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16385
16386 else
16387   echo "$as_me: failed program was:" >&5
16388 cat conftest.$ac_ext >&5
16389 fi
16390 rm -f conftest.$ac_objext conftest.$ac_ext
16391                 CXXFLAGS="$cf_save_CFLAGS"
16392                 echo "$as_me:16392: result: $INTEL_CPLUSPLUS" >&5
16393 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16394                 ;;
16395         esac
16396 fi
16397
16398 CLANG_CPLUSPLUS=no
16399
16400 if test "$GCC" = yes ; then
16401         echo "$as_me:16401: checking if this is really Clang C++ compiler" >&5
16402 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16403         cf_save_CFLAGS="$CXXFLAGS"
16404         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16405         cat >conftest.$ac_ext <<_ACEOF
16406 #line 16406 "configure"
16407 #include "confdefs.h"
16408
16409 int
16410 main (void)
16411 {
16412
16413 #ifdef __clang__
16414 #else
16415 make an error
16416 #endif
16417
16418   ;
16419   return 0;
16420 }
16421 _ACEOF
16422 rm -f conftest.$ac_objext
16423 if { (eval echo "$as_me:16423: \"$ac_compile\"") >&5
16424   (eval $ac_compile) 2>&5
16425   ac_status=$?
16426   echo "$as_me:16426: \$? = $ac_status" >&5
16427   (exit $ac_status); } &&
16428          { ac_try='test -s conftest.$ac_objext'
16429   { (eval echo "$as_me:16429: \"$ac_try\"") >&5
16430   (eval $ac_try) 2>&5
16431   ac_status=$?
16432   echo "$as_me:16432: \$? = $ac_status" >&5
16433   (exit $ac_status); }; }; then
16434   CLANG_CPLUSPLUS=yes
16435 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16436
16437 else
16438   echo "$as_me: failed program was:" >&5
16439 cat conftest.$ac_ext >&5
16440 fi
16441 rm -f conftest.$ac_objext conftest.$ac_ext
16442         CXXFLAGS="$cf_save_CFLAGS"
16443         echo "$as_me:16443: result: $CLANG_CPLUSPLUS" >&5
16444 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16445 fi
16446
16447 ac_ext=cc
16448 ac_cpp='$CXXCPP $CPPFLAGS'
16449 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16450 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16451 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16452 ac_main_return=return
16453
16454 cat > conftest.$ac_ext <<EOF
16455 #line 16455 "configure"
16456 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16457 EOF
16458
16459 if test "$INTEL_CPLUSPLUS" = yes
16460 then
16461 # The "-wdXXX" options suppress warnings:
16462 # remark #1419: external declaration in primary source file
16463 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16464 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16465 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16466 # remark #193: zero used for undefined preprocessing identifier
16467 # remark #593: variable "curs_sb_left_arrow" was set but never used
16468 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16469 # remark #869: parameter "tw" was never referenced
16470 # remark #981: operands are evaluated in unspecified order
16471 # warning #269: invalid format string conversion
16472
16473         { echo "$as_me:16473: checking for $CC warning options..." >&5
16474 echo "$as_me: checking for $CC warning options..." >&6;}
16475         cf_save_CXXFLAGS="$CXXFLAGS"
16476         EXTRA_CXXFLAGS="-Wall"
16477         for cf_opt in \
16478                 wd1419 \
16479                 wd1682 \
16480                 wd1683 \
16481                 wd1684 \
16482                 wd193 \
16483                 wd279 \
16484                 wd593 \
16485                 wd810 \
16486                 wd869 \
16487                 wd981
16488         do
16489                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16490                 if { (eval echo "$as_me:16490: \"$ac_compile\"") >&5
16491   (eval $ac_compile) 2>&5
16492   ac_status=$?
16493   echo "$as_me:16493: \$? = $ac_status" >&5
16494   (exit $ac_status); }; then
16495                         test -n "$verbose" && echo "$as_me:16495: result: ... -$cf_opt" >&5
16496 echo "${ECHO_T}... -$cf_opt" >&6
16497                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16498                 fi
16499         done
16500         CXXFLAGS="$cf_save_CXXFLAGS"
16501
16502 elif test "$GXX" = yes
16503 then
16504         { echo "$as_me:16504: checking for $CXX warning options..." >&5
16505 echo "$as_me: checking for $CXX warning options..." >&6;}
16506         cf_save_CXXFLAGS="$CXXFLAGS"
16507         EXTRA_CXXFLAGS="-W -Wall"
16508         cf_gxx_extra_warnings=""
16509         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16510         case "$GCC_VERSION" in
16511         ([1-2].*)
16512                 ;;
16513         (*)
16514                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16515                 ;;
16516         esac
16517         for cf_opt in \
16518                 Wabi \
16519                 fabi-version=0 \
16520                 Wextra \
16521                 Wignored-qualifiers \
16522                 Wlogical-op \
16523                 Woverloaded-virtual \
16524                 Wsign-promo \
16525                 Wsynth \
16526                 Wold-style-cast \
16527                 Wcast-align \
16528                 Wcast-qual \
16529                 Wpointer-arith \
16530                 Wshadow \
16531                 Wundef $cf_gxx_extra_warnings Wno-unused
16532         do
16533                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16534                 if { (eval echo "$as_me:16534: \"$ac_compile\"") >&5
16535   (eval $ac_compile) 2>&5
16536   ac_status=$?
16537   echo "$as_me:16537: \$? = $ac_status" >&5
16538   (exit $ac_status); }; then
16539                         test -n "$verbose" && echo "$as_me:16539: result: ... -$cf_opt" >&5
16540 echo "${ECHO_T}... -$cf_opt" >&6
16541                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16542                 else
16543                         test -n "$verbose" && echo "$as_me:16543: result: ... no -$cf_opt" >&5
16544 echo "${ECHO_T}... no -$cf_opt" >&6
16545                 fi
16546         done
16547         CXXFLAGS="$cf_save_CXXFLAGS"
16548 fi
16549
16550 rm -rf conftest*
16551 ac_ext=c
16552 ac_cpp='$CPP $CPPFLAGS'
16553 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16554 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16555 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16556 ac_main_return=return
16557
16558         fi
16559 fi
16560
16561 if test "$GCC" = yes
16562 then
16563 cat > conftest.i <<EOF
16564 #ifndef GCC_PRINTF
16565 #define GCC_PRINTF 0
16566 #endif
16567 #ifndef GCC_SCANF
16568 #define GCC_SCANF 0
16569 #endif
16570 #ifndef GCC_NORETURN
16571 #define GCC_NORETURN /* nothing */
16572 #endif
16573 #ifndef GCC_UNUSED
16574 #define GCC_UNUSED /* nothing */
16575 #endif
16576 EOF
16577 if test "$GCC" = yes
16578 then
16579         { echo "$as_me:16579: checking for $CC __attribute__ directives..." >&5
16580 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16581 cat > conftest.$ac_ext <<EOF
16582 #line 16582 "${as_me:-configure}"
16583 #include "confdefs.h"
16584 #include "conftest.h"
16585 #include "conftest.i"
16586 #if     GCC_PRINTF
16587 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16588 #else
16589 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16590 #endif
16591 #if     GCC_SCANF
16592 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16593 #else
16594 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16595 #endif
16596 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16597 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16598 extern void foo(void) GCC_NORETURN;
16599 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16600 EOF
16601         cf_printf_attribute=no
16602         cf_scanf_attribute=no
16603         for cf_attribute in scanf printf unused noreturn
16604         do
16605
16606 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16607
16608                 cf_directive="__attribute__(($cf_attribute))"
16609                 echo "checking for $CC $cf_directive" 1>&5
16610
16611                 case $cf_attribute in
16612                 (printf)
16613                         cf_printf_attribute=yes
16614                         cat >conftest.h <<EOF
16615 #define GCC_$cf_ATTRIBUTE 1
16616 EOF
16617                         ;;
16618                 (scanf)
16619                         cf_scanf_attribute=yes
16620                         cat >conftest.h <<EOF
16621 #define GCC_$cf_ATTRIBUTE 1
16622 EOF
16623                         ;;
16624                 (*)
16625                         cat >conftest.h <<EOF
16626 #define GCC_$cf_ATTRIBUTE $cf_directive
16627 EOF
16628                         ;;
16629                 esac
16630
16631                 if { (eval echo "$as_me:16631: \"$ac_compile\"") >&5
16632   (eval $ac_compile) 2>&5
16633   ac_status=$?
16634   echo "$as_me:16634: \$? = $ac_status" >&5
16635   (exit $ac_status); }; then
16636                         test -n "$verbose" && echo "$as_me:16636: result: ... $cf_attribute" >&5
16637 echo "${ECHO_T}... $cf_attribute" >&6
16638                         cat conftest.h >>confdefs.h
16639                         case $cf_attribute in
16640                         (noreturn)
16641
16642 cat >>confdefs.h <<EOF
16643 #define GCC_NORETURN $cf_directive
16644 EOF
16645
16646                                 ;;
16647                         (printf)
16648                                 cf_value='/* nothing */'
16649                                 if test "$cf_printf_attribute" != no ; then
16650                                         cf_value='__attribute__((format(printf,fmt,var)))'
16651
16652 cat >>confdefs.h <<\EOF
16653 #define GCC_PRINTF 1
16654 EOF
16655
16656                                 fi
16657
16658 cat >>confdefs.h <<EOF
16659 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16660 EOF
16661
16662                                 ;;
16663                         (scanf)
16664                                 cf_value='/* nothing */'
16665                                 if test "$cf_scanf_attribute" != no ; then
16666                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16667
16668 cat >>confdefs.h <<\EOF
16669 #define GCC_SCANF 1
16670 EOF
16671
16672                                 fi
16673
16674 cat >>confdefs.h <<EOF
16675 #define GCC_SCANFLIKE(fmt,var) $cf_value
16676 EOF
16677
16678                                 ;;
16679                         (unused)
16680
16681 cat >>confdefs.h <<EOF
16682 #define GCC_UNUSED $cf_directive
16683 EOF
16684
16685                                 ;;
16686                         esac
16687                 fi
16688         done
16689 else
16690         fgrep define conftest.i >>confdefs.h
16691 fi
16692 rm -rf conftest*
16693 fi
16694
16695 echo "$as_me:16695: checking if you want to work around bogus compiler/loader warnings" >&5
16696 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16697
16698 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16699 if test "${enable_string_hacks+set}" = set; then
16700   enableval="$enable_string_hacks"
16701   with_string_hacks=$enableval
16702 else
16703   with_string_hacks=no
16704 fi;
16705 echo "$as_me:16705: result: $with_string_hacks" >&5
16706 echo "${ECHO_T}$with_string_hacks" >&6
16707
16708 if test "x$with_string_hacks" = "xyes"; then
16709
16710 cat >>confdefs.h <<\EOF
16711 #define USE_STRING_HACKS 1
16712 EOF
16713
16714         { echo "$as_me:16714: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16715 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16716         echo "$as_me:16716: checking for strlcat" >&5
16717 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16718 if test "${ac_cv_func_strlcat+set}" = set; then
16719   echo $ECHO_N "(cached) $ECHO_C" >&6
16720 else
16721   cat >conftest.$ac_ext <<_ACEOF
16722 #line 16722 "configure"
16723 #include "confdefs.h"
16724 #define strlcat autoconf_temporary
16725 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16726 #undef strlcat
16727
16728 #ifdef __cplusplus
16729 extern "C"
16730 #endif
16731
16732 /* We use char because int might match the return type of a gcc2
16733    builtin and then its argument prototype would still apply.  */
16734 char strlcat (void);
16735
16736 int
16737 main (void)
16738 {
16739
16740 /* The GNU C library defines stubs for functions which it implements
16741     to always fail with ENOSYS.  Some functions are actually named
16742     something starting with __ and the normal name is an alias.  */
16743 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16744 #error found stub for strlcat
16745 #endif
16746
16747         return strlcat ();
16748   ;
16749   return 0;
16750 }
16751 _ACEOF
16752 rm -f conftest.$ac_objext conftest$ac_exeext
16753 if { (eval echo "$as_me:16753: \"$ac_link\"") >&5
16754   (eval $ac_link) 2>&5
16755   ac_status=$?
16756   echo "$as_me:16756: \$? = $ac_status" >&5
16757   (exit $ac_status); } &&
16758          { ac_try='test -s conftest$ac_exeext'
16759   { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760   (eval $ac_try) 2>&5
16761   ac_status=$?
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); }; }; then
16764   ac_cv_func_strlcat=yes
16765 else
16766   echo "$as_me: failed program was:" >&5
16767 cat conftest.$ac_ext >&5
16768 ac_cv_func_strlcat=no
16769 fi
16770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16771 fi
16772 echo "$as_me:16772: result: $ac_cv_func_strlcat" >&5
16773 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16774 if test $ac_cv_func_strlcat = yes; then
16775
16776 cat >>confdefs.h <<\EOF
16777 #define HAVE_STRLCAT 1
16778 EOF
16779
16780 else
16781
16782                 echo "$as_me:16782: checking for strlcat in -lbsd" >&5
16783 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16784 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16785   echo $ECHO_N "(cached) $ECHO_C" >&6
16786 else
16787   ac_check_lib_save_LIBS=$LIBS
16788 LIBS="-lbsd  $LIBS"
16789 cat >conftest.$ac_ext <<_ACEOF
16790 #line 16790 "configure"
16791 #include "confdefs.h"
16792
16793 /* Override any gcc2 internal prototype to avoid an error.  */
16794 #ifdef __cplusplus
16795 extern "C"
16796 #endif
16797 /* We use char because int might match the return type of a gcc2
16798    builtin and then its argument prototype would still apply.  */
16799 char strlcat ();
16800 int
16801 main (void)
16802 {
16803 strlcat ();
16804   ;
16805   return 0;
16806 }
16807 _ACEOF
16808 rm -f conftest.$ac_objext conftest$ac_exeext
16809 if { (eval echo "$as_me:16809: \"$ac_link\"") >&5
16810   (eval $ac_link) 2>&5
16811   ac_status=$?
16812   echo "$as_me:16812: \$? = $ac_status" >&5
16813   (exit $ac_status); } &&
16814          { ac_try='test -s conftest$ac_exeext'
16815   { (eval echo "$as_me:16815: \"$ac_try\"") >&5
16816   (eval $ac_try) 2>&5
16817   ac_status=$?
16818   echo "$as_me:16818: \$? = $ac_status" >&5
16819   (exit $ac_status); }; }; then
16820   ac_cv_lib_bsd_strlcat=yes
16821 else
16822   echo "$as_me: failed program was:" >&5
16823 cat conftest.$ac_ext >&5
16824 ac_cv_lib_bsd_strlcat=no
16825 fi
16826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16827 LIBS=$ac_check_lib_save_LIBS
16828 fi
16829 echo "$as_me:16829: result: $ac_cv_lib_bsd_strlcat" >&5
16830 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16831 if test $ac_cv_lib_bsd_strlcat = yes; then
16832
16833 cf_add_libs="$LIBS"
16834 # reverse order
16835 cf_add_0lib=
16836 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16837 # filter duplicates
16838 for cf_add_1lib in $cf_add_0lib; do
16839         for cf_add_2lib in $cf_add_libs; do
16840                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16841                         cf_add_1lib=
16842                         break
16843                 fi
16844         done
16845         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16846 done
16847 LIBS="$cf_add_libs"
16848
16849 for ac_header in bsd/string.h
16850 do
16851 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16852 echo "$as_me:16852: checking for $ac_header" >&5
16853 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16854 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16855   echo $ECHO_N "(cached) $ECHO_C" >&6
16856 else
16857   cat >conftest.$ac_ext <<_ACEOF
16858 #line 16858 "configure"
16859 #include "confdefs.h"
16860 #include <$ac_header>
16861 _ACEOF
16862 if { (eval echo "$as_me:16862: \"$ac_cpp conftest.$ac_ext\"") >&5
16863   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16864   ac_status=$?
16865   egrep -v '^ *\+' conftest.er1 >conftest.err
16866   rm -f conftest.er1
16867   cat conftest.err >&5
16868   echo "$as_me:16868: \$? = $ac_status" >&5
16869   (exit $ac_status); } >/dev/null; then
16870   if test -s conftest.err; then
16871     ac_cpp_err=$ac_c_preproc_warn_flag
16872   else
16873     ac_cpp_err=
16874   fi
16875 else
16876   ac_cpp_err=yes
16877 fi
16878 if test -z "$ac_cpp_err"; then
16879   eval "$as_ac_Header=yes"
16880 else
16881   echo "$as_me: failed program was:" >&5
16882   cat conftest.$ac_ext >&5
16883   eval "$as_ac_Header=no"
16884 fi
16885 rm -f conftest.err conftest.$ac_ext
16886 fi
16887 echo "$as_me:16887: result: `eval echo '${'$as_ac_Header'}'`" >&5
16888 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16889 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16890   cat >>confdefs.h <<EOF
16891 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16892 EOF
16893
16894 fi
16895 done
16896
16897 cat >>confdefs.h <<\EOF
16898 #define HAVE_STRLCAT 1
16899 EOF
16900
16901 fi
16902
16903 fi
16904
16905 for ac_func in strlcpy snprintf
16906 do
16907 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16908 echo "$as_me:16908: checking for $ac_func" >&5
16909 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16910 if eval "test \"\${$as_ac_var+set}\" = set"; then
16911   echo $ECHO_N "(cached) $ECHO_C" >&6
16912 else
16913   cat >conftest.$ac_ext <<_ACEOF
16914 #line 16914 "configure"
16915 #include "confdefs.h"
16916 #define $ac_func autoconf_temporary
16917 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16918 #undef $ac_func
16919
16920 #ifdef __cplusplus
16921 extern "C"
16922 #endif
16923
16924 /* We use char because int might match the return type of a gcc2
16925    builtin and then its argument prototype would still apply.  */
16926 char $ac_func (void);
16927
16928 int
16929 main (void)
16930 {
16931
16932 /* The GNU C library defines stubs for functions which it implements
16933     to always fail with ENOSYS.  Some functions are actually named
16934     something starting with __ and the normal name is an alias.  */
16935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16936 #error found stub for $ac_func
16937 #endif
16938
16939         return $ac_func ();
16940   ;
16941   return 0;
16942 }
16943 _ACEOF
16944 rm -f conftest.$ac_objext conftest$ac_exeext
16945 if { (eval echo "$as_me:16945: \"$ac_link\"") >&5
16946   (eval $ac_link) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); } &&
16950          { ac_try='test -s conftest$ac_exeext'
16951   { (eval echo "$as_me:16951: \"$ac_try\"") >&5
16952   (eval $ac_try) 2>&5
16953   ac_status=$?
16954   echo "$as_me:16954: \$? = $ac_status" >&5
16955   (exit $ac_status); }; }; then
16956   eval "$as_ac_var=yes"
16957 else
16958   echo "$as_me: failed program was:" >&5
16959 cat conftest.$ac_ext >&5
16960 eval "$as_ac_var=no"
16961 fi
16962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16963 fi
16964 echo "$as_me:16964: result: `eval echo '${'$as_ac_var'}'`" >&5
16965 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16966 if test `eval echo '${'$as_ac_var'}'` = yes; then
16967   cat >>confdefs.h <<EOF
16968 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16969 EOF
16970
16971 fi
16972 done
16973
16974 fi
16975
16976 ###     use option --enable-assertions to turn on generation of assertion code
16977 echo "$as_me:16977: checking if you want to enable runtime assertions" >&5
16978 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16979
16980 # Check whether --enable-assertions or --disable-assertions was given.
16981 if test "${enable_assertions+set}" = set; then
16982   enableval="$enable_assertions"
16983   with_assertions=$enableval
16984 else
16985   with_assertions=no
16986 fi;
16987 echo "$as_me:16987: result: $with_assertions" >&5
16988 echo "${ECHO_T}$with_assertions" >&6
16989 if test -n "$GCC"
16990 then
16991         if test "$with_assertions" = no
16992         then
16993                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16994         else
16995
16996         ADAFLAGS="$ADAFLAGS -gnata"
16997
16998         fi
16999 fi
17000
17001 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17002
17003 echo "$as_me:17003: checking if you want to use dmalloc for testing" >&5
17004 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17005
17006 # Check whether --with-dmalloc or --without-dmalloc was given.
17007 if test "${with_dmalloc+set}" = set; then
17008   withval="$with_dmalloc"
17009
17010 cat >>confdefs.h <<EOF
17011 #define USE_DMALLOC 1
17012 EOF
17013
17014         : ${with_cflags:=-g}
17015         : ${with_no_leaks:=yes}
17016          with_dmalloc=yes
17017 else
17018   with_dmalloc=
17019 fi;
17020 echo "$as_me:17020: result: ${with_dmalloc:-no}" >&5
17021 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17022
17023 case .$with_cflags in
17024 (.*-g*)
17025         case .$CFLAGS in
17026         (.*-g*)
17027                 ;;
17028         (*)
17029
17030 cf_fix_cppflags=no
17031 cf_new_cflags=
17032 cf_new_cppflags=
17033 cf_new_extra_cppflags=
17034
17035 for cf_add_cflags in -g
17036 do
17037 case $cf_fix_cppflags in
17038 (no)
17039         case $cf_add_cflags in
17040         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17041                 case $cf_add_cflags in
17042                 (-D*)
17043                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17044
17045                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17046                                 && test -z "${cf_tst_cflags}" \
17047                                 && cf_fix_cppflags=yes
17048
17049                         if test $cf_fix_cppflags = yes ; then
17050
17051         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17052         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17053
17054                                 continue
17055                         elif test "${cf_tst_cflags}" = "\"'" ; then
17056
17057         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17058         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17059
17060                                 continue
17061                         fi
17062                         ;;
17063                 esac
17064                 case "$CPPFLAGS" in
17065                 (*$cf_add_cflags)
17066                         ;;
17067                 (*)
17068                         case $cf_add_cflags in
17069                         (-D*)
17070                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17071
17072 CPPFLAGS=`echo "$CPPFLAGS" | \
17073         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17074                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17075
17076                                 ;;
17077                         esac
17078
17079         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17080         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17081
17082                         ;;
17083                 esac
17084                 ;;
17085         (*)
17086
17087         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17088         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17089
17090                 ;;
17091         esac
17092         ;;
17093 (yes)
17094
17095         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17096         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17097
17098         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17099
17100         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17101                 && test -z "${cf_tst_cflags}" \
17102                 && cf_fix_cppflags=no
17103         ;;
17104 esac
17105 done
17106
17107 if test -n "$cf_new_cflags" ; then
17108
17109         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17110         CFLAGS="${CFLAGS}$cf_new_cflags"
17111
17112 fi
17113
17114 if test -n "$cf_new_cppflags" ; then
17115
17116         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17117         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17118
17119 fi
17120
17121 if test -n "$cf_new_extra_cppflags" ; then
17122
17123         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17124         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17125
17126 fi
17127
17128                 ;;
17129         esac
17130         ;;
17131 esac
17132
17133 if test "$with_dmalloc" = yes ; then
17134         echo "$as_me:17134: checking for dmalloc.h" >&5
17135 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17136 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17137   echo $ECHO_N "(cached) $ECHO_C" >&6
17138 else
17139   cat >conftest.$ac_ext <<_ACEOF
17140 #line 17140 "configure"
17141 #include "confdefs.h"
17142 #include <dmalloc.h>
17143 _ACEOF
17144 if { (eval echo "$as_me:17144: \"$ac_cpp conftest.$ac_ext\"") >&5
17145   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17146   ac_status=$?
17147   egrep -v '^ *\+' conftest.er1 >conftest.err
17148   rm -f conftest.er1
17149   cat conftest.err >&5
17150   echo "$as_me:17150: \$? = $ac_status" >&5
17151   (exit $ac_status); } >/dev/null; then
17152   if test -s conftest.err; then
17153     ac_cpp_err=$ac_c_preproc_warn_flag
17154   else
17155     ac_cpp_err=
17156   fi
17157 else
17158   ac_cpp_err=yes
17159 fi
17160 if test -z "$ac_cpp_err"; then
17161   ac_cv_header_dmalloc_h=yes
17162 else
17163   echo "$as_me: failed program was:" >&5
17164   cat conftest.$ac_ext >&5
17165   ac_cv_header_dmalloc_h=no
17166 fi
17167 rm -f conftest.err conftest.$ac_ext
17168 fi
17169 echo "$as_me:17169: result: $ac_cv_header_dmalloc_h" >&5
17170 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17171 if test $ac_cv_header_dmalloc_h = yes; then
17172
17173 echo "$as_me:17173: checking for dmalloc_debug in -ldmalloc" >&5
17174 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17175 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17176   echo $ECHO_N "(cached) $ECHO_C" >&6
17177 else
17178   ac_check_lib_save_LIBS=$LIBS
17179 LIBS="-ldmalloc  $LIBS"
17180 cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183
17184 /* Override any gcc2 internal prototype to avoid an error.  */
17185 #ifdef __cplusplus
17186 extern "C"
17187 #endif
17188 /* We use char because int might match the return type of a gcc2
17189    builtin and then its argument prototype would still apply.  */
17190 char dmalloc_debug ();
17191 int
17192 main (void)
17193 {
17194 dmalloc_debug ();
17195   ;
17196   return 0;
17197 }
17198 _ACEOF
17199 rm -f conftest.$ac_objext conftest$ac_exeext
17200 if { (eval echo "$as_me:17200: \"$ac_link\"") >&5
17201   (eval $ac_link) 2>&5
17202   ac_status=$?
17203   echo "$as_me:17203: \$? = $ac_status" >&5
17204   (exit $ac_status); } &&
17205          { ac_try='test -s conftest$ac_exeext'
17206   { (eval echo "$as_me:17206: \"$ac_try\"") >&5
17207   (eval $ac_try) 2>&5
17208   ac_status=$?
17209   echo "$as_me:17209: \$? = $ac_status" >&5
17210   (exit $ac_status); }; }; then
17211   ac_cv_lib_dmalloc_dmalloc_debug=yes
17212 else
17213   echo "$as_me: failed program was:" >&5
17214 cat conftest.$ac_ext >&5
17215 ac_cv_lib_dmalloc_dmalloc_debug=no
17216 fi
17217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17218 LIBS=$ac_check_lib_save_LIBS
17219 fi
17220 echo "$as_me:17220: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17221 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17222 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17223   cat >>confdefs.h <<EOF
17224 #define HAVE_LIBDMALLOC 1
17225 EOF
17226
17227   LIBS="-ldmalloc $LIBS"
17228
17229 fi
17230
17231 fi
17232
17233 fi
17234
17235 echo "$as_me:17235: checking if you want to use dbmalloc for testing" >&5
17236 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17237
17238 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17239 if test "${with_dbmalloc+set}" = set; then
17240   withval="$with_dbmalloc"
17241
17242 cat >>confdefs.h <<EOF
17243 #define USE_DBMALLOC 1
17244 EOF
17245
17246         : ${with_cflags:=-g}
17247         : ${with_no_leaks:=yes}
17248          with_dbmalloc=yes
17249 else
17250   with_dbmalloc=
17251 fi;
17252 echo "$as_me:17252: result: ${with_dbmalloc:-no}" >&5
17253 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17254
17255 case .$with_cflags in
17256 (.*-g*)
17257         case .$CFLAGS in
17258         (.*-g*)
17259                 ;;
17260         (*)
17261
17262 cf_fix_cppflags=no
17263 cf_new_cflags=
17264 cf_new_cppflags=
17265 cf_new_extra_cppflags=
17266
17267 for cf_add_cflags in -g
17268 do
17269 case $cf_fix_cppflags in
17270 (no)
17271         case $cf_add_cflags in
17272         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17273                 case $cf_add_cflags in
17274                 (-D*)
17275                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17276
17277                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17278                                 && test -z "${cf_tst_cflags}" \
17279                                 && cf_fix_cppflags=yes
17280
17281                         if test $cf_fix_cppflags = yes ; then
17282
17283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17285
17286                                 continue
17287                         elif test "${cf_tst_cflags}" = "\"'" ; then
17288
17289         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17290         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17291
17292                                 continue
17293                         fi
17294                         ;;
17295                 esac
17296                 case "$CPPFLAGS" in
17297                 (*$cf_add_cflags)
17298                         ;;
17299                 (*)
17300                         case $cf_add_cflags in
17301                         (-D*)
17302                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17303
17304 CPPFLAGS=`echo "$CPPFLAGS" | \
17305         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17306                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17307
17308                                 ;;
17309                         esac
17310
17311         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17312         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17313
17314                         ;;
17315                 esac
17316                 ;;
17317         (*)
17318
17319         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17320         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17321
17322                 ;;
17323         esac
17324         ;;
17325 (yes)
17326
17327         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17328         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17329
17330         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17331
17332         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17333                 && test -z "${cf_tst_cflags}" \
17334                 && cf_fix_cppflags=no
17335         ;;
17336 esac
17337 done
17338
17339 if test -n "$cf_new_cflags" ; then
17340
17341         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17342         CFLAGS="${CFLAGS}$cf_new_cflags"
17343
17344 fi
17345
17346 if test -n "$cf_new_cppflags" ; then
17347
17348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17349         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17350
17351 fi
17352
17353 if test -n "$cf_new_extra_cppflags" ; then
17354
17355         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17356         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17357
17358 fi
17359
17360                 ;;
17361         esac
17362         ;;
17363 esac
17364
17365 if test "$with_dbmalloc" = yes ; then
17366         echo "$as_me:17366: checking for dbmalloc.h" >&5
17367 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17368 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17369   echo $ECHO_N "(cached) $ECHO_C" >&6
17370 else
17371   cat >conftest.$ac_ext <<_ACEOF
17372 #line 17372 "configure"
17373 #include "confdefs.h"
17374 #include <dbmalloc.h>
17375 _ACEOF
17376 if { (eval echo "$as_me:17376: \"$ac_cpp conftest.$ac_ext\"") >&5
17377   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17378   ac_status=$?
17379   egrep -v '^ *\+' conftest.er1 >conftest.err
17380   rm -f conftest.er1
17381   cat conftest.err >&5
17382   echo "$as_me:17382: \$? = $ac_status" >&5
17383   (exit $ac_status); } >/dev/null; then
17384   if test -s conftest.err; then
17385     ac_cpp_err=$ac_c_preproc_warn_flag
17386   else
17387     ac_cpp_err=
17388   fi
17389 else
17390   ac_cpp_err=yes
17391 fi
17392 if test -z "$ac_cpp_err"; then
17393   ac_cv_header_dbmalloc_h=yes
17394 else
17395   echo "$as_me: failed program was:" >&5
17396   cat conftest.$ac_ext >&5
17397   ac_cv_header_dbmalloc_h=no
17398 fi
17399 rm -f conftest.err conftest.$ac_ext
17400 fi
17401 echo "$as_me:17401: result: $ac_cv_header_dbmalloc_h" >&5
17402 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17403 if test $ac_cv_header_dbmalloc_h = yes; then
17404
17405 echo "$as_me:17405: checking for debug_malloc in -ldbmalloc" >&5
17406 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17407 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17408   echo $ECHO_N "(cached) $ECHO_C" >&6
17409 else
17410   ac_check_lib_save_LIBS=$LIBS
17411 LIBS="-ldbmalloc  $LIBS"
17412 cat >conftest.$ac_ext <<_ACEOF
17413 #line 17413 "configure"
17414 #include "confdefs.h"
17415
17416 /* Override any gcc2 internal prototype to avoid an error.  */
17417 #ifdef __cplusplus
17418 extern "C"
17419 #endif
17420 /* We use char because int might match the return type of a gcc2
17421    builtin and then its argument prototype would still apply.  */
17422 char debug_malloc ();
17423 int
17424 main (void)
17425 {
17426 debug_malloc ();
17427   ;
17428   return 0;
17429 }
17430 _ACEOF
17431 rm -f conftest.$ac_objext conftest$ac_exeext
17432 if { (eval echo "$as_me:17432: \"$ac_link\"") >&5
17433   (eval $ac_link) 2>&5
17434   ac_status=$?
17435   echo "$as_me:17435: \$? = $ac_status" >&5
17436   (exit $ac_status); } &&
17437          { ac_try='test -s conftest$ac_exeext'
17438   { (eval echo "$as_me:17438: \"$ac_try\"") >&5
17439   (eval $ac_try) 2>&5
17440   ac_status=$?
17441   echo "$as_me:17441: \$? = $ac_status" >&5
17442   (exit $ac_status); }; }; then
17443   ac_cv_lib_dbmalloc_debug_malloc=yes
17444 else
17445   echo "$as_me: failed program was:" >&5
17446 cat conftest.$ac_ext >&5
17447 ac_cv_lib_dbmalloc_debug_malloc=no
17448 fi
17449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17450 LIBS=$ac_check_lib_save_LIBS
17451 fi
17452 echo "$as_me:17452: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17453 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17454 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17455   cat >>confdefs.h <<EOF
17456 #define HAVE_LIBDBMALLOC 1
17457 EOF
17458
17459   LIBS="-ldbmalloc $LIBS"
17460
17461 fi
17462
17463 fi
17464
17465 fi
17466
17467 echo "$as_me:17467: checking if you want to use valgrind for testing" >&5
17468 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17469
17470 # Check whether --with-valgrind or --without-valgrind was given.
17471 if test "${with_valgrind+set}" = set; then
17472   withval="$with_valgrind"
17473
17474 cat >>confdefs.h <<EOF
17475 #define USE_VALGRIND 1
17476 EOF
17477
17478         : ${with_cflags:=-g}
17479         : ${with_no_leaks:=yes}
17480          with_valgrind=yes
17481 else
17482   with_valgrind=
17483 fi;
17484 echo "$as_me:17484: result: ${with_valgrind:-no}" >&5
17485 echo "${ECHO_T}${with_valgrind:-no}" >&6
17486
17487 case .$with_cflags in
17488 (.*-g*)
17489         case .$CFLAGS in
17490         (.*-g*)
17491                 ;;
17492         (*)
17493
17494 cf_fix_cppflags=no
17495 cf_new_cflags=
17496 cf_new_cppflags=
17497 cf_new_extra_cppflags=
17498
17499 for cf_add_cflags in -g
17500 do
17501 case $cf_fix_cppflags in
17502 (no)
17503         case $cf_add_cflags in
17504         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17505                 case $cf_add_cflags in
17506                 (-D*)
17507                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17508
17509                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17510                                 && test -z "${cf_tst_cflags}" \
17511                                 && cf_fix_cppflags=yes
17512
17513                         if test $cf_fix_cppflags = yes ; then
17514
17515         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17516         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17517
17518                                 continue
17519                         elif test "${cf_tst_cflags}" = "\"'" ; then
17520
17521         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17522         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17523
17524                                 continue
17525                         fi
17526                         ;;
17527                 esac
17528                 case "$CPPFLAGS" in
17529                 (*$cf_add_cflags)
17530                         ;;
17531                 (*)
17532                         case $cf_add_cflags in
17533                         (-D*)
17534                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17535
17536 CPPFLAGS=`echo "$CPPFLAGS" | \
17537         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17538                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17539
17540                                 ;;
17541                         esac
17542
17543         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17544         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17545
17546                         ;;
17547                 esac
17548                 ;;
17549         (*)
17550
17551         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17552         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17553
17554                 ;;
17555         esac
17556         ;;
17557 (yes)
17558
17559         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17560         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17561
17562         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17563
17564         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17565                 && test -z "${cf_tst_cflags}" \
17566                 && cf_fix_cppflags=no
17567         ;;
17568 esac
17569 done
17570
17571 if test -n "$cf_new_cflags" ; then
17572
17573         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17574         CFLAGS="${CFLAGS}$cf_new_cflags"
17575
17576 fi
17577
17578 if test -n "$cf_new_cppflags" ; then
17579
17580         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17581         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17582
17583 fi
17584
17585 if test -n "$cf_new_extra_cppflags" ; then
17586
17587         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17588         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17589
17590 fi
17591
17592                 ;;
17593         esac
17594         ;;
17595 esac
17596
17597 echo "$as_me:17597: checking if you want to perform memory-leak testing" >&5
17598 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17599
17600 # Check whether --enable-leaks or --disable-leaks was given.
17601 if test "${enable_leaks+set}" = set; then
17602   enableval="$enable_leaks"
17603   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17604 else
17605   : ${with_no_leaks:=no}
17606 fi;
17607 echo "$as_me:17607: result: $with_no_leaks" >&5
17608 echo "${ECHO_T}$with_no_leaks" >&6
17609
17610 if test "$with_no_leaks" = yes ; then
17611
17612 cat >>confdefs.h <<\EOF
17613 #define NO_LEAKS 1
17614 EOF
17615
17616 cat >>confdefs.h <<\EOF
17617 #define YY_NO_LEAKS 1
17618 EOF
17619
17620 fi
17621
17622 cat >>confdefs.h <<\EOF
17623 #define HAVE_NC_ALLOC_H 1
17624 EOF
17625
17626 ###     use option --enable-expanded to generate certain macros as functions
17627
17628 # Check whether --enable-expanded or --disable-expanded was given.
17629 if test "${enable_expanded+set}" = set; then
17630   enableval="$enable_expanded"
17631   test "x$enableval" = xyes &&
17632 cat >>confdefs.h <<\EOF
17633 #define NCURSES_EXPANDED 1
17634 EOF
17635
17636 fi;
17637
17638 ###     use option --disable-macros to suppress macros in favor of functions
17639
17640 # Check whether --enable-macros or --disable-macros was given.
17641 if test "${enable_macros+set}" = set; then
17642   enableval="$enable_macros"
17643   test "$enableval" = no &&
17644 cat >>confdefs.h <<\EOF
17645 #define NCURSES_NOMACROS 1
17646 EOF
17647
17648 fi;
17649
17650 # Normally we only add trace() to the debug-library.  Allow this to be
17651 # extended to all models of the ncurses library:
17652 cf_all_traces=no
17653 case "$CFLAGS $CPPFLAGS" in
17654 (*-DTRACE*)
17655         cf_all_traces=yes
17656         ;;
17657 esac
17658
17659 echo "$as_me:17659: checking whether to add trace feature to all models" >&5
17660 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17661
17662 # Check whether --with-trace or --without-trace was given.
17663 if test "${with_trace+set}" = set; then
17664   withval="$with_trace"
17665   cf_with_trace=$withval
17666 else
17667   cf_with_trace=$cf_all_traces
17668 fi;
17669 echo "$as_me:17669: result: $cf_with_trace" >&5
17670 echo "${ECHO_T}$cf_with_trace" >&6
17671
17672 if test "x$cf_with_trace" = xyes ; then
17673         LIB_TRACING=all
17674         ADA_TRACE=TRUE
17675
17676 cf_fix_cppflags=no
17677 cf_new_cflags=
17678 cf_new_cppflags=
17679 cf_new_extra_cppflags=
17680
17681 for cf_add_cflags in -DTRACE
17682 do
17683 case $cf_fix_cppflags in
17684 (no)
17685         case $cf_add_cflags in
17686         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17687                 case $cf_add_cflags in
17688                 (-D*)
17689                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17690
17691                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17692                                 && test -z "${cf_tst_cflags}" \
17693                                 && cf_fix_cppflags=yes
17694
17695                         if test $cf_fix_cppflags = yes ; then
17696
17697         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17698         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17699
17700                                 continue
17701                         elif test "${cf_tst_cflags}" = "\"'" ; then
17702
17703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17705
17706                                 continue
17707                         fi
17708                         ;;
17709                 esac
17710                 case "$CPPFLAGS" in
17711                 (*$cf_add_cflags)
17712                         ;;
17713                 (*)
17714                         case $cf_add_cflags in
17715                         (-D*)
17716                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17717
17718 CPPFLAGS=`echo "$CPPFLAGS" | \
17719         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17720                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17721
17722                                 ;;
17723                         esac
17724
17725         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17726         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17727
17728                         ;;
17729                 esac
17730                 ;;
17731         (*)
17732
17733         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17734         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17735
17736                 ;;
17737         esac
17738         ;;
17739 (yes)
17740
17741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17743
17744         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17745
17746         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17747                 && test -z "${cf_tst_cflags}" \
17748                 && cf_fix_cppflags=no
17749         ;;
17750 esac
17751 done
17752
17753 if test -n "$cf_new_cflags" ; then
17754
17755         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17756         CFLAGS="${CFLAGS}$cf_new_cflags"
17757
17758 fi
17759
17760 if test -n "$cf_new_cppflags" ; then
17761
17762         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17763         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17764
17765 fi
17766
17767 if test -n "$cf_new_extra_cppflags" ; then
17768
17769         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17770         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17771
17772 fi
17773
17774 cat >>confdefs.h <<\EOF
17775 #define HAVE__TRACEF 1
17776 EOF
17777
17778 else
17779         LIB_TRACING=DEBUG
17780         ADA_TRACE=FALSE
17781 fi
17782
17783 echo "$as_me:17783: checking if we want to use GNAT projects" >&5
17784 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17785
17786 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17787 if test "${enable_gnat_projects+set}" = set; then
17788   enableval="$enable_gnat_projects"
17789   test "$enableval" != no && enableval=yes
17790         if test "$enableval" != "yes" ; then
17791     enable_gnat_projects=no
17792         else
17793                 enable_gnat_projects=yes
17794         fi
17795 else
17796   enableval=yes
17797         enable_gnat_projects=yes
17798
17799 fi;
17800 echo "$as_me:17800: result: $enable_gnat_projects" >&5
17801 echo "${ECHO_T}$enable_gnat_projects" >&6
17802
17803 ###     Checks for libraries.
17804 case $cf_cv_system_name in
17805 (*mingw32*|*mingw64*)
17806         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17807         # Note: WINVER may be a problem with Windows 10
17808         ;;
17809 (*)
17810 echo "$as_me:17810: checking for gettimeofday" >&5
17811 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17812 if test "${ac_cv_func_gettimeofday+set}" = set; then
17813   echo $ECHO_N "(cached) $ECHO_C" >&6
17814 else
17815   cat >conftest.$ac_ext <<_ACEOF
17816 #line 17816 "configure"
17817 #include "confdefs.h"
17818 #define gettimeofday autoconf_temporary
17819 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17820 #undef gettimeofday
17821
17822 #ifdef __cplusplus
17823 extern "C"
17824 #endif
17825
17826 /* We use char because int might match the return type of a gcc2
17827    builtin and then its argument prototype would still apply.  */
17828 char gettimeofday (void);
17829
17830 int
17831 main (void)
17832 {
17833
17834 /* The GNU C library defines stubs for functions which it implements
17835     to always fail with ENOSYS.  Some functions are actually named
17836     something starting with __ and the normal name is an alias.  */
17837 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17838 #error found stub for gettimeofday
17839 #endif
17840
17841         return gettimeofday ();
17842   ;
17843   return 0;
17844 }
17845 _ACEOF
17846 rm -f conftest.$ac_objext conftest$ac_exeext
17847 if { (eval echo "$as_me:17847: \"$ac_link\"") >&5
17848   (eval $ac_link) 2>&5
17849   ac_status=$?
17850   echo "$as_me:17850: \$? = $ac_status" >&5
17851   (exit $ac_status); } &&
17852          { ac_try='test -s conftest$ac_exeext'
17853   { (eval echo "$as_me:17853: \"$ac_try\"") >&5
17854   (eval $ac_try) 2>&5
17855   ac_status=$?
17856   echo "$as_me:17856: \$? = $ac_status" >&5
17857   (exit $ac_status); }; }; then
17858   ac_cv_func_gettimeofday=yes
17859 else
17860   echo "$as_me: failed program was:" >&5
17861 cat conftest.$ac_ext >&5
17862 ac_cv_func_gettimeofday=no
17863 fi
17864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17865 fi
17866 echo "$as_me:17866: result: $ac_cv_func_gettimeofday" >&5
17867 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17868 if test $ac_cv_func_gettimeofday = yes; then
17869
17870 cat >>confdefs.h <<\EOF
17871 #define HAVE_GETTIMEOFDAY 1
17872 EOF
17873
17874 else
17875
17876 echo "$as_me:17876: checking for gettimeofday in -lbsd" >&5
17877 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17878 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17879   echo $ECHO_N "(cached) $ECHO_C" >&6
17880 else
17881   ac_check_lib_save_LIBS=$LIBS
17882 LIBS="-lbsd  $LIBS"
17883 cat >conftest.$ac_ext <<_ACEOF
17884 #line 17884 "configure"
17885 #include "confdefs.h"
17886
17887 /* Override any gcc2 internal prototype to avoid an error.  */
17888 #ifdef __cplusplus
17889 extern "C"
17890 #endif
17891 /* We use char because int might match the return type of a gcc2
17892    builtin and then its argument prototype would still apply.  */
17893 char gettimeofday ();
17894 int
17895 main (void)
17896 {
17897 gettimeofday ();
17898   ;
17899   return 0;
17900 }
17901 _ACEOF
17902 rm -f conftest.$ac_objext conftest$ac_exeext
17903 if { (eval echo "$as_me:17903: \"$ac_link\"") >&5
17904   (eval $ac_link) 2>&5
17905   ac_status=$?
17906   echo "$as_me:17906: \$? = $ac_status" >&5
17907   (exit $ac_status); } &&
17908          { ac_try='test -s conftest$ac_exeext'
17909   { (eval echo "$as_me:17909: \"$ac_try\"") >&5
17910   (eval $ac_try) 2>&5
17911   ac_status=$?
17912   echo "$as_me:17912: \$? = $ac_status" >&5
17913   (exit $ac_status); }; }; then
17914   ac_cv_lib_bsd_gettimeofday=yes
17915 else
17916   echo "$as_me: failed program was:" >&5
17917 cat conftest.$ac_ext >&5
17918 ac_cv_lib_bsd_gettimeofday=no
17919 fi
17920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17921 LIBS=$ac_check_lib_save_LIBS
17922 fi
17923 echo "$as_me:17923: result: $ac_cv_lib_bsd_gettimeofday" >&5
17924 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17925 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17926
17927 cat >>confdefs.h <<\EOF
17928 #define HAVE_GETTIMEOFDAY 1
17929 EOF
17930
17931 cf_add_libs="$LIBS"
17932 # reverse order
17933 cf_add_0lib=
17934 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17935 # filter duplicates
17936 for cf_add_1lib in $cf_add_0lib; do
17937         for cf_add_2lib in $cf_add_libs; do
17938                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17939                         cf_add_1lib=
17940                         break
17941                 fi
17942         done
17943         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17944 done
17945 LIBS="$cf_add_libs"
17946
17947 fi
17948
17949 fi
17950         ;;
17951 esac
17952
17953 echo "$as_me:17953: checking if -lm needed for math functions" >&5
17954 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17955 if test "${cf_cv_need_libm+set}" = set; then
17956   echo $ECHO_N "(cached) $ECHO_C" >&6
17957 else
17958
17959         cat >conftest.$ac_ext <<_ACEOF
17960 #line 17960 "configure"
17961 #include "confdefs.h"
17962
17963         #include <stdio.h>
17964         #include <stdlib.h>
17965         #include <math.h>
17966
17967 int
17968 main (void)
17969 {
17970 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17971   ;
17972   return 0;
17973 }
17974 _ACEOF
17975 rm -f conftest.$ac_objext conftest$ac_exeext
17976 if { (eval echo "$as_me:17976: \"$ac_link\"") >&5
17977   (eval $ac_link) 2>&5
17978   ac_status=$?
17979   echo "$as_me:17979: \$? = $ac_status" >&5
17980   (exit $ac_status); } &&
17981          { ac_try='test -s conftest$ac_exeext'
17982   { (eval echo "$as_me:17982: \"$ac_try\"") >&5
17983   (eval $ac_try) 2>&5
17984   ac_status=$?
17985   echo "$as_me:17985: \$? = $ac_status" >&5
17986   (exit $ac_status); }; }; then
17987   cf_cv_need_libm=no
17988 else
17989   echo "$as_me: failed program was:" >&5
17990 cat conftest.$ac_ext >&5
17991 cf_cv_need_libm=yes
17992 fi
17993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17994 fi
17995 echo "$as_me:17995: result: $cf_cv_need_libm" >&5
17996 echo "${ECHO_T}$cf_cv_need_libm" >&6
17997 if test "$cf_cv_need_libm" = yes
17998 then
17999 MATH_LIB=-lm
18000 fi
18001
18002 ###     Checks for header files.
18003 echo "$as_me:18003: checking for ANSI C header files" >&5
18004 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18005 if test "${ac_cv_header_stdc+set}" = set; then
18006   echo $ECHO_N "(cached) $ECHO_C" >&6
18007 else
18008   cat >conftest.$ac_ext <<_ACEOF
18009 #line 18009 "configure"
18010 #include "confdefs.h"
18011 #include <stdlib.h>
18012 #include <stdarg.h>
18013 #include <string.h>
18014 #include <float.h>
18015
18016 _ACEOF
18017 if { (eval echo "$as_me:18017: \"$ac_cpp conftest.$ac_ext\"") >&5
18018   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18019   ac_status=$?
18020   egrep -v '^ *\+' conftest.er1 >conftest.err
18021   rm -f conftest.er1
18022   cat conftest.err >&5
18023   echo "$as_me:18023: \$? = $ac_status" >&5
18024   (exit $ac_status); } >/dev/null; then
18025   if test -s conftest.err; then
18026     ac_cpp_err=$ac_c_preproc_warn_flag
18027   else
18028     ac_cpp_err=
18029   fi
18030 else
18031   ac_cpp_err=yes
18032 fi
18033 if test -z "$ac_cpp_err"; then
18034   ac_cv_header_stdc=yes
18035 else
18036   echo "$as_me: failed program was:" >&5
18037   cat conftest.$ac_ext >&5
18038   ac_cv_header_stdc=no
18039 fi
18040 rm -f conftest.err conftest.$ac_ext
18041
18042 if test $ac_cv_header_stdc = yes; then
18043   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18044   cat >conftest.$ac_ext <<_ACEOF
18045 #line 18045 "configure"
18046 #include "confdefs.h"
18047 #include <string.h>
18048
18049 _ACEOF
18050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18051   egrep "memchr" >/dev/null 2>&1; then
18052   :
18053 else
18054   ac_cv_header_stdc=no
18055 fi
18056 rm -rf conftest*
18057
18058 fi
18059
18060 if test $ac_cv_header_stdc = yes; then
18061   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18062   cat >conftest.$ac_ext <<_ACEOF
18063 #line 18063 "configure"
18064 #include "confdefs.h"
18065 #include <stdlib.h>
18066
18067 _ACEOF
18068 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18069   egrep "free" >/dev/null 2>&1; then
18070   :
18071 else
18072   ac_cv_header_stdc=no
18073 fi
18074 rm -rf conftest*
18075
18076 fi
18077
18078 if test $ac_cv_header_stdc = yes; then
18079   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18080   if test "$cross_compiling" = yes; then
18081   :
18082 else
18083   cat >conftest.$ac_ext <<_ACEOF
18084 #line 18084 "configure"
18085 #include "confdefs.h"
18086 #include <ctype.h>
18087 #if ((' ' & 0x0FF) == 0x020)
18088 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18089 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18090 #else
18091 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18092                      || ('j' <= (c) && (c) <= 'r') \
18093                      || ('s' <= (c) && (c) <= 'z'))
18094 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18095 #endif
18096
18097 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18098 int
18099 main (void)
18100 {
18101   int i;
18102   for (i = 0; i < 256; i++)
18103     if (XOR (islower (i), ISLOWER (i))
18104         || toupper (i) != TOUPPER (i))
18105       $ac_main_return(2);
18106   $ac_main_return (0);
18107 }
18108 _ACEOF
18109 rm -f 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); } && { ac_try='./conftest$ac_exeext'
18115   { (eval echo "$as_me:18115: \"$ac_try\"") >&5
18116   (eval $ac_try) 2>&5
18117   ac_status=$?
18118   echo "$as_me:18118: \$? = $ac_status" >&5
18119   (exit $ac_status); }; }; then
18120   :
18121 else
18122   echo "$as_me: program exited with status $ac_status" >&5
18123 echo "$as_me: failed program was:" >&5
18124 cat conftest.$ac_ext >&5
18125 ac_cv_header_stdc=no
18126 fi
18127 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18128 fi
18129 fi
18130 fi
18131 echo "$as_me:18131: result: $ac_cv_header_stdc" >&5
18132 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18133 if test $ac_cv_header_stdc = yes; then
18134
18135 cat >>confdefs.h <<\EOF
18136 #define STDC_HEADERS 1
18137 EOF
18138
18139 fi
18140
18141 ac_header_dirent=no
18142 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18143   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18144 echo "$as_me:18144: checking for $ac_hdr that defines DIR" >&5
18145 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18146 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18147   echo $ECHO_N "(cached) $ECHO_C" >&6
18148 else
18149   cat >conftest.$ac_ext <<_ACEOF
18150 #line 18150 "configure"
18151 #include "confdefs.h"
18152 #include <sys/types.h>
18153 #include <$ac_hdr>
18154
18155 int
18156 main (void)
18157 {
18158 if ((DIR *) 0)
18159 return 0;
18160   ;
18161   return 0;
18162 }
18163 _ACEOF
18164 rm -f conftest.$ac_objext
18165 if { (eval echo "$as_me:18165: \"$ac_compile\"") >&5
18166   (eval $ac_compile) 2>&5
18167   ac_status=$?
18168   echo "$as_me:18168: \$? = $ac_status" >&5
18169   (exit $ac_status); } &&
18170          { ac_try='test -s conftest.$ac_objext'
18171   { (eval echo "$as_me:18171: \"$ac_try\"") >&5
18172   (eval $ac_try) 2>&5
18173   ac_status=$?
18174   echo "$as_me:18174: \$? = $ac_status" >&5
18175   (exit $ac_status); }; }; then
18176   eval "$as_ac_Header=yes"
18177 else
18178   echo "$as_me: failed program was:" >&5
18179 cat conftest.$ac_ext >&5
18180 eval "$as_ac_Header=no"
18181 fi
18182 rm -f conftest.$ac_objext conftest.$ac_ext
18183 fi
18184 echo "$as_me:18184: result: `eval echo '${'$as_ac_Header'}'`" >&5
18185 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18186 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18187   cat >>confdefs.h <<EOF
18188 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18189 EOF
18190
18191 ac_header_dirent=$ac_hdr; break
18192 fi
18193
18194 done
18195 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18196 if test $ac_header_dirent = dirent.h; then
18197   echo "$as_me:18197: checking for opendir in -ldir" >&5
18198 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18199 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18200   echo $ECHO_N "(cached) $ECHO_C" >&6
18201 else
18202   ac_check_lib_save_LIBS=$LIBS
18203 LIBS="-ldir  $LIBS"
18204 cat >conftest.$ac_ext <<_ACEOF
18205 #line 18205 "configure"
18206 #include "confdefs.h"
18207
18208 /* Override any gcc2 internal prototype to avoid an error.  */
18209 #ifdef __cplusplus
18210 extern "C"
18211 #endif
18212 /* We use char because int might match the return type of a gcc2
18213    builtin and then its argument prototype would still apply.  */
18214 char opendir ();
18215 int
18216 main (void)
18217 {
18218 opendir ();
18219   ;
18220   return 0;
18221 }
18222 _ACEOF
18223 rm -f conftest.$ac_objext conftest$ac_exeext
18224 if { (eval echo "$as_me:18224: \"$ac_link\"") >&5
18225   (eval $ac_link) 2>&5
18226   ac_status=$?
18227   echo "$as_me:18227: \$? = $ac_status" >&5
18228   (exit $ac_status); } &&
18229          { ac_try='test -s conftest$ac_exeext'
18230   { (eval echo "$as_me:18230: \"$ac_try\"") >&5
18231   (eval $ac_try) 2>&5
18232   ac_status=$?
18233   echo "$as_me:18233: \$? = $ac_status" >&5
18234   (exit $ac_status); }; }; then
18235   ac_cv_lib_dir_opendir=yes
18236 else
18237   echo "$as_me: failed program was:" >&5
18238 cat conftest.$ac_ext >&5
18239 ac_cv_lib_dir_opendir=no
18240 fi
18241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18242 LIBS=$ac_check_lib_save_LIBS
18243 fi
18244 echo "$as_me:18244: result: $ac_cv_lib_dir_opendir" >&5
18245 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18246 if test $ac_cv_lib_dir_opendir = yes; then
18247   LIBS="$LIBS -ldir"
18248 fi
18249
18250 else
18251   echo "$as_me:18251: checking for opendir in -lx" >&5
18252 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18253 if test "${ac_cv_lib_x_opendir+set}" = set; then
18254   echo $ECHO_N "(cached) $ECHO_C" >&6
18255 else
18256   ac_check_lib_save_LIBS=$LIBS
18257 LIBS="-lx  $LIBS"
18258 cat >conftest.$ac_ext <<_ACEOF
18259 #line 18259 "configure"
18260 #include "confdefs.h"
18261
18262 /* Override any gcc2 internal prototype to avoid an error.  */
18263 #ifdef __cplusplus
18264 extern "C"
18265 #endif
18266 /* We use char because int might match the return type of a gcc2
18267    builtin and then its argument prototype would still apply.  */
18268 char opendir ();
18269 int
18270 main (void)
18271 {
18272 opendir ();
18273   ;
18274   return 0;
18275 }
18276 _ACEOF
18277 rm -f conftest.$ac_objext conftest$ac_exeext
18278 if { (eval echo "$as_me:18278: \"$ac_link\"") >&5
18279   (eval $ac_link) 2>&5
18280   ac_status=$?
18281   echo "$as_me:18281: \$? = $ac_status" >&5
18282   (exit $ac_status); } &&
18283          { ac_try='test -s conftest$ac_exeext'
18284   { (eval echo "$as_me:18284: \"$ac_try\"") >&5
18285   (eval $ac_try) 2>&5
18286   ac_status=$?
18287   echo "$as_me:18287: \$? = $ac_status" >&5
18288   (exit $ac_status); }; }; then
18289   ac_cv_lib_x_opendir=yes
18290 else
18291   echo "$as_me: failed program was:" >&5
18292 cat conftest.$ac_ext >&5
18293 ac_cv_lib_x_opendir=no
18294 fi
18295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18296 LIBS=$ac_check_lib_save_LIBS
18297 fi
18298 echo "$as_me:18298: result: $ac_cv_lib_x_opendir" >&5
18299 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18300 if test $ac_cv_lib_x_opendir = yes; then
18301   LIBS="$LIBS -lx"
18302 fi
18303
18304 fi
18305
18306 echo "$as_me:18306: checking whether time.h and sys/time.h may both be included" >&5
18307 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18308 if test "${ac_cv_header_time+set}" = set; then
18309   echo $ECHO_N "(cached) $ECHO_C" >&6
18310 else
18311   cat >conftest.$ac_ext <<_ACEOF
18312 #line 18312 "configure"
18313 #include "confdefs.h"
18314 #include <sys/types.h>
18315 #include <sys/time.h>
18316 #include <time.h>
18317
18318 int
18319 main (void)
18320 {
18321 if ((struct tm *) 0)
18322 return 0;
18323   ;
18324   return 0;
18325 }
18326 _ACEOF
18327 rm -f conftest.$ac_objext
18328 if { (eval echo "$as_me:18328: \"$ac_compile\"") >&5
18329   (eval $ac_compile) 2>&5
18330   ac_status=$?
18331   echo "$as_me:18331: \$? = $ac_status" >&5
18332   (exit $ac_status); } &&
18333          { ac_try='test -s conftest.$ac_objext'
18334   { (eval echo "$as_me:18334: \"$ac_try\"") >&5
18335   (eval $ac_try) 2>&5
18336   ac_status=$?
18337   echo "$as_me:18337: \$? = $ac_status" >&5
18338   (exit $ac_status); }; }; then
18339   ac_cv_header_time=yes
18340 else
18341   echo "$as_me: failed program was:" >&5
18342 cat conftest.$ac_ext >&5
18343 ac_cv_header_time=no
18344 fi
18345 rm -f conftest.$ac_objext conftest.$ac_ext
18346 fi
18347 echo "$as_me:18347: result: $ac_cv_header_time" >&5
18348 echo "${ECHO_T}$ac_cv_header_time" >&6
18349 if test $ac_cv_header_time = yes; then
18350
18351 cat >>confdefs.h <<\EOF
18352 #define TIME_WITH_SYS_TIME 1
18353 EOF
18354
18355 fi
18356
18357 cf_regex_func=no
18358
18359 cf_regex_libs="regex re"
18360 case $host_os in
18361 (mingw*)
18362         cf_regex_libs="systre gnurx $cf_regex_libs"
18363         ;;
18364 esac
18365
18366 echo "$as_me:18366: checking for regcomp" >&5
18367 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18368 if test "${ac_cv_func_regcomp+set}" = set; then
18369   echo $ECHO_N "(cached) $ECHO_C" >&6
18370 else
18371   cat >conftest.$ac_ext <<_ACEOF
18372 #line 18372 "configure"
18373 #include "confdefs.h"
18374 #define regcomp autoconf_temporary
18375 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18376 #undef regcomp
18377
18378 #ifdef __cplusplus
18379 extern "C"
18380 #endif
18381
18382 /* We use char because int might match the return type of a gcc2
18383    builtin and then its argument prototype would still apply.  */
18384 char regcomp (void);
18385
18386 int
18387 main (void)
18388 {
18389
18390 /* The GNU C library defines stubs for functions which it implements
18391     to always fail with ENOSYS.  Some functions are actually named
18392     something starting with __ and the normal name is an alias.  */
18393 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18394 #error found stub for regcomp
18395 #endif
18396
18397         return regcomp ();
18398   ;
18399   return 0;
18400 }
18401 _ACEOF
18402 rm -f conftest.$ac_objext conftest$ac_exeext
18403 if { (eval echo "$as_me:18403: \"$ac_link\"") >&5
18404   (eval $ac_link) 2>&5
18405   ac_status=$?
18406   echo "$as_me:18406: \$? = $ac_status" >&5
18407   (exit $ac_status); } &&
18408          { ac_try='test -s conftest$ac_exeext'
18409   { (eval echo "$as_me:18409: \"$ac_try\"") >&5
18410   (eval $ac_try) 2>&5
18411   ac_status=$?
18412   echo "$as_me:18412: \$? = $ac_status" >&5
18413   (exit $ac_status); }; }; then
18414   ac_cv_func_regcomp=yes
18415 else
18416   echo "$as_me: failed program was:" >&5
18417 cat conftest.$ac_ext >&5
18418 ac_cv_func_regcomp=no
18419 fi
18420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18421 fi
18422 echo "$as_me:18422: result: $ac_cv_func_regcomp" >&5
18423 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18424 if test $ac_cv_func_regcomp = yes; then
18425   cf_regex_func=regcomp
18426 else
18427
18428         for cf_regex_lib in $cf_regex_libs
18429         do
18430                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18431 echo "$as_me:18431: checking for regcomp in -l$cf_regex_lib" >&5
18432 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18433 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18434   echo $ECHO_N "(cached) $ECHO_C" >&6
18435 else
18436   ac_check_lib_save_LIBS=$LIBS
18437 LIBS="-l$cf_regex_lib  $LIBS"
18438 cat >conftest.$ac_ext <<_ACEOF
18439 #line 18439 "configure"
18440 #include "confdefs.h"
18441
18442 /* Override any gcc2 internal prototype to avoid an error.  */
18443 #ifdef __cplusplus
18444 extern "C"
18445 #endif
18446 /* We use char because int might match the return type of a gcc2
18447    builtin and then its argument prototype would still apply.  */
18448 char regcomp ();
18449 int
18450 main (void)
18451 {
18452 regcomp ();
18453   ;
18454   return 0;
18455 }
18456 _ACEOF
18457 rm -f conftest.$ac_objext conftest$ac_exeext
18458 if { (eval echo "$as_me:18458: \"$ac_link\"") >&5
18459   (eval $ac_link) 2>&5
18460   ac_status=$?
18461   echo "$as_me:18461: \$? = $ac_status" >&5
18462   (exit $ac_status); } &&
18463          { ac_try='test -s conftest$ac_exeext'
18464   { (eval echo "$as_me:18464: \"$ac_try\"") >&5
18465   (eval $ac_try) 2>&5
18466   ac_status=$?
18467   echo "$as_me:18467: \$? = $ac_status" >&5
18468   (exit $ac_status); }; }; then
18469   eval "$as_ac_Lib=yes"
18470 else
18471   echo "$as_me: failed program was:" >&5
18472 cat conftest.$ac_ext >&5
18473 eval "$as_ac_Lib=no"
18474 fi
18475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18476 LIBS=$ac_check_lib_save_LIBS
18477 fi
18478 echo "$as_me:18478: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18479 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18480 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18481
18482 cf_add_libs="$LIBS"
18483 # reverse order
18484 cf_add_0lib=
18485 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18486 # filter duplicates
18487 for cf_add_1lib in $cf_add_0lib; do
18488         for cf_add_2lib in $cf_add_libs; do
18489                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18490                         cf_add_1lib=
18491                         break
18492                 fi
18493         done
18494         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18495 done
18496 LIBS="$cf_add_libs"
18497
18498                                 cf_regex_func=regcomp
18499                                 break
18500 fi
18501
18502         done
18503
18504 fi
18505
18506 if test "$cf_regex_func" = no ; then
18507         echo "$as_me:18507: checking for compile" >&5
18508 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18509 if test "${ac_cv_func_compile+set}" = set; then
18510   echo $ECHO_N "(cached) $ECHO_C" >&6
18511 else
18512   cat >conftest.$ac_ext <<_ACEOF
18513 #line 18513 "configure"
18514 #include "confdefs.h"
18515 #define compile autoconf_temporary
18516 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18517 #undef compile
18518
18519 #ifdef __cplusplus
18520 extern "C"
18521 #endif
18522
18523 /* We use char because int might match the return type of a gcc2
18524    builtin and then its argument prototype would still apply.  */
18525 char compile (void);
18526
18527 int
18528 main (void)
18529 {
18530
18531 /* The GNU C library defines stubs for functions which it implements
18532     to always fail with ENOSYS.  Some functions are actually named
18533     something starting with __ and the normal name is an alias.  */
18534 #if defined (__stub_compile) || defined (__stub___compile)
18535 #error found stub for compile
18536 #endif
18537
18538         return compile ();
18539   ;
18540   return 0;
18541 }
18542 _ACEOF
18543 rm -f conftest.$ac_objext conftest$ac_exeext
18544 if { (eval echo "$as_me:18544: \"$ac_link\"") >&5
18545   (eval $ac_link) 2>&5
18546   ac_status=$?
18547   echo "$as_me:18547: \$? = $ac_status" >&5
18548   (exit $ac_status); } &&
18549          { ac_try='test -s conftest$ac_exeext'
18550   { (eval echo "$as_me:18550: \"$ac_try\"") >&5
18551   (eval $ac_try) 2>&5
18552   ac_status=$?
18553   echo "$as_me:18553: \$? = $ac_status" >&5
18554   (exit $ac_status); }; }; then
18555   ac_cv_func_compile=yes
18556 else
18557   echo "$as_me: failed program was:" >&5
18558 cat conftest.$ac_ext >&5
18559 ac_cv_func_compile=no
18560 fi
18561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18562 fi
18563 echo "$as_me:18563: result: $ac_cv_func_compile" >&5
18564 echo "${ECHO_T}$ac_cv_func_compile" >&6
18565 if test $ac_cv_func_compile = yes; then
18566   cf_regex_func=compile
18567 else
18568
18569                 echo "$as_me:18569: checking for compile in -lgen" >&5
18570 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18571 if test "${ac_cv_lib_gen_compile+set}" = set; then
18572   echo $ECHO_N "(cached) $ECHO_C" >&6
18573 else
18574   ac_check_lib_save_LIBS=$LIBS
18575 LIBS="-lgen  $LIBS"
18576 cat >conftest.$ac_ext <<_ACEOF
18577 #line 18577 "configure"
18578 #include "confdefs.h"
18579
18580 /* Override any gcc2 internal prototype to avoid an error.  */
18581 #ifdef __cplusplus
18582 extern "C"
18583 #endif
18584 /* We use char because int might match the return type of a gcc2
18585    builtin and then its argument prototype would still apply.  */
18586 char compile ();
18587 int
18588 main (void)
18589 {
18590 compile ();
18591   ;
18592   return 0;
18593 }
18594 _ACEOF
18595 rm -f conftest.$ac_objext conftest$ac_exeext
18596 if { (eval echo "$as_me:18596: \"$ac_link\"") >&5
18597   (eval $ac_link) 2>&5
18598   ac_status=$?
18599   echo "$as_me:18599: \$? = $ac_status" >&5
18600   (exit $ac_status); } &&
18601          { ac_try='test -s conftest$ac_exeext'
18602   { (eval echo "$as_me:18602: \"$ac_try\"") >&5
18603   (eval $ac_try) 2>&5
18604   ac_status=$?
18605   echo "$as_me:18605: \$? = $ac_status" >&5
18606   (exit $ac_status); }; }; then
18607   ac_cv_lib_gen_compile=yes
18608 else
18609   echo "$as_me: failed program was:" >&5
18610 cat conftest.$ac_ext >&5
18611 ac_cv_lib_gen_compile=no
18612 fi
18613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18614 LIBS=$ac_check_lib_save_LIBS
18615 fi
18616 echo "$as_me:18616: result: $ac_cv_lib_gen_compile" >&5
18617 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18618 if test $ac_cv_lib_gen_compile = yes; then
18619
18620 cf_add_libs="$LIBS"
18621 # reverse order
18622 cf_add_0lib=
18623 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18624 # filter duplicates
18625 for cf_add_1lib in $cf_add_0lib; do
18626         for cf_add_2lib in $cf_add_libs; do
18627                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18628                         cf_add_1lib=
18629                         break
18630                 fi
18631         done
18632         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18633 done
18634 LIBS="$cf_add_libs"
18635
18636                                 cf_regex_func=compile
18637 fi
18638
18639 fi
18640
18641 fi
18642
18643 if test "$cf_regex_func" = no ; then
18644         { echo "$as_me:18644: WARNING: cannot find regular expression library" >&5
18645 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18646 fi
18647
18648 echo "$as_me:18648: checking for regular-expression headers" >&5
18649 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18650 if test "${cf_cv_regex_hdrs+set}" = set; then
18651   echo $ECHO_N "(cached) $ECHO_C" >&6
18652 else
18653
18654 cf_cv_regex_hdrs=no
18655 case $cf_regex_func in
18656 (compile)
18657         for cf_regex_hdr in regexp.h regexpr.h
18658         do
18659                 cat >conftest.$ac_ext <<_ACEOF
18660 #line 18660 "configure"
18661 #include "confdefs.h"
18662 #include <$cf_regex_hdr>
18663 int
18664 main (void)
18665 {
18666
18667                         char *p = compile("", "", "", 0);
18668                         int x = step("", "");
18669                         (void)p;
18670                         (void)x;
18671
18672   ;
18673   return 0;
18674 }
18675 _ACEOF
18676 rm -f conftest.$ac_objext conftest$ac_exeext
18677 if { (eval echo "$as_me:18677: \"$ac_link\"") >&5
18678   (eval $ac_link) 2>&5
18679   ac_status=$?
18680   echo "$as_me:18680: \$? = $ac_status" >&5
18681   (exit $ac_status); } &&
18682          { ac_try='test -s conftest$ac_exeext'
18683   { (eval echo "$as_me:18683: \"$ac_try\"") >&5
18684   (eval $ac_try) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); }; }; then
18688
18689                         cf_cv_regex_hdrs=$cf_regex_hdr
18690                         break
18691
18692 else
18693   echo "$as_me: failed program was:" >&5
18694 cat conftest.$ac_ext >&5
18695 fi
18696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18697         done
18698         ;;
18699 (*)
18700         for cf_regex_hdr in regex.h
18701         do
18702                 cat >conftest.$ac_ext <<_ACEOF
18703 #line 18703 "configure"
18704 #include "confdefs.h"
18705 #include <sys/types.h>
18706 #include <$cf_regex_hdr>
18707 int
18708 main (void)
18709 {
18710
18711                         regex_t *p = 0;
18712                         int x = regcomp(p, "", 0);
18713                         int y = regexec(p, "", 0, 0, 0);
18714                         (void)x;
18715                         (void)y;
18716                         regfree(p);
18717
18718   ;
18719   return 0;
18720 }
18721 _ACEOF
18722 rm -f conftest.$ac_objext conftest$ac_exeext
18723 if { (eval echo "$as_me:18723: \"$ac_link\"") >&5
18724   (eval $ac_link) 2>&5
18725   ac_status=$?
18726   echo "$as_me:18726: \$? = $ac_status" >&5
18727   (exit $ac_status); } &&
18728          { ac_try='test -s conftest$ac_exeext'
18729   { (eval echo "$as_me:18729: \"$ac_try\"") >&5
18730   (eval $ac_try) 2>&5
18731   ac_status=$?
18732   echo "$as_me:18732: \$? = $ac_status" >&5
18733   (exit $ac_status); }; }; then
18734
18735                         cf_cv_regex_hdrs=$cf_regex_hdr
18736                         break
18737
18738 else
18739   echo "$as_me: failed program was:" >&5
18740 cat conftest.$ac_ext >&5
18741 fi
18742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18743         done
18744         ;;
18745 esac
18746
18747 fi
18748 echo "$as_me:18748: result: $cf_cv_regex_hdrs" >&5
18749 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18750
18751 case $cf_cv_regex_hdrs in
18752         (no)            { echo "$as_me:18752: WARNING: no regular expression header found" >&5
18753 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18754         (regex.h)
18755 cat >>confdefs.h <<\EOF
18756 #define HAVE_REGEX_H_FUNCS 1
18757 EOF
18758  ;;
18759         (regexp.h)
18760 cat >>confdefs.h <<\EOF
18761 #define HAVE_REGEXP_H_FUNCS 1
18762 EOF
18763  ;;
18764         (regexpr.h)
18765 cat >>confdefs.h <<\EOF
18766 #define HAVE_REGEXPR_H_FUNCS 1
18767 EOF
18768  ;;
18769 esac
18770
18771 for ac_header in \
18772 fcntl.h \
18773 getopt.h \
18774 limits.h \
18775 locale.h \
18776 math.h \
18777 poll.h \
18778 sys/ioctl.h \
18779 sys/param.h \
18780 sys/poll.h \
18781 sys/select.h \
18782 sys/time.h \
18783 sys/times.h \
18784 ttyent.h \
18785 unistd.h \
18786 wctype.h \
18787
18788 do
18789 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18790 echo "$as_me:18790: checking for $ac_header" >&5
18791 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18792 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18793   echo $ECHO_N "(cached) $ECHO_C" >&6
18794 else
18795   cat >conftest.$ac_ext <<_ACEOF
18796 #line 18796 "configure"
18797 #include "confdefs.h"
18798 #include <$ac_header>
18799 _ACEOF
18800 if { (eval echo "$as_me:18800: \"$ac_cpp conftest.$ac_ext\"") >&5
18801   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18802   ac_status=$?
18803   egrep -v '^ *\+' conftest.er1 >conftest.err
18804   rm -f conftest.er1
18805   cat conftest.err >&5
18806   echo "$as_me:18806: \$? = $ac_status" >&5
18807   (exit $ac_status); } >/dev/null; then
18808   if test -s conftest.err; then
18809     ac_cpp_err=$ac_c_preproc_warn_flag
18810   else
18811     ac_cpp_err=
18812   fi
18813 else
18814   ac_cpp_err=yes
18815 fi
18816 if test -z "$ac_cpp_err"; then
18817   eval "$as_ac_Header=yes"
18818 else
18819   echo "$as_me: failed program was:" >&5
18820   cat conftest.$ac_ext >&5
18821   eval "$as_ac_Header=no"
18822 fi
18823 rm -f conftest.err conftest.$ac_ext
18824 fi
18825 echo "$as_me:18825: result: `eval echo '${'$as_ac_Header'}'`" >&5
18826 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18827 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18828   cat >>confdefs.h <<EOF
18829 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18830 EOF
18831
18832 fi
18833 done
18834
18835 for ac_header in unistd.h getopt.h
18836 do
18837 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18838 echo "$as_me:18838: checking for $ac_header" >&5
18839 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18840 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18841   echo $ECHO_N "(cached) $ECHO_C" >&6
18842 else
18843   cat >conftest.$ac_ext <<_ACEOF
18844 #line 18844 "configure"
18845 #include "confdefs.h"
18846 #include <$ac_header>
18847 _ACEOF
18848 if { (eval echo "$as_me:18848: \"$ac_cpp conftest.$ac_ext\"") >&5
18849   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18850   ac_status=$?
18851   egrep -v '^ *\+' conftest.er1 >conftest.err
18852   rm -f conftest.er1
18853   cat conftest.err >&5
18854   echo "$as_me:18854: \$? = $ac_status" >&5
18855   (exit $ac_status); } >/dev/null; then
18856   if test -s conftest.err; then
18857     ac_cpp_err=$ac_c_preproc_warn_flag
18858   else
18859     ac_cpp_err=
18860   fi
18861 else
18862   ac_cpp_err=yes
18863 fi
18864 if test -z "$ac_cpp_err"; then
18865   eval "$as_ac_Header=yes"
18866 else
18867   echo "$as_me: failed program was:" >&5
18868   cat conftest.$ac_ext >&5
18869   eval "$as_ac_Header=no"
18870 fi
18871 rm -f conftest.err conftest.$ac_ext
18872 fi
18873 echo "$as_me:18873: result: `eval echo '${'$as_ac_Header'}'`" >&5
18874 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18875 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18876   cat >>confdefs.h <<EOF
18877 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18878 EOF
18879
18880 fi
18881 done
18882
18883 echo "$as_me:18883: checking for header declaring getopt variables" >&5
18884 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18885 if test "${cf_cv_getopt_header+set}" = set; then
18886   echo $ECHO_N "(cached) $ECHO_C" >&6
18887 else
18888
18889 cf_cv_getopt_header=none
18890 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18891 do
18892 cat >conftest.$ac_ext <<_ACEOF
18893 #line 18893 "configure"
18894 #include "confdefs.h"
18895
18896 #include <$cf_header>
18897 int
18898 main (void)
18899 {
18900 int x = optind; char *y = optarg
18901   ;
18902   return 0;
18903 }
18904 _ACEOF
18905 rm -f conftest.$ac_objext
18906 if { (eval echo "$as_me:18906: \"$ac_compile\"") >&5
18907   (eval $ac_compile) 2>&5
18908   ac_status=$?
18909   echo "$as_me:18909: \$? = $ac_status" >&5
18910   (exit $ac_status); } &&
18911          { ac_try='test -s conftest.$ac_objext'
18912   { (eval echo "$as_me:18912: \"$ac_try\"") >&5
18913   (eval $ac_try) 2>&5
18914   ac_status=$?
18915   echo "$as_me:18915: \$? = $ac_status" >&5
18916   (exit $ac_status); }; }; then
18917   cf_cv_getopt_header=$cf_header
18918  break
18919 else
18920   echo "$as_me: failed program was:" >&5
18921 cat conftest.$ac_ext >&5
18922 fi
18923 rm -f conftest.$ac_objext conftest.$ac_ext
18924 done
18925
18926 fi
18927 echo "$as_me:18927: result: $cf_cv_getopt_header" >&5
18928 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18929 if test $cf_cv_getopt_header != none ; then
18930
18931 cat >>confdefs.h <<\EOF
18932 #define HAVE_GETOPT_HEADER 1
18933 EOF
18934
18935 fi
18936 if test $cf_cv_getopt_header = getopt.h ; then
18937
18938 cat >>confdefs.h <<\EOF
18939 #define NEED_GETOPT_H 1
18940 EOF
18941
18942 fi
18943
18944 echo "$as_me:18944: checking if external environ is declared" >&5
18945 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18946 if test "${cf_cv_dcl_environ+set}" = set; then
18947   echo $ECHO_N "(cached) $ECHO_C" >&6
18948 else
18949
18950     cat >conftest.$ac_ext <<_ACEOF
18951 #line 18951 "configure"
18952 #include "confdefs.h"
18953
18954 #ifdef HAVE_STDLIB_H
18955 #include <stdlib.h>
18956 #endif
18957 #include <unistd.h>
18958 int
18959 main (void)
18960 {
18961 int x = (int) environ
18962   ;
18963   return 0;
18964 }
18965 _ACEOF
18966 rm -f conftest.$ac_objext
18967 if { (eval echo "$as_me:18967: \"$ac_compile\"") >&5
18968   (eval $ac_compile) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit $ac_status); } &&
18972          { ac_try='test -s conftest.$ac_objext'
18973   { (eval echo "$as_me:18973: \"$ac_try\"") >&5
18974   (eval $ac_try) 2>&5
18975   ac_status=$?
18976   echo "$as_me:18976: \$? = $ac_status" >&5
18977   (exit $ac_status); }; }; then
18978   cf_cv_dcl_environ=yes
18979 else
18980   echo "$as_me: failed program was:" >&5
18981 cat conftest.$ac_ext >&5
18982 cf_cv_dcl_environ=no
18983 fi
18984 rm -f conftest.$ac_objext conftest.$ac_ext
18985
18986 fi
18987 echo "$as_me:18987: result: $cf_cv_dcl_environ" >&5
18988 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18989
18990 if test "$cf_cv_dcl_environ" = no ; then
18991
18992 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18993
18994     cat >>confdefs.h <<EOF
18995 #define $cf_result 1
18996 EOF
18997
18998 fi
18999
19000 # It's possible (for near-UNIX clones) that the data doesn't exist
19001
19002 echo "$as_me:19002: checking if external environ exists" >&5
19003 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19004 if test "${cf_cv_have_environ+set}" = set; then
19005   echo $ECHO_N "(cached) $ECHO_C" >&6
19006 else
19007
19008         cat >conftest.$ac_ext <<_ACEOF
19009 #line 19009 "configure"
19010 #include "confdefs.h"
19011
19012 #undef environ
19013 extern int environ;
19014
19015 int
19016 main (void)
19017 {
19018 environ = 2
19019   ;
19020   return 0;
19021 }
19022 _ACEOF
19023 rm -f conftest.$ac_objext conftest$ac_exeext
19024 if { (eval echo "$as_me:19024: \"$ac_link\"") >&5
19025   (eval $ac_link) 2>&5
19026   ac_status=$?
19027   echo "$as_me:19027: \$? = $ac_status" >&5
19028   (exit $ac_status); } &&
19029          { ac_try='test -s conftest$ac_exeext'
19030   { (eval echo "$as_me:19030: \"$ac_try\"") >&5
19031   (eval $ac_try) 2>&5
19032   ac_status=$?
19033   echo "$as_me:19033: \$? = $ac_status" >&5
19034   (exit $ac_status); }; }; then
19035   cf_cv_have_environ=yes
19036 else
19037   echo "$as_me: failed program was:" >&5
19038 cat conftest.$ac_ext >&5
19039 cf_cv_have_environ=no
19040 fi
19041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19042
19043 fi
19044 echo "$as_me:19044: result: $cf_cv_have_environ" >&5
19045 echo "${ECHO_T}$cf_cv_have_environ" >&6
19046
19047 if test "$cf_cv_have_environ" = yes ; then
19048
19049 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19050
19051         cat >>confdefs.h <<EOF
19052 #define $cf_result 1
19053 EOF
19054
19055 fi
19056
19057 echo "$as_me:19057: checking for getenv" >&5
19058 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19059 if test "${ac_cv_func_getenv+set}" = set; then
19060   echo $ECHO_N "(cached) $ECHO_C" >&6
19061 else
19062   cat >conftest.$ac_ext <<_ACEOF
19063 #line 19063 "configure"
19064 #include "confdefs.h"
19065 #define getenv autoconf_temporary
19066 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19067 #undef getenv
19068
19069 #ifdef __cplusplus
19070 extern "C"
19071 #endif
19072
19073 /* We use char because int might match the return type of a gcc2
19074    builtin and then its argument prototype would still apply.  */
19075 char getenv (void);
19076
19077 int
19078 main (void)
19079 {
19080
19081 /* The GNU C library defines stubs for functions which it implements
19082     to always fail with ENOSYS.  Some functions are actually named
19083     something starting with __ and the normal name is an alias.  */
19084 #if defined (__stub_getenv) || defined (__stub___getenv)
19085 #error found stub for getenv
19086 #endif
19087
19088         return getenv ();
19089   ;
19090   return 0;
19091 }
19092 _ACEOF
19093 rm -f conftest.$ac_objext conftest$ac_exeext
19094 if { (eval echo "$as_me:19094: \"$ac_link\"") >&5
19095   (eval $ac_link) 2>&5
19096   ac_status=$?
19097   echo "$as_me:19097: \$? = $ac_status" >&5
19098   (exit $ac_status); } &&
19099          { ac_try='test -s conftest$ac_exeext'
19100   { (eval echo "$as_me:19100: \"$ac_try\"") >&5
19101   (eval $ac_try) 2>&5
19102   ac_status=$?
19103   echo "$as_me:19103: \$? = $ac_status" >&5
19104   (exit $ac_status); }; }; then
19105   ac_cv_func_getenv=yes
19106 else
19107   echo "$as_me: failed program was:" >&5
19108 cat conftest.$ac_ext >&5
19109 ac_cv_func_getenv=no
19110 fi
19111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19112 fi
19113 echo "$as_me:19113: result: $ac_cv_func_getenv" >&5
19114 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19115
19116 for ac_func in putenv setenv strdup
19117 do
19118 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19119 echo "$as_me:19119: checking for $ac_func" >&5
19120 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19121 if eval "test \"\${$as_ac_var+set}\" = set"; then
19122   echo $ECHO_N "(cached) $ECHO_C" >&6
19123 else
19124   cat >conftest.$ac_ext <<_ACEOF
19125 #line 19125 "configure"
19126 #include "confdefs.h"
19127 #define $ac_func autoconf_temporary
19128 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19129 #undef $ac_func
19130
19131 #ifdef __cplusplus
19132 extern "C"
19133 #endif
19134
19135 /* We use char because int might match the return type of a gcc2
19136    builtin and then its argument prototype would still apply.  */
19137 char $ac_func (void);
19138
19139 int
19140 main (void)
19141 {
19142
19143 /* The GNU C library defines stubs for functions which it implements
19144     to always fail with ENOSYS.  Some functions are actually named
19145     something starting with __ and the normal name is an alias.  */
19146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19147 #error found stub for $ac_func
19148 #endif
19149
19150         return $ac_func ();
19151   ;
19152   return 0;
19153 }
19154 _ACEOF
19155 rm -f conftest.$ac_objext conftest$ac_exeext
19156 if { (eval echo "$as_me:19156: \"$ac_link\"") >&5
19157   (eval $ac_link) 2>&5
19158   ac_status=$?
19159   echo "$as_me:19159: \$? = $ac_status" >&5
19160   (exit $ac_status); } &&
19161          { ac_try='test -s conftest$ac_exeext'
19162   { (eval echo "$as_me:19162: \"$ac_try\"") >&5
19163   (eval $ac_try) 2>&5
19164   ac_status=$?
19165   echo "$as_me:19165: \$? = $ac_status" >&5
19166   (exit $ac_status); }; }; then
19167   eval "$as_ac_var=yes"
19168 else
19169   echo "$as_me: failed program was:" >&5
19170 cat conftest.$ac_ext >&5
19171 eval "$as_ac_var=no"
19172 fi
19173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19174 fi
19175 echo "$as_me:19175: result: `eval echo '${'$as_ac_var'}'`" >&5
19176 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19177 if test `eval echo '${'$as_ac_var'}'` = yes; then
19178   cat >>confdefs.h <<EOF
19179 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19180 EOF
19181
19182 fi
19183 done
19184
19185 echo "$as_me:19185: checking if getenv returns consistent values" >&5
19186 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19187 if test "${cf_cv_consistent_getenv+set}" = set; then
19188   echo $ECHO_N "(cached) $ECHO_C" >&6
19189 else
19190
19191 if test "$cross_compiling" = yes; then
19192   cf_cv_consistent_getenv=unknown
19193 else
19194   cat >conftest.$ac_ext <<_ACEOF
19195 #line 19195 "configure"
19196 #include "confdefs.h"
19197
19198 #include <stdlib.h>
19199 #include <unistd.h>
19200 #include <stdio.h>
19201 #include <string.h>
19202 #include <sys/types.h>
19203
19204 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19205 extern char **environ;  /* POSIX, but some systems are not... */
19206 #endif
19207
19208 #if defined(HAVE_STRDUP)
19209 #define str_alloc(s) strdup(s)
19210 #else
19211 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19212 #endif
19213
19214 static void set_value(const char *name, const char *value)
19215 {
19216 #if defined(HAVE_SETENV)
19217         setenv(name, value, 1);
19218 #elif defined(HAVE_PUTENV)
19219         char buffer[1024];
19220         sprintf(buffer, "%s=%s", name, value);
19221         putenv(str_alloc(buffer));
19222 #else
19223 #error neither putenv/setenv found
19224 #endif
19225 }
19226 int main(void)
19227 {
19228         int pass;
19229         size_t numenv, limit, j;
19230         char **mynames;
19231         char **myvalues;
19232         char **mypointer;
19233         char *equals;
19234         for (numenv = 0; environ[numenv]; ++numenv) ;
19235         limit = numenv + 10;
19236         mynames = (char **) calloc(limit + 1, sizeof(char *));
19237         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19238         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19239 #if defined(HAVE_ENVIRON)
19240         for (j = 0; environ[j]; ++j) {
19241                 mynames[j] = str_alloc(environ[j]);
19242                 equals = strchr(mynames[j], '=');
19243                 if (equals != 0) {
19244                         *equals++ = '\0';
19245                         myvalues[j] = str_alloc(equals);
19246                 } else {
19247                         myvalues[j] = str_alloc("");
19248                 }
19249         }
19250 #endif
19251         for (j = numenv; j < limit; ++j) {
19252                 char name[80];
19253                 char value[80];
19254                 size_t found;
19255                 size_t k = 0;
19256                 do {
19257                         size_t jk;
19258                         found = 0;
19259                         sprintf(name, "TERM%lu", (unsigned long) k);
19260                         for (jk = 0; jk < j; ++jk) {
19261                                 if (!strcmp(name, mynames[jk])) {
19262                                         found = 1;
19263                                         ++k;
19264                                         break;
19265                                 }
19266                         }
19267                 } while (found);
19268                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19269                 set_value(name, value);
19270                 mynames[j] = str_alloc(name);
19271                 myvalues[j] = str_alloc(value);
19272         }
19273         for (pass = 0; pass < 3; ++pass) {
19274                 for (j = 0; j < limit; ++j) {
19275                         char *value = getenv(mynames[j]);
19276                         if (pass) {
19277                                 if (value == 0) {
19278                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19279                                         ${cf_cv_main_return:-return}(1);
19280                                 } else if (value != mypointer[j]) {
19281                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19282                                         ${cf_cv_main_return:-return}(1);
19283                                 } else if (strcmp(value, myvalues[j])) {
19284                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19285                                         ${cf_cv_main_return:-return}(1);
19286                                 }
19287                         } else {
19288                                 size_t k;
19289                                 mypointer[j] = value;
19290                                 for (k = 0; k < j; ++k) {
19291                                         if (mypointer[j] == mypointer[k]) {
19292                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19293                                                 ${cf_cv_main_return:-return}(1);
19294                                         }
19295                                 }
19296                         }
19297                 }
19298         }
19299         ${cf_cv_main_return:-return}(0);
19300 }
19301
19302 _ACEOF
19303 rm -f conftest$ac_exeext
19304 if { (eval echo "$as_me:19304: \"$ac_link\"") >&5
19305   (eval $ac_link) 2>&5
19306   ac_status=$?
19307   echo "$as_me:19307: \$? = $ac_status" >&5
19308   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19309   { (eval echo "$as_me:19309: \"$ac_try\"") >&5
19310   (eval $ac_try) 2>&5
19311   ac_status=$?
19312   echo "$as_me:19312: \$? = $ac_status" >&5
19313   (exit $ac_status); }; }; then
19314   cf_cv_consistent_getenv=yes
19315 else
19316   echo "$as_me: program exited with status $ac_status" >&5
19317 echo "$as_me: failed program was:" >&5
19318 cat conftest.$ac_ext >&5
19319 cf_cv_consistent_getenv=no
19320 fi
19321 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19322 fi
19323
19324 fi
19325 echo "$as_me:19325: result: $cf_cv_consistent_getenv" >&5
19326 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19327
19328 if test "x$cf_cv_consistent_getenv" = xno
19329 then
19330
19331 cat >>confdefs.h <<\EOF
19332 #define HAVE_CONSISTENT_GETENV 1
19333 EOF
19334
19335 fi
19336
19337 if test "x$cf_cv_consistent_getenv" = xno && \
19338         test "x$cf_with_trace" = xyes
19339 then
19340         { echo "$as_me:19340: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19341 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19342 fi
19343
19344 echo "$as_me:19344: checking if sys/time.h works with sys/select.h" >&5
19345 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19346 if test "${cf_cv_sys_time_select+set}" = set; then
19347   echo $ECHO_N "(cached) $ECHO_C" >&6
19348 else
19349
19350 cat >conftest.$ac_ext <<_ACEOF
19351 #line 19351 "configure"
19352 #include "confdefs.h"
19353
19354 #include <sys/types.h>
19355 #ifdef HAVE_SYS_TIME_H
19356 #include <sys/time.h>
19357 #endif
19358 #ifdef HAVE_SYS_SELECT_H
19359 #include <sys/select.h>
19360 #endif
19361
19362 int
19363 main (void)
19364 {
19365
19366   ;
19367   return 0;
19368 }
19369 _ACEOF
19370 rm -f conftest.$ac_objext
19371 if { (eval echo "$as_me:19371: \"$ac_compile\"") >&5
19372   (eval $ac_compile) 2>&5
19373   ac_status=$?
19374   echo "$as_me:19374: \$? = $ac_status" >&5
19375   (exit $ac_status); } &&
19376          { ac_try='test -s conftest.$ac_objext'
19377   { (eval echo "$as_me:19377: \"$ac_try\"") >&5
19378   (eval $ac_try) 2>&5
19379   ac_status=$?
19380   echo "$as_me:19380: \$? = $ac_status" >&5
19381   (exit $ac_status); }; }; then
19382   cf_cv_sys_time_select=yes
19383 else
19384   echo "$as_me: failed program was:" >&5
19385 cat conftest.$ac_ext >&5
19386 cf_cv_sys_time_select=no
19387 fi
19388 rm -f conftest.$ac_objext conftest.$ac_ext
19389
19390 fi
19391
19392 echo "$as_me:19392: result: $cf_cv_sys_time_select" >&5
19393 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19394 test "$cf_cv_sys_time_select" = yes &&
19395 cat >>confdefs.h <<\EOF
19396 #define HAVE_SYS_TIME_SELECT 1
19397 EOF
19398
19399 ###     checks for compiler characteristics
19400 ac_ext=c
19401 ac_cpp='$CPP $CPPFLAGS'
19402 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19403 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19404 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19405 ac_main_return=return
19406
19407 echo "$as_me:19407: checking for an ANSI C-conforming const" >&5
19408 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19409 if test "${ac_cv_c_const+set}" = set; then
19410   echo $ECHO_N "(cached) $ECHO_C" >&6
19411 else
19412   cat >conftest.$ac_ext <<_ACEOF
19413 #line 19413 "configure"
19414 #include "confdefs.h"
19415
19416 int
19417 main (void)
19418 {
19419 /* FIXME: Include the comments suggested by Paul. */
19420 #ifndef __cplusplus
19421   /* Ultrix mips cc rejects this.  */
19422   typedef int charset[2];
19423   const charset x;
19424   /* SunOS 4.1.1 cc rejects this.  */
19425   char const *const *ccp;
19426   char **p;
19427   /* NEC SVR4.0.2 mips cc rejects this.  */
19428   struct point {int x, y;};
19429   static struct point const zero = {0,0};
19430   /* AIX XL C 1.02.0.0 rejects this.
19431      It does not let you subtract one const X* pointer from another in
19432      an arm of an if-expression whose if-part is not a constant
19433      expression */
19434   const char *g = "string";
19435   ccp = &g + (g ? g-g : 0);
19436   /* HPUX 7.0 cc rejects these. */
19437   ++ccp;
19438   p = (char**) ccp;
19439   ccp = (char const *const *) p;
19440   { /* SCO 3.2v4 cc rejects this.  */
19441     char *t;
19442     char const *s = 0 ? (char *) 0 : (char const *) 0;
19443
19444     *t++ = 0;
19445   }
19446   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19447     int x[] = {25, 17};
19448     const int *foo = &x[0];
19449     ++foo;
19450   }
19451   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19452     typedef const int *iptr;
19453     iptr p = 0;
19454     ++p;
19455   }
19456   { /* AIX XL C 1.02.0.0 rejects this saying
19457        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19458     struct s { int j; const int *ap[3]; };
19459     struct s *b; b->j = 5;
19460   }
19461   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19462     const int foo = 10;
19463   }
19464 #endif
19465
19466   ;
19467   return 0;
19468 }
19469 _ACEOF
19470 rm -f conftest.$ac_objext
19471 if { (eval echo "$as_me:19471: \"$ac_compile\"") >&5
19472   (eval $ac_compile) 2>&5
19473   ac_status=$?
19474   echo "$as_me:19474: \$? = $ac_status" >&5
19475   (exit $ac_status); } &&
19476          { ac_try='test -s conftest.$ac_objext'
19477   { (eval echo "$as_me:19477: \"$ac_try\"") >&5
19478   (eval $ac_try) 2>&5
19479   ac_status=$?
19480   echo "$as_me:19480: \$? = $ac_status" >&5
19481   (exit $ac_status); }; }; then
19482   ac_cv_c_const=yes
19483 else
19484   echo "$as_me: failed program was:" >&5
19485 cat conftest.$ac_ext >&5
19486 ac_cv_c_const=no
19487 fi
19488 rm -f conftest.$ac_objext conftest.$ac_ext
19489 fi
19490 echo "$as_me:19490: result: $ac_cv_c_const" >&5
19491 echo "${ECHO_T}$ac_cv_c_const" >&6
19492 if test $ac_cv_c_const = no; then
19493
19494 cat >>confdefs.h <<\EOF
19495 #define const
19496 EOF
19497
19498 fi
19499
19500 echo "$as_me:19500: checking for inline" >&5
19501 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19502 if test "${ac_cv_c_inline+set}" = set; then
19503   echo $ECHO_N "(cached) $ECHO_C" >&6
19504 else
19505   ac_cv_c_inline=no
19506 for ac_kw in inline __inline__ __inline; do
19507   cat >conftest.$ac_ext <<_ACEOF
19508 #line 19508 "configure"
19509 #include "confdefs.h"
19510 #ifndef __cplusplus
19511 static $ac_kw int static_foo () {return 0; }
19512 $ac_kw int foo () {return 0; }
19513 #endif
19514
19515 _ACEOF
19516 rm -f conftest.$ac_objext
19517 if { (eval echo "$as_me:19517: \"$ac_compile\"") >&5
19518   (eval $ac_compile) 2>&5
19519   ac_status=$?
19520   echo "$as_me:19520: \$? = $ac_status" >&5
19521   (exit $ac_status); } &&
19522          { ac_try='test -s conftest.$ac_objext'
19523   { (eval echo "$as_me:19523: \"$ac_try\"") >&5
19524   (eval $ac_try) 2>&5
19525   ac_status=$?
19526   echo "$as_me:19526: \$? = $ac_status" >&5
19527   (exit $ac_status); }; }; then
19528   ac_cv_c_inline=$ac_kw; break
19529 else
19530   echo "$as_me: failed program was:" >&5
19531 cat conftest.$ac_ext >&5
19532 fi
19533 rm -f conftest.$ac_objext conftest.$ac_ext
19534 done
19535
19536 fi
19537 echo "$as_me:19537: result: $ac_cv_c_inline" >&5
19538 echo "${ECHO_T}$ac_cv_c_inline" >&6
19539 case $ac_cv_c_inline in
19540   inline | yes) ;;
19541   no)
19542 cat >>confdefs.h <<\EOF
19543 #define inline
19544 EOF
19545  ;;
19546   *)  cat >>confdefs.h <<EOF
19547 #define inline $ac_cv_c_inline
19548 EOF
19549  ;;
19550 esac
19551
19552 NCURSES_INLINE=
19553 if test "$ac_cv_c_inline" != no ; then
19554         NCURSES_INLINE=inline
19555         if test "$INTEL_COMPILER" = yes
19556         then
19557                 :
19558         elif test "$CLANG_COMPILER" = yes
19559         then
19560                 :
19561         elif test "$GCC" = yes
19562         then
19563                 echo "$as_me:19563: checking if $CC supports options to tune inlining" >&5
19564 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19565 if test "${cf_cv_gcc_inline+set}" = set; then
19566   echo $ECHO_N "(cached) $ECHO_C" >&6
19567 else
19568
19569                 cf_save_CFLAGS=$CFLAGS
19570                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19571                 cat >conftest.$ac_ext <<_ACEOF
19572 #line 19572 "configure"
19573 #include "confdefs.h"
19574 inline int foo(void) { return 1; }
19575 int
19576 main (void)
19577 {
19578 ${cf_cv_main_return:-return} foo()
19579   ;
19580   return 0;
19581 }
19582 _ACEOF
19583 rm -f conftest.$ac_objext
19584 if { (eval echo "$as_me:19584: \"$ac_compile\"") >&5
19585   (eval $ac_compile) 2>&5
19586   ac_status=$?
19587   echo "$as_me:19587: \$? = $ac_status" >&5
19588   (exit $ac_status); } &&
19589          { ac_try='test -s conftest.$ac_objext'
19590   { (eval echo "$as_me:19590: \"$ac_try\"") >&5
19591   (eval $ac_try) 2>&5
19592   ac_status=$?
19593   echo "$as_me:19593: \$? = $ac_status" >&5
19594   (exit $ac_status); }; }; then
19595   cf_cv_gcc_inline=yes
19596 else
19597   echo "$as_me: failed program was:" >&5
19598 cat conftest.$ac_ext >&5
19599 cf_cv_gcc_inline=no
19600 fi
19601 rm -f conftest.$ac_objext conftest.$ac_ext
19602                 CFLAGS=$cf_save_CFLAGS
19603
19604 fi
19605 echo "$as_me:19605: result: $cf_cv_gcc_inline" >&5
19606 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19607                 if test "$cf_cv_gcc_inline" = yes ; then
19608
19609 cf_fix_cppflags=no
19610 cf_new_cflags=
19611 cf_new_cppflags=
19612 cf_new_extra_cppflags=
19613
19614 for cf_add_cflags in --param max-inline-insns-single=1200
19615 do
19616 case $cf_fix_cppflags in
19617 (no)
19618         case $cf_add_cflags in
19619         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19620                 case $cf_add_cflags in
19621                 (-D*)
19622                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19623
19624                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19625                                 && test -z "${cf_tst_cflags}" \
19626                                 && cf_fix_cppflags=yes
19627
19628                         if test $cf_fix_cppflags = yes ; then
19629
19630         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19631         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19632
19633                                 continue
19634                         elif test "${cf_tst_cflags}" = "\"'" ; then
19635
19636         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19637         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19638
19639                                 continue
19640                         fi
19641                         ;;
19642                 esac
19643                 case "$CPPFLAGS" in
19644                 (*$cf_add_cflags)
19645                         ;;
19646                 (*)
19647                         case $cf_add_cflags in
19648                         (-D*)
19649                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19650
19651 CPPFLAGS=`echo "$CPPFLAGS" | \
19652         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19653                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19654
19655                                 ;;
19656                         esac
19657
19658         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19659         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19660
19661                         ;;
19662                 esac
19663                 ;;
19664         (*)
19665
19666         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19667         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19668
19669                 ;;
19670         esac
19671         ;;
19672 (yes)
19673
19674         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19675         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19676
19677         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19678
19679         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19680                 && test -z "${cf_tst_cflags}" \
19681                 && cf_fix_cppflags=no
19682         ;;
19683 esac
19684 done
19685
19686 if test -n "$cf_new_cflags" ; then
19687
19688         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19689         CFLAGS="${CFLAGS}$cf_new_cflags"
19690
19691 fi
19692
19693 if test -n "$cf_new_cppflags" ; then
19694
19695         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19696         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19697
19698 fi
19699
19700 if test -n "$cf_new_extra_cppflags" ; then
19701
19702         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19703         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19704
19705 fi
19706
19707                 fi
19708         fi
19709 fi
19710
19711 echo "$as_me:19711: checking for signal global datatype" >&5
19712 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19713 if test "${cf_cv_sig_atomic_t+set}" = set; then
19714   echo $ECHO_N "(cached) $ECHO_C" >&6
19715 else
19716
19717         for cf_type in \
19718                 "volatile sig_atomic_t" \
19719                 "sig_atomic_t" \
19720                 "int"
19721         do
19722         cat >conftest.$ac_ext <<_ACEOF
19723 #line 19723 "configure"
19724 #include "confdefs.h"
19725
19726 #include <sys/types.h>
19727 #include <signal.h>
19728 #include <stdio.h>
19729
19730 extern $cf_type x;
19731 $cf_type x;
19732 static void handler(int sig)
19733 {
19734         (void)sig;
19735         x = 5;
19736 }
19737 int
19738 main (void)
19739 {
19740 signal(SIGINT, handler);
19741                  x = 1
19742   ;
19743   return 0;
19744 }
19745 _ACEOF
19746 rm -f conftest.$ac_objext
19747 if { (eval echo "$as_me:19747: \"$ac_compile\"") >&5
19748   (eval $ac_compile) 2>&5
19749   ac_status=$?
19750   echo "$as_me:19750: \$? = $ac_status" >&5
19751   (exit $ac_status); } &&
19752          { ac_try='test -s conftest.$ac_objext'
19753   { (eval echo "$as_me:19753: \"$ac_try\"") >&5
19754   (eval $ac_try) 2>&5
19755   ac_status=$?
19756   echo "$as_me:19756: \$? = $ac_status" >&5
19757   (exit $ac_status); }; }; then
19758   cf_cv_sig_atomic_t=$cf_type
19759 else
19760   echo "$as_me: failed program was:" >&5
19761 cat conftest.$ac_ext >&5
19762 cf_cv_sig_atomic_t=no
19763 fi
19764 rm -f conftest.$ac_objext conftest.$ac_ext
19765                 test "$cf_cv_sig_atomic_t" != no && break
19766         done
19767
19768 fi
19769
19770 echo "$as_me:19770: result: $cf_cv_sig_atomic_t" >&5
19771 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19772 test "$cf_cv_sig_atomic_t" != no &&
19773 cat >>confdefs.h <<EOF
19774 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19775 EOF
19776
19777 if test $NCURSES_CHTYPE = auto ; then
19778
19779 echo "$as_me:19779: checking for type of chtype" >&5
19780 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19781 if test "${cf_cv_typeof_chtype+set}" = set; then
19782   echo $ECHO_N "(cached) $ECHO_C" >&6
19783 else
19784
19785                 if test "$cross_compiling" = yes; then
19786   cf_cv_typeof_chtype=long
19787 else
19788   cat >conftest.$ac_ext <<_ACEOF
19789 #line 19789 "configure"
19790 #include "confdefs.h"
19791
19792 #define WANT_BITS 31
19793 #include <stdio.h>
19794 int main(void)
19795 {
19796         FILE *fp = fopen("cf_test.out", "w");
19797         if (fp != 0) {
19798                 char *result = "long";
19799                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19800                         int n;
19801                         unsigned int x, y;
19802                         for (n = 0; n < WANT_BITS; n++) {
19803                                 x = (1 << n);
19804                                 y = (x >> n);
19805                                 if (y != 1 || x == 0) {
19806                                         x = 0;
19807                                         break;
19808                                 }
19809                         }
19810                         /*
19811                          * If x is nonzero, an int is big enough for the bits
19812                          * that we want.
19813                          */
19814                         result = (x != 0) ? "int" : "long";
19815                 }
19816                 fputs(result, fp);
19817                 fclose(fp);
19818         }
19819         ${cf_cv_main_return:-return}(0);
19820 }
19821
19822 _ACEOF
19823 rm -f conftest$ac_exeext
19824 if { (eval echo "$as_me:19824: \"$ac_link\"") >&5
19825   (eval $ac_link) 2>&5
19826   ac_status=$?
19827   echo "$as_me:19827: \$? = $ac_status" >&5
19828   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19829   { (eval echo "$as_me:19829: \"$ac_try\"") >&5
19830   (eval $ac_try) 2>&5
19831   ac_status=$?
19832   echo "$as_me:19832: \$? = $ac_status" >&5
19833   (exit $ac_status); }; }; then
19834   cf_cv_typeof_chtype=`cat cf_test.out`
19835 else
19836   echo "$as_me: program exited with status $ac_status" >&5
19837 echo "$as_me: failed program was:" >&5
19838 cat conftest.$ac_ext >&5
19839 cf_cv_typeof_chtype=long
19840 fi
19841 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19842 fi
19843                 rm -f cf_test.out
19844
19845 fi
19846
19847 echo "$as_me:19847: result: $cf_cv_typeof_chtype" >&5
19848 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19849
19850 cat >>confdefs.h <<EOF
19851 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19852 EOF
19853
19854 else
19855         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19856 fi
19857 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19858
19859 echo "$as_me:19859: checking if unsigned literals are legal" >&5
19860 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19861 if test "${cf_cv_unsigned_literals+set}" = set; then
19862   echo $ECHO_N "(cached) $ECHO_C" >&6
19863 else
19864
19865         cat >conftest.$ac_ext <<_ACEOF
19866 #line 19866 "configure"
19867 #include "confdefs.h"
19868
19869 int
19870 main (void)
19871 {
19872 long x = 1L + 1UL + 1U + 1
19873   ;
19874   return 0;
19875 }
19876 _ACEOF
19877 rm -f conftest.$ac_objext
19878 if { (eval echo "$as_me:19878: \"$ac_compile\"") >&5
19879   (eval $ac_compile) 2>&5
19880   ac_status=$?
19881   echo "$as_me:19881: \$? = $ac_status" >&5
19882   (exit $ac_status); } &&
19883          { ac_try='test -s conftest.$ac_objext'
19884   { (eval echo "$as_me:19884: \"$ac_try\"") >&5
19885   (eval $ac_try) 2>&5
19886   ac_status=$?
19887   echo "$as_me:19887: \$? = $ac_status" >&5
19888   (exit $ac_status); }; }; then
19889   cf_cv_unsigned_literals=yes
19890 else
19891   echo "$as_me: failed program was:" >&5
19892 cat conftest.$ac_ext >&5
19893 cf_cv_unsigned_literals=no
19894 fi
19895 rm -f conftest.$ac_objext conftest.$ac_ext
19896
19897 fi
19898
19899 echo "$as_me:19899: result: $cf_cv_unsigned_literals" >&5
19900 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19901
19902 cf_cv_1UL="1"
19903 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19904 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19905
19906 if test $NCURSES_MMASK_T = auto ; then
19907         cf_cv_typeof_mmask_t=long
19908 else
19909         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19910 fi
19911 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19912
19913 ###     Checks for external-data
19914
19915 echo "$as_me:19915: checking if external errno is declared" >&5
19916 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19917 if test "${cf_cv_dcl_errno+set}" = set; then
19918   echo $ECHO_N "(cached) $ECHO_C" >&6
19919 else
19920
19921         cat >conftest.$ac_ext <<_ACEOF
19922 #line 19922 "configure"
19923 #include "confdefs.h"
19924
19925 #ifdef HAVE_STDLIB_H
19926 #include <stdlib.h>
19927 #endif
19928 #include <stdio.h>
19929 #include <sys/types.h>
19930 #include <errno.h>
19931 int
19932 main (void)
19933 {
19934 int x = (int) errno; (void)x
19935   ;
19936   return 0;
19937 }
19938 _ACEOF
19939 rm -f conftest.$ac_objext
19940 if { (eval echo "$as_me:19940: \"$ac_compile\"") >&5
19941   (eval $ac_compile) 2>&5
19942   ac_status=$?
19943   echo "$as_me:19943: \$? = $ac_status" >&5
19944   (exit $ac_status); } &&
19945          { ac_try='test -s conftest.$ac_objext'
19946   { (eval echo "$as_me:19946: \"$ac_try\"") >&5
19947   (eval $ac_try) 2>&5
19948   ac_status=$?
19949   echo "$as_me:19949: \$? = $ac_status" >&5
19950   (exit $ac_status); }; }; then
19951   cf_cv_dcl_errno=yes
19952 else
19953   echo "$as_me: failed program was:" >&5
19954 cat conftest.$ac_ext >&5
19955 cf_cv_dcl_errno=no
19956 fi
19957 rm -f conftest.$ac_objext conftest.$ac_ext
19958
19959 fi
19960 echo "$as_me:19960: result: $cf_cv_dcl_errno" >&5
19961 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19962
19963 if test "$cf_cv_dcl_errno" = no ; then
19964
19965 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19966
19967         cat >>confdefs.h <<EOF
19968 #define $cf_result 1
19969 EOF
19970
19971 fi
19972
19973 # It's possible (for near-UNIX clones) that the data doesn't exist
19974
19975 echo "$as_me:19975: checking if external errno exists" >&5
19976 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19977 if test "${cf_cv_have_errno+set}" = set; then
19978   echo $ECHO_N "(cached) $ECHO_C" >&6
19979 else
19980
19981         cat >conftest.$ac_ext <<_ACEOF
19982 #line 19982 "configure"
19983 #include "confdefs.h"
19984
19985 #undef errno
19986 extern int errno;
19987
19988 int
19989 main (void)
19990 {
19991 errno = 2
19992   ;
19993   return 0;
19994 }
19995 _ACEOF
19996 rm -f conftest.$ac_objext conftest$ac_exeext
19997 if { (eval echo "$as_me:19997: \"$ac_link\"") >&5
19998   (eval $ac_link) 2>&5
19999   ac_status=$?
20000   echo "$as_me:20000: \$? = $ac_status" >&5
20001   (exit $ac_status); } &&
20002          { ac_try='test -s conftest$ac_exeext'
20003   { (eval echo "$as_me:20003: \"$ac_try\"") >&5
20004   (eval $ac_try) 2>&5
20005   ac_status=$?
20006   echo "$as_me:20006: \$? = $ac_status" >&5
20007   (exit $ac_status); }; }; then
20008   cf_cv_have_errno=yes
20009 else
20010   echo "$as_me: failed program was:" >&5
20011 cat conftest.$ac_ext >&5
20012 cf_cv_have_errno=no
20013 fi
20014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20015
20016 fi
20017 echo "$as_me:20017: result: $cf_cv_have_errno" >&5
20018 echo "${ECHO_T}$cf_cv_have_errno" >&6
20019
20020 if test "$cf_cv_have_errno" = yes ; then
20021
20022 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20023
20024         cat >>confdefs.h <<EOF
20025 #define $cf_result 1
20026 EOF
20027
20028 fi
20029
20030 echo "$as_me:20030: checking if data-only library module links" >&5
20031 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20032 if test "${cf_cv_link_dataonly+set}" = set; then
20033   echo $ECHO_N "(cached) $ECHO_C" >&6
20034 else
20035
20036         rm -f conftest.a
20037         cat >conftest.$ac_ext <<EOF
20038 #line 20038 "configure"
20039 int     testdata[3] = { 123, 456, 789 };
20040 EOF
20041         if { (eval echo "$as_me:20041: \"$ac_compile\"") >&5
20042   (eval $ac_compile) 2>&5
20043   ac_status=$?
20044   echo "$as_me:20044: \$? = $ac_status" >&5
20045   (exit $ac_status); } ; then
20046                 mv conftest.o data.o && \
20047                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20048         fi
20049         rm -f conftest.$ac_ext data.o
20050         cat >conftest.$ac_ext <<EOF
20051 #line 20051 "configure"
20052 int     testfunc(void)
20053 {
20054 #if defined(NeXT)
20055         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20056 #else
20057         extern int testdata[3];
20058         return testdata[0] == 123
20059            &&  testdata[1] == 456
20060            &&  testdata[2] == 789;
20061 #endif
20062 }
20063 EOF
20064         if { (eval echo "$as_me:20064: \"$ac_compile\"") >&5
20065   (eval $ac_compile) 2>&5
20066   ac_status=$?
20067   echo "$as_me:20067: \$? = $ac_status" >&5
20068   (exit $ac_status); }; then
20069                 mv conftest.o func.o && \
20070                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20071         fi
20072         rm -f conftest.$ac_ext func.o
20073         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20074         cf_saveLIBS="$LIBS"
20075         LIBS="conftest.a $LIBS"
20076         if test "$cross_compiling" = yes; then
20077   cf_cv_link_dataonly=unknown
20078 else
20079   cat >conftest.$ac_ext <<_ACEOF
20080 #line 20080 "configure"
20081 #include "confdefs.h"
20082
20083         int main(void)
20084         {
20085                 extern int testfunc();
20086                 ${cf_cv_main_return:-return} (!testfunc());
20087         }
20088
20089 _ACEOF
20090 rm -f conftest$ac_exeext
20091 if { (eval echo "$as_me:20091: \"$ac_link\"") >&5
20092   (eval $ac_link) 2>&5
20093   ac_status=$?
20094   echo "$as_me:20094: \$? = $ac_status" >&5
20095   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20096   { (eval echo "$as_me:20096: \"$ac_try\"") >&5
20097   (eval $ac_try) 2>&5
20098   ac_status=$?
20099   echo "$as_me:20099: \$? = $ac_status" >&5
20100   (exit $ac_status); }; }; then
20101   cf_cv_link_dataonly=yes
20102 else
20103   echo "$as_me: program exited with status $ac_status" >&5
20104 echo "$as_me: failed program was:" >&5
20105 cat conftest.$ac_ext >&5
20106 cf_cv_link_dataonly=no
20107 fi
20108 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20109 fi
20110         LIBS="$cf_saveLIBS"
20111
20112 fi
20113
20114 echo "$as_me:20114: result: $cf_cv_link_dataonly" >&5
20115 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20116
20117 if test "$cf_cv_link_dataonly" = no ; then
20118
20119 cat >>confdefs.h <<\EOF
20120 #define BROKEN_LINKER 1
20121 EOF
20122
20123         BROKEN_LINKER=1
20124 fi
20125
20126 ###     Checks for library functions.
20127
20128 for ac_func in \
20129 getcwd \
20130 getegid \
20131 geteuid \
20132 getopt \
20133 getttynam \
20134 issetugid \
20135 localeconv \
20136 poll \
20137 putenv \
20138 remove \
20139 select \
20140 setbuf \
20141 setbuffer \
20142 setenv \
20143 setvbuf \
20144 sigaction \
20145 sigvec \
20146 snprintf \
20147 strdup \
20148 strstr \
20149 sysconf \
20150 tcgetpgrp \
20151 times \
20152 tsearch \
20153 vsnprintf \
20154
20155 do
20156 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20157 echo "$as_me:20157: checking for $ac_func" >&5
20158 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20159 if eval "test \"\${$as_ac_var+set}\" = set"; then
20160   echo $ECHO_N "(cached) $ECHO_C" >&6
20161 else
20162   cat >conftest.$ac_ext <<_ACEOF
20163 #line 20163 "configure"
20164 #include "confdefs.h"
20165 #define $ac_func autoconf_temporary
20166 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20167 #undef $ac_func
20168
20169 #ifdef __cplusplus
20170 extern "C"
20171 #endif
20172
20173 /* We use char because int might match the return type of a gcc2
20174    builtin and then its argument prototype would still apply.  */
20175 char $ac_func (void);
20176
20177 int
20178 main (void)
20179 {
20180
20181 /* The GNU C library defines stubs for functions which it implements
20182     to always fail with ENOSYS.  Some functions are actually named
20183     something starting with __ and the normal name is an alias.  */
20184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20185 #error found stub for $ac_func
20186 #endif
20187
20188         return $ac_func ();
20189   ;
20190   return 0;
20191 }
20192 _ACEOF
20193 rm -f conftest.$ac_objext conftest$ac_exeext
20194 if { (eval echo "$as_me:20194: \"$ac_link\"") >&5
20195   (eval $ac_link) 2>&5
20196   ac_status=$?
20197   echo "$as_me:20197: \$? = $ac_status" >&5
20198   (exit $ac_status); } &&
20199          { ac_try='test -s conftest$ac_exeext'
20200   { (eval echo "$as_me:20200: \"$ac_try\"") >&5
20201   (eval $ac_try) 2>&5
20202   ac_status=$?
20203   echo "$as_me:20203: \$? = $ac_status" >&5
20204   (exit $ac_status); }; }; then
20205   eval "$as_ac_var=yes"
20206 else
20207   echo "$as_me: failed program was:" >&5
20208 cat conftest.$ac_ext >&5
20209 eval "$as_ac_var=no"
20210 fi
20211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20212 fi
20213 echo "$as_me:20213: result: `eval echo '${'$as_ac_var'}'`" >&5
20214 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20215 if test `eval echo '${'$as_ac_var'}'` = yes; then
20216   cat >>confdefs.h <<EOF
20217 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20218 EOF
20219
20220 fi
20221 done
20222
20223 if test "x$ac_cv_func_getopt" = xno && \
20224    test "x$cf_with_progs$cf_with_tests" != xnono; then
20225         { { echo "$as_me:20225: error: getopt is required for building programs" >&5
20226 echo "$as_me: error: getopt is required for building programs" >&2;}
20227    { (exit 1); exit 1; }; }
20228 fi
20229
20230 if test "x$with_safe_sprintf" = xyes
20231 then
20232         if test "x$ac_cv_func_vsnprintf" = xyes
20233         then
20234                 { echo "$as_me:20234: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20235 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20236         else
20237
20238 cat >>confdefs.h <<\EOF
20239 #define USE_SAFE_SPRINTF 1
20240 EOF
20241
20242         fi
20243 fi
20244
20245 if test "x$with_getcap" = "xyes" ; then
20246
20247 echo "$as_me:20247: checking for terminal-capability database functions" >&5
20248 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20249 if test "${cf_cv_cgetent+set}" = set; then
20250   echo $ECHO_N "(cached) $ECHO_C" >&6
20251 else
20252
20253 cat >conftest.$ac_ext <<_ACEOF
20254 #line 20254 "configure"
20255 #include "confdefs.h"
20256
20257 #include <stdlib.h>
20258 int
20259 main (void)
20260 {
20261
20262         char temp[128];
20263         char *buf = temp;
20264         char *db_array = temp;
20265         cgetent(&buf, &db_array, "vt100");
20266         cgetcap(buf, "tc", '=');
20267         cgetmatch(buf, "tc");
20268
20269   ;
20270   return 0;
20271 }
20272 _ACEOF
20273 rm -f conftest.$ac_objext conftest$ac_exeext
20274 if { (eval echo "$as_me:20274: \"$ac_link\"") >&5
20275   (eval $ac_link) 2>&5
20276   ac_status=$?
20277   echo "$as_me:20277: \$? = $ac_status" >&5
20278   (exit $ac_status); } &&
20279          { ac_try='test -s conftest$ac_exeext'
20280   { (eval echo "$as_me:20280: \"$ac_try\"") >&5
20281   (eval $ac_try) 2>&5
20282   ac_status=$?
20283   echo "$as_me:20283: \$? = $ac_status" >&5
20284   (exit $ac_status); }; }; then
20285   cf_cv_cgetent=yes
20286 else
20287   echo "$as_me: failed program was:" >&5
20288 cat conftest.$ac_ext >&5
20289 cf_cv_cgetent=no
20290 fi
20291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20292
20293 fi
20294 echo "$as_me:20294: result: $cf_cv_cgetent" >&5
20295 echo "${ECHO_T}$cf_cv_cgetent" >&6
20296
20297 if test "$cf_cv_cgetent" = yes
20298 then
20299
20300 cat >>confdefs.h <<\EOF
20301 #define HAVE_BSD_CGETENT 1
20302 EOF
20303
20304 echo "$as_me:20304: checking if cgetent uses const parameter" >&5
20305 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20306 if test "${cf_cv_cgetent_const+set}" = set; then
20307   echo $ECHO_N "(cached) $ECHO_C" >&6
20308 else
20309
20310 cat >conftest.$ac_ext <<_ACEOF
20311 #line 20311 "configure"
20312 #include "confdefs.h"
20313
20314 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20315 #include <stdlib.h>
20316 int
20317 main (void)
20318 {
20319
20320         char temp[128];
20321         char *buf = temp;
20322 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20323         const char *db_array = temp;
20324         cgetent(&buf, &db_array, "vt100");
20325 #endif
20326         cgetcap(buf, "tc", '=');
20327         cgetmatch(buf, "tc");
20328
20329   ;
20330   return 0;
20331 }
20332 _ACEOF
20333 rm -f conftest.$ac_objext conftest$ac_exeext
20334 if { (eval echo "$as_me:20334: \"$ac_link\"") >&5
20335   (eval $ac_link) 2>&5
20336   ac_status=$?
20337   echo "$as_me:20337: \$? = $ac_status" >&5
20338   (exit $ac_status); } &&
20339          { ac_try='test -s conftest$ac_exeext'
20340   { (eval echo "$as_me:20340: \"$ac_try\"") >&5
20341   (eval $ac_try) 2>&5
20342   ac_status=$?
20343   echo "$as_me:20343: \$? = $ac_status" >&5
20344   (exit $ac_status); }; }; then
20345   cf_cv_cgetent_const=yes
20346 else
20347   echo "$as_me: failed program was:" >&5
20348 cat conftest.$ac_ext >&5
20349 cf_cv_cgetent_const=no
20350 fi
20351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20352
20353 fi
20354 echo "$as_me:20354: result: $cf_cv_cgetent_const" >&5
20355 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20356         if test "$cf_cv_cgetent_const" = yes
20357         then
20358
20359 cat >>confdefs.h <<EOF
20360 #define CGETENT_CONST const
20361 EOF
20362
20363         fi
20364 fi
20365
20366 fi
20367
20368 echo "$as_me:20368: checking for isascii" >&5
20369 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20370 if test "${cf_cv_have_isascii+set}" = set; then
20371   echo $ECHO_N "(cached) $ECHO_C" >&6
20372 else
20373
20374         cat >conftest.$ac_ext <<_ACEOF
20375 #line 20375 "configure"
20376 #include "confdefs.h"
20377 #include <ctype.h>
20378 int
20379 main (void)
20380 {
20381 int x = isascii(' ')
20382   ;
20383   return 0;
20384 }
20385 _ACEOF
20386 rm -f conftest.$ac_objext conftest$ac_exeext
20387 if { (eval echo "$as_me:20387: \"$ac_link\"") >&5
20388   (eval $ac_link) 2>&5
20389   ac_status=$?
20390   echo "$as_me:20390: \$? = $ac_status" >&5
20391   (exit $ac_status); } &&
20392          { ac_try='test -s conftest$ac_exeext'
20393   { (eval echo "$as_me:20393: \"$ac_try\"") >&5
20394   (eval $ac_try) 2>&5
20395   ac_status=$?
20396   echo "$as_me:20396: \$? = $ac_status" >&5
20397   (exit $ac_status); }; }; then
20398   cf_cv_have_isascii=yes
20399 else
20400   echo "$as_me: failed program was:" >&5
20401 cat conftest.$ac_ext >&5
20402 cf_cv_have_isascii=no
20403 fi
20404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20405
20406 fi
20407 echo "$as_me:20407: result: $cf_cv_have_isascii" >&5
20408 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20409 test "$cf_cv_have_isascii" = yes &&
20410 cat >>confdefs.h <<\EOF
20411 #define HAVE_ISASCII 1
20412 EOF
20413
20414 if test "$ac_cv_func_sigaction" = yes; then
20415 echo "$as_me:20415: checking whether sigaction needs _POSIX_SOURCE" >&5
20416 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20417 cat >conftest.$ac_ext <<_ACEOF
20418 #line 20418 "configure"
20419 #include "confdefs.h"
20420
20421 #include <sys/types.h>
20422 #include <signal.h>
20423 int
20424 main (void)
20425 {
20426 struct sigaction act
20427   ;
20428   return 0;
20429 }
20430 _ACEOF
20431 rm -f conftest.$ac_objext
20432 if { (eval echo "$as_me:20432: \"$ac_compile\"") >&5
20433   (eval $ac_compile) 2>&5
20434   ac_status=$?
20435   echo "$as_me:20435: \$? = $ac_status" >&5
20436   (exit $ac_status); } &&
20437          { ac_try='test -s conftest.$ac_objext'
20438   { (eval echo "$as_me:20438: \"$ac_try\"") >&5
20439   (eval $ac_try) 2>&5
20440   ac_status=$?
20441   echo "$as_me:20441: \$? = $ac_status" >&5
20442   (exit $ac_status); }; }; then
20443   sigact_bad=no
20444 else
20445   echo "$as_me: failed program was:" >&5
20446 cat conftest.$ac_ext >&5
20447
20448 cat >conftest.$ac_ext <<_ACEOF
20449 #line 20449 "configure"
20450 #include "confdefs.h"
20451
20452 #define _POSIX_SOURCE
20453 #include <sys/types.h>
20454 #include <signal.h>
20455 int
20456 main (void)
20457 {
20458 struct sigaction act
20459   ;
20460   return 0;
20461 }
20462 _ACEOF
20463 rm -f conftest.$ac_objext
20464 if { (eval echo "$as_me:20464: \"$ac_compile\"") >&5
20465   (eval $ac_compile) 2>&5
20466   ac_status=$?
20467   echo "$as_me:20467: \$? = $ac_status" >&5
20468   (exit $ac_status); } &&
20469          { ac_try='test -s conftest.$ac_objext'
20470   { (eval echo "$as_me:20470: \"$ac_try\"") >&5
20471   (eval $ac_try) 2>&5
20472   ac_status=$?
20473   echo "$as_me:20473: \$? = $ac_status" >&5
20474   (exit $ac_status); }; }; then
20475   sigact_bad=yes
20476
20477 cat >>confdefs.h <<\EOF
20478 #define _POSIX_SOURCE 1
20479 EOF
20480
20481 else
20482   echo "$as_me: failed program was:" >&5
20483 cat conftest.$ac_ext >&5
20484 sigact_bad=unknown
20485 fi
20486 rm -f conftest.$ac_objext conftest.$ac_ext
20487 fi
20488 rm -f conftest.$ac_objext conftest.$ac_ext
20489 echo "$as_me:20489: result: $sigact_bad" >&5
20490 echo "${ECHO_T}$sigact_bad" >&6
20491 fi
20492
20493 echo "$as_me:20493: checking if nanosleep really works" >&5
20494 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20495 if test "${cf_cv_func_nanosleep+set}" = set; then
20496   echo $ECHO_N "(cached) $ECHO_C" >&6
20497 else
20498
20499 if test "$cross_compiling" = yes; then
20500   cf_cv_func_nanosleep=unknown
20501 else
20502   cat >conftest.$ac_ext <<_ACEOF
20503 #line 20503 "configure"
20504 #include "confdefs.h"
20505
20506 #include <stdio.h>
20507 #include <errno.h>
20508 #include <time.h>
20509
20510 #ifdef HAVE_SYS_TIME_H
20511 #include <sys/time.h>
20512 #endif
20513
20514 int main(void) {
20515         struct timespec ts1, ts2;
20516         int code;
20517         ts1.tv_sec  = 0;
20518         ts1.tv_nsec = 750000000;
20519         ts2.tv_sec  = 0;
20520         ts2.tv_nsec = 0;
20521         errno = 0;
20522         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20523         ${cf_cv_main_return:-return}(code != 0);
20524 }
20525
20526 _ACEOF
20527 rm -f conftest$ac_exeext
20528 if { (eval echo "$as_me:20528: \"$ac_link\"") >&5
20529   (eval $ac_link) 2>&5
20530   ac_status=$?
20531   echo "$as_me:20531: \$? = $ac_status" >&5
20532   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20533   { (eval echo "$as_me:20533: \"$ac_try\"") >&5
20534   (eval $ac_try) 2>&5
20535   ac_status=$?
20536   echo "$as_me:20536: \$? = $ac_status" >&5
20537   (exit $ac_status); }; }; then
20538   cf_cv_func_nanosleep=yes
20539 else
20540   echo "$as_me: program exited with status $ac_status" >&5
20541 echo "$as_me: failed program was:" >&5
20542 cat conftest.$ac_ext >&5
20543 cf_cv_func_nanosleep=no
20544 fi
20545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20546 fi
20547 fi
20548 echo "$as_me:20548: result: $cf_cv_func_nanosleep" >&5
20549 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20550
20551 test "$cf_cv_func_nanosleep" = "yes" &&
20552 cat >>confdefs.h <<\EOF
20553 #define HAVE_NANOSLEEP 1
20554 EOF
20555
20556 for ac_header in \
20557 termio.h \
20558 termios.h \
20559 unistd.h \
20560 sys/ioctl.h \
20561 sys/termio.h \
20562
20563 do
20564 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20565 echo "$as_me:20565: checking for $ac_header" >&5
20566 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20567 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20568   echo $ECHO_N "(cached) $ECHO_C" >&6
20569 else
20570   cat >conftest.$ac_ext <<_ACEOF
20571 #line 20571 "configure"
20572 #include "confdefs.h"
20573 #include <$ac_header>
20574 _ACEOF
20575 if { (eval echo "$as_me:20575: \"$ac_cpp conftest.$ac_ext\"") >&5
20576   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20577   ac_status=$?
20578   egrep -v '^ *\+' conftest.er1 >conftest.err
20579   rm -f conftest.er1
20580   cat conftest.err >&5
20581   echo "$as_me:20581: \$? = $ac_status" >&5
20582   (exit $ac_status); } >/dev/null; then
20583   if test -s conftest.err; then
20584     ac_cpp_err=$ac_c_preproc_warn_flag
20585   else
20586     ac_cpp_err=
20587   fi
20588 else
20589   ac_cpp_err=yes
20590 fi
20591 if test -z "$ac_cpp_err"; then
20592   eval "$as_ac_Header=yes"
20593 else
20594   echo "$as_me: failed program was:" >&5
20595   cat conftest.$ac_ext >&5
20596   eval "$as_ac_Header=no"
20597 fi
20598 rm -f conftest.err conftest.$ac_ext
20599 fi
20600 echo "$as_me:20600: result: `eval echo '${'$as_ac_Header'}'`" >&5
20601 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20602 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20603   cat >>confdefs.h <<EOF
20604 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20605 EOF
20606
20607 fi
20608 done
20609
20610 if test "$ac_cv_header_termios_h" = yes ; then
20611         case "$CFLAGS $CPPFLAGS" in
20612         (*-D_POSIX_SOURCE*)
20613                 termios_bad=dunno ;;
20614         (*)     termios_bad=maybe ;;
20615         esac
20616         if test "$termios_bad" = maybe ; then
20617         echo "$as_me:20617: checking whether termios.h needs _POSIX_SOURCE" >&5
20618 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20619         cat >conftest.$ac_ext <<_ACEOF
20620 #line 20620 "configure"
20621 #include "confdefs.h"
20622 #include <termios.h>
20623 int
20624 main (void)
20625 {
20626 struct termios foo; int x = foo.c_iflag = 1; (void)x
20627   ;
20628   return 0;
20629 }
20630 _ACEOF
20631 rm -f conftest.$ac_objext
20632 if { (eval echo "$as_me:20632: \"$ac_compile\"") >&5
20633   (eval $ac_compile) 2>&5
20634   ac_status=$?
20635   echo "$as_me:20635: \$? = $ac_status" >&5
20636   (exit $ac_status); } &&
20637          { ac_try='test -s conftest.$ac_objext'
20638   { (eval echo "$as_me:20638: \"$ac_try\"") >&5
20639   (eval $ac_try) 2>&5
20640   ac_status=$?
20641   echo "$as_me:20641: \$? = $ac_status" >&5
20642   (exit $ac_status); }; }; then
20643   termios_bad=no
20644 else
20645   echo "$as_me: failed program was:" >&5
20646 cat conftest.$ac_ext >&5
20647
20648                 cat >conftest.$ac_ext <<_ACEOF
20649 #line 20649 "configure"
20650 #include "confdefs.h"
20651
20652 #define _POSIX_SOURCE
20653 #include <termios.h>
20654 int
20655 main (void)
20656 {
20657 struct termios foo; int x = foo.c_iflag = 2; (void)x
20658   ;
20659   return 0;
20660 }
20661 _ACEOF
20662 rm -f conftest.$ac_objext
20663 if { (eval echo "$as_me:20663: \"$ac_compile\"") >&5
20664   (eval $ac_compile) 2>&5
20665   ac_status=$?
20666   echo "$as_me:20666: \$? = $ac_status" >&5
20667   (exit $ac_status); } &&
20668          { ac_try='test -s conftest.$ac_objext'
20669   { (eval echo "$as_me:20669: \"$ac_try\"") >&5
20670   (eval $ac_try) 2>&5
20671   ac_status=$?
20672   echo "$as_me:20672: \$? = $ac_status" >&5
20673   (exit $ac_status); }; }; then
20674   termios_bad=unknown
20675 else
20676   echo "$as_me: failed program was:" >&5
20677 cat conftest.$ac_ext >&5
20678 termios_bad=yes
20679 cat >>confdefs.h <<\EOF
20680 #define _POSIX_SOURCE 1
20681 EOF
20682
20683 fi
20684 rm -f conftest.$ac_objext conftest.$ac_ext
20685
20686 fi
20687 rm -f conftest.$ac_objext conftest.$ac_ext
20688         echo "$as_me:20688: result: $termios_bad" >&5
20689 echo "${ECHO_T}$termios_bad" >&6
20690         fi
20691 fi
20692
20693 echo "$as_me:20693: checking for tcgetattr" >&5
20694 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20695 if test "${cf_cv_have_tcgetattr+set}" = set; then
20696   echo $ECHO_N "(cached) $ECHO_C" >&6
20697 else
20698
20699 cat >conftest.$ac_ext <<_ACEOF
20700 #line 20700 "configure"
20701 #include "confdefs.h"
20702
20703 #include <sys/types.h>
20704 #ifdef HAVE_UNISTD_H
20705 #include <unistd.h>
20706 #endif
20707 #ifdef HAVE_TERMIOS_H
20708 #include <termios.h>
20709 #define TTY struct termios
20710 #else
20711 #ifdef HAVE_TERMIO_H
20712 #include <termio.h>
20713 #define TTY struct termio
20714 #endif
20715 #endif
20716
20717 int
20718 main (void)
20719 {
20720
20721 TTY foo;
20722 tcgetattr(1, &foo);
20723   ;
20724   return 0;
20725 }
20726 _ACEOF
20727 rm -f conftest.$ac_objext conftest$ac_exeext
20728 if { (eval echo "$as_me:20728: \"$ac_link\"") >&5
20729   (eval $ac_link) 2>&5
20730   ac_status=$?
20731   echo "$as_me:20731: \$? = $ac_status" >&5
20732   (exit $ac_status); } &&
20733          { ac_try='test -s conftest$ac_exeext'
20734   { (eval echo "$as_me:20734: \"$ac_try\"") >&5
20735   (eval $ac_try) 2>&5
20736   ac_status=$?
20737   echo "$as_me:20737: \$? = $ac_status" >&5
20738   (exit $ac_status); }; }; then
20739   cf_cv_have_tcgetattr=yes
20740 else
20741   echo "$as_me: failed program was:" >&5
20742 cat conftest.$ac_ext >&5
20743 cf_cv_have_tcgetattr=no
20744 fi
20745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20746 fi
20747 echo "$as_me:20747: result: $cf_cv_have_tcgetattr" >&5
20748 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20749 test "$cf_cv_have_tcgetattr" = yes &&
20750 cat >>confdefs.h <<\EOF
20751 #define HAVE_TCGETATTR 1
20752 EOF
20753
20754 echo "$as_me:20754: checking for vsscanf function or workaround" >&5
20755 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20756 if test "${cf_cv_func_vsscanf+set}" = set; then
20757   echo $ECHO_N "(cached) $ECHO_C" >&6
20758 else
20759
20760 cat >conftest.$ac_ext <<_ACEOF
20761 #line 20761 "configure"
20762 #include "confdefs.h"
20763
20764 #include <stdarg.h>
20765 #include <stdio.h>
20766 int
20767 main (void)
20768 {
20769
20770         va_list ap;
20771         vsscanf("from", "%d", ap)
20772   ;
20773   return 0;
20774 }
20775 _ACEOF
20776 rm -f conftest.$ac_objext conftest$ac_exeext
20777 if { (eval echo "$as_me:20777: \"$ac_link\"") >&5
20778   (eval $ac_link) 2>&5
20779   ac_status=$?
20780   echo "$as_me:20780: \$? = $ac_status" >&5
20781   (exit $ac_status); } &&
20782          { ac_try='test -s conftest$ac_exeext'
20783   { (eval echo "$as_me:20783: \"$ac_try\"") >&5
20784   (eval $ac_try) 2>&5
20785   ac_status=$?
20786   echo "$as_me:20786: \$? = $ac_status" >&5
20787   (exit $ac_status); }; }; then
20788   cf_cv_func_vsscanf=vsscanf
20789 else
20790   echo "$as_me: failed program was:" >&5
20791 cat conftest.$ac_ext >&5
20792
20793 cat >conftest.$ac_ext <<_ACEOF
20794 #line 20794 "configure"
20795 #include "confdefs.h"
20796
20797 #include <stdarg.h>
20798 #include <stdio.h>
20799 int
20800 main (void)
20801 {
20802
20803         FILE strbuf;
20804         char *str = "from";
20805
20806         strbuf._flag = _IOREAD;
20807         strbuf._ptr = strbuf._base = (unsigned char *) str;
20808         strbuf._cnt = strlen(str);
20809         strbuf._file = _NFILE;
20810         return (vfscanf(&strbuf, "%d", ap))
20811   ;
20812   return 0;
20813 }
20814 _ACEOF
20815 rm -f conftest.$ac_objext conftest$ac_exeext
20816 if { (eval echo "$as_me:20816: \"$ac_link\"") >&5
20817   (eval $ac_link) 2>&5
20818   ac_status=$?
20819   echo "$as_me:20819: \$? = $ac_status" >&5
20820   (exit $ac_status); } &&
20821          { ac_try='test -s conftest$ac_exeext'
20822   { (eval echo "$as_me:20822: \"$ac_try\"") >&5
20823   (eval $ac_try) 2>&5
20824   ac_status=$?
20825   echo "$as_me:20825: \$? = $ac_status" >&5
20826   (exit $ac_status); }; }; then
20827   cf_cv_func_vsscanf=vfscanf
20828 else
20829   echo "$as_me: failed program was:" >&5
20830 cat conftest.$ac_ext >&5
20831
20832 cat >conftest.$ac_ext <<_ACEOF
20833 #line 20833 "configure"
20834 #include "confdefs.h"
20835
20836 #include <stdarg.h>
20837 #include <stdio.h>
20838 int
20839 main (void)
20840 {
20841
20842         FILE strbuf;
20843         char *str = "from";
20844
20845         strbuf._flag = _IOREAD;
20846         strbuf._ptr = strbuf._base = (unsigned char *) str;
20847         strbuf._cnt = strlen(str);
20848         strbuf._file = _NFILE;
20849         return (_doscan(&strbuf, "%d", ap))
20850   ;
20851   return 0;
20852 }
20853 _ACEOF
20854 rm -f conftest.$ac_objext conftest$ac_exeext
20855 if { (eval echo "$as_me:20855: \"$ac_link\"") >&5
20856   (eval $ac_link) 2>&5
20857   ac_status=$?
20858   echo "$as_me:20858: \$? = $ac_status" >&5
20859   (exit $ac_status); } &&
20860          { ac_try='test -s conftest$ac_exeext'
20861   { (eval echo "$as_me:20861: \"$ac_try\"") >&5
20862   (eval $ac_try) 2>&5
20863   ac_status=$?
20864   echo "$as_me:20864: \$? = $ac_status" >&5
20865   (exit $ac_status); }; }; then
20866   cf_cv_func_vsscanf=_doscan
20867 else
20868   echo "$as_me: failed program was:" >&5
20869 cat conftest.$ac_ext >&5
20870
20871 cf_cv_func_vsscanf=no
20872 fi
20873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20874 fi
20875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20876 fi
20877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20878 fi
20879 echo "$as_me:20879: result: $cf_cv_func_vsscanf" >&5
20880 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20881
20882 case $cf_cv_func_vsscanf in
20883 (vsscanf)
20884 cat >>confdefs.h <<\EOF
20885 #define HAVE_VSSCANF 1
20886 EOF
20887 ;;
20888 (vfscanf)
20889 cat >>confdefs.h <<\EOF
20890 #define HAVE_VFSCANF 1
20891 EOF
20892 ;;
20893 (_doscan)
20894 cat >>confdefs.h <<\EOF
20895 #define HAVE__DOSCAN 1
20896 EOF
20897 ;;
20898 esac
20899
20900 for ac_header in \
20901 unistd.h \
20902
20903 do
20904 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20905 echo "$as_me:20905: checking for $ac_header" >&5
20906 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20907 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20908   echo $ECHO_N "(cached) $ECHO_C" >&6
20909 else
20910   cat >conftest.$ac_ext <<_ACEOF
20911 #line 20911 "configure"
20912 #include "confdefs.h"
20913 #include <$ac_header>
20914 _ACEOF
20915 if { (eval echo "$as_me:20915: \"$ac_cpp conftest.$ac_ext\"") >&5
20916   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20917   ac_status=$?
20918   egrep -v '^ *\+' conftest.er1 >conftest.err
20919   rm -f conftest.er1
20920   cat conftest.err >&5
20921   echo "$as_me:20921: \$? = $ac_status" >&5
20922   (exit $ac_status); } >/dev/null; then
20923   if test -s conftest.err; then
20924     ac_cpp_err=$ac_c_preproc_warn_flag
20925   else
20926     ac_cpp_err=
20927   fi
20928 else
20929   ac_cpp_err=yes
20930 fi
20931 if test -z "$ac_cpp_err"; then
20932   eval "$as_ac_Header=yes"
20933 else
20934   echo "$as_me: failed program was:" >&5
20935   cat conftest.$ac_ext >&5
20936   eval "$as_ac_Header=no"
20937 fi
20938 rm -f conftest.err conftest.$ac_ext
20939 fi
20940 echo "$as_me:20940: result: `eval echo '${'$as_ac_Header'}'`" >&5
20941 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20942 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20943   cat >>confdefs.h <<EOF
20944 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20945 EOF
20946
20947 fi
20948 done
20949
20950 echo "$as_me:20950: checking for working mkstemp" >&5
20951 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20952 if test "${cf_cv_func_mkstemp+set}" = set; then
20953   echo $ECHO_N "(cached) $ECHO_C" >&6
20954 else
20955
20956 rm -rf conftest*
20957 if test "$cross_compiling" = yes; then
20958   cf_cv_func_mkstemp=maybe
20959 else
20960   cat >conftest.$ac_ext <<_ACEOF
20961 #line 20961 "configure"
20962 #include "confdefs.h"
20963
20964 #include <sys/types.h>
20965 #ifdef HAVE_UNISTD_H
20966 #include <unistd.h>
20967 #endif
20968 #include <stdlib.h>
20969 #include <stdio.h>
20970 #include <string.h>
20971 #include <sys/stat.h>
20972 int main(void)
20973 {
20974         char *tmpl = "conftestXXXXXX";
20975         char name[2][80];
20976         int n;
20977         int result = 0;
20978         int fd;
20979         struct stat sb;
20980
20981         umask(077);
20982         for (n = 0; n < 2; ++n) {
20983                 strcpy(name[n], tmpl);
20984                 if ((fd = mkstemp(name[n])) >= 0) {
20985                         if (!strcmp(name[n], tmpl)
20986                          || stat(name[n], &sb) != 0
20987                          || (sb.st_mode & S_IFMT) != S_IFREG
20988                          || (sb.st_mode & 077) != 0) {
20989                                 result = 1;
20990                         }
20991                         close(fd);
20992                 }
20993         }
20994         if (result == 0
20995          && !strcmp(name[0], name[1]))
20996                 result = 1;
20997         ${cf_cv_main_return:-return}(result);
20998 }
20999
21000 _ACEOF
21001 rm -f conftest$ac_exeext
21002 if { (eval echo "$as_me:21002: \"$ac_link\"") >&5
21003   (eval $ac_link) 2>&5
21004   ac_status=$?
21005   echo "$as_me:21005: \$? = $ac_status" >&5
21006   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21007   { (eval echo "$as_me:21007: \"$ac_try\"") >&5
21008   (eval $ac_try) 2>&5
21009   ac_status=$?
21010   echo "$as_me:21010: \$? = $ac_status" >&5
21011   (exit $ac_status); }; }; then
21012   cf_cv_func_mkstemp=yes
21013
21014 else
21015   echo "$as_me: program exited with status $ac_status" >&5
21016 echo "$as_me: failed program was:" >&5
21017 cat conftest.$ac_ext >&5
21018 cf_cv_func_mkstemp=no
21019
21020 fi
21021 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21022 fi
21023
21024 fi
21025 echo "$as_me:21025: result: $cf_cv_func_mkstemp" >&5
21026 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21027 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21028         echo "$as_me:21028: checking for mkstemp" >&5
21029 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21030 if test "${ac_cv_func_mkstemp+set}" = set; then
21031   echo $ECHO_N "(cached) $ECHO_C" >&6
21032 else
21033   cat >conftest.$ac_ext <<_ACEOF
21034 #line 21034 "configure"
21035 #include "confdefs.h"
21036 #define mkstemp autoconf_temporary
21037 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21038 #undef mkstemp
21039
21040 #ifdef __cplusplus
21041 extern "C"
21042 #endif
21043
21044 /* We use char because int might match the return type of a gcc2
21045    builtin and then its argument prototype would still apply.  */
21046 char mkstemp (void);
21047
21048 int
21049 main (void)
21050 {
21051
21052 /* The GNU C library defines stubs for functions which it implements
21053     to always fail with ENOSYS.  Some functions are actually named
21054     something starting with __ and the normal name is an alias.  */
21055 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21056 #error found stub for mkstemp
21057 #endif
21058
21059         return mkstemp ();
21060   ;
21061   return 0;
21062 }
21063 _ACEOF
21064 rm -f conftest.$ac_objext conftest$ac_exeext
21065 if { (eval echo "$as_me:21065: \"$ac_link\"") >&5
21066   (eval $ac_link) 2>&5
21067   ac_status=$?
21068   echo "$as_me:21068: \$? = $ac_status" >&5
21069   (exit $ac_status); } &&
21070          { ac_try='test -s conftest$ac_exeext'
21071   { (eval echo "$as_me:21071: \"$ac_try\"") >&5
21072   (eval $ac_try) 2>&5
21073   ac_status=$?
21074   echo "$as_me:21074: \$? = $ac_status" >&5
21075   (exit $ac_status); }; }; then
21076   ac_cv_func_mkstemp=yes
21077 else
21078   echo "$as_me: failed program was:" >&5
21079 cat conftest.$ac_ext >&5
21080 ac_cv_func_mkstemp=no
21081 fi
21082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21083 fi
21084 echo "$as_me:21084: result: $ac_cv_func_mkstemp" >&5
21085 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21086
21087 fi
21088 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21089
21090 cat >>confdefs.h <<\EOF
21091 #define HAVE_MKSTEMP 1
21092 EOF
21093
21094 fi
21095
21096 # setup for prototype of fallback for vsscanf()
21097
21098 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21099         HAVE_VSSCANF=1
21100 else
21101         HAVE_VSSCANF=0
21102 fi
21103
21104 if test "x$cross_compiling" = xyes ; then
21105         { echo "$as_me:21105: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21106 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21107 else
21108         echo "$as_me:21108: checking whether setvbuf arguments are reversed" >&5
21109 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21110 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21111   echo $ECHO_N "(cached) $ECHO_C" >&6
21112 else
21113   if test "$cross_compiling" = yes; then
21114   { { echo "$as_me:21114: error: cannot run test program while cross compiling" >&5
21115 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21116    { (exit 1); exit 1; }; }
21117 else
21118   cat >conftest.$ac_ext <<_ACEOF
21119 #line 21119 "configure"
21120 #include "confdefs.h"
21121 #include <stdio.h>
21122 /* If setvbuf has the reversed format, exit 0. */
21123 int
21124 main (void)
21125 {
21126   /* This call has the arguments reversed.
21127      A reversed system may check and see that the address of main
21128      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21129   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21130     $ac_main_return(1);
21131   putc('\r', stdout);
21132   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21133 }
21134 _ACEOF
21135 rm -f conftest$ac_exeext
21136 if { (eval echo "$as_me:21136: \"$ac_link\"") >&5
21137   (eval $ac_link) 2>&5
21138   ac_status=$?
21139   echo "$as_me:21139: \$? = $ac_status" >&5
21140   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21141   { (eval echo "$as_me:21141: \"$ac_try\"") >&5
21142   (eval $ac_try) 2>&5
21143   ac_status=$?
21144   echo "$as_me:21144: \$? = $ac_status" >&5
21145   (exit $ac_status); }; }; then
21146   ac_cv_func_setvbuf_reversed=yes
21147 else
21148   echo "$as_me: program exited with status $ac_status" >&5
21149 echo "$as_me: failed program was:" >&5
21150 cat conftest.$ac_ext >&5
21151 ac_cv_func_setvbuf_reversed=no
21152 fi
21153 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21154 fi
21155 rm -f core core.* *.core
21156 fi
21157 echo "$as_me:21157: result: $ac_cv_func_setvbuf_reversed" >&5
21158 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21159 if test $ac_cv_func_setvbuf_reversed = yes; then
21160
21161 cat >>confdefs.h <<\EOF
21162 #define SETVBUF_REVERSED 1
21163 EOF
21164
21165 fi
21166
21167 fi
21168 echo "$as_me:21168: checking for intptr_t" >&5
21169 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21170 if test "${ac_cv_type_intptr_t+set}" = set; then
21171   echo $ECHO_N "(cached) $ECHO_C" >&6
21172 else
21173   cat >conftest.$ac_ext <<_ACEOF
21174 #line 21174 "configure"
21175 #include "confdefs.h"
21176 $ac_includes_default
21177 int
21178 main (void)
21179 {
21180 if ((intptr_t *) 0)
21181   return 0;
21182 if (sizeof (intptr_t))
21183   return 0;
21184   ;
21185   return 0;
21186 }
21187 _ACEOF
21188 rm -f conftest.$ac_objext
21189 if { (eval echo "$as_me:21189: \"$ac_compile\"") >&5
21190   (eval $ac_compile) 2>&5
21191   ac_status=$?
21192   echo "$as_me:21192: \$? = $ac_status" >&5
21193   (exit $ac_status); } &&
21194          { ac_try='test -s conftest.$ac_objext'
21195   { (eval echo "$as_me:21195: \"$ac_try\"") >&5
21196   (eval $ac_try) 2>&5
21197   ac_status=$?
21198   echo "$as_me:21198: \$? = $ac_status" >&5
21199   (exit $ac_status); }; }; then
21200   ac_cv_type_intptr_t=yes
21201 else
21202   echo "$as_me: failed program was:" >&5
21203 cat conftest.$ac_ext >&5
21204 ac_cv_type_intptr_t=no
21205 fi
21206 rm -f conftest.$ac_objext conftest.$ac_ext
21207 fi
21208 echo "$as_me:21208: result: $ac_cv_type_intptr_t" >&5
21209 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21210 if test $ac_cv_type_intptr_t = yes; then
21211   :
21212 else
21213
21214 cat >>confdefs.h <<EOF
21215 #define intptr_t long
21216 EOF
21217
21218 fi
21219
21220 echo "$as_me:21220: checking for ssize_t" >&5
21221 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21222 if test "${ac_cv_type_ssize_t+set}" = set; then
21223   echo $ECHO_N "(cached) $ECHO_C" >&6
21224 else
21225   cat >conftest.$ac_ext <<_ACEOF
21226 #line 21226 "configure"
21227 #include "confdefs.h"
21228 $ac_includes_default
21229 int
21230 main (void)
21231 {
21232 if ((ssize_t *) 0)
21233   return 0;
21234 if (sizeof (ssize_t))
21235   return 0;
21236   ;
21237   return 0;
21238 }
21239 _ACEOF
21240 rm -f conftest.$ac_objext
21241 if { (eval echo "$as_me:21241: \"$ac_compile\"") >&5
21242   (eval $ac_compile) 2>&5
21243   ac_status=$?
21244   echo "$as_me:21244: \$? = $ac_status" >&5
21245   (exit $ac_status); } &&
21246          { ac_try='test -s conftest.$ac_objext'
21247   { (eval echo "$as_me:21247: \"$ac_try\"") >&5
21248   (eval $ac_try) 2>&5
21249   ac_status=$?
21250   echo "$as_me:21250: \$? = $ac_status" >&5
21251   (exit $ac_status); }; }; then
21252   ac_cv_type_ssize_t=yes
21253 else
21254   echo "$as_me: failed program was:" >&5
21255 cat conftest.$ac_ext >&5
21256 ac_cv_type_ssize_t=no
21257 fi
21258 rm -f conftest.$ac_objext conftest.$ac_ext
21259 fi
21260 echo "$as_me:21260: result: $ac_cv_type_ssize_t" >&5
21261 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21262 if test $ac_cv_type_ssize_t = yes; then
21263   :
21264 else
21265
21266 cat >>confdefs.h <<EOF
21267 #define ssize_t int
21268 EOF
21269
21270 fi
21271
21272 echo "$as_me:21272: checking for type sigaction_t" >&5
21273 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21274 if test "${cf_cv_type_sigaction+set}" = set; then
21275   echo $ECHO_N "(cached) $ECHO_C" >&6
21276 else
21277
21278         cat >conftest.$ac_ext <<_ACEOF
21279 #line 21279 "configure"
21280 #include "confdefs.h"
21281
21282 #include <signal.h>
21283 int
21284 main (void)
21285 {
21286 sigaction_t x
21287   ;
21288   return 0;
21289 }
21290 _ACEOF
21291 rm -f conftest.$ac_objext
21292 if { (eval echo "$as_me:21292: \"$ac_compile\"") >&5
21293   (eval $ac_compile) 2>&5
21294   ac_status=$?
21295   echo "$as_me:21295: \$? = $ac_status" >&5
21296   (exit $ac_status); } &&
21297          { ac_try='test -s conftest.$ac_objext'
21298   { (eval echo "$as_me:21298: \"$ac_try\"") >&5
21299   (eval $ac_try) 2>&5
21300   ac_status=$?
21301   echo "$as_me:21301: \$? = $ac_status" >&5
21302   (exit $ac_status); }; }; then
21303   cf_cv_type_sigaction=yes
21304 else
21305   echo "$as_me: failed program was:" >&5
21306 cat conftest.$ac_ext >&5
21307 cf_cv_type_sigaction=no
21308 fi
21309 rm -f conftest.$ac_objext conftest.$ac_ext
21310 fi
21311
21312 echo "$as_me:21312: result: $cf_cv_type_sigaction" >&5
21313 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21314 test "$cf_cv_type_sigaction" = yes &&
21315 cat >>confdefs.h <<\EOF
21316 #define HAVE_TYPE_SIGACTION 1
21317 EOF
21318
21319 echo "$as_me:21319: checking declaration of size-change" >&5
21320 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21321 if test "${cf_cv_sizechange+set}" = set; then
21322   echo $ECHO_N "(cached) $ECHO_C" >&6
21323 else
21324
21325         cf_cv_sizechange=unknown
21326         cf_save_CPPFLAGS="$CPPFLAGS"
21327
21328 for cf_opts in "" "NEED_PTEM_H"
21329 do
21330
21331         CPPFLAGS="$cf_save_CPPFLAGS"
21332         if test -n "$cf_opts"
21333         then
21334
21335         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21336         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21337
21338         fi
21339         cat >conftest.$ac_ext <<_ACEOF
21340 #line 21340 "configure"
21341 #include "confdefs.h"
21342 #include <sys/types.h>
21343 #ifdef HAVE_TERMIOS_H
21344 #include <termios.h>
21345 #else
21346 #ifdef HAVE_TERMIO_H
21347 #include <termio.h>
21348 #endif
21349 #endif
21350
21351 #ifdef NEED_PTEM_H
21352 /* This is a workaround for SCO:  they neglected to define struct winsize in
21353  * termios.h -- it's only in termio.h and ptem.h
21354  */
21355 #include <sys/stream.h>
21356 #include <sys/ptem.h>
21357 #endif
21358
21359 #ifdef HAVE_SYS_IOCTL_H
21360 #include <sys/ioctl.h>
21361 #endif
21362
21363 int
21364 main (void)
21365 {
21366
21367 #ifdef TIOCGSIZE
21368         struct ttysize win;     /* SunOS 3.0... */
21369         int y = win.ts_lines = 2;
21370         int x = win.ts_cols = 1;
21371         (void)y;
21372         (void)x;
21373 #else
21374 #ifdef TIOCGWINSZ
21375         struct winsize win;     /* everything else */
21376         int y = win.ws_row = 2;
21377         int x = win.ws_col = 1;
21378         (void)y;
21379         (void)x;
21380 #else
21381         no TIOCGSIZE or TIOCGWINSZ
21382 #endif /* TIOCGWINSZ */
21383 #endif /* TIOCGSIZE */
21384
21385   ;
21386   return 0;
21387 }
21388 _ACEOF
21389 rm -f conftest.$ac_objext
21390 if { (eval echo "$as_me:21390: \"$ac_compile\"") >&5
21391   (eval $ac_compile) 2>&5
21392   ac_status=$?
21393   echo "$as_me:21393: \$? = $ac_status" >&5
21394   (exit $ac_status); } &&
21395          { ac_try='test -s conftest.$ac_objext'
21396   { (eval echo "$as_me:21396: \"$ac_try\"") >&5
21397   (eval $ac_try) 2>&5
21398   ac_status=$?
21399   echo "$as_me:21399: \$? = $ac_status" >&5
21400   (exit $ac_status); }; }; then
21401   cf_cv_sizechange=yes
21402 else
21403   echo "$as_me: failed program was:" >&5
21404 cat conftest.$ac_ext >&5
21405 cf_cv_sizechange=no
21406 fi
21407 rm -f conftest.$ac_objext conftest.$ac_ext
21408
21409         CPPFLAGS="$cf_save_CPPFLAGS"
21410         if test "$cf_cv_sizechange" = yes ; then
21411                 echo "size-change succeeded ($cf_opts)" >&5
21412                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21413                 break
21414         fi
21415 done
21416
21417 fi
21418 echo "$as_me:21418: result: $cf_cv_sizechange" >&5
21419 echo "${ECHO_T}$cf_cv_sizechange" >&6
21420 if test "$cf_cv_sizechange" != no ; then
21421
21422 cat >>confdefs.h <<\EOF
21423 #define HAVE_SIZECHANGE 1
21424 EOF
21425
21426         case $cf_cv_sizechange in
21427         (NEED*)
21428                 cat >>confdefs.h <<EOF
21429 #define $cf_cv_sizechange  1
21430 EOF
21431
21432                 ;;
21433         esac
21434 fi
21435
21436 echo "$as_me:21436: checking for memmove" >&5
21437 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21438 if test "${ac_cv_func_memmove+set}" = set; then
21439   echo $ECHO_N "(cached) $ECHO_C" >&6
21440 else
21441   cat >conftest.$ac_ext <<_ACEOF
21442 #line 21442 "configure"
21443 #include "confdefs.h"
21444 #define memmove autoconf_temporary
21445 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21446 #undef memmove
21447
21448 #ifdef __cplusplus
21449 extern "C"
21450 #endif
21451
21452 /* We use char because int might match the return type of a gcc2
21453    builtin and then its argument prototype would still apply.  */
21454 char memmove (void);
21455
21456 int
21457 main (void)
21458 {
21459
21460 /* The GNU C library defines stubs for functions which it implements
21461     to always fail with ENOSYS.  Some functions are actually named
21462     something starting with __ and the normal name is an alias.  */
21463 #if defined (__stub_memmove) || defined (__stub___memmove)
21464 #error found stub for memmove
21465 #endif
21466
21467         return memmove ();
21468   ;
21469   return 0;
21470 }
21471 _ACEOF
21472 rm -f conftest.$ac_objext conftest$ac_exeext
21473 if { (eval echo "$as_me:21473: \"$ac_link\"") >&5
21474   (eval $ac_link) 2>&5
21475   ac_status=$?
21476   echo "$as_me:21476: \$? = $ac_status" >&5
21477   (exit $ac_status); } &&
21478          { ac_try='test -s conftest$ac_exeext'
21479   { (eval echo "$as_me:21479: \"$ac_try\"") >&5
21480   (eval $ac_try) 2>&5
21481   ac_status=$?
21482   echo "$as_me:21482: \$? = $ac_status" >&5
21483   (exit $ac_status); }; }; then
21484   ac_cv_func_memmove=yes
21485 else
21486   echo "$as_me: failed program was:" >&5
21487 cat conftest.$ac_ext >&5
21488 ac_cv_func_memmove=no
21489 fi
21490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21491 fi
21492 echo "$as_me:21492: result: $ac_cv_func_memmove" >&5
21493 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21494 if test $ac_cv_func_memmove = yes; then
21495   :
21496 else
21497
21498 echo "$as_me:21498: checking for bcopy" >&5
21499 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21500 if test "${ac_cv_func_bcopy+set}" = set; then
21501   echo $ECHO_N "(cached) $ECHO_C" >&6
21502 else
21503   cat >conftest.$ac_ext <<_ACEOF
21504 #line 21504 "configure"
21505 #include "confdefs.h"
21506 #define bcopy autoconf_temporary
21507 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21508 #undef bcopy
21509
21510 #ifdef __cplusplus
21511 extern "C"
21512 #endif
21513
21514 /* We use char because int might match the return type of a gcc2
21515    builtin and then its argument prototype would still apply.  */
21516 char bcopy (void);
21517
21518 int
21519 main (void)
21520 {
21521
21522 /* The GNU C library defines stubs for functions which it implements
21523     to always fail with ENOSYS.  Some functions are actually named
21524     something starting with __ and the normal name is an alias.  */
21525 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21526 #error found stub for bcopy
21527 #endif
21528
21529         return bcopy ();
21530   ;
21531   return 0;
21532 }
21533 _ACEOF
21534 rm -f conftest.$ac_objext conftest$ac_exeext
21535 if { (eval echo "$as_me:21535: \"$ac_link\"") >&5
21536   (eval $ac_link) 2>&5
21537   ac_status=$?
21538   echo "$as_me:21538: \$? = $ac_status" >&5
21539   (exit $ac_status); } &&
21540          { ac_try='test -s conftest$ac_exeext'
21541   { (eval echo "$as_me:21541: \"$ac_try\"") >&5
21542   (eval $ac_try) 2>&5
21543   ac_status=$?
21544   echo "$as_me:21544: \$? = $ac_status" >&5
21545   (exit $ac_status); }; }; then
21546   ac_cv_func_bcopy=yes
21547 else
21548   echo "$as_me: failed program was:" >&5
21549 cat conftest.$ac_ext >&5
21550 ac_cv_func_bcopy=no
21551 fi
21552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21553 fi
21554 echo "$as_me:21554: result: $ac_cv_func_bcopy" >&5
21555 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21556 if test $ac_cv_func_bcopy = yes; then
21557
21558         echo "$as_me:21558: checking if bcopy does overlapping moves" >&5
21559 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21560 if test "${cf_cv_good_bcopy+set}" = set; then
21561   echo $ECHO_N "(cached) $ECHO_C" >&6
21562 else
21563
21564                 if test "$cross_compiling" = yes; then
21565   cf_cv_good_bcopy=unknown
21566 else
21567   cat >conftest.$ac_ext <<_ACEOF
21568 #line 21568 "configure"
21569 #include "confdefs.h"
21570
21571 int main(void) {
21572         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21573         char temp[40];
21574         bcopy(data, temp, sizeof(data));
21575         bcopy(temp+10, temp, 15);
21576         bcopy(temp+5, temp+15, 10);
21577         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21578 }
21579
21580 _ACEOF
21581 rm -f conftest$ac_exeext
21582 if { (eval echo "$as_me:21582: \"$ac_link\"") >&5
21583   (eval $ac_link) 2>&5
21584   ac_status=$?
21585   echo "$as_me:21585: \$? = $ac_status" >&5
21586   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21587   { (eval echo "$as_me:21587: \"$ac_try\"") >&5
21588   (eval $ac_try) 2>&5
21589   ac_status=$?
21590   echo "$as_me:21590: \$? = $ac_status" >&5
21591   (exit $ac_status); }; }; then
21592   cf_cv_good_bcopy=yes
21593 else
21594   echo "$as_me: program exited with status $ac_status" >&5
21595 echo "$as_me: failed program was:" >&5
21596 cat conftest.$ac_ext >&5
21597 cf_cv_good_bcopy=no
21598 fi
21599 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21600 fi
21601
21602 fi
21603 echo "$as_me:21603: result: $cf_cv_good_bcopy" >&5
21604 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21605
21606 else
21607   cf_cv_good_bcopy=no
21608 fi
21609
21610         if test "$cf_cv_good_bcopy" = yes ; then
21611
21612 cat >>confdefs.h <<\EOF
21613 #define USE_OK_BCOPY 1
21614 EOF
21615
21616         else
21617
21618 cat >>confdefs.h <<\EOF
21619 #define USE_MY_MEMMOVE 1
21620 EOF
21621
21622         fi
21623
21624 fi
21625
21626 tty 2>&1 >/dev/null || {
21627 for ac_func in posix_openpt
21628 do
21629 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21630 echo "$as_me:21630: checking for $ac_func" >&5
21631 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21632 if eval "test \"\${$as_ac_var+set}\" = set"; then
21633   echo $ECHO_N "(cached) $ECHO_C" >&6
21634 else
21635   cat >conftest.$ac_ext <<_ACEOF
21636 #line 21636 "configure"
21637 #include "confdefs.h"
21638 #define $ac_func autoconf_temporary
21639 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21640 #undef $ac_func
21641
21642 #ifdef __cplusplus
21643 extern "C"
21644 #endif
21645
21646 /* We use char because int might match the return type of a gcc2
21647    builtin and then its argument prototype would still apply.  */
21648 char $ac_func (void);
21649
21650 int
21651 main (void)
21652 {
21653
21654 /* The GNU C library defines stubs for functions which it implements
21655     to always fail with ENOSYS.  Some functions are actually named
21656     something starting with __ and the normal name is an alias.  */
21657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21658 #error found stub for $ac_func
21659 #endif
21660
21661         return $ac_func ();
21662   ;
21663   return 0;
21664 }
21665 _ACEOF
21666 rm -f conftest.$ac_objext conftest$ac_exeext
21667 if { (eval echo "$as_me:21667: \"$ac_link\"") >&5
21668   (eval $ac_link) 2>&5
21669   ac_status=$?
21670   echo "$as_me:21670: \$? = $ac_status" >&5
21671   (exit $ac_status); } &&
21672          { ac_try='test -s conftest$ac_exeext'
21673   { (eval echo "$as_me:21673: \"$ac_try\"") >&5
21674   (eval $ac_try) 2>&5
21675   ac_status=$?
21676   echo "$as_me:21676: \$? = $ac_status" >&5
21677   (exit $ac_status); }; }; then
21678   eval "$as_ac_var=yes"
21679 else
21680   echo "$as_me: failed program was:" >&5
21681 cat conftest.$ac_ext >&5
21682 eval "$as_ac_var=no"
21683 fi
21684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21685 fi
21686 echo "$as_me:21686: result: `eval echo '${'$as_ac_var'}'`" >&5
21687 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21688 if test `eval echo '${'$as_ac_var'}'` = yes; then
21689   cat >>confdefs.h <<EOF
21690 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21691 EOF
21692
21693 fi
21694 done
21695  }
21696 echo "$as_me:21696: checking if poll really works" >&5
21697 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21698 if test "${cf_cv_working_poll+set}" = set; then
21699   echo $ECHO_N "(cached) $ECHO_C" >&6
21700 else
21701
21702 if test "$cross_compiling" = yes; then
21703   cf_cv_working_poll=unknown
21704 else
21705   cat >conftest.$ac_ext <<_ACEOF
21706 #line 21706 "configure"
21707 #include "confdefs.h"
21708
21709 #include <stdlib.h>
21710 #include <stdio.h>
21711 #include <unistd.h>
21712 #include <fcntl.h>
21713 #ifdef HAVE_POLL_H
21714 #include <poll.h>
21715 #else
21716 #include <sys/poll.h>
21717 #endif
21718 int main(void) {
21719         struct pollfd myfds;
21720         int ret;
21721
21722         /* check for Darwin bug with respect to "devices" */
21723         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21724         if (myfds.fd < 0)
21725                 myfds.fd = 0;
21726         myfds.events = POLLIN;
21727         myfds.revents = 0;
21728
21729         ret = poll(&myfds, 1, 100);
21730
21731         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21732                 ret = -1;
21733         } else {
21734                 int fd = 0;
21735                 if (!isatty(fd)) {
21736                         fd = open("/dev/tty", 2);       /* O_RDWR */
21737                 }
21738 #ifdef HAVE_POSIX_OPENPT
21739                 if (fd < 0) {
21740                         fd = posix_openpt(O_RDWR);
21741                 }
21742 #endif
21743
21744                 if (fd >= 0) {
21745                         /* also check with standard input */
21746                         myfds.fd = fd;
21747                         myfds.events = POLLIN;
21748                         myfds.revents = 0;
21749                         ret = poll(&myfds, 1, 100);
21750                 } else {
21751                         ret = -1;
21752                 }
21753         }
21754         ${cf_cv_main_return:-return}(ret < 0);
21755 }
21756 _ACEOF
21757 rm -f conftest$ac_exeext
21758 if { (eval echo "$as_me:21758: \"$ac_link\"") >&5
21759   (eval $ac_link) 2>&5
21760   ac_status=$?
21761   echo "$as_me:21761: \$? = $ac_status" >&5
21762   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21763   { (eval echo "$as_me:21763: \"$ac_try\"") >&5
21764   (eval $ac_try) 2>&5
21765   ac_status=$?
21766   echo "$as_me:21766: \$? = $ac_status" >&5
21767   (exit $ac_status); }; }; then
21768   cf_cv_working_poll=yes
21769 else
21770   echo "$as_me: program exited with status $ac_status" >&5
21771 echo "$as_me: failed program was:" >&5
21772 cat conftest.$ac_ext >&5
21773 cf_cv_working_poll=no
21774 fi
21775 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21776 fi
21777 fi
21778 echo "$as_me:21778: result: $cf_cv_working_poll" >&5
21779 echo "${ECHO_T}$cf_cv_working_poll" >&6
21780 test "$cf_cv_working_poll" = "yes" &&
21781 cat >>confdefs.h <<\EOF
21782 #define HAVE_WORKING_POLL 1
21783 EOF
21784
21785 echo "$as_me:21785: checking for va_copy" >&5
21786 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21787 if test "${cf_cv_have_va_copy+set}" = set; then
21788   echo $ECHO_N "(cached) $ECHO_C" >&6
21789 else
21790
21791 cat >conftest.$ac_ext <<_ACEOF
21792 #line 21792 "configure"
21793 #include "confdefs.h"
21794
21795 #include <stdarg.h>
21796
21797 int
21798 main (void)
21799 {
21800
21801         static va_list dst;
21802         static va_list src;
21803         va_copy(dst, src)
21804   ;
21805   return 0;
21806 }
21807 _ACEOF
21808 rm -f conftest.$ac_objext conftest$ac_exeext
21809 if { (eval echo "$as_me:21809: \"$ac_link\"") >&5
21810   (eval $ac_link) 2>&5
21811   ac_status=$?
21812   echo "$as_me:21812: \$? = $ac_status" >&5
21813   (exit $ac_status); } &&
21814          { ac_try='test -s conftest$ac_exeext'
21815   { (eval echo "$as_me:21815: \"$ac_try\"") >&5
21816   (eval $ac_try) 2>&5
21817   ac_status=$?
21818   echo "$as_me:21818: \$? = $ac_status" >&5
21819   (exit $ac_status); }; }; then
21820   cf_cv_have_va_copy=yes
21821 else
21822   echo "$as_me: failed program was:" >&5
21823 cat conftest.$ac_ext >&5
21824 cf_cv_have_va_copy=no
21825 fi
21826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21827 fi
21828 echo "$as_me:21828: result: $cf_cv_have_va_copy" >&5
21829 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21830
21831 if test "$cf_cv_have_va_copy" = yes;
21832 then
21833
21834 cat >>confdefs.h <<\EOF
21835 #define HAVE_VA_COPY 1
21836 EOF
21837
21838 else # !cf_cv_have_va_copy
21839
21840 echo "$as_me:21840: checking for __va_copy" >&5
21841 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21842 if test "${cf_cv_have___va_copy+set}" = set; then
21843   echo $ECHO_N "(cached) $ECHO_C" >&6
21844 else
21845
21846 cat >conftest.$ac_ext <<_ACEOF
21847 #line 21847 "configure"
21848 #include "confdefs.h"
21849
21850 #include <stdarg.h>
21851
21852 int
21853 main (void)
21854 {
21855
21856         static va_list dst;
21857         static va_list src;
21858         __va_copy(dst, src)
21859   ;
21860   return 0;
21861 }
21862 _ACEOF
21863 rm -f conftest.$ac_objext conftest$ac_exeext
21864 if { (eval echo "$as_me:21864: \"$ac_link\"") >&5
21865   (eval $ac_link) 2>&5
21866   ac_status=$?
21867   echo "$as_me:21867: \$? = $ac_status" >&5
21868   (exit $ac_status); } &&
21869          { ac_try='test -s conftest$ac_exeext'
21870   { (eval echo "$as_me:21870: \"$ac_try\"") >&5
21871   (eval $ac_try) 2>&5
21872   ac_status=$?
21873   echo "$as_me:21873: \$? = $ac_status" >&5
21874   (exit $ac_status); }; }; then
21875   cf_cv_have___va_copy=yes
21876 else
21877   echo "$as_me: failed program was:" >&5
21878 cat conftest.$ac_ext >&5
21879 cf_cv_have___va_copy=no
21880 fi
21881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21882 fi
21883 echo "$as_me:21883: result: $cf_cv_have___va_copy" >&5
21884 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21885
21886 if test "$cf_cv_have___va_copy" = yes
21887 then
21888
21889 cat >>confdefs.h <<\EOF
21890 #define HAVE___VA_COPY 1
21891 EOF
21892
21893 else # !cf_cv_have___va_copy
21894
21895 echo "$as_me:21895: checking for __builtin_va_copy" >&5
21896 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21897 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21898   echo $ECHO_N "(cached) $ECHO_C" >&6
21899 else
21900
21901 cat >conftest.$ac_ext <<_ACEOF
21902 #line 21902 "configure"
21903 #include "confdefs.h"
21904
21905 #include <stdarg.h>
21906
21907 int
21908 main (void)
21909 {
21910
21911         static va_list dst;
21912         static va_list src;
21913         __builtin_va_copy(dst, src)
21914   ;
21915   return 0;
21916 }
21917 _ACEOF
21918 rm -f conftest.$ac_objext conftest$ac_exeext
21919 if { (eval echo "$as_me:21919: \"$ac_link\"") >&5
21920   (eval $ac_link) 2>&5
21921   ac_status=$?
21922   echo "$as_me:21922: \$? = $ac_status" >&5
21923   (exit $ac_status); } &&
21924          { ac_try='test -s conftest$ac_exeext'
21925   { (eval echo "$as_me:21925: \"$ac_try\"") >&5
21926   (eval $ac_try) 2>&5
21927   ac_status=$?
21928   echo "$as_me:21928: \$? = $ac_status" >&5
21929   (exit $ac_status); }; }; then
21930   cf_cv_have___builtin_va_copy=yes
21931 else
21932   echo "$as_me: failed program was:" >&5
21933 cat conftest.$ac_ext >&5
21934 cf_cv_have___builtin_va_copy=no
21935 fi
21936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21937 fi
21938 echo "$as_me:21938: result: $cf_cv_have___builtin_va_copy" >&5
21939 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21940
21941 test "$cf_cv_have___builtin_va_copy" = yes &&
21942
21943 cat >>confdefs.h <<\EOF
21944 #define HAVE___BUILTIN_VA_COPY 1
21945 EOF
21946
21947 fi # cf_cv_have___va_copy
21948
21949 fi # cf_cv_have_va_copy
21950
21951 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21952 (*yes*)
21953         ;;
21954
21955 (*)
21956         echo "$as_me:21956: checking if we can simply copy va_list" >&5
21957 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21958 if test "${cf_cv_pointer_va_list+set}" = set; then
21959   echo $ECHO_N "(cached) $ECHO_C" >&6
21960 else
21961
21962 cat >conftest.$ac_ext <<_ACEOF
21963 #line 21963 "configure"
21964 #include "confdefs.h"
21965
21966 #include <stdarg.h>
21967
21968 int
21969 main (void)
21970 {
21971
21972         va_list dst;
21973         va_list src;
21974         dst = src
21975   ;
21976   return 0;
21977 }
21978 _ACEOF
21979 rm -f conftest.$ac_objext conftest$ac_exeext
21980 if { (eval echo "$as_me:21980: \"$ac_link\"") >&5
21981   (eval $ac_link) 2>&5
21982   ac_status=$?
21983   echo "$as_me:21983: \$? = $ac_status" >&5
21984   (exit $ac_status); } &&
21985          { ac_try='test -s conftest$ac_exeext'
21986   { (eval echo "$as_me:21986: \"$ac_try\"") >&5
21987   (eval $ac_try) 2>&5
21988   ac_status=$?
21989   echo "$as_me:21989: \$? = $ac_status" >&5
21990   (exit $ac_status); }; }; then
21991   cf_cv_pointer_va_list=yes
21992 else
21993   echo "$as_me: failed program was:" >&5
21994 cat conftest.$ac_ext >&5
21995 cf_cv_pointer_va_list=no
21996 fi
21997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21998 fi
21999 echo "$as_me:21999: result: $cf_cv_pointer_va_list" >&5
22000 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22001
22002         if test "$cf_cv_pointer_va_list" = no
22003         then
22004                 echo "$as_me:22004: checking if we can copy va_list indirectly" >&5
22005 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22006 if test "${cf_cv_array_va_list+set}" = set; then
22007   echo $ECHO_N "(cached) $ECHO_C" >&6
22008 else
22009
22010 cat >conftest.$ac_ext <<_ACEOF
22011 #line 22011 "configure"
22012 #include "confdefs.h"
22013
22014 #include <stdarg.h>
22015
22016 int
22017 main (void)
22018 {
22019
22020         va_list dst;
22021         va_list src;
22022         *dst = *src
22023   ;
22024   return 0;
22025 }
22026 _ACEOF
22027 rm -f conftest.$ac_objext conftest$ac_exeext
22028 if { (eval echo "$as_me:22028: \"$ac_link\"") >&5
22029   (eval $ac_link) 2>&5
22030   ac_status=$?
22031   echo "$as_me:22031: \$? = $ac_status" >&5
22032   (exit $ac_status); } &&
22033          { ac_try='test -s conftest$ac_exeext'
22034   { (eval echo "$as_me:22034: \"$ac_try\"") >&5
22035   (eval $ac_try) 2>&5
22036   ac_status=$?
22037   echo "$as_me:22037: \$? = $ac_status" >&5
22038   (exit $ac_status); }; }; then
22039   cf_cv_array_va_list=yes
22040 else
22041   echo "$as_me: failed program was:" >&5
22042 cat conftest.$ac_ext >&5
22043 cf_cv_array_va_list=no
22044 fi
22045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22046 fi
22047 echo "$as_me:22047: result: $cf_cv_array_va_list" >&5
22048 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22049                 test "$cf_cv_array_va_list" = yes &&
22050 cat >>confdefs.h <<\EOF
22051 #define ARRAY_VA_LIST 1
22052 EOF
22053
22054         fi
22055         ;;
22056 esac
22057
22058 echo "$as_me:22058: checking for pid_t" >&5
22059 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22060 if test "${ac_cv_type_pid_t+set}" = set; then
22061   echo $ECHO_N "(cached) $ECHO_C" >&6
22062 else
22063   cat >conftest.$ac_ext <<_ACEOF
22064 #line 22064 "configure"
22065 #include "confdefs.h"
22066 $ac_includes_default
22067 int
22068 main (void)
22069 {
22070 if ((pid_t *) 0)
22071   return 0;
22072 if (sizeof (pid_t))
22073   return 0;
22074   ;
22075   return 0;
22076 }
22077 _ACEOF
22078 rm -f conftest.$ac_objext
22079 if { (eval echo "$as_me:22079: \"$ac_compile\"") >&5
22080   (eval $ac_compile) 2>&5
22081   ac_status=$?
22082   echo "$as_me:22082: \$? = $ac_status" >&5
22083   (exit $ac_status); } &&
22084          { ac_try='test -s conftest.$ac_objext'
22085   { (eval echo "$as_me:22085: \"$ac_try\"") >&5
22086   (eval $ac_try) 2>&5
22087   ac_status=$?
22088   echo "$as_me:22088: \$? = $ac_status" >&5
22089   (exit $ac_status); }; }; then
22090   ac_cv_type_pid_t=yes
22091 else
22092   echo "$as_me: failed program was:" >&5
22093 cat conftest.$ac_ext >&5
22094 ac_cv_type_pid_t=no
22095 fi
22096 rm -f conftest.$ac_objext conftest.$ac_ext
22097 fi
22098 echo "$as_me:22098: result: $ac_cv_type_pid_t" >&5
22099 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22100 if test $ac_cv_type_pid_t = yes; then
22101   :
22102 else
22103
22104 cat >>confdefs.h <<EOF
22105 #define pid_t int
22106 EOF
22107
22108 fi
22109
22110 for ac_header in unistd.h vfork.h
22111 do
22112 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22113 echo "$as_me:22113: checking for $ac_header" >&5
22114 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22115 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22116   echo $ECHO_N "(cached) $ECHO_C" >&6
22117 else
22118   cat >conftest.$ac_ext <<_ACEOF
22119 #line 22119 "configure"
22120 #include "confdefs.h"
22121 #include <$ac_header>
22122 _ACEOF
22123 if { (eval echo "$as_me:22123: \"$ac_cpp conftest.$ac_ext\"") >&5
22124   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22125   ac_status=$?
22126   egrep -v '^ *\+' conftest.er1 >conftest.err
22127   rm -f conftest.er1
22128   cat conftest.err >&5
22129   echo "$as_me:22129: \$? = $ac_status" >&5
22130   (exit $ac_status); } >/dev/null; then
22131   if test -s conftest.err; then
22132     ac_cpp_err=$ac_c_preproc_warn_flag
22133   else
22134     ac_cpp_err=
22135   fi
22136 else
22137   ac_cpp_err=yes
22138 fi
22139 if test -z "$ac_cpp_err"; then
22140   eval "$as_ac_Header=yes"
22141 else
22142   echo "$as_me: failed program was:" >&5
22143   cat conftest.$ac_ext >&5
22144   eval "$as_ac_Header=no"
22145 fi
22146 rm -f conftest.err conftest.$ac_ext
22147 fi
22148 echo "$as_me:22148: result: `eval echo '${'$as_ac_Header'}'`" >&5
22149 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22150 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22151   cat >>confdefs.h <<EOF
22152 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22153 EOF
22154
22155 fi
22156 done
22157
22158 for ac_func in fork vfork
22159 do
22160 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22161 echo "$as_me:22161: checking for $ac_func" >&5
22162 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22163 if eval "test \"\${$as_ac_var+set}\" = set"; then
22164   echo $ECHO_N "(cached) $ECHO_C" >&6
22165 else
22166   cat >conftest.$ac_ext <<_ACEOF
22167 #line 22167 "configure"
22168 #include "confdefs.h"
22169 #define $ac_func autoconf_temporary
22170 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22171 #undef $ac_func
22172
22173 #ifdef __cplusplus
22174 extern "C"
22175 #endif
22176
22177 /* We use char because int might match the return type of a gcc2
22178    builtin and then its argument prototype would still apply.  */
22179 char $ac_func (void);
22180
22181 int
22182 main (void)
22183 {
22184
22185 /* The GNU C library defines stubs for functions which it implements
22186     to always fail with ENOSYS.  Some functions are actually named
22187     something starting with __ and the normal name is an alias.  */
22188 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22189 #error found stub for $ac_func
22190 #endif
22191
22192         return $ac_func ();
22193   ;
22194   return 0;
22195 }
22196 _ACEOF
22197 rm -f conftest.$ac_objext conftest$ac_exeext
22198 if { (eval echo "$as_me:22198: \"$ac_link\"") >&5
22199   (eval $ac_link) 2>&5
22200   ac_status=$?
22201   echo "$as_me:22201: \$? = $ac_status" >&5
22202   (exit $ac_status); } &&
22203          { ac_try='test -s conftest$ac_exeext'
22204   { (eval echo "$as_me:22204: \"$ac_try\"") >&5
22205   (eval $ac_try) 2>&5
22206   ac_status=$?
22207   echo "$as_me:22207: \$? = $ac_status" >&5
22208   (exit $ac_status); }; }; then
22209   eval "$as_ac_var=yes"
22210 else
22211   echo "$as_me: failed program was:" >&5
22212 cat conftest.$ac_ext >&5
22213 eval "$as_ac_var=no"
22214 fi
22215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22216 fi
22217 echo "$as_me:22217: result: `eval echo '${'$as_ac_var'}'`" >&5
22218 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22219 if test `eval echo '${'$as_ac_var'}'` = yes; then
22220   cat >>confdefs.h <<EOF
22221 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22222 EOF
22223
22224 fi
22225 done
22226
22227 ac_cv_func_fork_works=$ac_cv_func_fork
22228 if test "x$ac_cv_func_fork" = xyes; then
22229   echo "$as_me:22229: checking for working fork" >&5
22230 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22231 if test "${ac_cv_func_fork_works+set}" = set; then
22232   echo $ECHO_N "(cached) $ECHO_C" >&6
22233 else
22234   if test "$cross_compiling" = yes; then
22235   ac_cv_func_fork_works=cross
22236 else
22237   cat >conftest.$ac_ext <<_ACEOF
22238 /* By Rüdiger Kuhlmann. */
22239       #include <sys/types.h>
22240       #if HAVE_UNISTD_H
22241       # include <unistd.h>
22242       #endif
22243       /* Some systems only have a dummy stub for fork() */
22244       int main (void)
22245       {
22246         if (fork() < 0)
22247           $ac_main_return (1);
22248         $ac_main_return (0);
22249       }
22250 _ACEOF
22251 rm -f conftest$ac_exeext
22252 if { (eval echo "$as_me:22252: \"$ac_link\"") >&5
22253   (eval $ac_link) 2>&5
22254   ac_status=$?
22255   echo "$as_me:22255: \$? = $ac_status" >&5
22256   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22257   { (eval echo "$as_me:22257: \"$ac_try\"") >&5
22258   (eval $ac_try) 2>&5
22259   ac_status=$?
22260   echo "$as_me:22260: \$? = $ac_status" >&5
22261   (exit $ac_status); }; }; then
22262   ac_cv_func_fork_works=yes
22263 else
22264   echo "$as_me: program exited with status $ac_status" >&5
22265 echo "$as_me: failed program was:" >&5
22266 cat conftest.$ac_ext >&5
22267 ac_cv_func_fork_works=no
22268 fi
22269 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22270 fi
22271 fi
22272 echo "$as_me:22272: result: $ac_cv_func_fork_works" >&5
22273 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22274
22275 fi
22276 if test "x$ac_cv_func_fork_works" = xcross; then
22277   case $host in
22278     *-*-amigaos* | *-*-msdosdjgpp*)
22279       # Override, as these systems have only a dummy fork() stub
22280       ac_cv_func_fork_works=no
22281       ;;
22282     *)
22283       ac_cv_func_fork_works=yes
22284       ;;
22285   esac
22286   { echo "$as_me:22286: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22287 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22288 fi
22289 ac_cv_func_vfork_works=$ac_cv_func_vfork
22290 if test "x$ac_cv_func_vfork" = xyes; then
22291   echo "$as_me:22291: checking for working vfork" >&5
22292 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22293 if test "${ac_cv_func_vfork_works+set}" = set; then
22294   echo $ECHO_N "(cached) $ECHO_C" >&6
22295 else
22296   if test "$cross_compiling" = yes; then
22297   ac_cv_func_vfork_works=cross
22298 else
22299   cat >conftest.$ac_ext <<_ACEOF
22300 #line 22300 "configure"
22301 #include "confdefs.h"
22302 /* Thanks to Paul Eggert for this test.  */
22303 #include <stdio.h>
22304 #include <sys/types.h>
22305 #include <sys/stat.h>
22306 #if HAVE_UNISTD_H
22307 # include <unistd.h>
22308 #endif
22309 #if HAVE_VFORK_H
22310 # include <vfork.h>
22311 #endif
22312 /* On some sparc systems, changes by the child to local and incoming
22313    argument registers are propagated back to the parent.  The compiler
22314    is told about this with #include <vfork.h>, but some compilers
22315    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22316    static variable whose address is put into a register that is
22317    clobbered by the vfork.  */
22318 static
22319 #ifdef __cplusplus
22320 sparc_address_test (int arg)
22321 # else
22322 sparc_address_test (arg) int arg;
22323 #endif
22324 {
22325   static pid_t child;
22326   if (!child) {
22327     child = vfork ();
22328     if (child < 0) {
22329       perror ("vfork");
22330       _exit(2);
22331     }
22332     if (!child) {
22333       arg = getpid();
22334       write(-1, "", 0);
22335       _exit (arg);
22336     }
22337   }
22338 }
22339
22340 int
22341 main (void)
22342 {
22343   pid_t parent = getpid ();
22344   pid_t child;
22345
22346   sparc_address_test ();
22347
22348   child = vfork ();
22349
22350   if (child == 0) {
22351     /* Here is another test for sparc vfork register problems.  This
22352        test uses lots of local variables, at least as many local
22353        variables as main has allocated so far including compiler
22354        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22355        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22356        reuse the register of parent for one of the local variables,
22357        since it will think that parent can't possibly be used any more
22358        in this routine.  Assigning to the local variable will thus
22359        munge parent in the parent process.  */
22360     pid_t
22361       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22362       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22363     /* Convince the compiler that p..p7 are live; otherwise, it might
22364        use the same hardware register for all 8 local variables.  */
22365     if (p != p1 || p != p2 || p != p3 || p != p4
22366         || p != p5 || p != p6 || p != p7)
22367       _exit(1);
22368
22369     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22370        from child file descriptors.  If the child closes a descriptor
22371        before it execs or exits, this munges the parent's descriptor
22372        as well.  Test for this by closing stdout in the child.  */
22373     _exit(close(fileno(stdout)) != 0);
22374   } else {
22375     int status;
22376     struct stat st;
22377
22378     while (wait(&status) != child)
22379       ;
22380     $ac_main_return(
22381          /* Was there some problem with vforking?  */
22382          child < 0
22383
22384          /* Did the child fail?  (This shouldn't happen.)  */
22385          || status
22386
22387          /* Did the vfork/compiler bug occur?  */
22388          || parent != getpid()
22389
22390          /* Did the file descriptor bug occur?  */
22391          || fstat(fileno(stdout), &st) != 0
22392          );
22393   }
22394 }
22395 _ACEOF
22396 rm -f conftest$ac_exeext
22397 if { (eval echo "$as_me:22397: \"$ac_link\"") >&5
22398   (eval $ac_link) 2>&5
22399   ac_status=$?
22400   echo "$as_me:22400: \$? = $ac_status" >&5
22401   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22402   { (eval echo "$as_me:22402: \"$ac_try\"") >&5
22403   (eval $ac_try) 2>&5
22404   ac_status=$?
22405   echo "$as_me:22405: \$? = $ac_status" >&5
22406   (exit $ac_status); }; }; then
22407   ac_cv_func_vfork_works=yes
22408 else
22409   echo "$as_me: program exited with status $ac_status" >&5
22410 echo "$as_me: failed program was:" >&5
22411 cat conftest.$ac_ext >&5
22412 ac_cv_func_vfork_works=no
22413 fi
22414 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22415 fi
22416 fi
22417 echo "$as_me:22417: result: $ac_cv_func_vfork_works" >&5
22418 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22419
22420 fi;
22421 if test "x$ac_cv_func_fork_works" = xcross; then
22422   ac_cv_func_vfork_works=ac_cv_func_vfork
22423   { echo "$as_me:22423: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22424 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22425 fi
22426
22427 if test "x$ac_cv_func_vfork_works" = xyes; then
22428
22429 cat >>confdefs.h <<\EOF
22430 #define HAVE_WORKING_VFORK 1
22431 EOF
22432
22433 else
22434
22435 cat >>confdefs.h <<\EOF
22436 #define vfork fork
22437 EOF
22438
22439 fi
22440 if test "x$ac_cv_func_fork_works" = xyes; then
22441
22442 cat >>confdefs.h <<\EOF
22443 #define HAVE_WORKING_FORK 1
22444 EOF
22445
22446 fi
22447
22448 echo "$as_me:22448: checking if fopen accepts explicit binary mode" >&5
22449 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22450 if test "${cf_cv_fopen_bin_r+set}" = set; then
22451   echo $ECHO_N "(cached) $ECHO_C" >&6
22452 else
22453
22454         if test "$cross_compiling" = yes; then
22455   cf_cv_fopen_bin_r=unknown
22456 else
22457   cat >conftest.$ac_ext <<_ACEOF
22458 #line 22458 "configure"
22459 #include "confdefs.h"
22460
22461 #include <stdio.h>
22462 int main(void) {
22463         FILE *fp = fopen("conftest.tmp", "wb");
22464         int rc = 0;
22465         if (fp != 0) {
22466                 int p, q;
22467                 for (p = 0; p < 256; ++p) {
22468                         fputc(p, fp);
22469                 }
22470                 fclose(fp);
22471                 fp = fopen("conftest.tmp", "rb");
22472                 if (fp != 0) {
22473                         for (p = 0; p < 256; ++p) {
22474                                 q = fgetc(fp);
22475                                 if (q != p) {
22476                                         rc = 1;
22477                                         break;
22478                                 }
22479                         }
22480                 } else {
22481                         rc = 1;
22482                 }
22483         } else {
22484                 rc = 1;
22485         }
22486         ${cf_cv_main_return:-return} (rc);
22487 }
22488
22489 _ACEOF
22490 rm -f conftest$ac_exeext
22491 if { (eval echo "$as_me:22491: \"$ac_link\"") >&5
22492   (eval $ac_link) 2>&5
22493   ac_status=$?
22494   echo "$as_me:22494: \$? = $ac_status" >&5
22495   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22496   { (eval echo "$as_me:22496: \"$ac_try\"") >&5
22497   (eval $ac_try) 2>&5
22498   ac_status=$?
22499   echo "$as_me:22499: \$? = $ac_status" >&5
22500   (exit $ac_status); }; }; then
22501   cf_cv_fopen_bin_r=yes
22502 else
22503   echo "$as_me: program exited with status $ac_status" >&5
22504 echo "$as_me: failed program was:" >&5
22505 cat conftest.$ac_ext >&5
22506 cf_cv_fopen_bin_r=no
22507 fi
22508 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22509 fi
22510
22511 fi
22512 echo "$as_me:22512: result: $cf_cv_fopen_bin_r" >&5
22513 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22514 test "x$cf_cv_fopen_bin_r" != xno &&
22515 cat >>confdefs.h <<\EOF
22516 #define USE_FOPEN_BIN_R 1
22517 EOF
22518
22519 # special check for test/ditto.c
22520
22521 echo "$as_me:22521: checking for openpty in -lutil" >&5
22522 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22523 if test "${ac_cv_lib_util_openpty+set}" = set; then
22524   echo $ECHO_N "(cached) $ECHO_C" >&6
22525 else
22526   ac_check_lib_save_LIBS=$LIBS
22527 LIBS="-lutil  $LIBS"
22528 cat >conftest.$ac_ext <<_ACEOF
22529 #line 22529 "configure"
22530 #include "confdefs.h"
22531
22532 /* Override any gcc2 internal prototype to avoid an error.  */
22533 #ifdef __cplusplus
22534 extern "C"
22535 #endif
22536 /* We use char because int might match the return type of a gcc2
22537    builtin and then its argument prototype would still apply.  */
22538 char openpty ();
22539 int
22540 main (void)
22541 {
22542 openpty ();
22543   ;
22544   return 0;
22545 }
22546 _ACEOF
22547 rm -f conftest.$ac_objext conftest$ac_exeext
22548 if { (eval echo "$as_me:22548: \"$ac_link\"") >&5
22549   (eval $ac_link) 2>&5
22550   ac_status=$?
22551   echo "$as_me:22551: \$? = $ac_status" >&5
22552   (exit $ac_status); } &&
22553          { ac_try='test -s conftest$ac_exeext'
22554   { (eval echo "$as_me:22554: \"$ac_try\"") >&5
22555   (eval $ac_try) 2>&5
22556   ac_status=$?
22557   echo "$as_me:22557: \$? = $ac_status" >&5
22558   (exit $ac_status); }; }; then
22559   ac_cv_lib_util_openpty=yes
22560 else
22561   echo "$as_me: failed program was:" >&5
22562 cat conftest.$ac_ext >&5
22563 ac_cv_lib_util_openpty=no
22564 fi
22565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22566 LIBS=$ac_check_lib_save_LIBS
22567 fi
22568 echo "$as_me:22568: result: $ac_cv_lib_util_openpty" >&5
22569 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22570 if test $ac_cv_lib_util_openpty = yes; then
22571   cf_cv_lib_util=yes
22572 else
22573   cf_cv_lib_util=no
22574 fi
22575
22576 echo "$as_me:22576: checking for openpty header" >&5
22577 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22578 if test "${cf_cv_func_openpty+set}" = set; then
22579   echo $ECHO_N "(cached) $ECHO_C" >&6
22580 else
22581
22582         cf_save_LIBS="$LIBS"
22583         test $cf_cv_lib_util = yes && {
22584 cf_add_libs="$LIBS"
22585 # reverse order
22586 cf_add_0lib=
22587 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22588 # filter duplicates
22589 for cf_add_1lib in $cf_add_0lib; do
22590         for cf_add_2lib in $cf_add_libs; do
22591                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22592                         cf_add_1lib=
22593                         break
22594                 fi
22595         done
22596         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22597 done
22598 LIBS="$cf_add_libs"
22599  }
22600         for cf_header in pty.h libutil.h util.h
22601         do
22602         cat >conftest.$ac_ext <<_ACEOF
22603 #line 22603 "configure"
22604 #include "confdefs.h"
22605
22606 #include <$cf_header>
22607
22608 int
22609 main (void)
22610 {
22611
22612         int x = openpty((int *)0, (int *)0, (char *)0,
22613                                    (struct termios *)0, (struct winsize *)0);
22614
22615   ;
22616   return 0;
22617 }
22618 _ACEOF
22619 rm -f conftest.$ac_objext conftest$ac_exeext
22620 if { (eval echo "$as_me:22620: \"$ac_link\"") >&5
22621   (eval $ac_link) 2>&5
22622   ac_status=$?
22623   echo "$as_me:22623: \$? = $ac_status" >&5
22624   (exit $ac_status); } &&
22625          { ac_try='test -s conftest$ac_exeext'
22626   { (eval echo "$as_me:22626: \"$ac_try\"") >&5
22627   (eval $ac_try) 2>&5
22628   ac_status=$?
22629   echo "$as_me:22629: \$? = $ac_status" >&5
22630   (exit $ac_status); }; }; then
22631
22632                 cf_cv_func_openpty=$cf_header
22633                 break
22634
22635 else
22636   echo "$as_me: failed program was:" >&5
22637 cat conftest.$ac_ext >&5
22638
22639                 cf_cv_func_openpty=no
22640
22641 fi
22642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22643         done
22644         LIBS="$cf_save_LIBS"
22645
22646 fi
22647 echo "$as_me:22647: result: $cf_cv_func_openpty" >&5
22648 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22649
22650 if test "$cf_cv_func_openpty" != no ; then
22651
22652 cat >>confdefs.h <<EOF
22653 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22654 EOF
22655
22656 cat >>confdefs.h <<\EOF
22657 #define USE_XTERM_PTY 1
22658 EOF
22659
22660         if test "x$cf_cv_lib_util" = xyes ; then
22661
22662 cf_add_libs="$TEST_LIBS"
22663 # reverse order
22664 cf_add_0lib=
22665 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22666 # filter duplicates
22667 for cf_add_1lib in $cf_add_0lib; do
22668         for cf_add_2lib in $cf_add_libs; do
22669                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22670                         cf_add_1lib=
22671                         break
22672                 fi
22673         done
22674         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22675 done
22676 TEST_LIBS="$cf_add_libs"
22677
22678         fi
22679 fi
22680
22681 if test "$with_hashed_db" != no ; then
22682
22683 cat >>confdefs.h <<\EOF
22684 #define USE_HASHED_DB 1
22685 EOF
22686
22687 case $with_hashed_db in
22688 (yes|*able*)
22689         ;;
22690 (*)
22691         if test -d "$with_hashed_db" ; then
22692
22693 if test -n "$with_hashed_db/include" ; then
22694   for cf_add_incdir in $with_hashed_db/include
22695   do
22696         while test $cf_add_incdir != /usr/include
22697         do
22698           if test -d $cf_add_incdir
22699           then
22700                 cf_have_incdir=no
22701                 if test -n "$CFLAGS$CPPFLAGS" ; then
22702                   # a loop is needed to ensure we can add subdirs of existing dirs
22703                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22704                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22705                           cf_have_incdir=yes; break
22706                         fi
22707                   done
22708                 fi
22709
22710                 if test "$cf_have_incdir" = no ; then
22711                   if test "$cf_add_incdir" = /usr/local/include ; then
22712                         if test "$GCC" = yes
22713                         then
22714                           cf_save_CPPFLAGS=$CPPFLAGS
22715
22716         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22717         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22718
22719                           cat >conftest.$ac_ext <<_ACEOF
22720 #line 22720 "configure"
22721 #include "confdefs.h"
22722 #include <stdio.h>
22723 int
22724 main (void)
22725 {
22726 printf("Hello")
22727   ;
22728   return 0;
22729 }
22730 _ACEOF
22731 rm -f conftest.$ac_objext
22732 if { (eval echo "$as_me:22732: \"$ac_compile\"") >&5
22733   (eval $ac_compile) 2>&5
22734   ac_status=$?
22735   echo "$as_me:22735: \$? = $ac_status" >&5
22736   (exit $ac_status); } &&
22737          { ac_try='test -s conftest.$ac_objext'
22738   { (eval echo "$as_me:22738: \"$ac_try\"") >&5
22739   (eval $ac_try) 2>&5
22740   ac_status=$?
22741   echo "$as_me:22741: \$? = $ac_status" >&5
22742   (exit $ac_status); }; }; then
22743   :
22744 else
22745   echo "$as_me: failed program was:" >&5
22746 cat conftest.$ac_ext >&5
22747 cf_have_incdir=yes
22748 fi
22749 rm -f conftest.$ac_objext conftest.$ac_ext
22750                           CPPFLAGS=$cf_save_CPPFLAGS
22751                         fi
22752                   fi
22753                 fi
22754
22755                 if test "$cf_have_incdir" = no ; then
22756                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22757
22758 echo "${as_me:-configure}:22758: testing adding $cf_add_incdir to include-path ..." 1>&5
22759
22760                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22761
22762                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22763                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22764                   cf_add_incdir="$cf_top_incdir"
22765                 else
22766                   break
22767                 fi
22768           else
22769                 break
22770           fi
22771         done
22772   done
22773 fi
22774
22775 if test -n "$with_hashed_db/lib" ; then
22776         for cf_add_libdir in $with_hashed_db/lib
22777         do
22778                 if test $cf_add_libdir = /usr/lib ; then
22779                         :
22780                 elif test -d $cf_add_libdir
22781                 then
22782                         cf_have_libdir=no
22783                         if test -n "$LDFLAGS$LIBS" ; then
22784                                 # a loop is needed to ensure we can add subdirs of existing dirs
22785                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22786                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22787                                                 cf_have_libdir=yes; break
22788                                         fi
22789                                 done
22790                         fi
22791                         if test "$cf_have_libdir" = no ; then
22792                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22793
22794 echo "${as_me:-configure}:22794: testing adding $cf_add_libdir to library-path ..." 1>&5
22795
22796                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22797                         fi
22798                 fi
22799         done
22800 fi
22801
22802         else
22803                 case "$with_hashed_db" in
22804                 (./*|../*|/*)
22805                         { echo "$as_me:22805: WARNING: no such directory $with_hashed_db" >&5
22806 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22807                         ;;
22808                 (*)
22809
22810 cf_search=
22811
22812 test "x$prefix" != "xNONE" && \
22813 test -d "$prefix" && \
22814  {
22815         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22816         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22817         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22818         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22819         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22820         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22821 }
22822
22823 for cf_subdir_prefix in \
22824         /usr \
22825         /usr/local \
22826         /usr/pkg \
22827         /opt \
22828         /opt/local \
22829         $HOME
22830 do
22831
22832 test "x$cf_subdir_prefix" != "x$prefix" && \
22833 test -d "$cf_subdir_prefix" && \
22834 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22835         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22836         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22837         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22838         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22839         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22840         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"
22841 }
22842
22843 done
22844
22845         for cf_item in $cf_search
22846         do
22847                 case $cf_item in
22848                 (*/$with_hashed_db)
22849
22850 if test -n "$cf_item" ; then
22851   for cf_add_incdir in $cf_item
22852   do
22853         while test $cf_add_incdir != /usr/include
22854         do
22855           if test -d $cf_add_incdir
22856           then
22857                 cf_have_incdir=no
22858                 if test -n "$CFLAGS$CPPFLAGS" ; then
22859                   # a loop is needed to ensure we can add subdirs of existing dirs
22860                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22861                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22862                           cf_have_incdir=yes; break
22863                         fi
22864                   done
22865                 fi
22866
22867                 if test "$cf_have_incdir" = no ; then
22868                   if test "$cf_add_incdir" = /usr/local/include ; then
22869                         if test "$GCC" = yes
22870                         then
22871                           cf_save_CPPFLAGS=$CPPFLAGS
22872
22873         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22874         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22875
22876                           cat >conftest.$ac_ext <<_ACEOF
22877 #line 22877 "configure"
22878 #include "confdefs.h"
22879 #include <stdio.h>
22880 int
22881 main (void)
22882 {
22883 printf("Hello")
22884   ;
22885   return 0;
22886 }
22887 _ACEOF
22888 rm -f conftest.$ac_objext
22889 if { (eval echo "$as_me:22889: \"$ac_compile\"") >&5
22890   (eval $ac_compile) 2>&5
22891   ac_status=$?
22892   echo "$as_me:22892: \$? = $ac_status" >&5
22893   (exit $ac_status); } &&
22894          { ac_try='test -s conftest.$ac_objext'
22895   { (eval echo "$as_me:22895: \"$ac_try\"") >&5
22896   (eval $ac_try) 2>&5
22897   ac_status=$?
22898   echo "$as_me:22898: \$? = $ac_status" >&5
22899   (exit $ac_status); }; }; then
22900   :
22901 else
22902   echo "$as_me: failed program was:" >&5
22903 cat conftest.$ac_ext >&5
22904 cf_have_incdir=yes
22905 fi
22906 rm -f conftest.$ac_objext conftest.$ac_ext
22907                           CPPFLAGS=$cf_save_CPPFLAGS
22908                         fi
22909                   fi
22910                 fi
22911
22912                 if test "$cf_have_incdir" = no ; then
22913                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22914
22915 echo "${as_me:-configure}:22915: testing adding $cf_add_incdir to include-path ..." 1>&5
22916
22917                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22918
22919                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22920                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22921                   cf_add_incdir="$cf_top_incdir"
22922                 else
22923                   break
22924                 fi
22925           else
22926                 break
22927           fi
22928         done
22929   done
22930 fi
22931
22932                         ;;
22933                 esac
22934         done
22935
22936 cf_search=
22937
22938 test "x$prefix" != "xNONE" && \
22939 test -d "$prefix" && \
22940  {
22941         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22942         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22943         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22944         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22945         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22946         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22947 }
22948
22949 for cf_subdir_prefix in \
22950         /usr \
22951         /usr/local \
22952         /usr/pkg \
22953         /opt \
22954         /opt/local \
22955         $HOME
22956 do
22957
22958 test "x$cf_subdir_prefix" != "x$prefix" && \
22959 test -d "$cf_subdir_prefix" && \
22960 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22961         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22962         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22963         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22964         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22965         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22966         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"
22967 }
22968
22969 done
22970
22971         for cf_item in $cf_search
22972         do
22973                 case $cf_item in
22974                 (*/$with_hashed_db)
22975
22976 if test -n "$cf_item" ; then
22977         for cf_add_libdir in $cf_item
22978         do
22979                 if test $cf_add_libdir = /usr/lib ; then
22980                         :
22981                 elif test -d $cf_add_libdir
22982                 then
22983                         cf_have_libdir=no
22984                         if test -n "$LDFLAGS$LIBS" ; then
22985                                 # a loop is needed to ensure we can add subdirs of existing dirs
22986                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22987                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22988                                                 cf_have_libdir=yes; break
22989                                         fi
22990                                 done
22991                         fi
22992                         if test "$cf_have_libdir" = no ; then
22993                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22994
22995 echo "${as_me:-configure}:22995: testing adding $cf_add_libdir to library-path ..." 1>&5
22996
22997                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22998                         fi
22999                 fi
23000         done
23001 fi
23002
23003                         ;;
23004                 esac
23005         done
23006
23007                         ;;
23008                 esac
23009         fi
23010 esac
23011
23012 echo "$as_me:23012: checking for db.h" >&5
23013 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23014 if test "${ac_cv_header_db_h+set}" = set; then
23015   echo $ECHO_N "(cached) $ECHO_C" >&6
23016 else
23017   cat >conftest.$ac_ext <<_ACEOF
23018 #line 23018 "configure"
23019 #include "confdefs.h"
23020 #include <db.h>
23021 _ACEOF
23022 if { (eval echo "$as_me:23022: \"$ac_cpp conftest.$ac_ext\"") >&5
23023   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23024   ac_status=$?
23025   egrep -v '^ *\+' conftest.er1 >conftest.err
23026   rm -f conftest.er1
23027   cat conftest.err >&5
23028   echo "$as_me:23028: \$? = $ac_status" >&5
23029   (exit $ac_status); } >/dev/null; then
23030   if test -s conftest.err; then
23031     ac_cpp_err=$ac_c_preproc_warn_flag
23032   else
23033     ac_cpp_err=
23034   fi
23035 else
23036   ac_cpp_err=yes
23037 fi
23038 if test -z "$ac_cpp_err"; then
23039   ac_cv_header_db_h=yes
23040 else
23041   echo "$as_me: failed program was:" >&5
23042   cat conftest.$ac_ext >&5
23043   ac_cv_header_db_h=no
23044 fi
23045 rm -f conftest.err conftest.$ac_ext
23046 fi
23047 echo "$as_me:23047: result: $ac_cv_header_db_h" >&5
23048 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23049 if test $ac_cv_header_db_h = yes; then
23050
23051 echo "$as_me:23051: checking for version of db" >&5
23052 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23053 if test "${cf_cv_hashed_db_version+set}" = set; then
23054   echo $ECHO_N "(cached) $ECHO_C" >&6
23055 else
23056
23057 cf_cv_hashed_db_version=unknown
23058
23059 for cf_db_version in 1 2 3 4 5 6
23060 do
23061
23062 echo "${as_me:-configure}:23062: testing checking for db version $cf_db_version ..." 1>&5
23063
23064         cat >conftest.$ac_ext <<_ACEOF
23065 #line 23065 "configure"
23066 #include "confdefs.h"
23067
23068 $ac_includes_default
23069 #include <db.h>
23070
23071 #ifdef DB_VERSION_MAJOR
23072         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23073 #if $cf_db_version == DB_VERSION_MAJOR
23074         /* ok */
23075 #else
23076         make an error
23077 #endif
23078 #else
23079 #if $cf_db_version == 1
23080         /* ok: assuming this is DB 1.8.5 */
23081 #else
23082         make an error
23083 #endif
23084 #endif
23085
23086 int
23087 main (void)
23088 {
23089 DBT *foo = 0
23090   ;
23091   return 0;
23092 }
23093 _ACEOF
23094 rm -f conftest.$ac_objext
23095 if { (eval echo "$as_me:23095: \"$ac_compile\"") >&5
23096   (eval $ac_compile) 2>&5
23097   ac_status=$?
23098   echo "$as_me:23098: \$? = $ac_status" >&5
23099   (exit $ac_status); } &&
23100          { ac_try='test -s conftest.$ac_objext'
23101   { (eval echo "$as_me:23101: \"$ac_try\"") >&5
23102   (eval $ac_try) 2>&5
23103   ac_status=$?
23104   echo "$as_me:23104: \$? = $ac_status" >&5
23105   (exit $ac_status); }; }; then
23106
23107         cf_cv_hashed_db_version=$cf_db_version
23108         break
23109
23110 else
23111   echo "$as_me: failed program was:" >&5
23112 cat conftest.$ac_ext >&5
23113 fi
23114 rm -f conftest.$ac_objext conftest.$ac_ext
23115 done
23116
23117 fi
23118 echo "$as_me:23118: result: $cf_cv_hashed_db_version" >&5
23119 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23120
23121 if test "$cf_cv_hashed_db_version" = unknown ; then
23122         { { echo "$as_me:23122: error: Cannot determine version of db" >&5
23123 echo "$as_me: error: Cannot determine version of db" >&2;}
23124    { (exit 1); exit 1; }; }
23125 else
23126
23127 echo "$as_me:23127: checking for db libraries" >&5
23128 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23129 if test "${cf_cv_hashed_db_libs+set}" = set; then
23130   echo $ECHO_N "(cached) $ECHO_C" >&6
23131 else
23132
23133 cf_cv_hashed_db_libs=unknown
23134 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23135 do
23136         cf_save_libs="$LIBS"
23137         if test -n "$cf_db_libs"; then
23138
23139 cf_add_libs="$LIBS"
23140 # reverse order
23141 cf_add_0lib=
23142 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23143 # filter duplicates
23144 for cf_add_1lib in $cf_add_0lib; do
23145         for cf_add_2lib in $cf_add_libs; do
23146                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23147                         cf_add_1lib=
23148                         break
23149                 fi
23150         done
23151         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23152 done
23153 LIBS="$cf_add_libs"
23154
23155         fi
23156
23157 echo "${as_me:-configure}:23157: testing checking for library "$cf_db_libs" ..." 1>&5
23158
23159         cat >conftest.$ac_ext <<_ACEOF
23160 #line 23160 "configure"
23161 #include "confdefs.h"
23162
23163 $ac_includes_default
23164 #include <db.h>
23165
23166 int
23167 main (void)
23168 {
23169
23170         char *path = "/tmp/foo";
23171 #ifdef DB_VERSION_MAJOR
23172 #if DB_VERSION_MAJOR >= 4
23173         DB *result = 0;
23174         db_create(&result, NULL, 0);
23175         result->open(result,
23176                 NULL,
23177                 path,
23178                 path,
23179                 DB_HASH,
23180                 DB_CREATE,
23181                 0644);
23182 #elif DB_VERSION_MAJOR >= 3
23183         DB *result = 0;
23184         db_create(&result, NULL, 0);
23185         result->open(result,
23186                 path,
23187                 path,
23188                 DB_HASH,
23189                 DB_CREATE,
23190                 0644);
23191 #elif DB_VERSION_MAJOR >= 2
23192         DB *result = 0;
23193         db_open(path,
23194                 DB_HASH,
23195                 DB_CREATE,
23196                 0644,
23197                 (DB_ENV *) 0,
23198                 (DB_INFO *) 0,
23199                 &result);
23200 #endif /* DB_VERSION_MAJOR */
23201 #else
23202         DB *result = dbopen(path,
23203                      2,
23204                      0644,
23205                      DB_HASH,
23206                      0);
23207 #endif
23208         ${cf_cv_main_return:-return}(result != 0)
23209
23210   ;
23211   return 0;
23212 }
23213 _ACEOF
23214 rm -f conftest.$ac_objext conftest$ac_exeext
23215 if { (eval echo "$as_me:23215: \"$ac_link\"") >&5
23216   (eval $ac_link) 2>&5
23217   ac_status=$?
23218   echo "$as_me:23218: \$? = $ac_status" >&5
23219   (exit $ac_status); } &&
23220          { ac_try='test -s conftest$ac_exeext'
23221   { (eval echo "$as_me:23221: \"$ac_try\"") >&5
23222   (eval $ac_try) 2>&5
23223   ac_status=$?
23224   echo "$as_me:23224: \$? = $ac_status" >&5
23225   (exit $ac_status); }; }; then
23226
23227         if test -n "$cf_db_libs" ; then
23228                 cf_cv_hashed_db_libs=$cf_db_libs
23229         else
23230                 cf_cv_hashed_db_libs=default
23231         fi
23232         LIBS="$cf_save_libs"
23233         break
23234
23235 else
23236   echo "$as_me: failed program was:" >&5
23237 cat conftest.$ac_ext >&5
23238 fi
23239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23240         LIBS="$cf_save_libs"
23241 done
23242
23243 fi
23244 echo "$as_me:23244: result: $cf_cv_hashed_db_libs" >&5
23245 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23246
23247         if test "$cf_cv_hashed_db_libs" = unknown ; then
23248                 { { echo "$as_me:23248: error: Cannot determine library for db" >&5
23249 echo "$as_me: error: Cannot determine library for db" >&2;}
23250    { (exit 1); exit 1; }; }
23251         elif test "$cf_cv_hashed_db_libs" != default ; then
23252
23253 cf_add_libs="$LIBS"
23254 # reverse order
23255 cf_add_0lib=
23256 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23257 # filter duplicates
23258 for cf_add_1lib in $cf_add_0lib; do
23259         for cf_add_2lib in $cf_add_libs; do
23260                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23261                         cf_add_1lib=
23262                         break
23263                 fi
23264         done
23265         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23266 done
23267 LIBS="$cf_add_libs"
23268
23269         fi
23270 fi
23271
23272 else
23273
23274         { { echo "$as_me:23274: error: Cannot find db.h" >&5
23275 echo "$as_me: error: Cannot find db.h" >&2;}
23276    { (exit 1); exit 1; }; }
23277
23278 fi
23279
23280 fi
23281
23282 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23283         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23284         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23285 fi
23286
23287 # Just in case, check if the C compiler has a bool type.
23288
23289 echo "$as_me:23289: checking if we should include stdbool.h" >&5
23290 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23291
23292 if test "${cf_cv_header_stdbool_h+set}" = set; then
23293   echo $ECHO_N "(cached) $ECHO_C" >&6
23294 else
23295
23296         cat >conftest.$ac_ext <<_ACEOF
23297 #line 23297 "configure"
23298 #include "confdefs.h"
23299
23300 int
23301 main (void)
23302 {
23303 bool foo = false
23304   ;
23305   return 0;
23306 }
23307 _ACEOF
23308 rm -f conftest.$ac_objext
23309 if { (eval echo "$as_me:23309: \"$ac_compile\"") >&5
23310   (eval $ac_compile) 2>&5
23311   ac_status=$?
23312   echo "$as_me:23312: \$? = $ac_status" >&5
23313   (exit $ac_status); } &&
23314          { ac_try='test -s conftest.$ac_objext'
23315   { (eval echo "$as_me:23315: \"$ac_try\"") >&5
23316   (eval $ac_try) 2>&5
23317   ac_status=$?
23318   echo "$as_me:23318: \$? = $ac_status" >&5
23319   (exit $ac_status); }; }; then
23320   cf_cv_header_stdbool_h=0
23321 else
23322   echo "$as_me: failed program was:" >&5
23323 cat conftest.$ac_ext >&5
23324 cat >conftest.$ac_ext <<_ACEOF
23325 #line 23325 "configure"
23326 #include "confdefs.h"
23327
23328 #ifndef __BEOS__
23329 #include <stdbool.h>
23330 #endif
23331
23332 int
23333 main (void)
23334 {
23335 bool foo = false
23336   ;
23337   return 0;
23338 }
23339 _ACEOF
23340 rm -f conftest.$ac_objext
23341 if { (eval echo "$as_me:23341: \"$ac_compile\"") >&5
23342   (eval $ac_compile) 2>&5
23343   ac_status=$?
23344   echo "$as_me:23344: \$? = $ac_status" >&5
23345   (exit $ac_status); } &&
23346          { ac_try='test -s conftest.$ac_objext'
23347   { (eval echo "$as_me:23347: \"$ac_try\"") >&5
23348   (eval $ac_try) 2>&5
23349   ac_status=$?
23350   echo "$as_me:23350: \$? = $ac_status" >&5
23351   (exit $ac_status); }; }; then
23352   cf_cv_header_stdbool_h=1
23353 else
23354   echo "$as_me: failed program was:" >&5
23355 cat conftest.$ac_ext >&5
23356 cf_cv_header_stdbool_h=0
23357 fi
23358 rm -f conftest.$ac_objext conftest.$ac_ext
23359 fi
23360 rm -f conftest.$ac_objext conftest.$ac_ext
23361 fi
23362
23363 if test "$cf_cv_header_stdbool_h" = 1
23364 then    echo "$as_me:23364: result: yes" >&5
23365 echo "${ECHO_T}yes" >&6
23366 else    echo "$as_me:23366: result: no" >&5
23367 echo "${ECHO_T}no" >&6
23368 fi
23369
23370 echo "$as_me:23370: checking for builtin bool type" >&5
23371 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23372
23373 if test "${cf_cv_cc_bool_type+set}" = set; then
23374   echo $ECHO_N "(cached) $ECHO_C" >&6
23375 else
23376
23377         cat >conftest.$ac_ext <<_ACEOF
23378 #line 23378 "configure"
23379 #include "confdefs.h"
23380
23381 #include <stdio.h>
23382 #include <sys/types.h>
23383
23384 int
23385 main (void)
23386 {
23387 bool x = false
23388   ;
23389   return 0;
23390 }
23391 _ACEOF
23392 rm -f conftest.$ac_objext
23393 if { (eval echo "$as_me:23393: \"$ac_compile\"") >&5
23394   (eval $ac_compile) 2>&5
23395   ac_status=$?
23396   echo "$as_me:23396: \$? = $ac_status" >&5
23397   (exit $ac_status); } &&
23398          { ac_try='test -s conftest.$ac_objext'
23399   { (eval echo "$as_me:23399: \"$ac_try\"") >&5
23400   (eval $ac_try) 2>&5
23401   ac_status=$?
23402   echo "$as_me:23402: \$? = $ac_status" >&5
23403   (exit $ac_status); }; }; then
23404   cf_cv_cc_bool_type=1
23405 else
23406   echo "$as_me: failed program was:" >&5
23407 cat conftest.$ac_ext >&5
23408 cf_cv_cc_bool_type=0
23409 fi
23410 rm -f conftest.$ac_objext conftest.$ac_ext
23411
23412 fi
23413
23414 if test "$cf_cv_cc_bool_type" = 1
23415 then    echo "$as_me:23415: result: yes" >&5
23416 echo "${ECHO_T}yes" >&6
23417 else    echo "$as_me:23417: result: no" >&5
23418 echo "${ECHO_T}no" >&6
23419 fi
23420
23421 # Check for C++ compiler characteristics (and ensure that it's there!)
23422 if test -n "$CXX" ; then
23423         ac_ext=cc
23424 ac_cpp='$CXXCPP $CPPFLAGS'
23425 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23426 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23427 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23428 ac_main_return=return
23429
23430 if test -n "$GXX" ; then
23431
23432         cf_save="$LIBS"
23433         LIBS="$LIBS $CXXLIBS"
23434         echo "$as_me:23434: checking if we already have C++ library" >&5
23435 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23436         cat >conftest.$ac_ext <<_ACEOF
23437 #line 23437 "configure"
23438 #include "confdefs.h"
23439
23440                         #include <iostream>
23441 int
23442 main (void)
23443 {
23444
23445                         std::cout << "Hello World!" << std::endl;
23446   ;
23447   return 0;
23448 }
23449 _ACEOF
23450 rm -f conftest.$ac_objext conftest$ac_exeext
23451 if { (eval echo "$as_me:23451: \"$ac_link\"") >&5
23452   (eval $ac_link) 2>&5
23453   ac_status=$?
23454   echo "$as_me:23454: \$? = $ac_status" >&5
23455   (exit $ac_status); } &&
23456          { ac_try='test -s conftest$ac_exeext'
23457   { (eval echo "$as_me:23457: \"$ac_try\"") >&5
23458   (eval $ac_try) 2>&5
23459   ac_status=$?
23460   echo "$as_me:23460: \$? = $ac_status" >&5
23461   (exit $ac_status); }; }; then
23462   cf_have_libstdcpp=yes
23463 else
23464   echo "$as_me: failed program was:" >&5
23465 cat conftest.$ac_ext >&5
23466 cf_have_libstdcpp=no
23467 fi
23468 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23469         echo "$as_me:23469: result: $cf_have_libstdcpp" >&5
23470 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23471         LIBS="$cf_save"
23472
23473         if test $cf_have_libstdcpp != yes
23474         then
23475                 case $cf_cv_system_name in
23476                 (os2*)
23477                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23478                                 cf_stdcpp_libname=stdcpp
23479                         else
23480                                 cf_stdcpp_libname=stdc++
23481                         fi
23482                         ;;
23483                 (*)
23484                         cf_stdcpp_libname=stdc++
23485                         ;;
23486                 esac
23487
23488                 echo "$as_me:23488: checking for library $cf_stdcpp_libname" >&5
23489 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23490 if test "${cf_cv_libstdcpp+set}" = set; then
23491   echo $ECHO_N "(cached) $ECHO_C" >&6
23492 else
23493
23494                         cf_save="$LIBS"
23495                         LIBS="$LIBS $CXXLIBS"
23496
23497 cf_add_libs="$LIBS"
23498 # reverse order
23499 cf_add_0lib=
23500 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23501 # filter duplicates
23502 for cf_add_1lib in $cf_add_0lib; do
23503         for cf_add_2lib in $cf_add_libs; do
23504                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23505                         cf_add_1lib=
23506                         break
23507                 fi
23508         done
23509         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23510 done
23511 LIBS="$cf_add_libs"
23512
23513                 cat >conftest.$ac_ext <<_ACEOF
23514 #line 23514 "configure"
23515 #include "confdefs.h"
23516
23517                                 #include <iostream>
23518 int
23519 main (void)
23520 {
23521
23522                                 std::cout << "Hello World!" << std::endl;
23523   ;
23524   return 0;
23525 }
23526 _ACEOF
23527 rm -f conftest.$ac_objext conftest$ac_exeext
23528 if { (eval echo "$as_me:23528: \"$ac_link\"") >&5
23529   (eval $ac_link) 2>&5
23530   ac_status=$?
23531   echo "$as_me:23531: \$? = $ac_status" >&5
23532   (exit $ac_status); } &&
23533          { ac_try='test -s conftest$ac_exeext'
23534   { (eval echo "$as_me:23534: \"$ac_try\"") >&5
23535   (eval $ac_try) 2>&5
23536   ac_status=$?
23537   echo "$as_me:23537: \$? = $ac_status" >&5
23538   (exit $ac_status); }; }; then
23539   cf_cv_libstdcpp=yes
23540 else
23541   echo "$as_me: failed program was:" >&5
23542 cat conftest.$ac_ext >&5
23543 cf_cv_libstdcpp=no
23544 fi
23545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23546                         LIBS="$cf_save"
23547
23548 fi
23549 echo "$as_me:23549: result: $cf_cv_libstdcpp" >&5
23550 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23551                 test "$cf_cv_libstdcpp" = yes && {
23552 cf_add_libs="$CXXLIBS"
23553 # reverse order
23554 cf_add_0lib=
23555 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23556 # filter duplicates
23557 for cf_add_1lib in $cf_add_0lib; do
23558         for cf_add_2lib in $cf_add_libs; do
23559                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23560                         cf_add_1lib=
23561                         break
23562                 fi
23563         done
23564         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23565 done
23566 CXXLIBS="$cf_add_libs"
23567  }
23568         fi
23569 fi
23570
23571         echo "$as_me:23571: checking whether $CXX understands -c and -o together" >&5
23572 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23573 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23574   echo $ECHO_N "(cached) $ECHO_C" >&6
23575 else
23576
23577 cat > conftest.$ac_ext <<CF_EOF
23578 int main(void)
23579 {
23580         ${cf_cv_main_return:-return}(0);
23581 }
23582 CF_EOF
23583 # We do the test twice because some compilers refuse to overwrite an
23584 # existing .o file with -o, though they will create one.
23585 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23586 if { (eval echo "$as_me:23586: \"$ac_try\"") >&5
23587   (eval $ac_try) 2>&5
23588   ac_status=$?
23589   echo "$as_me:23589: \$? = $ac_status" >&5
23590   (exit $ac_status); } &&
23591   test -f conftest2.$ac_objext && { (eval echo "$as_me:23591: \"$ac_try\"") >&5
23592   (eval $ac_try) 2>&5
23593   ac_status=$?
23594   echo "$as_me:23594: \$? = $ac_status" >&5
23595   (exit $ac_status); };
23596 then
23597   eval cf_cv_prog_CXX_c_o=yes
23598 else
23599   eval cf_cv_prog_CXX_c_o=no
23600 fi
23601 rm -rf conftest*
23602
23603 fi
23604 if test $cf_cv_prog_CXX_c_o = yes; then
23605   echo "$as_me:23605: result: yes" >&5
23606 echo "${ECHO_T}yes" >&6
23607 else
23608   echo "$as_me:23608: result: no" >&5
23609 echo "${ECHO_T}no" >&6
23610 fi
23611
23612         case $GXX_VERSION in
23613         (1.*|2.[0-6]*|[1-9][0-9].*)
23614                 cf_cxx_library=yes
23615                 ;;
23616         (*-2.7*|2.7*)
23617
23618 cf_cxx_library=unknown
23619 case $cf_cv_system_name in
23620 (os2*)
23621         cf_gpp_libname=gpp
23622         ;;
23623 (*)
23624         cf_gpp_libname=g++
23625         ;;
23626 esac
23627 if test "$GXX" = yes; then
23628         echo "$as_me:23628: checking for lib$cf_gpp_libname" >&5
23629 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23630         cf_save="$LIBS"
23631
23632 cf_add_libs="$LIBS"
23633 # reverse order
23634 cf_add_0lib=
23635 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23636 # filter duplicates
23637 for cf_add_1lib in $cf_add_0lib; do
23638         for cf_add_2lib in $cf_add_libs; do
23639                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23640                         cf_add_1lib=
23641                         break
23642                 fi
23643         done
23644         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23645 done
23646 LIBS="$cf_add_libs"
23647
23648         cat >conftest.$ac_ext <<_ACEOF
23649 #line 23649 "configure"
23650 #include "confdefs.h"
23651
23652 #include <$cf_gpp_libname/builtin.h>
23653
23654 int
23655 main (void)
23656 {
23657 two_arg_error_handler_t foo2 = lib_error_handler
23658   ;
23659   return 0;
23660 }
23661 _ACEOF
23662 rm -f conftest.$ac_objext conftest$ac_exeext
23663 if { (eval echo "$as_me:23663: \"$ac_link\"") >&5
23664   (eval $ac_link) 2>&5
23665   ac_status=$?
23666   echo "$as_me:23666: \$? = $ac_status" >&5
23667   (exit $ac_status); } &&
23668          { ac_try='test -s conftest$ac_exeext'
23669   { (eval echo "$as_me:23669: \"$ac_try\"") >&5
23670   (eval $ac_try) 2>&5
23671   ac_status=$?
23672   echo "$as_me:23672: \$? = $ac_status" >&5
23673   (exit $ac_status); }; }; then
23674   cf_cxx_library=yes
23675
23676 cf_add_libs="$CXXLIBS"
23677 # reverse order
23678 cf_add_0lib=
23679 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23680 # filter duplicates
23681 for cf_add_1lib in $cf_add_0lib; do
23682         for cf_add_2lib in $cf_add_libs; do
23683                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23684                         cf_add_1lib=
23685                         break
23686                 fi
23687         done
23688         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23689 done
23690 CXXLIBS="$cf_add_libs"
23691
23692          if test "$cf_gpp_libname" = cpp ; then
23693
23694 cat >>confdefs.h <<\EOF
23695 #define HAVE_GPP_BUILTIN_H 1
23696 EOF
23697
23698          else
23699
23700 cat >>confdefs.h <<\EOF
23701 #define HAVE_GXX_BUILTIN_H 1
23702 EOF
23703
23704          fi
23705 else
23706   echo "$as_me: failed program was:" >&5
23707 cat conftest.$ac_ext >&5
23708 cat >conftest.$ac_ext <<_ACEOF
23709 #line 23709 "configure"
23710 #include "confdefs.h"
23711
23712 #include <builtin.h>
23713
23714 int
23715 main (void)
23716 {
23717 two_arg_error_handler_t foo2 = lib_error_handler
23718   ;
23719   return 0;
23720 }
23721 _ACEOF
23722 rm -f conftest.$ac_objext conftest$ac_exeext
23723 if { (eval echo "$as_me:23723: \"$ac_link\"") >&5
23724   (eval $ac_link) 2>&5
23725   ac_status=$?
23726   echo "$as_me:23726: \$? = $ac_status" >&5
23727   (exit $ac_status); } &&
23728          { ac_try='test -s conftest$ac_exeext'
23729   { (eval echo "$as_me:23729: \"$ac_try\"") >&5
23730   (eval $ac_try) 2>&5
23731   ac_status=$?
23732   echo "$as_me:23732: \$? = $ac_status" >&5
23733   (exit $ac_status); }; }; then
23734   cf_cxx_library=yes
23735
23736 cf_add_libs="$CXXLIBS"
23737 # reverse order
23738 cf_add_0lib=
23739 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23740 # filter duplicates
23741 for cf_add_1lib in $cf_add_0lib; do
23742         for cf_add_2lib in $cf_add_libs; do
23743                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23744                         cf_add_1lib=
23745                         break
23746                 fi
23747         done
23748         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23749 done
23750 CXXLIBS="$cf_add_libs"
23751
23752 cat >>confdefs.h <<\EOF
23753 #define HAVE_BUILTIN_H 1
23754 EOF
23755
23756 else
23757   echo "$as_me: failed program was:" >&5
23758 cat conftest.$ac_ext >&5
23759 cf_cxx_library=no
23760 fi
23761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23762 fi
23763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23764         LIBS="$cf_save"
23765         echo "$as_me:23765: result: $cf_cxx_library" >&5
23766 echo "${ECHO_T}$cf_cxx_library" >&6
23767 fi
23768
23769                 ;;
23770         (*)
23771                 cf_cxx_library=no
23772                 ;;
23773         esac
23774
23775         ac_ext=cc
23776 ac_cpp='$CXXCPP $CPPFLAGS'
23777 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23778 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23779 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23780 ac_main_return=return
23781 echo "$as_me:23781: checking how to run the C++ preprocessor" >&5
23782 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23783 if test -z "$CXXCPP"; then
23784   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23785   echo $ECHO_N "(cached) $ECHO_C" >&6
23786 else
23787       # Double quotes because CXXCPP needs to be expanded
23788     for CXXCPP in "$CXX -E" "/lib/cpp"
23789     do
23790       ac_preproc_ok=false
23791 for ac_cxx_preproc_warn_flag in '' yes
23792 do
23793   # Use a header file that comes with gcc, so configuring glibc
23794   # with a fresh cross-compiler works.
23795   # On the NeXT, cc -E runs the code through the compiler's parser,
23796   # not just through cpp. "Syntax error" is here to catch this case.
23797   cat >conftest.$ac_ext <<_ACEOF
23798 #line 23798 "configure"
23799 #include "confdefs.h"
23800 #include <assert.h>
23801                      Syntax error
23802 _ACEOF
23803 if { (eval echo "$as_me:23803: \"$ac_cpp conftest.$ac_ext\"") >&5
23804   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23805   ac_status=$?
23806   egrep -v '^ *\+' conftest.er1 >conftest.err
23807   rm -f conftest.er1
23808   cat conftest.err >&5
23809   echo "$as_me:23809: \$? = $ac_status" >&5
23810   (exit $ac_status); } >/dev/null; then
23811   if test -s conftest.err; then
23812     ac_cpp_err=$ac_cxx_preproc_warn_flag
23813   else
23814     ac_cpp_err=
23815   fi
23816 else
23817   ac_cpp_err=yes
23818 fi
23819 if test -z "$ac_cpp_err"; then
23820   :
23821 else
23822   echo "$as_me: failed program was:" >&5
23823   cat conftest.$ac_ext >&5
23824   # Broken: fails on valid input.
23825 continue
23826 fi
23827 rm -f conftest.err conftest.$ac_ext
23828
23829   # OK, works on sane cases.  Now check whether non-existent headers
23830   # can be detected and how.
23831   cat >conftest.$ac_ext <<_ACEOF
23832 #line 23832 "configure"
23833 #include "confdefs.h"
23834 #include <ac_nonexistent.h>
23835 _ACEOF
23836 if { (eval echo "$as_me:23836: \"$ac_cpp conftest.$ac_ext\"") >&5
23837   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23838   ac_status=$?
23839   egrep -v '^ *\+' conftest.er1 >conftest.err
23840   rm -f conftest.er1
23841   cat conftest.err >&5
23842   echo "$as_me:23842: \$? = $ac_status" >&5
23843   (exit $ac_status); } >/dev/null; then
23844   if test -s conftest.err; then
23845     ac_cpp_err=$ac_cxx_preproc_warn_flag
23846   else
23847     ac_cpp_err=
23848   fi
23849 else
23850   ac_cpp_err=yes
23851 fi
23852 if test -z "$ac_cpp_err"; then
23853   # Broken: success on invalid input.
23854 continue
23855 else
23856   echo "$as_me: failed program was:" >&5
23857   cat conftest.$ac_ext >&5
23858   # Passes both tests.
23859 ac_preproc_ok=:
23860 break
23861 fi
23862 rm -f conftest.err conftest.$ac_ext
23863
23864 done
23865 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23866 rm -f conftest.err conftest.$ac_ext
23867 if $ac_preproc_ok; then
23868   break
23869 fi
23870
23871     done
23872     ac_cv_prog_CXXCPP=$CXXCPP
23873
23874 fi
23875   CXXCPP=$ac_cv_prog_CXXCPP
23876 else
23877   ac_cv_prog_CXXCPP=$CXXCPP
23878 fi
23879 echo "$as_me:23879: result: $CXXCPP" >&5
23880 echo "${ECHO_T}$CXXCPP" >&6
23881 ac_preproc_ok=false
23882 for ac_cxx_preproc_warn_flag in '' yes
23883 do
23884   # Use a header file that comes with gcc, so configuring glibc
23885   # with a fresh cross-compiler works.
23886   # On the NeXT, cc -E runs the code through the compiler's parser,
23887   # not just through cpp. "Syntax error" is here to catch this case.
23888   cat >conftest.$ac_ext <<_ACEOF
23889 #line 23889 "configure"
23890 #include "confdefs.h"
23891 #include <assert.h>
23892                      Syntax error
23893 _ACEOF
23894 if { (eval echo "$as_me:23894: \"$ac_cpp conftest.$ac_ext\"") >&5
23895   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23896   ac_status=$?
23897   egrep -v '^ *\+' conftest.er1 >conftest.err
23898   rm -f conftest.er1
23899   cat conftest.err >&5
23900   echo "$as_me:23900: \$? = $ac_status" >&5
23901   (exit $ac_status); } >/dev/null; then
23902   if test -s conftest.err; then
23903     ac_cpp_err=$ac_cxx_preproc_warn_flag
23904   else
23905     ac_cpp_err=
23906   fi
23907 else
23908   ac_cpp_err=yes
23909 fi
23910 if test -z "$ac_cpp_err"; then
23911   :
23912 else
23913   echo "$as_me: failed program was:" >&5
23914   cat conftest.$ac_ext >&5
23915   # Broken: fails on valid input.
23916 continue
23917 fi
23918 rm -f conftest.err conftest.$ac_ext
23919
23920   # OK, works on sane cases.  Now check whether non-existent headers
23921   # can be detected and how.
23922   cat >conftest.$ac_ext <<_ACEOF
23923 #line 23923 "configure"
23924 #include "confdefs.h"
23925 #include <ac_nonexistent.h>
23926 _ACEOF
23927 if { (eval echo "$as_me:23927: \"$ac_cpp conftest.$ac_ext\"") >&5
23928   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23929   ac_status=$?
23930   egrep -v '^ *\+' conftest.er1 >conftest.err
23931   rm -f conftest.er1
23932   cat conftest.err >&5
23933   echo "$as_me:23933: \$? = $ac_status" >&5
23934   (exit $ac_status); } >/dev/null; then
23935   if test -s conftest.err; then
23936     ac_cpp_err=$ac_cxx_preproc_warn_flag
23937   else
23938     ac_cpp_err=
23939   fi
23940 else
23941   ac_cpp_err=yes
23942 fi
23943 if test -z "$ac_cpp_err"; then
23944   # Broken: success on invalid input.
23945 continue
23946 else
23947   echo "$as_me: failed program was:" >&5
23948   cat conftest.$ac_ext >&5
23949   # Passes both tests.
23950 ac_preproc_ok=:
23951 break
23952 fi
23953 rm -f conftest.err conftest.$ac_ext
23954
23955 done
23956 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23957 rm -f conftest.err conftest.$ac_ext
23958 if $ac_preproc_ok; then
23959   :
23960 else
23961   { { echo "$as_me:23961: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23962 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23963    { (exit 1); exit 1; }; }
23964 fi
23965
23966 ac_ext=cc
23967 ac_cpp='$CXXCPP $CPPFLAGS'
23968 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23969 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23970 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23971 ac_main_return=return
23972
23973 for ac_header in typeinfo
23974 do
23975 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23976 echo "$as_me:23976: checking for $ac_header" >&5
23977 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23978 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23979   echo $ECHO_N "(cached) $ECHO_C" >&6
23980 else
23981   cat >conftest.$ac_ext <<_ACEOF
23982 #line 23982 "configure"
23983 #include "confdefs.h"
23984 #include <$ac_header>
23985 _ACEOF
23986 if { (eval echo "$as_me:23986: \"$ac_cpp conftest.$ac_ext\"") >&5
23987   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23988   ac_status=$?
23989   egrep -v '^ *\+' conftest.er1 >conftest.err
23990   rm -f conftest.er1
23991   cat conftest.err >&5
23992   echo "$as_me:23992: \$? = $ac_status" >&5
23993   (exit $ac_status); } >/dev/null; then
23994   if test -s conftest.err; then
23995     ac_cpp_err=$ac_cxx_preproc_warn_flag
23996   else
23997     ac_cpp_err=
23998   fi
23999 else
24000   ac_cpp_err=yes
24001 fi
24002 if test -z "$ac_cpp_err"; then
24003   eval "$as_ac_Header=yes"
24004 else
24005   echo "$as_me: failed program was:" >&5
24006   cat conftest.$ac_ext >&5
24007   eval "$as_ac_Header=no"
24008 fi
24009 rm -f conftest.err conftest.$ac_ext
24010 fi
24011 echo "$as_me:24011: result: `eval echo '${'$as_ac_Header'}'`" >&5
24012 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24013 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24014   cat >>confdefs.h <<EOF
24015 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24016 EOF
24017
24018 fi
24019 done
24020
24021 for ac_header in iostream
24022 do
24023 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24024 echo "$as_me:24024: checking for $ac_header" >&5
24025 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24026 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24027   echo $ECHO_N "(cached) $ECHO_C" >&6
24028 else
24029   cat >conftest.$ac_ext <<_ACEOF
24030 #line 24030 "configure"
24031 #include "confdefs.h"
24032 #include <$ac_header>
24033 _ACEOF
24034 if { (eval echo "$as_me:24034: \"$ac_cpp conftest.$ac_ext\"") >&5
24035   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24036   ac_status=$?
24037   egrep -v '^ *\+' conftest.er1 >conftest.err
24038   rm -f conftest.er1
24039   cat conftest.err >&5
24040   echo "$as_me:24040: \$? = $ac_status" >&5
24041   (exit $ac_status); } >/dev/null; then
24042   if test -s conftest.err; then
24043     ac_cpp_err=$ac_cxx_preproc_warn_flag
24044   else
24045     ac_cpp_err=
24046   fi
24047 else
24048   ac_cpp_err=yes
24049 fi
24050 if test -z "$ac_cpp_err"; then
24051   eval "$as_ac_Header=yes"
24052 else
24053   echo "$as_me: failed program was:" >&5
24054   cat conftest.$ac_ext >&5
24055   eval "$as_ac_Header=no"
24056 fi
24057 rm -f conftest.err conftest.$ac_ext
24058 fi
24059 echo "$as_me:24059: result: `eval echo '${'$as_ac_Header'}'`" >&5
24060 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24061 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24062   cat >>confdefs.h <<EOF
24063 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24064 EOF
24065
24066 fi
24067 done
24068
24069 if test x"$ac_cv_header_iostream" = xyes ; then
24070         echo "$as_me:24070: checking if iostream uses std-namespace" >&5
24071 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24072         cat >conftest.$ac_ext <<_ACEOF
24073 #line 24073 "configure"
24074 #include "confdefs.h"
24075
24076 #include <iostream>
24077 using std::endl;
24078 using std::cerr;
24079 int
24080 main (void)
24081 {
24082
24083 cerr << "testing" << endl;
24084
24085   ;
24086   return 0;
24087 }
24088 _ACEOF
24089 rm -f conftest.$ac_objext
24090 if { (eval echo "$as_me:24090: \"$ac_compile\"") >&5
24091   (eval $ac_compile) 2>&5
24092   ac_status=$?
24093   echo "$as_me:24093: \$? = $ac_status" >&5
24094   (exit $ac_status); } &&
24095          { ac_try='test -s conftest.$ac_objext'
24096   { (eval echo "$as_me:24096: \"$ac_try\"") >&5
24097   (eval $ac_try) 2>&5
24098   ac_status=$?
24099   echo "$as_me:24099: \$? = $ac_status" >&5
24100   (exit $ac_status); }; }; then
24101   cf_iostream_namespace=yes
24102 else
24103   echo "$as_me: failed program was:" >&5
24104 cat conftest.$ac_ext >&5
24105 cf_iostream_namespace=no
24106 fi
24107 rm -f conftest.$ac_objext conftest.$ac_ext
24108         echo "$as_me:24108: result: $cf_iostream_namespace" >&5
24109 echo "${ECHO_T}$cf_iostream_namespace" >&6
24110         if test "$cf_iostream_namespace" = yes ; then
24111
24112 cat >>confdefs.h <<\EOF
24113 #define IOSTREAM_NAMESPACE 1
24114 EOF
24115
24116         fi
24117 fi
24118
24119 echo "$as_me:24119: checking if we should include stdbool.h" >&5
24120 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24121
24122 if test "${cf_cv_header_stdbool_h+set}" = set; then
24123   echo $ECHO_N "(cached) $ECHO_C" >&6
24124 else
24125
24126         cat >conftest.$ac_ext <<_ACEOF
24127 #line 24127 "configure"
24128 #include "confdefs.h"
24129
24130 int
24131 main (void)
24132 {
24133 bool foo = false
24134   ;
24135   return 0;
24136 }
24137 _ACEOF
24138 rm -f conftest.$ac_objext
24139 if { (eval echo "$as_me:24139: \"$ac_compile\"") >&5
24140   (eval $ac_compile) 2>&5
24141   ac_status=$?
24142   echo "$as_me:24142: \$? = $ac_status" >&5
24143   (exit $ac_status); } &&
24144          { ac_try='test -s conftest.$ac_objext'
24145   { (eval echo "$as_me:24145: \"$ac_try\"") >&5
24146   (eval $ac_try) 2>&5
24147   ac_status=$?
24148   echo "$as_me:24148: \$? = $ac_status" >&5
24149   (exit $ac_status); }; }; then
24150   cf_cv_header_stdbool_h=0
24151 else
24152   echo "$as_me: failed program was:" >&5
24153 cat conftest.$ac_ext >&5
24154 cat >conftest.$ac_ext <<_ACEOF
24155 #line 24155 "configure"
24156 #include "confdefs.h"
24157
24158 #ifndef __BEOS__
24159 #include <stdbool.h>
24160 #endif
24161
24162 int
24163 main (void)
24164 {
24165 bool foo = false
24166   ;
24167   return 0;
24168 }
24169 _ACEOF
24170 rm -f conftest.$ac_objext
24171 if { (eval echo "$as_me:24171: \"$ac_compile\"") >&5
24172   (eval $ac_compile) 2>&5
24173   ac_status=$?
24174   echo "$as_me:24174: \$? = $ac_status" >&5
24175   (exit $ac_status); } &&
24176          { ac_try='test -s conftest.$ac_objext'
24177   { (eval echo "$as_me:24177: \"$ac_try\"") >&5
24178   (eval $ac_try) 2>&5
24179   ac_status=$?
24180   echo "$as_me:24180: \$? = $ac_status" >&5
24181   (exit $ac_status); }; }; then
24182   cf_cv_header_stdbool_h=1
24183 else
24184   echo "$as_me: failed program was:" >&5
24185 cat conftest.$ac_ext >&5
24186 cf_cv_header_stdbool_h=0
24187 fi
24188 rm -f conftest.$ac_objext conftest.$ac_ext
24189 fi
24190 rm -f conftest.$ac_objext conftest.$ac_ext
24191 fi
24192
24193 if test "$cf_cv_header_stdbool_h" = 1
24194 then    echo "$as_me:24194: result: yes" >&5
24195 echo "${ECHO_T}yes" >&6
24196 else    echo "$as_me:24196: result: no" >&5
24197 echo "${ECHO_T}no" >&6
24198 fi
24199
24200 echo "$as_me:24200: checking for builtin bool type" >&5
24201 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24202
24203 if test "${cf_cv_builtin_bool+set}" = set; then
24204   echo $ECHO_N "(cached) $ECHO_C" >&6
24205 else
24206
24207         cat >conftest.$ac_ext <<_ACEOF
24208 #line 24208 "configure"
24209 #include "confdefs.h"
24210
24211 #include <stdio.h>
24212 #include <sys/types.h>
24213
24214 int
24215 main (void)
24216 {
24217 bool x = false
24218   ;
24219   return 0;
24220 }
24221 _ACEOF
24222 rm -f conftest.$ac_objext
24223 if { (eval echo "$as_me:24223: \"$ac_compile\"") >&5
24224   (eval $ac_compile) 2>&5
24225   ac_status=$?
24226   echo "$as_me:24226: \$? = $ac_status" >&5
24227   (exit $ac_status); } &&
24228          { ac_try='test -s conftest.$ac_objext'
24229   { (eval echo "$as_me:24229: \"$ac_try\"") >&5
24230   (eval $ac_try) 2>&5
24231   ac_status=$?
24232   echo "$as_me:24232: \$? = $ac_status" >&5
24233   (exit $ac_status); }; }; then
24234   cf_cv_builtin_bool=1
24235 else
24236   echo "$as_me: failed program was:" >&5
24237 cat conftest.$ac_ext >&5
24238 cf_cv_builtin_bool=0
24239 fi
24240 rm -f conftest.$ac_objext conftest.$ac_ext
24241
24242 fi
24243
24244 if test "$cf_cv_builtin_bool" = 1
24245 then    echo "$as_me:24245: result: yes" >&5
24246 echo "${ECHO_T}yes" >&6
24247 else    echo "$as_me:24247: result: no" >&5
24248 echo "${ECHO_T}no" >&6
24249 fi
24250
24251 echo "$as_me:24251: checking for size of bool" >&5
24252 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24253 if test "${cf_cv_type_of_bool+set}" = set; then
24254   echo $ECHO_N "(cached) $ECHO_C" >&6
24255 else
24256
24257         rm -f cf_test.out
24258         if test "$cross_compiling" = yes; then
24259   cf_cv_type_of_bool=unknown
24260 else
24261   cat >conftest.$ac_ext <<_ACEOF
24262 #line 24262 "configure"
24263 #include "confdefs.h"
24264
24265 #include <stdlib.h>
24266 #include <stdio.h>
24267
24268 #if defined(__cplusplus)
24269
24270 #ifdef HAVE_GXX_BUILTIN_H
24271 #include <g++/builtin.h>
24272 #elif HAVE_GPP_BUILTIN_H
24273 #include <gpp/builtin.h>
24274 #elif HAVE_BUILTIN_H
24275 #include <builtin.h>
24276 #endif
24277
24278 #else
24279
24280 #if $cf_cv_header_stdbool_h
24281 #include <stdbool.h>
24282 #endif
24283
24284 #endif
24285
24286 int main(void)
24287 {
24288         FILE *fp = fopen("cf_test.out", "w");
24289         if (fp != 0) {
24290                 bool x = true;
24291                 if ((bool)(-x) >= 0)
24292                         fputs("unsigned ", fp);
24293                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24294                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24295                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24296                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24297                 fclose(fp);
24298         }
24299         ${cf_cv_main_return:-return}(0);
24300 }
24301
24302 _ACEOF
24303 rm -f conftest$ac_exeext
24304 if { (eval echo "$as_me:24304: \"$ac_link\"") >&5
24305   (eval $ac_link) 2>&5
24306   ac_status=$?
24307   echo "$as_me:24307: \$? = $ac_status" >&5
24308   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24309   { (eval echo "$as_me:24309: \"$ac_try\"") >&5
24310   (eval $ac_try) 2>&5
24311   ac_status=$?
24312   echo "$as_me:24312: \$? = $ac_status" >&5
24313   (exit $ac_status); }; }; then
24314   cf_cv_type_of_bool=`cat cf_test.out`
24315                  if test -z "$cf_cv_type_of_bool"; then
24316                    cf_cv_type_of_bool=unknown
24317                  fi
24318 else
24319   echo "$as_me: program exited with status $ac_status" >&5
24320 echo "$as_me: failed program was:" >&5
24321 cat conftest.$ac_ext >&5
24322 cf_cv_type_of_bool=unknown
24323 fi
24324 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24325 fi
24326
24327 fi
24328
24329         rm -f cf_test.out
24330 echo "$as_me:24330: result: $cf_cv_type_of_bool" >&5
24331 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24332 if test "$cf_cv_type_of_bool" = unknown ; then
24333         case .$NCURSES_BOOL in
24334         (.auto|.) NCURSES_BOOL=unsigned;;
24335         esac
24336         { echo "$as_me:24336: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24337 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24338         cf_cv_type_of_bool=$NCURSES_BOOL
24339 fi
24340
24341 echo "$as_me:24341: checking for special defines needed for etip.h" >&5
24342 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24343 cf_save_CXXFLAGS="$CXXFLAGS"
24344 cf_result="none"
24345
24346 # etip.h includes ncurses.h which includes ncurses_dll.h
24347 # But ncurses_dll.h is generated - fix here.
24348 test -d include || mkdir include
24349 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
24350
24351 for cf_math in "" MATH_H
24352 do
24353 for cf_excp in "" MATH_EXCEPTION
24354 do
24355         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24356         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24357         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24358 cat >conftest.$ac_ext <<_ACEOF
24359 #line 24359 "configure"
24360 #include "confdefs.h"
24361
24362 #include <etip.h.in>
24363
24364 int
24365 main (void)
24366 {
24367
24368   ;
24369   return 0;
24370 }
24371 _ACEOF
24372 rm -f conftest.$ac_objext
24373 if { (eval echo "$as_me:24373: \"$ac_compile\"") >&5
24374   (eval $ac_compile) 2>&5
24375   ac_status=$?
24376   echo "$as_me:24376: \$? = $ac_status" >&5
24377   (exit $ac_status); } &&
24378          { ac_try='test -s conftest.$ac_objext'
24379   { (eval echo "$as_me:24379: \"$ac_try\"") >&5
24380   (eval $ac_try) 2>&5
24381   ac_status=$?
24382   echo "$as_me:24382: \$? = $ac_status" >&5
24383   (exit $ac_status); }; }; then
24384
24385         test -n "$cf_math" && cat >>confdefs.h <<EOF
24386 #define ETIP_NEEDS_${cf_math} 1
24387 EOF
24388
24389         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24390 #define ETIP_NEEDS_${cf_excp} 1
24391 EOF
24392
24393         cf_result="$cf_math $cf_excp"
24394         break 2
24395
24396 else
24397   echo "$as_me: failed program was:" >&5
24398 cat conftest.$ac_ext >&5
24399 fi
24400 rm -f conftest.$ac_objext conftest.$ac_ext
24401 done
24402 done
24403 echo "$as_me:24403: result: $cf_result" >&5
24404 echo "${ECHO_T}$cf_result" >&6
24405 CXXFLAGS="$cf_save_CXXFLAGS"
24406
24407 if test -n "$CXX"; then
24408 echo "$as_me:24408: checking if $CXX accepts parameter initialization" >&5
24409 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24410 if test "${cf_cv_cpp_param_init+set}" = set; then
24411   echo $ECHO_N "(cached) $ECHO_C" >&6
24412 else
24413
24414         ac_ext=cc
24415 ac_cpp='$CXXCPP $CPPFLAGS'
24416 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24417 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24418 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24419 ac_main_return=return
24420
24421         if test "$cross_compiling" = yes; then
24422   cf_cv_cpp_param_init=unknown
24423 else
24424   cat >conftest.$ac_ext <<_ACEOF
24425 #line 24425 "configure"
24426 #include "confdefs.h"
24427
24428 class TEST {
24429 private:
24430         int value;
24431 public:
24432         TEST(int x = 1);
24433         ~TEST();
24434 };
24435
24436 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24437 {
24438         value = x;
24439 }
24440 int main(void) { }
24441
24442 _ACEOF
24443 rm -f conftest$ac_exeext
24444 if { (eval echo "$as_me:24444: \"$ac_link\"") >&5
24445   (eval $ac_link) 2>&5
24446   ac_status=$?
24447   echo "$as_me:24447: \$? = $ac_status" >&5
24448   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24449   { (eval echo "$as_me:24449: \"$ac_try\"") >&5
24450   (eval $ac_try) 2>&5
24451   ac_status=$?
24452   echo "$as_me:24452: \$? = $ac_status" >&5
24453   (exit $ac_status); }; }; then
24454   cf_cv_cpp_param_init=yes
24455 else
24456   echo "$as_me: program exited with status $ac_status" >&5
24457 echo "$as_me: failed program was:" >&5
24458 cat conftest.$ac_ext >&5
24459 cf_cv_cpp_param_init=no
24460 fi
24461 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24462 fi
24463         ac_ext=cc
24464 ac_cpp='$CXXCPP $CPPFLAGS'
24465 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24466 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24467 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24468 ac_main_return=return
24469
24470 fi
24471 echo "$as_me:24471: result: $cf_cv_cpp_param_init" >&5
24472 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24473 fi
24474 test "$cf_cv_cpp_param_init" = yes &&
24475 cat >>confdefs.h <<\EOF
24476 #define CPP_HAS_PARAM_INIT 1
24477 EOF
24478
24479 if test -n "$CXX"; then
24480
24481 echo "$as_me:24481: checking if $CXX accepts static_cast" >&5
24482 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24483 if test "${cf_cv_cpp_static_cast+set}" = set; then
24484   echo $ECHO_N "(cached) $ECHO_C" >&6
24485 else
24486
24487         ac_ext=cc
24488 ac_cpp='$CXXCPP $CPPFLAGS'
24489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24492 ac_main_return=return
24493
24494         cat >conftest.$ac_ext <<_ACEOF
24495 #line 24495 "configure"
24496 #include "confdefs.h"
24497
24498 class NCursesPanel
24499 {
24500 public:
24501   NCursesPanel(int nlines,
24502                int ncols,
24503                int begin_y = 0,
24504                int begin_x = 0)
24505   {
24506   }
24507   NCursesPanel();
24508   ~NCursesPanel();
24509 };
24510
24511 template<class T> class NCursesUserPanel : public NCursesPanel
24512 {
24513 public:
24514   NCursesUserPanel (int nlines,
24515                     int ncols,
24516                     int begin_y = 0,
24517                     int begin_x = 0,
24518                     const T* p_UserData = static_cast<T*>(0))
24519     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24520   {
24521   };
24522   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24523   {
24524   };
24525
24526   virtual ~NCursesUserPanel() {};
24527 };
24528
24529 int
24530 main (void)
24531 {
24532
24533         const char* p_UserData = static_cast<char*>(0)
24534   ;
24535   return 0;
24536 }
24537 _ACEOF
24538 rm -f conftest.$ac_objext
24539 if { (eval echo "$as_me:24539: \"$ac_compile\"") >&5
24540   (eval $ac_compile) 2>&5
24541   ac_status=$?
24542   echo "$as_me:24542: \$? = $ac_status" >&5
24543   (exit $ac_status); } &&
24544          { ac_try='test -s conftest.$ac_objext'
24545   { (eval echo "$as_me:24545: \"$ac_try\"") >&5
24546   (eval $ac_try) 2>&5
24547   ac_status=$?
24548   echo "$as_me:24548: \$? = $ac_status" >&5
24549   (exit $ac_status); }; }; then
24550   cf_cv_cpp_static_cast=yes
24551 else
24552   echo "$as_me: failed program was:" >&5
24553 cat conftest.$ac_ext >&5
24554 cf_cv_cpp_static_cast=no
24555 fi
24556 rm -f conftest.$ac_objext conftest.$ac_ext
24557
24558         ac_ext=cc
24559 ac_cpp='$CXXCPP $CPPFLAGS'
24560 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24561 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24562 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24563 ac_main_return=return
24564
24565 fi
24566 echo "$as_me:24566: result: $cf_cv_cpp_static_cast" >&5
24567 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24568
24569 fi
24570
24571 test "$cf_cv_cpp_static_cast" = yes &&
24572 cat >>confdefs.h <<\EOF
24573 #define CPP_HAS_STATIC_CAST 1
24574 EOF
24575
24576         CXX_AR='$(AR)'
24577         CXX_ARFLAGS='$(ARFLAGS)'
24578         case $cf_cv_system_name in
24579         (irix*)
24580             if test "$GXX" != yes ; then
24581                 CXX_AR='$(CXX)'
24582                 CXX_ARFLAGS='-ar -o'
24583             fi
24584             ;;
24585         (sco3.2v5*)
24586             CXXLDFLAGS="-u main"
24587             ;;
24588         (solaris2*)
24589             if test "$GXX" != yes ; then
24590                 CXX_AR='$(CXX)'
24591                 CXX_ARFLAGS='-xar -o'
24592             fi
24593             ;;
24594         esac
24595
24596 else
24597         cf_cxx_library=no
24598         cf_cv_builtin_bool=1
24599
24600         # Just because we are not configuring against C++ right now does not
24601         # mean that a user will not want to use C++.  Some distributors disable
24602         # the C++ portion of this configuration as a shortcut (or just to avoid
24603         # compiling the demo in the c++ directory).  So we need a reasonable
24604         # default for the 'bool' type.
24605         #
24606         # Caveat: since the storage of the bool type is not standardized, it
24607         # may change.
24608
24609         if test "$NCURSES_BOOL" != auto ; then
24610                 cf_cv_type_of_bool=$NCURSES_BOOL
24611                 cf_cv_header_stdbool_h=0
24612         else
24613                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24614
24615 echo "$as_me:24615: checking for size of bool" >&5
24616 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24617 if test "${cf_cv_type_of_bool+set}" = set; then
24618   echo $ECHO_N "(cached) $ECHO_C" >&6
24619 else
24620
24621         rm -f cf_test.out
24622         if test "$cross_compiling" = yes; then
24623   cf_cv_type_of_bool=unknown
24624 else
24625   cat >conftest.$ac_ext <<_ACEOF
24626 #line 24626 "configure"
24627 #include "confdefs.h"
24628
24629 #include <stdlib.h>
24630 #include <stdio.h>
24631
24632 #if defined(__cplusplus)
24633
24634 #ifdef HAVE_GXX_BUILTIN_H
24635 #include <g++/builtin.h>
24636 #elif HAVE_GPP_BUILTIN_H
24637 #include <gpp/builtin.h>
24638 #elif HAVE_BUILTIN_H
24639 #include <builtin.h>
24640 #endif
24641
24642 #else
24643
24644 #if $cf_cv_header_stdbool_h
24645 #include <stdbool.h>
24646 #endif
24647
24648 #endif
24649
24650 int main(void)
24651 {
24652         FILE *fp = fopen("cf_test.out", "w");
24653         if (fp != 0) {
24654                 bool x = true;
24655                 if ((bool)(-x) >= 0)
24656                         fputs("unsigned ", fp);
24657                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24658                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24659                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24660                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24661                 fclose(fp);
24662         }
24663         ${cf_cv_main_return:-return}(0);
24664 }
24665
24666 _ACEOF
24667 rm -f conftest$ac_exeext
24668 if { (eval echo "$as_me:24668: \"$ac_link\"") >&5
24669   (eval $ac_link) 2>&5
24670   ac_status=$?
24671   echo "$as_me:24671: \$? = $ac_status" >&5
24672   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24673   { (eval echo "$as_me:24673: \"$ac_try\"") >&5
24674   (eval $ac_try) 2>&5
24675   ac_status=$?
24676   echo "$as_me:24676: \$? = $ac_status" >&5
24677   (exit $ac_status); }; }; then
24678   cf_cv_type_of_bool=`cat cf_test.out`
24679                  if test -z "$cf_cv_type_of_bool"; then
24680                    cf_cv_type_of_bool=unknown
24681                  fi
24682 else
24683   echo "$as_me: program exited with status $ac_status" >&5
24684 echo "$as_me: failed program was:" >&5
24685 cat conftest.$ac_ext >&5
24686 cf_cv_type_of_bool=unknown
24687 fi
24688 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24689 fi
24690
24691 fi
24692
24693         rm -f cf_test.out
24694 echo "$as_me:24694: result: $cf_cv_type_of_bool" >&5
24695 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24696 if test "$cf_cv_type_of_bool" = unknown ; then
24697         case .$NCURSES_BOOL in
24698         (.auto|.) NCURSES_BOOL=unsigned;;
24699         esac
24700         { echo "$as_me:24700: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24701 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24702         cf_cv_type_of_bool=$NCURSES_BOOL
24703 fi
24704
24705                 else
24706                         echo "$as_me:24706: checking for fallback type of bool" >&5
24707 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24708                         case "$host_cpu" in
24709                         (i?86)  cf_cv_type_of_bool=char ;;
24710                         (*)     cf_cv_type_of_bool=int  ;;
24711                         esac
24712                         echo "$as_me:24712: result: $cf_cv_type_of_bool" >&5
24713 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24714                 fi
24715         fi
24716 fi
24717
24718 # If the C compiler did not declare bool, and we did not determine that the C++
24719 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24720 # ncurses library use the same type as C++ bool.  Note that this allows one to
24721 # specify the type of bool in a configure-script option and postpone
24722 # integration with the C++ compiler provided that the types are compatible.
24723 USE_CXX_BOOL=1
24724 if test $cf_cv_cc_bool_type = 1
24725 then
24726         # oops: C has a bool.  Unlikely, but C++ could differ.
24727         USE_CXX_BOOL=0
24728 elif test $cf_cv_builtin_bool = 0
24729 then
24730         # C++ has no bool
24731         USE_CXX_BOOL=0
24732 else
24733         # this is the normal case
24734         USE_CXX_BOOL='defined(__cplusplus)'
24735 fi
24736
24737 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24738
24739         if test "$cf_with_ada" != "no" ; then
24740                 if test "$with_libtool" != "no"; then
24741                         { echo "$as_me:24741: WARNING: libtool does not support Ada - disabling feature" >&5
24742 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24743                         cf_with_ada=no
24744                 fi
24745         fi
24746
24747         if test "$cf_with_ada" != "no" ; then
24748
24749 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24750 do
24751
24752 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24753
24754         unset ac_cv_path_cf_TEMP_gnat
24755         unset cf_TEMP_gnat
24756         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24757 set dummy $cf_prog_gnat; ac_word=$2
24758 echo "$as_me:24758: checking for $ac_word" >&5
24759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24760 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24761   echo $ECHO_N "(cached) $ECHO_C" >&6
24762 else
24763   case $cf_TEMP_gnat in
24764   [\\/]* | ?:[\\/]*)
24765   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24766   ;;
24767   *)
24768   ac_save_IFS=$IFS; IFS=$ac_path_separator
24769 ac_dummy="$PATH"
24770 for ac_dir in $ac_dummy; do
24771   IFS=$ac_save_IFS
24772   test -z "$ac_dir" && ac_dir=.
24773   if $as_executable_p "$ac_dir/$ac_word"; then
24774    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24775    echo "$as_me:24775: found $ac_dir/$ac_word" >&5
24776    break
24777 fi
24778 done
24779
24780   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24781   ;;
24782 esac
24783 fi
24784 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24785
24786 if test -n "$cf_TEMP_gnat"; then
24787   echo "$as_me:24787: result: $cf_TEMP_gnat" >&5
24788 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24789 else
24790   echo "$as_me:24790: result: no" >&5
24791 echo "${ECHO_T}no" >&6
24792 fi
24793
24794         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24795
24796         if test "x$cf_TEMP_gnat" != xno; then
24797                 unset cf_cv_gnat_version
24798                 unset cf_TEMP_gnat
24799
24800 echo "$as_me:24800: checking for $cf_prog_gnat version" >&5
24801 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24802 if test "${cf_cv_gnat_version+set}" = set; then
24803   echo $ECHO_N "(cached) $ECHO_C" >&6
24804 else
24805
24806 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24807         grep '[0-9].[0-9][0-9]*' |\
24808         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24809
24810 fi
24811 echo "$as_me:24811: result: $cf_cv_gnat_version" >&5
24812 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24813 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24814 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24815
24816         fi
24817         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24818
24819         unset cf_TEMP_gnat
24820         unset cf_cv_gnat_version
24821         unset ac_cv_path_cf_TEMP_gnat
24822 done
24823
24824 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24825         cf_ada_make=
24826         cf_cv_prog_gnat_correct=no
24827 else
24828         cf_ada_make=gnatmake
24829         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24830                 # gprconfig is newer than gnatmake; we can continue...
24831                 cf_ada_config="##"
24832         else
24833                 rm -rf conftest* *~conftest*
24834                 if mkdir conftest.src
24835                 then
24836                         cf_ada_config=""
24837                         cd conftest.src
24838                         for cf_gprconfig in Ada C
24839                         do
24840                                 echo "$as_me:24840: checking for gprconfig name for $cf_gprconfig" >&5
24841 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24842                                 if test $cf_gprconfig = C
24843                                 then
24844                                         for cf_gprconfig_param in \
24845                                                 $cf_gprconfig,,,,GNATGCC \
24846                                                 $cf_gprconfig,,,,GCC \
24847                                                 $cf_gprconfig
24848                                         do
24849                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24850                                                 test -n "$cf_gprconfig_value" && break
24851                                         done
24852                                 else
24853                                         cf_gprconfig_param=$cf_gprconfig
24854                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24855                                 fi
24856                                 if test -n "$cf_gprconfig_value"
24857                                 then
24858                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24859                                         echo "$as_me:24859: result: $cf_gprconfig_value" >&5
24860 echo "${ECHO_T}$cf_gprconfig_value" >&6
24861                                 else
24862                                         echo "$as_me:24862: result: missing" >&5
24863 echo "${ECHO_T}missing" >&6
24864                                         cf_ada_config="#"
24865                                         break
24866                                 fi
24867                         done
24868                         cd ..
24869                         rm -rf conftest* *~conftest*
24870                 fi
24871         fi
24872         if test "x$cf_ada_config" != "x#"
24873         then
24874
24875 echo "$as_me:24875: checking for gnat version" >&5
24876 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24877 if test "${cf_cv_gnat_version+set}" = set; then
24878   echo $ECHO_N "(cached) $ECHO_C" >&6
24879 else
24880
24881 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24882         grep '[0-9].[0-9][0-9]*' |\
24883         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24884
24885 fi
24886 echo "$as_me:24886: result: $cf_cv_gnat_version" >&5
24887 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24888 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24889
24890 case $cf_cv_gnat_version in
24891 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24892         cf_cv_prog_gnat_correct=yes
24893         ;;
24894 (*)
24895         { echo "$as_me:24895: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24896 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24897         cf_cv_prog_gnat_correct=no
24898         ;;
24899 esac
24900
24901                 # Extract the first word of "m4", so it can be a program name with args.
24902 set dummy m4; ac_word=$2
24903 echo "$as_me:24903: checking for $ac_word" >&5
24904 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24905 if test "${ac_cv_prog_M4_exists+set}" = set; then
24906   echo $ECHO_N "(cached) $ECHO_C" >&6
24907 else
24908   if test -n "$M4_exists"; then
24909   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24910 else
24911   ac_save_IFS=$IFS; IFS=$ac_path_separator
24912 ac_dummy="$PATH"
24913 for ac_dir in $ac_dummy; do
24914   IFS=$ac_save_IFS
24915   test -z "$ac_dir" && ac_dir=.
24916   $as_executable_p "$ac_dir/$ac_word" || continue
24917 ac_cv_prog_M4_exists="yes"
24918 echo "$as_me:24918: found $ac_dir/$ac_word" >&5
24919 break
24920 done
24921
24922   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24923 fi
24924 fi
24925 M4_exists=$ac_cv_prog_M4_exists
24926 if test -n "$M4_exists"; then
24927   echo "$as_me:24927: result: $M4_exists" >&5
24928 echo "${ECHO_T}$M4_exists" >&6
24929 else
24930   echo "$as_me:24930: result: no" >&5
24931 echo "${ECHO_T}no" >&6
24932 fi
24933
24934                 if test "$ac_cv_prog_M4_exists" = no; then
24935                         cf_cv_prog_gnat_correct=no
24936                         { echo "$as_me:24936: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24937 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24938                 fi
24939                 if test "$cf_cv_prog_gnat_correct" = yes; then
24940                         echo "$as_me:24940: checking if GNAT works" >&5
24941 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24942
24943 rm -rf conftest* *~conftest*
24944 cat >>conftest.ads <<CF_EOF
24945 procedure conftest;
24946 CF_EOF
24947 cat >>conftest.adb <<CF_EOF
24948 with Text_IO;
24949 with GNAT.OS_Lib;
24950 procedure conftest is
24951 begin
24952    Text_IO.Put ("Hello World");
24953    Text_IO.New_Line;
24954    GNAT.OS_Lib.OS_Exit (0);
24955 end conftest;
24956 CF_EOF
24957 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24958    if ( ./conftest 1>&5 2>&1 ) ; then
24959       cf_cv_prog_gnat_correct=yes
24960    else
24961       cf_cv_prog_gnat_correct=no
24962    fi
24963 else
24964    cf_cv_prog_gnat_correct=no
24965 fi
24966 rm -rf conftest* *~conftest*
24967
24968                         echo "$as_me:24968: result: $cf_cv_prog_gnat_correct" >&5
24969 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24970                 fi
24971         else
24972                 cf_cv_prog_gnat_correct=no
24973         fi
24974 fi
24975
24976                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24977
24978         ADAFLAGS="$ADAFLAGS -gnatpn"
24979
24980         echo "$as_me:24980: checking optimization options for ADAFLAGS" >&5
24981 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24982         case "$CFLAGS" in
24983         (*-g*)
24984
24985         ADAFLAGS="$ADAFLAGS -g"
24986
24987                 ;;
24988         esac
24989         case "$CFLAGS" in
24990         (*-O*)
24991                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24992
24993         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24994
24995                 ;;
24996         esac
24997         echo "$as_me:24997: result: $ADAFLAGS" >&5
24998 echo "${ECHO_T}$ADAFLAGS" >&6
24999
25000 echo "$as_me:25000: checking if GNATPREP supports -T option" >&5
25001 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
25002 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
25003   echo $ECHO_N "(cached) $ECHO_C" >&6
25004 else
25005
25006 cf_cv_gnatprep_opt_t=no
25007 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
25008
25009 fi
25010 echo "$as_me:25010: result: $cf_cv_gnatprep_opt_t" >&5
25011 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
25012 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
25013
25014 echo "$as_me:25014: checking if GNAT supports generics" >&5
25015 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
25016 case $cf_cv_gnat_version in
25017 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
25018         cf_gnat_generics=yes
25019         ;;
25020 (*)
25021         cf_gnat_generics=no
25022         ;;
25023 esac
25024 echo "$as_me:25024: result: $cf_gnat_generics" >&5
25025 echo "${ECHO_T}$cf_gnat_generics" >&6
25026
25027 if test "$cf_gnat_generics" = yes
25028 then
25029         cf_compile_generics=generics
25030         cf_generic_objects="\${GENOBJS}"
25031 else
25032         cf_compile_generics=
25033         cf_generic_objects=
25034 fi
25035
25036 echo "$as_me:25036: checking if GNAT supports SIGINT" >&5
25037 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
25038 if test "${cf_cv_gnat_sigint+set}" = set; then
25039   echo $ECHO_N "(cached) $ECHO_C" >&6
25040 else
25041
25042 rm -rf conftest* *~conftest*
25043 cat >>conftest.ads <<CF_EOF
25044 with Ada.Interrupts.Names;
25045
25046 package ConfTest is
25047
25048    pragma Warnings (Off);  --  the next pragma exists since 3.11p
25049    pragma Unreserve_All_Interrupts;
25050    pragma Warnings (On);
25051
25052    protected Process is
25053       procedure Stop;
25054       function Continue return Boolean;
25055       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
25056    private
25057       Done : Boolean := False;
25058    end Process;
25059
25060 end ConfTest;
25061 CF_EOF
25062 cat >>conftest.adb <<CF_EOF
25063 package body ConfTest is
25064    protected body Process is
25065       procedure Stop is
25066       begin
25067          Done := True;
25068       end Stop;
25069       function Continue return Boolean is
25070       begin
25071          return not Done;
25072       end Continue;
25073    end Process;
25074 end ConfTest;
25075 CF_EOF
25076 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
25077       cf_cv_gnat_sigint=yes
25078 else
25079    cf_cv_gnat_sigint=no
25080 fi
25081 rm -rf conftest* *~conftest*
25082
25083 fi
25084 echo "$as_me:25084: result: $cf_cv_gnat_sigint" >&5
25085 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
25086
25087 if test $cf_cv_gnat_sigint = yes ; then
25088         USE_GNAT_SIGINT=""
25089 else
25090         USE_GNAT_SIGINT="#"
25091 fi
25092
25093 cf_gnat_libraries=no
25094 cf_gnat_projects=no
25095
25096 if test "$enable_gnat_projects" != no ; then
25097 echo "$as_me:25097: checking if GNAT supports project files" >&5
25098 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
25099 case $cf_cv_gnat_version in
25100 (3.[0-9]*)
25101         ;;
25102 (*)
25103         case $cf_cv_system_name in
25104         (cygwin*|msys*)
25105                 ;;
25106         (*)
25107                 rm -rf conftest* *~conftest*
25108                 if mkdir conftest.src conftest.bin conftest.lib
25109                 then
25110                         cd conftest.src
25111                         rm -rf conftest* *~conftest*
25112                         cat >>library.gpr <<CF_EOF
25113 project Library is
25114   Kind := External ("LIB_KIND");
25115   for Library_Name use "ConfTest";
25116   for Object_Dir use ".";
25117   for Library_ALI_Dir use External("LIBRARY_DIR");
25118   for Library_Version use External ("SONAME");
25119   for Library_Kind use Kind;
25120   for Library_Dir use External("BUILD_DIR");
25121   Source_Dir := External ("SOURCE_DIR");
25122   for Source_Dirs use (Source_Dir);
25123 end Library;
25124 CF_EOF
25125                         cat >>confpackage.ads <<CF_EOF
25126 package ConfPackage is
25127    procedure conftest;
25128 end ConfPackage;
25129 CF_EOF
25130                         cat >>confpackage.adb <<CF_EOF
25131 with Text_IO;
25132 package body ConfPackage is
25133    procedure conftest is
25134    begin
25135       Text_IO.Put ("Hello World");
25136       Text_IO.New_Line;
25137    end conftest;
25138 end ConfPackage;
25139 CF_EOF
25140                         if ( $cf_ada_make $ADAFLAGS \
25141                                         -Plibrary.gpr \
25142                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
25143                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
25144                                         -XSOURCE_DIR=`pwd` \
25145                                         -XSONAME=libConfTest.so.1 \
25146                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
25147                                 cf_gnat_projects=yes
25148                         fi
25149                         cd ..
25150                 fi
25151                 if test -f conftest.lib/confpackage.ali
25152                 then
25153                         cf_gnat_libraries=yes
25154                 fi
25155                 rm -rf conftest* *~conftest*
25156                 ;;
25157         esac
25158         ;;
25159 esac
25160 echo "$as_me:25160: result: $cf_gnat_projects" >&5
25161 echo "${ECHO_T}$cf_gnat_projects" >&6
25162 fi # enable_gnat_projects
25163
25164 if test $cf_gnat_projects = yes
25165 then
25166         echo "$as_me:25166: checking if GNAT supports libraries" >&5
25167 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25168         echo "$as_me:25168: result: $cf_gnat_libraries" >&5
25169 echo "${ECHO_T}$cf_gnat_libraries" >&6
25170 fi
25171
25172 if test "$cf_gnat_projects" = yes
25173 then
25174         USE_OLD_MAKERULES="#"
25175         USE_GNAT_PROJECTS=""
25176 else
25177         USE_OLD_MAKERULES=""
25178         USE_GNAT_PROJECTS="#"
25179 fi
25180
25181 if test "$cf_gnat_libraries" = yes
25182 then
25183         USE_GNAT_LIBRARIES=""
25184 else
25185         USE_GNAT_LIBRARIES="#"
25186 fi
25187
25188 echo "$as_me:25188: checking for ada-compiler" >&5
25189 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25190
25191 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25192 if test "${with_ada_compiler+set}" = set; then
25193   withval="$with_ada_compiler"
25194   cf_ada_compiler=$withval
25195 else
25196   cf_ada_compiler=gnatmake
25197 fi;
25198
25199 echo "$as_me:25199: result: $cf_ada_compiler" >&5
25200 echo "${ECHO_T}$cf_ada_compiler" >&6
25201
25202                         cf_ada_package=terminal_interface
25203
25204 echo "$as_me:25204: checking for ada-include" >&5
25205 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25206
25207 # Check whether --with-ada-include or --without-ada-include was given.
25208 if test "${with_ada_include+set}" = set; then
25209   withval="$with_ada_include"
25210
25211 else
25212   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25213 fi; if test -n "$prefix/share/ada/adainclude" ; then
25214
25215 if test "x$prefix" != xNONE; then
25216         cf_path_syntax="$prefix"
25217 else
25218         cf_path_syntax="$ac_default_prefix"
25219 fi
25220
25221 case ".$withval" in
25222 (.\$\(*\)*|.\'*\'*)
25223         ;;
25224 (..|./*|.\\*)
25225         ;;
25226 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25227         ;;
25228 (.\${*prefix}*|.\${*dir}*)
25229         eval withval="$withval"
25230         case ".$withval" in
25231         (.NONE/*)
25232                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25233                 ;;
25234         esac
25235         ;;
25236 (.no|.NONE/*)
25237         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25238         ;;
25239 (*)
25240         { { echo "$as_me:25240: error: expected a pathname, not \"$withval\"" >&5
25241 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25242    { (exit 1); exit 1; }; }
25243         ;;
25244 esac
25245
25246 fi
25247 eval ADA_INCLUDE="$withval"
25248
25249 echo "$as_me:25249: result: $ADA_INCLUDE" >&5
25250 echo "${ECHO_T}$ADA_INCLUDE" >&6
25251
25252 echo "$as_me:25252: checking for ada-objects" >&5
25253 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25254
25255 # Check whether --with-ada-objects or --without-ada-objects was given.
25256 if test "${with_ada_objects+set}" = set; then
25257   withval="$with_ada_objects"
25258
25259 else
25260   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25261 fi; if test -n "$prefix/lib/ada/adalib" ; then
25262
25263 if test "x$prefix" != xNONE; then
25264         cf_path_syntax="$prefix"
25265 else
25266         cf_path_syntax="$ac_default_prefix"
25267 fi
25268
25269 case ".$withval" in
25270 (.\$\(*\)*|.\'*\'*)
25271         ;;
25272 (..|./*|.\\*)
25273         ;;
25274 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25275         ;;
25276 (.\${*prefix}*|.\${*dir}*)
25277         eval withval="$withval"
25278         case ".$withval" in
25279         (.NONE/*)
25280                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25281                 ;;
25282         esac
25283         ;;
25284 (.no|.NONE/*)
25285         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25286         ;;
25287 (*)
25288         { { echo "$as_me:25288: error: expected a pathname, not \"$withval\"" >&5
25289 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25290    { (exit 1); exit 1; }; }
25291         ;;
25292 esac
25293
25294 fi
25295 eval ADA_OBJECTS="$withval"
25296
25297 echo "$as_me:25297: result: $ADA_OBJECTS" >&5
25298 echo "${ECHO_T}$ADA_OBJECTS" >&6
25299
25300 echo "$as_me:25300: checking if an Ada95 shared-library should be built" >&5
25301 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25302
25303 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25304 if test "${with_ada_sharedlib+set}" = set; then
25305   withval="$with_ada_sharedlib"
25306   with_ada_sharedlib=$withval
25307 else
25308   with_ada_sharedlib=no
25309 fi;
25310 echo "$as_me:25310: result: $with_ada_sharedlib" >&5
25311 echo "${ECHO_T}$with_ada_sharedlib" >&6
25312
25313 if test "x$with_ada_sharedlib" != xno
25314 then
25315         if test "x$cf_gnat_projects" != xyes
25316         then
25317                 { echo "$as_me:25317: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25318 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25319                 with_ada_sharedlib=no
25320         fi
25321 fi
25322
25323 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25324 MAKE_ADA_SHAREDLIB="#"
25325
25326 if test "x$with_ada_sharedlib" != xno
25327 then
25328         MAKE_ADA_SHAREDLIB=
25329         if test "x$with_ada_sharedlib" != xyes
25330         then
25331                 ADA_SHAREDLIB="$with_ada_sharedlib"
25332         fi
25333 fi
25334
25335                         # allow the Ada binding to be renamed
25336
25337 echo "$as_me:25337: checking for ada-libname" >&5
25338 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25339
25340 # Check whether --with-ada-libname or --without-ada-libname was given.
25341 if test "${with_ada_libname+set}" = set; then
25342   withval="$with_ada_libname"
25343   ADA_LIBNAME=$withval
25344 else
25345   ADA_LIBNAME=AdaCurses
25346 fi;
25347 case "x$ADA_LIBNAME" in
25348 (x|xyes|xno)
25349         ADA_LIBNAME=AdaCurses
25350         ;;
25351 esac
25352
25353 echo "$as_me:25353: result: $ADA_LIBNAME" >&5
25354 echo "${ECHO_T}$ADA_LIBNAME" >&6
25355
25356                 fi
25357         fi
25358 else
25359         cf_with_ada=no
25360 fi
25361
25362 # do this "late" to avoid conflict with header-checks
25363 if test "x$with_widec" = xyes ; then
25364         echo "$as_me:25364: checking for wchar_t" >&5
25365 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25366 if test "${ac_cv_type_wchar_t+set}" = set; then
25367   echo $ECHO_N "(cached) $ECHO_C" >&6
25368 else
25369   cat >conftest.$ac_ext <<_ACEOF
25370 #line 25370 "configure"
25371 #include "confdefs.h"
25372 $ac_includes_default
25373 int
25374 main (void)
25375 {
25376 if ((wchar_t *) 0)
25377   return 0;
25378 if (sizeof (wchar_t))
25379   return 0;
25380   ;
25381   return 0;
25382 }
25383 _ACEOF
25384 rm -f conftest.$ac_objext
25385 if { (eval echo "$as_me:25385: \"$ac_compile\"") >&5
25386   (eval $ac_compile) 2>&5
25387   ac_status=$?
25388   echo "$as_me:25388: \$? = $ac_status" >&5
25389   (exit $ac_status); } &&
25390          { ac_try='test -s conftest.$ac_objext'
25391   { (eval echo "$as_me:25391: \"$ac_try\"") >&5
25392   (eval $ac_try) 2>&5
25393   ac_status=$?
25394   echo "$as_me:25394: \$? = $ac_status" >&5
25395   (exit $ac_status); }; }; then
25396   ac_cv_type_wchar_t=yes
25397 else
25398   echo "$as_me: failed program was:" >&5
25399 cat conftest.$ac_ext >&5
25400 ac_cv_type_wchar_t=no
25401 fi
25402 rm -f conftest.$ac_objext conftest.$ac_ext
25403 fi
25404 echo "$as_me:25404: result: $ac_cv_type_wchar_t" >&5
25405 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25406
25407 echo "$as_me:25407: checking size of wchar_t" >&5
25408 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25409 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25410   echo $ECHO_N "(cached) $ECHO_C" >&6
25411 else
25412   if test "$ac_cv_type_wchar_t" = yes; then
25413   if test "$cross_compiling" = yes; then
25414   # Depending upon the size, compute the lo and hi bounds.
25415 cat >conftest.$ac_ext <<_ACEOF
25416 #line 25416 "configure"
25417 #include "confdefs.h"
25418 $ac_includes_default
25419 int
25420 main (void)
25421 {
25422 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25423   ;
25424   return 0;
25425 }
25426 _ACEOF
25427 rm -f conftest.$ac_objext
25428 if { (eval echo "$as_me:25428: \"$ac_compile\"") >&5
25429   (eval $ac_compile) 2>&5
25430   ac_status=$?
25431   echo "$as_me:25431: \$? = $ac_status" >&5
25432   (exit $ac_status); } &&
25433          { ac_try='test -s conftest.$ac_objext'
25434   { (eval echo "$as_me:25434: \"$ac_try\"") >&5
25435   (eval $ac_try) 2>&5
25436   ac_status=$?
25437   echo "$as_me:25437: \$? = $ac_status" >&5
25438   (exit $ac_status); }; }; then
25439   ac_lo=0 ac_mid=0
25440   while :; do
25441     cat >conftest.$ac_ext <<_ACEOF
25442 #line 25442 "configure"
25443 #include "confdefs.h"
25444 $ac_includes_default
25445 int
25446 main (void)
25447 {
25448 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25449   ;
25450   return 0;
25451 }
25452 _ACEOF
25453 rm -f conftest.$ac_objext
25454 if { (eval echo "$as_me:25454: \"$ac_compile\"") >&5
25455   (eval $ac_compile) 2>&5
25456   ac_status=$?
25457   echo "$as_me:25457: \$? = $ac_status" >&5
25458   (exit $ac_status); } &&
25459          { ac_try='test -s conftest.$ac_objext'
25460   { (eval echo "$as_me:25460: \"$ac_try\"") >&5
25461   (eval $ac_try) 2>&5
25462   ac_status=$?
25463   echo "$as_me:25463: \$? = $ac_status" >&5
25464   (exit $ac_status); }; }; then
25465   ac_hi=$ac_mid; break
25466 else
25467   echo "$as_me: failed program was:" >&5
25468 cat conftest.$ac_ext >&5
25469 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25470 fi
25471 rm -f conftest.$ac_objext conftest.$ac_ext
25472   done
25473 else
25474   echo "$as_me: failed program was:" >&5
25475 cat conftest.$ac_ext >&5
25476 ac_hi=-1 ac_mid=-1
25477   while :; do
25478     cat >conftest.$ac_ext <<_ACEOF
25479 #line 25479 "configure"
25480 #include "confdefs.h"
25481 $ac_includes_default
25482 int
25483 main (void)
25484 {
25485 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25486   ;
25487   return 0;
25488 }
25489 _ACEOF
25490 rm -f conftest.$ac_objext
25491 if { (eval echo "$as_me:25491: \"$ac_compile\"") >&5
25492   (eval $ac_compile) 2>&5
25493   ac_status=$?
25494   echo "$as_me:25494: \$? = $ac_status" >&5
25495   (exit $ac_status); } &&
25496          { ac_try='test -s conftest.$ac_objext'
25497   { (eval echo "$as_me:25497: \"$ac_try\"") >&5
25498   (eval $ac_try) 2>&5
25499   ac_status=$?
25500   echo "$as_me:25500: \$? = $ac_status" >&5
25501   (exit $ac_status); }; }; then
25502   ac_lo=$ac_mid; break
25503 else
25504   echo "$as_me: failed program was:" >&5
25505 cat conftest.$ac_ext >&5
25506 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25507 fi
25508 rm -f conftest.$ac_objext conftest.$ac_ext
25509   done
25510 fi
25511 rm -f conftest.$ac_objext conftest.$ac_ext
25512 # Binary search between lo and hi bounds.
25513 while test "x$ac_lo" != "x$ac_hi"; do
25514   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25515   cat >conftest.$ac_ext <<_ACEOF
25516 #line 25516 "configure"
25517 #include "confdefs.h"
25518 $ac_includes_default
25519 int
25520 main (void)
25521 {
25522 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25523   ;
25524   return 0;
25525 }
25526 _ACEOF
25527 rm -f conftest.$ac_objext
25528 if { (eval echo "$as_me:25528: \"$ac_compile\"") >&5
25529   (eval $ac_compile) 2>&5
25530   ac_status=$?
25531   echo "$as_me:25531: \$? = $ac_status" >&5
25532   (exit $ac_status); } &&
25533          { ac_try='test -s conftest.$ac_objext'
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_hi=$ac_mid
25540 else
25541   echo "$as_me: failed program was:" >&5
25542 cat conftest.$ac_ext >&5
25543 ac_lo=`expr $ac_mid + 1`
25544 fi
25545 rm -f conftest.$ac_objext conftest.$ac_ext
25546 done
25547 ac_cv_sizeof_wchar_t=$ac_lo
25548 else
25549   if test "$cross_compiling" = yes; then
25550   { { echo "$as_me:25550: error: cannot run test program while cross compiling" >&5
25551 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25552    { (exit 1); exit 1; }; }
25553 else
25554   cat >conftest.$ac_ext <<_ACEOF
25555 #line 25555 "configure"
25556 #include "confdefs.h"
25557 $ac_includes_default
25558 int
25559 main (void)
25560 {
25561 FILE *f = fopen ("conftest.val", "w");
25562 if (!f)
25563   $ac_main_return (1);
25564 fprintf (f, "%d", (sizeof (wchar_t)));
25565 fclose (f);
25566   ;
25567   return 0;
25568 }
25569 _ACEOF
25570 rm -f conftest$ac_exeext
25571 if { (eval echo "$as_me:25571: \"$ac_link\"") >&5
25572   (eval $ac_link) 2>&5
25573   ac_status=$?
25574   echo "$as_me:25574: \$? = $ac_status" >&5
25575   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25576   { (eval echo "$as_me:25576: \"$ac_try\"") >&5
25577   (eval $ac_try) 2>&5
25578   ac_status=$?
25579   echo "$as_me:25579: \$? = $ac_status" >&5
25580   (exit $ac_status); }; }; then
25581   ac_cv_sizeof_wchar_t=`cat conftest.val`
25582 else
25583   echo "$as_me: program exited with status $ac_status" >&5
25584 echo "$as_me: failed program was:" >&5
25585 cat conftest.$ac_ext >&5
25586 fi
25587 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25588 fi
25589 fi
25590 rm -f conftest.val
25591 else
25592   ac_cv_sizeof_wchar_t=0
25593 fi
25594 fi
25595 echo "$as_me:25595: result: $ac_cv_sizeof_wchar_t" >&5
25596 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25597 cat >>confdefs.h <<EOF
25598 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25599 EOF
25600
25601         # cross-compiling to mingw can run into the problem that attempting to
25602         # link with the regex library fails, causing the test to not set this to
25603         # a number.  "recent" autoconf does not address this problem either -TD
25604         if test -z "$ac_cv_sizeof_wchar_t"
25605         then
25606                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25607
25608 echo "${as_me:-configure}:25608: testing test failed (assume 2) ..." 1>&5
25609
25610                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25611                 mv confdefs.tmp confdefs.h
25612                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25613         fi
25614 fi
25615
25616 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25617 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25618 ###
25619 ### ticlib modules may be a separate library, otherwise contained in termlib.
25620 ### termlib modules may be a separate library, otherwise contained in ncurses.
25621 ###
25622 ### The of "+" or " " between the tokens controls the way the script
25623 ### chooses to split module lists into libraries.
25624 ###
25625 ### (see CF_LIB_RULES).
25626 echo "$as_me:25626: checking for library subsets" >&5
25627 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25628 LIB_SUBSETS=
25629
25630 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25631         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25632         if test "$with_ticlib" != no ; then
25633                 LIB_SUBSETS="${LIB_SUBSETS} "
25634         else
25635                 LIB_SUBSETS="${LIB_SUBSETS}+"
25636         fi
25637 fi
25638
25639 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25640 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25641
25642 if test "$with_termlib" != no ; then
25643         LIB_SUBSETS="${LIB_SUBSETS} "
25644 else
25645         LIB_SUBSETS="${LIB_SUBSETS}+"
25646 fi
25647
25648 LIB_SUBSETS="${LIB_SUBSETS}base"
25649
25650 # Most term-driver calls are to tinfo, but some like init_pair are to the
25651 # base library (so it resides in base).
25652 if test "$with_term_driver" != no ; then
25653         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25654         case $cf_cv_system_name in
25655         (*mingw32*|*mingw64*)
25656                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25657                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25658                 ;;
25659         (*)
25660                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25661                 ;;
25662         esac
25663 fi
25664
25665 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25666 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25667
25668 echo "$as_me:25668: result: $LIB_SUBSETS" >&5
25669 echo "${ECHO_T}$LIB_SUBSETS" >&6
25670
25671 ### Construct the list of include-directories to be generated
25672
25673 if test "$srcdir" != "."; then
25674         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25675 fi
25676 CPPFLAGS="-I../include $CPPFLAGS"
25677 if test "$srcdir" != "."; then
25678         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25679 fi
25680 CPPFLAGS="-I. $CPPFLAGS"
25681
25682 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25683 if test "$srcdir" != "."; then
25684         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25685 fi
25686 if test "$GCC" != yes; then
25687         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25688 elif test "$includedir" != "/usr/include"; then
25689         if test "$includedir" = '${prefix}/include' ; then
25690                 if test x$prefix != x/usr ; then
25691                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25692                 fi
25693         else
25694                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25695         fi
25696 fi
25697
25698 ### Build up pieces for makefile rules
25699 echo "$as_me:25699: checking default library suffix" >&5
25700 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25701
25702         case $DFT_LWR_MODEL in
25703         (libtool) DFT_ARG_SUFFIX=''   ;;
25704         (normal)  DFT_ARG_SUFFIX=''   ;;
25705         (debug)   DFT_ARG_SUFFIX='_g' ;;
25706         (profile) DFT_ARG_SUFFIX='_p' ;;
25707         (shared)  DFT_ARG_SUFFIX=''   ;;
25708         esac
25709         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25710 echo "$as_me:25710: result: $DFT_ARG_SUFFIX" >&5
25711 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25712
25713 echo "$as_me:25713: checking default library-dependency suffix" >&5
25714 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25715
25716         case X$DFT_LWR_MODEL in
25717         (Xlibtool)
25718                 DFT_LIB_SUFFIX='.la'
25719                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25720                 ;;
25721         (Xdebug)
25722                 case $cf_cv_system_name in
25723                 (*-msvc*)
25724                         DFT_LIB_SUFFIX='_g.lib'
25725                         ;;
25726                 (*)
25727                         DFT_LIB_SUFFIX='_g.a'
25728                         ;;
25729                 esac
25730                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25731                 ;;
25732         (Xprofile)
25733                 case $cf_cv_system_name in
25734                 (*-msvc*)
25735                         DFT_LIB_SUFFIX='_p.lib'
25736                         ;;
25737                 (*)
25738                         DFT_LIB_SUFFIX='_p.a'
25739                         ;;
25740                 esac
25741                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25742                 ;;
25743         (Xshared)
25744                 case $cf_cv_system_name in
25745                 (aix[5-7]*)
25746                         DFT_LIB_SUFFIX='.so'
25747                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25748                         ;;
25749                 (*-msvc*)
25750                         DFT_LIB_SUFFIX='.dll'
25751                         DFT_DEP_SUFFIX='.dll.lib'
25752                         ;;
25753                 (cygwin*|msys*|mingw*)
25754                         DFT_LIB_SUFFIX='.dll'
25755                         DFT_DEP_SUFFIX='.dll.a'
25756                         ;;
25757                 (darwin*)
25758                         DFT_LIB_SUFFIX='.dylib'
25759                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25760                         ;;
25761                 (hpux*)
25762                         case $target in
25763                         (ia64*)
25764                                 DFT_LIB_SUFFIX='.so'
25765                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25766                                 ;;
25767                         (*)
25768                                 DFT_LIB_SUFFIX='.sl'
25769                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25770                                 ;;
25771                         esac
25772                         ;;
25773                 (*)
25774                         DFT_LIB_SUFFIX='.so'
25775                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25776                         ;;
25777                 esac
25778                 ;;
25779         (*)
25780                 case $target in
25781                 (*-msvc*)
25782                         DFT_LIB_SUFFIX='.lib'
25783                         ;;
25784                 (*)
25785                         DFT_LIB_SUFFIX='.a'
25786                         ;;
25787                 esac
25788                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25789                 ;;
25790         esac
25791         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25792         then
25793                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25794                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25795         fi
25796 echo "$as_me:25796: result: $DFT_DEP_SUFFIX" >&5
25797 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25798
25799 echo "$as_me:25799: checking default object directory" >&5
25800 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25801
25802         case $DFT_LWR_MODEL in
25803         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25804         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25805         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25806         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25807         (shared)
25808                 case $cf_cv_system_name in
25809                 (cygwin|msys)
25810                         DFT_OBJ_SUBDIR='objects' ;;
25811                 (*)
25812                         DFT_OBJ_SUBDIR='obj_s' ;;
25813                 esac
25814         esac
25815 echo "$as_me:25815: result: $DFT_OBJ_SUBDIR" >&5
25816 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25817
25818 if test "x$cf_with_cxx" = xyes ; then
25819 echo "$as_me:25819: checking c++ library-dependency suffix" >&5
25820 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25821 if test "$with_libtool" != "no"; then
25822         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25823         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25824 elif test "$with_shared_cxx" != "no"; then
25825         # also for g++ users...
25826         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25827 else
25828         # we normally make a static library because C/C++ library rules differ
25829
25830         case Xnormal in
25831         (Xlibtool)
25832                 CXX_LIB_SUFFIX='.la'
25833                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25834                 ;;
25835         (Xdebug)
25836                 case $cf_cv_system_name in
25837                 (*-msvc*)
25838                         CXX_LIB_SUFFIX='_g.lib'
25839                         ;;
25840                 (*)
25841                         CXX_LIB_SUFFIX='_g.a'
25842                         ;;
25843                 esac
25844                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25845                 ;;
25846         (Xprofile)
25847                 case $cf_cv_system_name in
25848                 (*-msvc*)
25849                         CXX_LIB_SUFFIX='_p.lib'
25850                         ;;
25851                 (*)
25852                         CXX_LIB_SUFFIX='_p.a'
25853                         ;;
25854                 esac
25855                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25856                 ;;
25857         (Xshared)
25858                 case $cf_cv_system_name in
25859                 (aix[5-7]*)
25860                         CXX_LIB_SUFFIX='.so'
25861                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25862                         ;;
25863                 (*-msvc*)
25864                         CXX_LIB_SUFFIX='.dll'
25865                         CXX_DEP_SUFFIX='.dll.lib'
25866                         ;;
25867                 (cygwin*|msys*|mingw*)
25868                         CXX_LIB_SUFFIX='.dll'
25869                         CXX_DEP_SUFFIX='.dll.a'
25870                         ;;
25871                 (darwin*)
25872                         CXX_LIB_SUFFIX='.dylib'
25873                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25874                         ;;
25875                 (hpux*)
25876                         case $target in
25877                         (ia64*)
25878                                 CXX_LIB_SUFFIX='.so'
25879                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25880                                 ;;
25881                         (*)
25882                                 CXX_LIB_SUFFIX='.sl'
25883                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25884                                 ;;
25885                         esac
25886                         ;;
25887                 (*)
25888                         CXX_LIB_SUFFIX='.so'
25889                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25890                         ;;
25891                 esac
25892                 ;;
25893         (*)
25894                 case $target in
25895                 (*-msvc*)
25896                         CXX_LIB_SUFFIX='.lib'
25897                         ;;
25898                 (*)
25899                         CXX_LIB_SUFFIX='.a'
25900                         ;;
25901                 esac
25902                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25903                 ;;
25904         esac
25905         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25906         then
25907                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25908                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25909         fi
25910
25911 fi
25912 echo "$as_me:25912: result: $CXX_LIB_SUFFIX" >&5
25913 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25914
25915 fi
25916
25917 # do not want -ldl in build except as needed for -lncurses dependency
25918 if test "x$with_dlsym" = xyes ; then
25919 if test $DFT_LWR_MODEL = shared || \
25920    test $DFT_LWR_MODEL = libtool ; then
25921
25922 # remove dl library from $LIBS
25923 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25924
25925 fi
25926 fi
25927 ### Set up low-level terminfo dependencies for makefiles.
25928
25929 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25930 # do not need libdl
25931 TICS_LIST=
25932 if test "x$with_dlsym" = xyes ; then
25933
25934 # remove dl library from $SHLIB_LIST
25935 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25936
25937 fi
25938
25939 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25940 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25941 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25942 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25943 then
25944         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25945 fi
25946
25947 if test "$with_ticlib" != no ; then
25948
25949         if test "x$with_ticlib" != xyes ; then
25950                 TICS_NAME=$with_ticlib
25951                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25952                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25953                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25954                 TICS_LIB_SUFFIX="${with_ticlib}"
25955         else
25956                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25957                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25958                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25959                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25960         fi
25961         TICS_LDFLAGS="-L${LIB_DIR}"
25962         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25963 else
25964         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25965         TICS_LDFLAGS="-L${LIB_DIR}"
25966         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25967 fi
25968
25969 if test "$with_termlib" != no ; then
25970
25971         if test "x$with_termlib" != xyes ; then
25972                 TINFO_NAME=$with_termlib
25973                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25974                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25975                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25976                 TINFO_LIB_SUFFIX="${with_termlib}"
25977         else
25978                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25979                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25980                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25981                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25982         fi
25983
25984         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25985         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25986         if test "$DFT_LWR_MODEL" = "libtool"; then
25987                 TEST_ARGS="${TEST_DEPS}"
25988                 TEST_ARG2="${TEST_DEP2}"
25989                 TINFO_LDFLAGS="-L${LIB_DIR}"
25990                 TINFO_LIBS="$TEST_ARGS"
25991                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25992                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25993         else
25994                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25995                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25996                 if test "x$with_term_driver" != xno ; then
25997                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25998                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25999                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26000                 else
26001                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
26002                         TINFO_LIBS="$TEST_ARGS"
26003                 fi
26004                 TINFO_LDFLAGS="-L${LIB_DIR}"
26005                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
26006         fi
26007 else
26008         # the next lines are needed for linking libtic over libncurses
26009         TINFO_NAME=${LIB_NAME}
26010         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
26011         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
26012         if test "x$with_tic_depends" = xyes ; then
26013                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
26014         else
26015                 TICS_LIST="$SHLIB_LIST"
26016         fi
26017
26018         TINFO_LDFLAGS="-L${LIB_DIR}"
26019         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
26020 fi
26021
26022 if test "$DFT_LWR_MODEL" = shared ; then
26023         case $cf_cv_system_name in
26024         (cygwin*|msys*)
26025                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
26026                 TINFO_SUFFIX=.dll
26027                 ;;
26028         esac
26029 fi
26030
26031 if test "x$with_dlsym" = xyes ; then
26032
26033 # remove dl library from $TICS_LIST
26034 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
26035
26036 fi
26037
26038 if test "$DFT_LWR_MODEL" = "libtool"; then
26039         OBJEXT=lo
26040 fi
26041
26042 # needed for Ada95
26043 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
26044
26045 case $DFT_LWR_MODEL in
26046 (normal|debug|profile)
26047
26048 if test "$GCC" = yes ; then
26049         case $cf_cv_system_name in
26050         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
26051                 LDFLAGS_STATIC=
26052                 LDFLAGS_SHARED=
26053                 ;;
26054         (*)     # normally, except when broken
26055                 LDFLAGS_STATIC=-static
26056                 LDFLAGS_SHARED=-dynamic
26057                 ;;
26058         esac
26059 else
26060         case $cf_cv_system_name in
26061         (aix[4-7]*)     # from ld manpage
26062                 LDFLAGS_STATIC=-bstatic
26063                 LDFLAGS_SHARED=-bdynamic
26064                 ;;
26065         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
26066                 # We could also use just "archive" and "shared".
26067                 LDFLAGS_STATIC=-Wl,-a,archive_shared
26068                 LDFLAGS_SHARED=-Wl,-a,shared_archive
26069                 ;;
26070         (irix*)         # from ld manpage IRIX64
26071                 LDFLAGS_STATIC=-Bstatic
26072                 LDFLAGS_SHARED=-Bdynamic
26073                 ;;
26074         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
26075                 # alternative "-oldstyle_liblookup" (not in cc manpage)
26076                 LDFLAGS_STATIC=-noso
26077                 LDFLAGS_SHARED=-so_archive
26078                 ;;
26079         (solaris2*)
26080                 LDFLAGS_STATIC=-Bstatic
26081                 LDFLAGS_SHARED=-Bdynamic
26082                 ;;
26083         esac
26084 fi
26085
26086 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
26087 then
26088         echo "$as_me:26088: checking if linker supports switching between static/dynamic" >&5
26089 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
26090
26091         rm -f libconftest.a
26092         cat >conftest.$ac_ext <<EOF
26093 #line 26093 "configure"
26094 #include <stdio.h>
26095 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
26096 EOF
26097         if { (eval echo "$as_me:26097: \"$ac_compile\"") >&5
26098   (eval $ac_compile) 2>&5
26099   ac_status=$?
26100   echo "$as_me:26100: \$? = $ac_status" >&5
26101   (exit $ac_status); } ; then
26102                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
26103                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
26104         fi
26105         rm -f conftest.*
26106
26107         cf_save_LIBS="$LIBS"
26108
26109         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
26110         cat >conftest.$ac_ext <<_ACEOF
26111 #line 26111 "configure"
26112 #include "confdefs.h"
26113
26114 #line 26114 "configure"
26115 #include <stdio.h>
26116 int cf_ldflags_static(FILE *fp);
26117
26118 int
26119 main (void)
26120 {
26121
26122         return cf_ldflags_static(stdin);
26123
26124   ;
26125   return 0;
26126 }
26127 _ACEOF
26128 rm -f conftest.$ac_objext conftest$ac_exeext
26129 if { (eval echo "$as_me:26129: \"$ac_link\"") >&5
26130   (eval $ac_link) 2>&5
26131   ac_status=$?
26132   echo "$as_me:26132: \$? = $ac_status" >&5
26133   (exit $ac_status); } &&
26134          { ac_try='test -s conftest$ac_exeext'
26135   { (eval echo "$as_me:26135: \"$ac_try\"") >&5
26136   (eval $ac_try) 2>&5
26137   ac_status=$?
26138   echo "$as_me:26138: \$? = $ac_status" >&5
26139   (exit $ac_status); }; }; then
26140
26141         # some linkers simply ignore the -dynamic
26142         case x`file conftest$ac_exeext 2>/dev/null` in
26143         (*static*)
26144                 cf_ldflags_static=no
26145                 ;;
26146         (*)
26147                 cf_ldflags_static=yes
26148                 ;;
26149         esac
26150
26151 else
26152   echo "$as_me: failed program was:" >&5
26153 cat conftest.$ac_ext >&5
26154 cf_ldflags_static=no
26155 fi
26156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26157
26158         rm -f libconftest.*
26159         LIBS="$cf_save_LIBS"
26160
26161         echo "$as_me:26161: result: $cf_ldflags_static" >&5
26162 echo "${ECHO_T}$cf_ldflags_static" >&6
26163
26164         if test $cf_ldflags_static != yes
26165         then
26166                 LDFLAGS_STATIC=
26167                 LDFLAGS_SHARED=
26168         fi
26169 else
26170         LDFLAGS_STATIC=
26171         LDFLAGS_SHARED=
26172 fi
26173
26174         ;;
26175 esac
26176
26177 echo "$as_me:26177: checking where we will install curses.h" >&5
26178 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26179
26180 includesubdir=
26181 if test "$with_overwrite" = no && \
26182  ( test "x$includedir" = 'x${prefix}/include' || \
26183    test "x$includedir" = "x${prefix}/include" )
26184 then
26185         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26186 fi
26187 echo "$as_me:26187: result: ${includedir}${includesubdir}" >&5
26188 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26189
26190 ### Resolve a conflict between normal and wide-curses by forcing applications
26191 ### that will need libutf8 to add it to their configure script.
26192 if test "$with_overwrite" != no ; then
26193 if test "$NCURSES_LIBUTF8" = 1 ; then
26194         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26195         { echo "$as_me:26195: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26196 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26197 fi
26198 fi
26199 WITH_OVERWRITE=$with_overwrite
26200
26201 ### At least on MinGW a shared library build without libtool
26202 ### requires adding the additional libs to the link list.
26203 case $cf_cv_system_name in
26204 (*mingw32*|*mingw64*)
26205         if test "$DFT_LWR_MODEL" != "libtool"; then
26206            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
26207         fi
26208         ;;
26209 *)      ;;
26210 esac
26211
26212 # used to separate tack out of the tree
26213 NCURSES_TREE=
26214
26215 ### predefined stuff for the test programs
26216
26217 cat >>confdefs.h <<\EOF
26218 #define HAVE_SLK_COLOR 1
26219 EOF
26220
26221 # pkgsrc uses these
26222
26223 echo "$as_me:26223: checking for desired basename for form library" >&5
26224 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26225
26226 # Check whether --with-form-libname or --without-form-libname was given.
26227 if test "${with_form_libname+set}" = set; then
26228   withval="$with_form_libname"
26229   with_lib_basename=$withval
26230 else
26231   with_lib_basename=form
26232 fi;
26233 FORM_NAME="$with_lib_basename"
26234
26235 case "x$FORM_NAME" in
26236 (x|xno|xnone|xyes)
26237         FORM_NAME=form
26238         ;;
26239 (*)
26240         ;;
26241 esac
26242
26243 echo "$as_me:26243: result: $FORM_NAME" >&5
26244 echo "${ECHO_T}$FORM_NAME" >&6
26245
26246 echo "$as_me:26246: checking for desired basename for menu library" >&5
26247 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26248
26249 # Check whether --with-menu-libname or --without-menu-libname was given.
26250 if test "${with_menu_libname+set}" = set; then
26251   withval="$with_menu_libname"
26252   with_lib_basename=$withval
26253 else
26254   with_lib_basename=menu
26255 fi;
26256 MENU_NAME="$with_lib_basename"
26257
26258 case "x$MENU_NAME" in
26259 (x|xno|xnone|xyes)
26260         MENU_NAME=menu
26261         ;;
26262 (*)
26263         ;;
26264 esac
26265
26266 echo "$as_me:26266: result: $MENU_NAME" >&5
26267 echo "${ECHO_T}$MENU_NAME" >&6
26268
26269 echo "$as_me:26269: checking for desired basename for panel library" >&5
26270 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26271
26272 # Check whether --with-panel-libname or --without-panel-libname was given.
26273 if test "${with_panel_libname+set}" = set; then
26274   withval="$with_panel_libname"
26275   with_lib_basename=$withval
26276 else
26277   with_lib_basename=panel
26278 fi;
26279 PANEL_NAME="$with_lib_basename"
26280
26281 case "x$PANEL_NAME" in
26282 (x|xno|xnone|xyes)
26283         PANEL_NAME=panel
26284         ;;
26285 (*)
26286         ;;
26287 esac
26288
26289 echo "$as_me:26289: result: $PANEL_NAME" >&5
26290 echo "${ECHO_T}$PANEL_NAME" >&6
26291
26292 echo "$as_me:26292: checking for desired basename for cxx library" >&5
26293 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26294
26295 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26296 if test "${with_cxx_libname+set}" = set; then
26297   withval="$with_cxx_libname"
26298   with_lib_basename=$withval
26299 else
26300   with_lib_basename=ncurses++
26301 fi;
26302 CXX_NAME="$with_lib_basename"
26303
26304 case "x$CXX_NAME" in
26305 (x|xno|xnone|xyes)
26306         CXX_NAME=ncurses++
26307         ;;
26308 (*)
26309         ;;
26310 esac
26311
26312 echo "$as_me:26312: result: $CXX_NAME" >&5
26313 echo "${ECHO_T}$CXX_NAME" >&6
26314
26315 ### Construct the list of subdirectories for which we'll customize makefiles
26316 ### with the appropriate compile-rules.
26317
26318 echo "$as_me:26318: checking for src modules" >&5
26319 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26320
26321 # dependencies and linker-arguments for test-programs
26322 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26323 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26324 if test "$DFT_LWR_MODEL" = "libtool"; then
26325         TEST_ARGS="${TEST_DEPS}"
26326         TEST_ARG2="${TEST_DEP2}"
26327 else
26328         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26329         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26330 fi
26331
26332 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26333 cf_cv_src_modules=
26334 for cf_dir in $modules_to_build
26335 do
26336         if test -f $srcdir/$cf_dir/modules; then
26337
26338                 # We may/may not have tack in the distribution, though the
26339                 # makefile is.
26340                 if test $cf_dir = tack ; then
26341                         if test "x$cf_with_tack" != "xyes"; then
26342                                 continue
26343                         fi
26344                 fi
26345
26346                 if test -z "$cf_cv_src_modules"; then
26347                         cf_cv_src_modules=$cf_dir
26348                 else
26349                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26350                 fi
26351
26352                 # Make the ncurses_cfg.h file record the library interface files as
26353                 # well.  These are header files that are the same name as their
26354                 # directory.  Ncurses is the only library that does not follow
26355                 # that pattern.
26356                 if test $cf_dir = tack ; then
26357                         continue
26358                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26359
26360 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26361
26362                         cat >>confdefs.h <<EOF
26363 #define HAVE_${cf_have_include}_H 1
26364 EOF
26365
26366                         cat >>confdefs.h <<EOF
26367 #define HAVE_LIB${cf_have_include} 1
26368 EOF
26369
26370 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26371
26372 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26373
26374                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26375                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26376                         if test "$DFT_LWR_MODEL" = "libtool"; then
26377                                 TEST_ARGS="${TEST_DEPS}"
26378                                 TEST_ARG2="${TEST_DEP2}"
26379                         else
26380                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26381                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26382                         fi
26383                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26384                 fi
26385         fi
26386 done
26387 echo "$as_me:26387: result: $cf_cv_src_modules" >&5
26388 echo "${ECHO_T}$cf_cv_src_modules" >&6
26389
26390 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26391 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26392
26393 SRC_SUBDIRS=
26394 if test "x$cf_with_manpages" != xno ; then
26395         SRC_SUBDIRS="$SRC_SUBDIRS man"
26396 fi
26397 SRC_SUBDIRS="$SRC_SUBDIRS include"
26398 for cf_dir in $cf_cv_src_modules
26399 do
26400         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26401 done
26402 if test "x$cf_with_tests" != "xno" ; then
26403         SRC_SUBDIRS="$SRC_SUBDIRS test"
26404 fi
26405 # always make this, to install the ncurses-config script
26406 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26407 if test "$cf_with_cxx_binding" != no; then
26408         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26409         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26410 fi
26411
26412 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26413 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26414
26415 ADA_SUBDIRS=
26416 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26417         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26418         ADA_SUBDIRS="gen src"
26419         if test "x$cf_with_tests" != "xno" ; then
26420                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26421         fi
26422 fi
26423
26424 SUB_MAKEFILES=
26425 for cf_dir in $SRC_SUBDIRS
26426 do
26427         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26428 done
26429
26430 if test -n "$ADA_SUBDIRS"; then
26431         for cf_dir in $ADA_SUBDIRS
26432         do
26433                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26434         done
26435
26436 fi
26437
26438 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26439    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26440    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26441    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26442 fi
26443
26444 DIRS_TO_MAKE="lib"
26445 for cf_item in $cf_list_models
26446 do
26447
26448         case $cf_item in
26449         (libtool) cf_subdir='obj_lo'  ;;
26450         (normal)  cf_subdir='objects' ;;
26451         (debug)   cf_subdir='obj_g' ;;
26452         (profile) cf_subdir='obj_p' ;;
26453         (shared)
26454                 case $cf_cv_system_name in
26455                 (cygwin|msys)
26456                         cf_subdir='objects' ;;
26457                 (*)
26458                         cf_subdir='obj_s' ;;
26459                 esac
26460         esac
26461
26462         for cf_item2 in $DIRS_TO_MAKE
26463         do
26464                 test $cf_item2 = $cf_subdir && break
26465         done
26466         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26467 done
26468 for cf_dir in $DIRS_TO_MAKE
26469 do
26470         test ! -d $cf_dir && mkdir $cf_dir
26471 done
26472
26473 # symbols that differ when compiling Ada95 by itself.
26474 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26475
26476 # values to use as strings
26477
26478 cat >>confdefs.h <<EOF
26479 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26480 EOF
26481
26482 cat >>confdefs.h <<EOF
26483 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26484 EOF
26485
26486 ### Now that we're done running tests, add the compiler-warnings, if any
26487
26488 cf_fix_cppflags=no
26489 cf_new_cflags=
26490 cf_new_cppflags=
26491 cf_new_extra_cppflags=
26492
26493 for cf_add_cflags in $EXTRA_CFLAGS
26494 do
26495 case $cf_fix_cppflags in
26496 (no)
26497         case $cf_add_cflags in
26498         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
26499                 case $cf_add_cflags in
26500                 (-D*)
26501                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
26502
26503                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26504                                 && test -z "${cf_tst_cflags}" \
26505                                 && cf_fix_cppflags=yes
26506
26507                         if test $cf_fix_cppflags = yes ; then
26508
26509         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26510         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26511
26512                                 continue
26513                         elif test "${cf_tst_cflags}" = "\"'" ; then
26514
26515         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26516         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26517
26518                                 continue
26519                         fi
26520                         ;;
26521                 esac
26522                 case "$CPPFLAGS" in
26523                 (*$cf_add_cflags)
26524                         ;;
26525                 (*)
26526                         case $cf_add_cflags in
26527                         (-D*)
26528                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
26529
26530 CPPFLAGS=`echo "$CPPFLAGS" | \
26531         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
26532                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
26533
26534                                 ;;
26535                         esac
26536
26537         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
26538         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
26539
26540                         ;;
26541                 esac
26542                 ;;
26543         (*)
26544
26545         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26546         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26547
26548                 ;;
26549         esac
26550         ;;
26551 (yes)
26552
26553         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26554         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26555
26556         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
26557
26558         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26559                 && test -z "${cf_tst_cflags}" \
26560                 && cf_fix_cppflags=no
26561         ;;
26562 esac
26563 done
26564
26565 if test -n "$cf_new_cflags" ; then
26566
26567         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26568         CFLAGS="${CFLAGS}$cf_new_cflags"
26569
26570 fi
26571
26572 if test -n "$cf_new_cppflags" ; then
26573
26574         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26575         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26576
26577 fi
26578
26579 if test -n "$cf_new_extra_cppflags" ; then
26580
26581         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26582         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26583
26584 fi
26585
26586 ### Define substitutions for header files to avoid name-pollution
26587
26588 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26589         HAVE_TCGETATTR=1
26590 else
26591         HAVE_TCGETATTR=0
26592 fi
26593
26594 if test "x$ac_cv_header_stdint_h" = xyes ; then
26595         HAVE_STDINT_H=1
26596 else
26597         HAVE_STDINT_H=0
26598 fi
26599
26600 if test "x$ac_cv_header_termio_h" = xyes ; then
26601         HAVE_TERMIO_H=1
26602 else
26603         HAVE_TERMIO_H=0
26604 fi
26605
26606 if test "x$ac_cv_header_termios_h" = xyes ; then
26607         HAVE_TERMIOS_H=1
26608 else
26609         HAVE_TERMIOS_H=0
26610 fi
26611
26612 ################################################################################
26613 test "x$use_database" = xyes && \
26614 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26615
26616 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26617 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26618
26619 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26620 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26621 fi
26622
26623 if test "x$cf_with_tests" != xno ; then
26624         MAKE_TESTS=
26625 else
26626         MAKE_TESTS="#"
26627 fi
26628
26629 ADAHTML_DIR=../../doc/html/ada
26630
26631 # workaround for OS/2 (20151017)
26632 case $cf_cv_system_name in
26633 (os2*)
26634         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26635         ;;
26636 (*)
26637         LIBTOOL_OPTS_CXX=
26638         ;;
26639 esac
26640
26641 # workaround for g++ versus Solaris (20131116)
26642 case $cf_cv_system_name in
26643 (solaris2*)
26644         case "x$CPPFLAGS" in
26645         (*-D_XOPEN_SOURCE_EXTENDED*)
26646                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26647
26648 echo "${as_me:-configure}:26648: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26649
26650                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26651                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26652                 ;;
26653         esac
26654         ;;
26655 esac
26656
26657 # Help to automatically enable the extended curses features when using either
26658 # the *-config or the ".pc" files by adding defines.
26659 echo "$as_me:26659: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26660 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26661 PKG_CFLAGS=
26662 for cf_loop1 in $CPPFLAGS_after_XOPEN
26663 do
26664         cf_found=no
26665         for cf_loop2 in $CPPFLAGS_before_XOPEN
26666         do
26667                 if test "x$cf_loop1" = "x$cf_loop2"
26668                 then
26669                         cf_found=yes
26670                         break
26671                 fi
26672         done
26673         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26674 done
26675 echo "$as_me:26675: result: $PKG_CFLAGS" >&5
26676 echo "${ECHO_T}$PKG_CFLAGS" >&6
26677
26678 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26679 case "x$NCURSES_OSPEED" in
26680 (*short*)
26681         cf_compatible=1
26682         ;;
26683 (*)
26684         cf_compatible=0
26685         ;;
26686 esac
26687
26688 cat >>confdefs.h <<EOF
26689 #define NCURSES_OSPEED_COMPAT $cf_compatible
26690 EOF
26691
26692 case "x$cf_cv_typeof_chtype" in
26693 (xshort|xint|xlong)
26694         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26695         ;;
26696 esac
26697
26698 case "x$cf_cv_typeof_mmask_t" in
26699 (xshort|xint|xlong)
26700         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26701         ;;
26702 esac
26703
26704 # substitute into misc/Makefile to suppress
26705 # (un)install.data from the
26706 # (un)install rules.
26707 if test "x$cf_with_db_install" = "xno"; then
26708         MISC_INSTALL_DATA=
26709         MISC_UNINSTALL_DATA=
26710 else
26711         MISC_INSTALL_DATA=install.data
26712         MISC_UNINSTALL_DATA=uninstall.data
26713 fi
26714
26715 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26716         MAKE_DATABASE="#"
26717 else
26718         MAKE_DATABASE="$MAKE_TERMINFO"
26719 fi
26720
26721 if test -n "$PACKAGE"
26722 then
26723         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26724         export PACKAGE
26725         echo "package: $PACKAGE"
26726 fi
26727
26728 UNALTERED_SYMS=
26729 cf_filter_syms=no
26730
26731 if test -n "$RESULTING_SYMS"
26732 then
26733         cf_filter_syms=$cf_dft_filter_syms
26734         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26735
26736 echo "${as_me:-configure}:26736: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26737
26738 fi
26739
26740 if test "x$WILDCARD_SYMS" = xno
26741 then
26742         cf_filter_syms=yes
26743 fi
26744
26745 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26746
26747 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26748 if test $cf_filter_syms = yes
26749 then
26750         RESULTING_SYMS=resulting.map
26751 fi
26752
26753 if test "x$cross_compiling" = xyes ; then
26754         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26755         CHECK_BUILD="#"
26756 else
26757         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26758         CHECK_BUILD=
26759 fi
26760
26761 # This is used for the *-config script and *.pc data files.
26762
26763 echo "$as_me:26763: checking for linker search path" >&5
26764 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26765 if test "${cf_cv_ld_searchpath+set}" = set; then
26766   echo $ECHO_N "(cached) $ECHO_C" >&6
26767 else
26768
26769 if test "$cross_compiling" != yes ; then
26770
26771 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26772 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26773
26774 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26775 # update the cache, which makes it run faster.
26776 test -z "$cf_pathlist" && \
26777         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26778
26779 test -z "$cf_pathlist" &&
26780         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26781
26782 # This works with OpenBSD 6.5, which lists only filenames
26783 test -z "$cf_pathlist" &&
26784         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26785
26786 if test -z "$cf_pathlist"
26787 then
26788         # dyld default path with MacOS
26789         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26790         then
26791                 # do this to bypass check
26792                 cf_cv_ld_searchpath='$HOME/lib'
26793                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26794         fi
26795 fi
26796
26797 if test -z "$cf_pathlist"
26798 then
26799         # Solaris is hardcoded
26800         if test -d /opt/SUNWspro/lib
26801         then
26802                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26803         elif test -d /usr/ccs/lib
26804         then
26805                 cf_pathlist="/usr/ccs/lib /usr/lib"
26806         fi
26807 fi
26808
26809 fi
26810
26811 # If nothing else, assume it is conventional
26812 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26813
26814 # Finally, check that this is only directories
26815 for cf_path in $0 $cf_pathlist
26816 do
26817         if test -d "$cf_path"; then
26818                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26819                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26820         fi
26821 done
26822
26823 # Ensure that it is nonempty
26824 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26825
26826 fi
26827 echo "$as_me:26827: result: $cf_cv_ld_searchpath" >&5
26828 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26829
26830 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26831
26832 cat >>confdefs.h <<\EOF
26833 #define HAVE_CURSES_DATA_BOOLNAMES 1
26834 EOF
26835
26836 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"
26837 ac_config_commands="$ac_config_commands default"
26838 cat >confcache <<\_ACEOF
26839 # This file is a shell script that caches the results of configure
26840 # tests run on this system so they can be shared between configure
26841 # scripts and configure runs, see configure's option --config-cache.
26842 # It is not useful on other systems.  If it contains results you don't
26843 # want to keep, you may remove or edit it.
26844 #
26845 # config.status only pays attention to the cache file if you give it
26846 # the --recheck option to rerun configure.
26847 #
26848 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26849 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26850 # following values.
26851
26852 _ACEOF
26853
26854 # The following way of writing the cache mishandles newlines in values,
26855 # but we know of no workaround that is simple, portable, and efficient.
26856 # So, don't put newlines in cache variables' values.
26857 # Ultrix sh set writes to stderr and can't be redirected directly,
26858 # and sets the high bit in the cache file unless we assign to the vars.
26859 {
26860   (set) 2>&1 |
26861     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26862     *ac_space=\ *)
26863       # `set' does not quote correctly, so add quotes (double-quote
26864       # substitution turns \\\\ into \\, and sed turns \\ into \).
26865       sed -n \
26866         "s/'/'\\\\''/g;
26867           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26868       ;;
26869     *)
26870       # `set' quotes correctly as required by POSIX, so do not add quotes.
26871       sed -n \
26872         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26873       ;;
26874     esac;
26875 } |
26876   sed '
26877      t clear
26878      : clear
26879      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26880      t end
26881      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26882      : end' >>confcache
26883 if cmp -s $cache_file confcache; then :; else
26884   if test -w $cache_file; then
26885     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26886     cat confcache >$cache_file
26887   else
26888     echo "not updating unwritable cache $cache_file"
26889   fi
26890 fi
26891 rm -f confcache
26892
26893 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26894 # Let make expand exec_prefix.
26895 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26896
26897 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26898 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26899 # trailing colons and then remove the whole line if VPATH becomes empty
26900 # (actually we leave an empty line to preserve line numbers).
26901 if test "x$srcdir" = x.; then
26902   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26903 s/:*\$(srcdir):*/:/;
26904 s/:*\${srcdir}:*/:/;
26905 s/:*@srcdir@:*/:/;
26906 s/^\([^=]*=[    ]*\):*/\1/;
26907 s/:*$//;
26908 s/^[^=]*=[      ]*$//;
26909 }'
26910 fi
26911
26912 DEFS=-DHAVE_CONFIG_H
26913
26914 : ${CONFIG_STATUS=./config.status}
26915 ac_clean_files_save=$ac_clean_files
26916 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26917 { echo "$as_me:26917: creating $CONFIG_STATUS" >&5
26918 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26919 cat >$CONFIG_STATUS <<_ACEOF
26920 #! $SHELL
26921 # Generated automatically by configure.
26922 # Run this file to recreate the current configuration.
26923 # Compiler output produced by configure, useful for debugging
26924 # configure, is in config.log if it exists.
26925
26926 debug=false
26927 SHELL=\${CONFIG_SHELL-$SHELL}
26928 ac_cs_invocation="\$0 \$@"
26929
26930 CLICOLOR_FORCE= GREP_OPTIONS=
26931 unset CLICOLOR_FORCE GREP_OPTIONS
26932 _ACEOF
26933
26934 cat >>$CONFIG_STATUS <<\_ACEOF
26935 # Be Bourne compatible
26936 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26937   emulate sh
26938   NULLCMD=:
26939 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26940   set -o posix
26941 fi
26942
26943 # Name of the executable.
26944 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26945
26946 if expr a : '\(a\)' >/dev/null 2>&1; then
26947   as_expr=expr
26948 else
26949   as_expr=false
26950 fi
26951
26952 rm -f conf$$ conf$$.exe conf$$.file
26953 echo >conf$$.file
26954 if ln -s conf$$.file conf$$ 2>/dev/null; then
26955   # We could just check for DJGPP; but this test a) works b) is more generic
26956   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26957   if test -f conf$$.exe; then
26958     # Don't use ln at all; we don't have any links
26959     as_ln_s='cp -p'
26960   else
26961     as_ln_s='ln -s'
26962   fi
26963 elif ln conf$$.file conf$$ 2>/dev/null; then
26964   as_ln_s=ln
26965 else
26966   as_ln_s='cp -p'
26967 fi
26968 rm -f conf$$ conf$$.exe conf$$.file
26969
26970 as_executable_p="test -f"
26971
26972 # Support unset when possible.
26973 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26974   as_unset=unset
26975 else
26976   as_unset=false
26977 fi
26978
26979 # NLS nuisances.
26980 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26981 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26982 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26983 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26984 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26985 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26986 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26987 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26988
26989 # IFS
26990 # We need space, tab and new line, in precisely that order.
26991 as_nl='
26992 '
26993 IFS="   $as_nl"
26994
26995 # CDPATH.
26996 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26997
26998 exec 6>&1
26999
27000 _ACEOF
27001
27002 # Files that config.status was made for.
27003 if test -n "$ac_config_files"; then
27004   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
27005 fi
27006
27007 if test -n "$ac_config_headers"; then
27008   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
27009 fi
27010
27011 if test -n "$ac_config_links"; then
27012   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
27013 fi
27014
27015 if test -n "$ac_config_commands"; then
27016   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
27017 fi
27018
27019 cat >>$CONFIG_STATUS <<\EOF
27020
27021 ac_cs_usage="\
27022 \`$as_me' instantiates files from templates according to the
27023 current configuration.
27024
27025 Usage: $0 [OPTIONS] [FILE]...
27026
27027   -h, --help       print this help, then exit
27028   -V, --version    print version number, then exit
27029   -d, --debug      don't remove temporary files
27030       --recheck    update $as_me by reconfiguring in the same conditions
27031   --file=FILE[:TEMPLATE]
27032                    instantiate the configuration file FILE
27033   --header=FILE[:TEMPLATE]
27034                    instantiate the configuration header FILE
27035
27036 Configuration files:
27037 $config_files
27038
27039 Configuration headers:
27040 $config_headers
27041
27042 Configuration commands:
27043 $config_commands
27044
27045 Report bugs to <dickey@invisible-island.net>."
27046 EOF
27047
27048 cat >>$CONFIG_STATUS <<EOF
27049 ac_cs_version="\\
27050 config.status
27051 configured by $0, generated by GNU Autoconf 2.52.20200802,
27052   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
27053
27054 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
27055 Free Software Foundation, Inc.
27056 This config.status script is free software; the Free Software Foundation
27057 gives unlimited permission to copy, distribute and modify it."
27058 srcdir=$srcdir
27059 INSTALL="$INSTALL"
27060 EOF
27061
27062 cat >>$CONFIG_STATUS <<\EOF
27063 # If no file are specified by the user, then we need to provide default
27064 # value.  By we need to know if files were specified by the user.
27065 ac_need_defaults=:
27066 while test $# != 0
27067 do
27068   case $1 in
27069   --*=*)
27070     ac_option=`expr "x$1" : 'x\([^=]*\)='`
27071     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
27072     shift
27073     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
27074     shift
27075     ;;
27076   -*);;
27077   *) # This is not an option, so the user has probably given explicit
27078      # arguments.
27079      ac_need_defaults=false;;
27080   esac
27081
27082   case $1 in
27083   # Handling of the options.
27084 EOF
27085 cat >>$CONFIG_STATUS <<EOF
27086   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27087     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
27088     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
27089 EOF
27090 cat >>$CONFIG_STATUS <<\EOF
27091   --version | --vers* | -V )
27092     echo "$ac_cs_version"; exit 0 ;;
27093   --he | --h)
27094     # Conflict between --help and --header
27095     { { echo "$as_me:27095: error: ambiguous option: $1
27096 Try \`$0 --help' for more information." >&5
27097 echo "$as_me: error: ambiguous option: $1
27098 Try \`$0 --help' for more information." >&2;}
27099    { (exit 1); exit 1; }; };;
27100   --help | --hel | -h )
27101     echo "$ac_cs_usage"; exit 0 ;;
27102   --debug | --d* | -d )
27103     debug=: ;;
27104   --file | --fil | --fi | --f )
27105     shift
27106     CONFIG_FILES="$CONFIG_FILES $1"
27107     ac_need_defaults=false;;
27108   --header | --heade | --head | --hea )
27109     shift
27110     CONFIG_HEADERS="$CONFIG_HEADERS $1"
27111     ac_need_defaults=false;;
27112
27113   # This is an error.
27114   -*) { { echo "$as_me:27114: error: unrecognized option: $1
27115 Try \`$0 --help' for more information." >&5
27116 echo "$as_me: error: unrecognized option: $1
27117 Try \`$0 --help' for more information." >&2;}
27118    { (exit 1); exit 1; }; } ;;
27119
27120   *) ac_config_targets="$ac_config_targets $1" ;;
27121
27122   esac
27123   shift
27124 done
27125
27126 exec 5>>config.log
27127 cat >&5 << _ACEOF
27128
27129 ## ----------------------- ##
27130 ## Running config.status.  ##
27131 ## ----------------------- ##
27132
27133 This file was extended by $as_me 2.52.20200802, executed with
27134   CONFIG_FILES    = $CONFIG_FILES
27135   CONFIG_HEADERS  = $CONFIG_HEADERS
27136   CONFIG_LINKS    = $CONFIG_LINKS
27137   CONFIG_COMMANDS = $CONFIG_COMMANDS
27138   > $ac_cs_invocation
27139 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27140
27141 _ACEOF
27142 EOF
27143
27144 cat >>$CONFIG_STATUS <<EOF
27145 #
27146 # INIT-COMMANDS section.
27147 #
27148
27149 ### Special initialization commands, used to pass information from the
27150 ### configuration-run into config.status
27151
27152 ALTERNATE_SYMS="$ALTERNATE_SYMS"
27153 AWK="$AWK"
27154 CXX_NAME="$CXX_NAME"
27155 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
27156 DFT_LWR_MODEL="$DFT_LWR_MODEL"
27157 ECHO_LD="$ECHO_LD"
27158 EXTRA_SUFFIX="$EXTRA_SUFFIX"
27159 FORM_NAME="$FORM_NAME"
27160 LDCONFIG="$LDCONFIG"
27161 LIBTOOL_VERSION="$LIBTOOL_VERSION"
27162 LIB_NAME="$LIB_NAME"
27163 LIB_PREFIX="$LIB_PREFIX"
27164 LIB_SUBSETS="$LIB_SUBSETS"
27165 LIB_SUFFIX="$LIB_SUFFIX"
27166 LIB_TRACING="$LIB_TRACING"
27167 LN_S="$LN_S"
27168 MAKE_TERMINFO="$MAKE_TERMINFO"
27169 MENU_NAME="$MENU_NAME"
27170 NCURSES_MAJOR="$NCURSES_MAJOR"
27171 NCURSES_MINOR="$NCURSES_MINOR"
27172 NCURSES_OSPEED="$NCURSES_OSPEED"
27173 NCURSES_PATCH="$NCURSES_PATCH"
27174 PANEL_NAME="$PANEL_NAME"
27175 SRC_SUBDIRS="$SRC_SUBDIRS"
27176 TERMINFO="$TERMINFO"
27177 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27178 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27179 TICS_NAME="$TICS_NAME"
27180 TICS_SUFFIX="$TICS_SUFFIX"
27181 TIC_PATH="$TIC_PATH"
27182 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27183 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27184 TINFO_NAME="$TINFO_NAME"
27185 TINFO_SUFFIX="$TINFO_SUFFIX"
27186 UNALTERED_SYMS="$UNALTERED_SYMS"
27187 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27188 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27189 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27190 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27191 WILDCARD_SYMS="$WILDCARD_SYMS"
27192 WITH_CURSES_H="$with_curses_h"
27193 WITH_ECHO="${enable_echo:=yes}"
27194 WITH_OVERWRITE="$with_overwrite"
27195 cf_LIST_MODELS="$cf_list_models"
27196 cf_cv_abi_version="$cf_cv_abi_version"
27197 cf_cv_do_relink="$cf_cv_do_relink"
27198 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27199 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27200 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27201 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27202 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27203 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27204 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27205 cf_cv_rel_version="$cf_cv_rel_version"
27206 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27207 cf_cv_shared_soname='$cf_cv_shared_soname'
27208 cf_cv_shlib_version="$cf_cv_shlib_version"
27209 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27210 cf_cv_system_name="$cf_cv_system_name"
27211 cf_cv_term_driver="$with_term_driver"
27212 cf_with_ada="$cf_with_ada"
27213 cf_with_cxx_binding="$cf_with_cxx_binding"
27214 cf_with_db_install="$cf_with_db_install"
27215 cf_with_manpages="$cf_with_manpages"
27216 cf_with_tests="$cf_with_tests"
27217 host="$host"
27218 target="$target"
27219 with_shared_cxx="$with_shared_cxx"
27220
27221 EOF
27222
27223 cat >>$CONFIG_STATUS <<\EOF
27224 for ac_config_target in $ac_config_targets
27225 do
27226   case "$ac_config_target" in
27227   # Handling of arguments.
27228   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27229   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27230   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27231   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27232   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27233   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27234   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27235   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27236   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27237   *) { { echo "$as_me:27237: error: invalid argument: $ac_config_target" >&5
27238 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27239    { (exit 1); exit 1; }; };;
27240   esac
27241 done
27242
27243 # If the user did not use the arguments to specify the items to instantiate,
27244 # then the envvar interface is used.  Set only those that are not.
27245 # We use the long form for the default assignment because of an extremely
27246 # bizarre bug on SunOS 4.1.3.
27247 if $ac_need_defaults; then
27248   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27249   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27250   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27251 fi
27252
27253 # Create a temporary directory, and hook for its removal unless debugging.
27254 $debug ||
27255 {
27256   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27257   trap '{ (exit 1); exit 1; }' 1 2 13 15
27258 }
27259
27260 # Create a (secure) tmp directory for tmp files.
27261 : ${TMPDIR=/tmp}
27262 {
27263   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27264   test -n "$tmp" && test -d "$tmp"
27265 }  ||
27266 {
27267   tmp=$TMPDIR/cs$$-$RANDOM
27268   (umask 077 && mkdir $tmp)
27269 } ||
27270 {
27271    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27272    { (exit 1); exit 1; }
27273 }
27274
27275 EOF
27276
27277 cat >>$CONFIG_STATUS <<EOF
27278
27279 #
27280 # CONFIG_FILES section.
27281 #
27282
27283 # No need to generate the scripts if there are no CONFIG_FILES.
27284 # This happens for instance when ./config.status config.h
27285 if test -n "\$CONFIG_FILES"; then
27286   # Protect against being on the right side of a sed subst in config.status.
27287   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27288    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27289 s,@SHELL@,$SHELL,;t t
27290 s,@exec_prefix@,$exec_prefix,;t t
27291 s,@prefix@,$prefix,;t t
27292 s,@program_transform_name@,$program_transform_name,;t t
27293 s,@bindir@,$bindir,;t t
27294 s,@sbindir@,$sbindir,;t t
27295 s,@libexecdir@,$libexecdir,;t t
27296 s,@datarootdir@,$datarootdir,;t t
27297 s,@datadir@,$datadir,;t t
27298 s,@sysconfdir@,$sysconfdir,;t t
27299 s,@sharedstatedir@,$sharedstatedir,;t t
27300 s,@localstatedir@,$localstatedir,;t t
27301 s,@runstatedir@,$runstatedir,;t t
27302 s,@libdir@,$libdir,;t t
27303 s,@includedir@,$includedir,;t t
27304 s,@oldincludedir@,$oldincludedir,;t t
27305 s,@infodir@,$infodir,;t t
27306 s,@mandir@,$mandir,;t t
27307 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27308 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27309 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27310 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27311 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27312 s,@build_alias@,$build_alias,;t t
27313 s,@host_alias@,$host_alias,;t t
27314 s,@target_alias@,$target_alias,;t t
27315 s,@ECHO_C@,$ECHO_C,;t t
27316 s,@ECHO_N@,$ECHO_N,;t t
27317 s,@ECHO_T@,$ECHO_T,;t t
27318 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27319 s,@DEFS@,$DEFS,;t t
27320 s,@LIBS@,$LIBS,;t t
27321 s,@top_builddir@,$top_builddir,;t t
27322 s,@EGREP@,$EGREP,;t t
27323 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27324 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27325 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27326 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27327 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27328 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27329 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27330 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27331 s,@VERSION@,$VERSION,;t t
27332 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27333 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27334 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27335 s,@PACKAGE@,$PACKAGE,;t t
27336 s,@build@,$build,;t t
27337 s,@build_cpu@,$build_cpu,;t t
27338 s,@build_vendor@,$build_vendor,;t t
27339 s,@build_os@,$build_os,;t t
27340 s,@host@,$host,;t t
27341 s,@host_cpu@,$host_cpu,;t t
27342 s,@host_vendor@,$host_vendor,;t t
27343 s,@host_os@,$host_os,;t t
27344 s,@target@,$target,;t t
27345 s,@target_cpu@,$target_cpu,;t t
27346 s,@target_vendor@,$target_vendor,;t t
27347 s,@target_os@,$target_os,;t t
27348 s,@CC@,$CC,;t t
27349 s,@CFLAGS@,$CFLAGS,;t t
27350 s,@LDFLAGS@,$LDFLAGS,;t t
27351 s,@CPPFLAGS@,$CPPFLAGS,;t t
27352 s,@ac_ct_CC@,$ac_ct_CC,;t t
27353 s,@EXEEXT@,$EXEEXT,;t t
27354 s,@OBJEXT@,$OBJEXT,;t t
27355 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27356 s,@CPP@,$CPP,;t t
27357 s,@LDCONFIG@,$LDCONFIG,;t t
27358 s,@CXX@,$CXX,;t t
27359 s,@CXXFLAGS@,$CXXFLAGS,;t t
27360 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27361 s,@AWK@,$AWK,;t t
27362 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27363 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27364 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27365 s,@LINT@,$LINT,;t t
27366 s,@LINT_OPTS@,$LINT_OPTS,;t t
27367 s,@LN_S@,$LN_S,;t t
27368 s,@cf_config_suffix@,$cf_config_suffix,;t t
27369 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27370 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27371 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27372 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27373 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27374 s,@SET_MAKE@,$SET_MAKE,;t t
27375 s,@CTAGS@,$CTAGS,;t t
27376 s,@ETAGS@,$ETAGS,;t t
27377 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27378 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27379 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27380 s,@RANLIB@,$RANLIB,;t t
27381 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27382 s,@LD@,$LD,;t t
27383 s,@ac_ct_LD@,$ac_ct_LD,;t t
27384 s,@AR@,$AR,;t t
27385 s,@ac_ct_AR@,$ac_ct_AR,;t t
27386 s,@NM@,$NM,;t t
27387 s,@ac_ct_NM@,$ac_ct_NM,;t t
27388 s,@ARFLAGS@,$ARFLAGS,;t t
27389 s,@DESTDIR@,$DESTDIR,;t t
27390 s,@BUILD_CC@,$BUILD_CC,;t t
27391 s,@BUILD_CPP@,$BUILD_CPP,;t t
27392 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27393 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27394 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27395 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27396 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27397 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27398 s,@cf_list_models@,$cf_list_models,;t t
27399 s,@ABI_VERSION@,$ABI_VERSION,;t t
27400 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27401 s,@LIBTOOL@,$LIBTOOL,;t t
27402 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27403 s,@LT_UNDEF@,$LT_UNDEF,;t t
27404 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27405 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27406 s,@LIB_CREATE@,$LIB_CREATE,;t t
27407 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27408 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27409 s,@LIB_PREP@,$LIB_PREP,;t t
27410 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27411 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27412 s,@LIB_LINK@,$LIB_LINK,;t t
27413 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27414 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27415 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27416 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27417 s,@TICS_NAME@,$TICS_NAME,;t t
27418 s,@TINFO_NAME@,$TINFO_NAME,;t t
27419 s,@LIB_NAME@,$LIB_NAME,;t t
27420 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27421 s,@CC_G_OPT@,$CC_G_OPT,;t t
27422 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27423 s,@LD_MODEL@,$LD_MODEL,;t t
27424 s,@shlibdir@,$shlibdir,;t t
27425 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27426 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27427 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27428 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27429 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27430 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27431 s,@LINK_PROGS@,$LINK_PROGS,;t t
27432 s,@LINK_TESTS@,$LINK_TESTS,;t t
27433 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27434 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27435 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27436 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27437 s,@RPATH_LIST@,$RPATH_LIST,;t t
27438 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27439 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27440 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27441 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27442 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27443 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
27444 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27445 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27446 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27447 s,@TIC@,$TIC,;t t
27448 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
27449 s,@INFOCMP@,$INFOCMP,;t t
27450 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
27451 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27452 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27453 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27454 s,@XTERM_KBS@,$XTERM_KBS,;t t
27455 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27456 s,@TERMINFO@,$TERMINFO,;t t
27457 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27458 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27459 s,@TERMPATH@,$TERMPATH,;t t
27460 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27461 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27462 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27463 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27464 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27465 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27466 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27467 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27468 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27469 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27470 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27471 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27472 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27473 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27474 s,@RGB_PATH@,$RGB_PATH,;t t
27475 s,@no_x11_rgb@,$no_x11_rgb,;t t
27476 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27477 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27478 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27479 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27480 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27481 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27482 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27483 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27484 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27485 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27486 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27487 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27488 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27489 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27490 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27491 s,@PTHREAD@,$PTHREAD,;t t
27492 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27493 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27494 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27495 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27496 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27497 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27498 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27499 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27500 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27501 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27502 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27503 s,@ECHO_LT@,$ECHO_LT,;t t
27504 s,@ECHO_LD@,$ECHO_LD,;t t
27505 s,@RULE_CC@,$RULE_CC,;t t
27506 s,@SHOW_CC@,$SHOW_CC,;t t
27507 s,@ECHO_CC@,$ECHO_CC,;t t
27508 s,@ECHO_LINK@,$ECHO_LINK,;t t
27509 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27510 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27511 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27512 s,@ADAFLAGS@,$ADAFLAGS,;t t
27513 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27514 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27515 s,@ADA_TRACE@,$ADA_TRACE,;t t
27516 s,@MATH_LIB@,$MATH_LIB,;t t
27517 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27518 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27519 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27520 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27521 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27522 s,@TEST_LIBS@,$TEST_LIBS,;t t
27523 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27524 s,@CXXCPP@,$CXXCPP,;t t
27525 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27526 s,@CXX_AR@,$CXX_AR,;t t
27527 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27528 s,@CXXLIBS@,$CXXLIBS,;t t
27529 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27530 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27531 s,@M4_exists@,$M4_exists,;t t
27532 s,@cf_ada_make@,$cf_ada_make,;t t
27533 s,@cf_ada_config@,$cf_ada_config,;t t
27534 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27535 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27536 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27537 s,@cf_compile_generics@,$cf_compile_generics,;t t
27538 s,@cf_generic_objects@,$cf_generic_objects,;t t
27539 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27540 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27541 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27542 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27543 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27544 s,@cf_ada_package@,$cf_ada_package,;t t
27545 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27546 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27547 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27548 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27549 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27550 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27551 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27552 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27553 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27554 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27555 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27556 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27557 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27558 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27559 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27560 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27561 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27562 s,@TICS_LIBS@,$TICS_LIBS,;t t
27563 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27564 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27565 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27566 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27567 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27568 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27569 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27570 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27571 s,@includesubdir@,$includesubdir,;t t
27572 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27573 s,@TICS_LIST@,$TICS_LIST,;t t
27574 s,@TINFO_LIST@,$TINFO_LIST,;t t
27575 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27576 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27577 s,@FORM_NAME@,$FORM_NAME,;t t
27578 s,@MENU_NAME@,$MENU_NAME,;t t
27579 s,@PANEL_NAME@,$PANEL_NAME,;t t
27580 s,@CXX_NAME@,$CXX_NAME,;t t
27581 s,@TEST_ARGS@,$TEST_ARGS,;t t
27582 s,@TEST_DEPS@,$TEST_DEPS,;t t
27583 s,@TEST_ARG2@,$TEST_ARG2,;t t
27584 s,@TEST_DEP2@,$TEST_DEP2,;t t
27585 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27586 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27587 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27588 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27589 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27590 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27591 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27592 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27593 s,@cross_compiling@,$cross_compiling,;t t
27594 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27595 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27596 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27597 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27598 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27599 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27600 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27601 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27602 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27603 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27604 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27605 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27606 CEOF
27607
27608 EOF
27609
27610   cat >>$CONFIG_STATUS <<\EOF
27611   # Split the substitutions into bite-sized pieces for seds with
27612   # small command number limits, like on Digital OSF/1 and HP-UX.
27613   ac_max_sed_lines=48
27614   ac_sed_frag=1 # Number of current file.
27615   ac_beg=1 # First line for current file.
27616   ac_end=$ac_max_sed_lines # Line after last line for current file.
27617   ac_more_lines=:
27618   ac_sed_cmds=
27619   while $ac_more_lines; do
27620     if test $ac_beg -gt 1; then
27621       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27622     else
27623       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27624     fi
27625     if test ! -s $tmp/subs.frag; then
27626       ac_more_lines=false
27627     else
27628       # The purpose of the label and of the branching condition is to
27629       # speed up the sed processing (if there are no `@' at all, there
27630       # is no need to browse any of the substitutions).
27631       # These are the two extra sed commands mentioned above.
27632       (echo ':t
27633   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27634       # It is possible to make a multiline substitution using escaped newlines.
27635       # Ensure that we do not split the substitution between script fragments.
27636       ac_BEG=$ac_end
27637       ac_END=`expr $ac_end + $ac_max_sed_lines`
27638       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27639       if test -s $tmp/subs.next; then
27640         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27641         if test ! -s $tmp/subs.edit; then
27642           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27643           if test ! -s $tmp/subs.edit; then
27644             if test $ac_beg -gt 1; then
27645               ac_end=`expr $ac_end - 1`
27646               continue
27647             fi
27648           fi
27649         fi
27650       fi
27651
27652       if test -z "$ac_sed_cmds"; then
27653         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27654       else
27655         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27656       fi
27657       ac_sed_frag=`expr $ac_sed_frag + 1`
27658       ac_beg=$ac_end
27659       ac_end=`expr $ac_end + $ac_max_sed_lines`
27660     fi
27661   done
27662   if test -z "$ac_sed_cmds"; then
27663     ac_sed_cmds=cat
27664   fi
27665 fi # test -n "$CONFIG_FILES"
27666
27667 EOF
27668 cat >>$CONFIG_STATUS <<\EOF
27669 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27670   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27671   case $ac_file in
27672   - | *:- | *:-:* ) # input from stdin
27673         cat >$tmp/stdin
27674         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27675         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27676   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27677         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27678   * )   ac_file_in=$ac_file.in ;;
27679   esac
27680
27681   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27682   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27683          X"$ac_file" : 'X\(//\)[^/]' \| \
27684          X"$ac_file" : 'X\(//\)$' \| \
27685          X"$ac_file" : 'X\(/\)' \| \
27686          .     : '\(.\)' 2>/dev/null ||
27687 echo X"$ac_file" |
27688     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27689           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27690           /^X\(\/\/\)$/{ s//\1/; q; }
27691           /^X\(\/\).*/{ s//\1/; q; }
27692           s/.*/./; q'`
27693   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27694     { case "$ac_dir" in
27695   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27696   *)                      as_incr_dir=.;;
27697 esac
27698 as_dummy="$ac_dir"
27699 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27700   case $as_mkdir_dir in
27701     # Skip DOS drivespec
27702     ?:) as_incr_dir=$as_mkdir_dir ;;
27703     *)
27704       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27705       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27706     ;;
27707   esac
27708 done; }
27709
27710     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27711     # A "../" for each directory in $ac_dir_suffix.
27712     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27713   else
27714     ac_dir_suffix= ac_dots=
27715   fi
27716
27717   case $srcdir in
27718   .)  ac_srcdir=.
27719       if test -z "$ac_dots"; then
27720          ac_top_srcdir=.
27721       else
27722          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27723       fi ;;
27724   [\\/]* | ?:[\\/]* )
27725       ac_srcdir=$srcdir$ac_dir_suffix;
27726       ac_top_srcdir=$srcdir ;;
27727   *) # Relative path.
27728     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27729     ac_top_srcdir=$ac_dots$srcdir ;;
27730   esac
27731
27732   case $INSTALL in
27733   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27734   *) ac_INSTALL=$ac_dots$INSTALL ;;
27735   esac
27736
27737   if test x"$ac_file" != x-; then
27738     { echo "$as_me:27738: creating $ac_file" >&5
27739 echo "$as_me: creating $ac_file" >&6;}
27740     rm -f "$ac_file"
27741   fi
27742   # Let's still pretend it is `configure' which instantiates (i.e., don't
27743   # use $as_me), people would be surprised to read:
27744   #    /* config.h.  Generated automatically by config.status.  */
27745   configure_input="Generated automatically from `echo $ac_file_in |
27746                                                  sed 's,.*/,,'` by configure."
27747
27748   # First look for the input files in the build tree, otherwise in the
27749   # src tree.
27750   ac_file_inputs=`IFS=:
27751     for f in $ac_file_in; do
27752       case $f in
27753       -) echo $tmp/stdin ;;
27754       [\\/$]*)
27755          # Absolute (can't be DOS-style, as IFS=:)
27756          test -f "$f" || { { echo "$as_me:27756: error: cannot find input file: $f" >&5
27757 echo "$as_me: error: cannot find input file: $f" >&2;}
27758    { (exit 1); exit 1; }; }
27759          echo $f;;
27760       *) # Relative
27761          if test -f "$f"; then
27762            # Build tree
27763            echo $f
27764          elif test -f "$srcdir/$f"; then
27765            # Source tree
27766            echo $srcdir/$f
27767          else
27768            # /dev/null tree
27769            { { echo "$as_me:27769: error: cannot find input file: $f" >&5
27770 echo "$as_me: error: cannot find input file: $f" >&2;}
27771    { (exit 1); exit 1; }; }
27772          fi;;
27773       esac
27774     done` || { (exit 1); exit 1; }
27775 EOF
27776 cat >>$CONFIG_STATUS <<\EOF
27777   ac_warn_datarootdir=no
27778   if test x"$ac_file" != x-; then
27779     for ac_item in $ac_file_inputs
27780     do
27781       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27782       if test -n "$ac_seen"; then
27783         ac_used=`grep '@datarootdir@' $ac_item`
27784         if test -z "$ac_used"; then
27785           { echo "$as_me:27785: WARNING: datarootdir was used implicitly but not set:
27786 $ac_seen" >&5
27787 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27788 $ac_seen" >&2;}
27789           ac_warn_datarootdir=yes
27790         fi
27791       fi
27792       ac_seen=`grep '${datarootdir}' $ac_item`
27793       if test -n "$ac_seen"; then
27794         { echo "$as_me:27794: WARNING: datarootdir was used explicitly but not set:
27795 $ac_seen" >&5
27796 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27797 $ac_seen" >&2;}
27798         ac_warn_datarootdir=yes
27799       fi
27800     done
27801   fi
27802
27803 if test "x$ac_warn_datarootdir" = xyes; then
27804   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27805 fi
27806
27807 EOF
27808 cat >>$CONFIG_STATUS <<EOF
27809   sed "$ac_vpsub
27810 $extrasub
27811 EOF
27812 cat >>$CONFIG_STATUS <<\EOF
27813 :t
27814 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27815 s,@configure_input@,$configure_input,;t t
27816 s,@srcdir@,$ac_srcdir,;t t
27817 s,@top_srcdir@,$ac_top_srcdir,;t t
27818 s,@INSTALL@,$ac_INSTALL,;t t
27819 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27820   rm -f $tmp/stdin
27821   if test x"$ac_file" != x-; then
27822     cp $tmp/out $ac_file
27823
27824     for ac_name in prefix exec_prefix datarootdir
27825     do
27826         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27827         if test -n "$ac_seen"; then
27828             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27829             if test -z "$ac_init"; then
27830               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27831               { echo "$as_me:27831: WARNING: Variable $ac_name is used but was not set:
27832 $ac_seen" >&5
27833 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27834 $ac_seen" >&2;}
27835             fi
27836         fi
27837     done
27838     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27839     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27840     if test -s $tmp/out; then
27841       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27842       { echo "$as_me:27842: WARNING: Some variables may not be substituted:
27843 $ac_seen" >&5
27844 echo "$as_me: WARNING: Some variables may not be substituted:
27845 $ac_seen" >&2;}
27846     fi
27847   else
27848     cat $tmp/out
27849   fi
27850   rm -f $tmp/out
27851
27852 done
27853 EOF
27854 cat >>$CONFIG_STATUS <<\EOF
27855
27856 #
27857 # CONFIG_HEADER section.
27858 #
27859
27860 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27861 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27862 #
27863 # ac_d sets the value in "#define NAME VALUE" lines.
27864 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27865 ac_dB='[        ].*$,\1#\2'
27866 ac_dC=' '
27867 ac_dD=',;t'
27868 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27869 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27870 ac_iB='\([      ]\),\1#\2define\3'
27871 ac_iC=' '
27872 ac_iD='\4,;t'
27873 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27874 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27875 ac_uB='$,\1#\2define\3'
27876 ac_uC=' '
27877 ac_uD=',;t'
27878
27879 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27880   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27881   case $ac_file in
27882   - | *:- | *:-:* ) # input from stdin
27883         cat >$tmp/stdin
27884         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27885         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27886   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27887         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27888   * )   ac_file_in=$ac_file.in ;;
27889   esac
27890
27891   test x"$ac_file" != x- && { echo "$as_me:27891: creating $ac_file" >&5
27892 echo "$as_me: creating $ac_file" >&6;}
27893
27894   # First look for the input files in the build tree, otherwise in the
27895   # src tree.
27896   ac_file_inputs=`IFS=:
27897     for f in $ac_file_in; do
27898       case $f in
27899       -) echo $tmp/stdin ;;
27900       [\\/$]*)
27901          # Absolute (can't be DOS-style, as IFS=:)
27902          test -f "$f" || { { echo "$as_me:27902: error: cannot find input file: $f" >&5
27903 echo "$as_me: error: cannot find input file: $f" >&2;}
27904    { (exit 1); exit 1; }; }
27905          echo $f;;
27906       *) # Relative
27907          if test -f "$f"; then
27908            # Build tree
27909            echo $f
27910          elif test -f "$srcdir/$f"; then
27911            # Source tree
27912            echo $srcdir/$f
27913          else
27914            # /dev/null tree
27915            { { echo "$as_me:27915: error: cannot find input file: $f" >&5
27916 echo "$as_me: error: cannot find input file: $f" >&2;}
27917    { (exit 1); exit 1; }; }
27918          fi;;
27919       esac
27920     done` || { (exit 1); exit 1; }
27921   # Remove the trailing spaces.
27922   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27923
27924 EOF
27925
27926 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27927 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27928 # be either 'cat' or 'sort'.
27929 cat confdefs.h | uniq >conftest.vals
27930
27931 # Break up conftest.vals because some shells have a limit on
27932 # the size of here documents, and old seds have small limits too.
27933
27934 rm -f conftest.tail
27935 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27936 while grep . conftest.vals >/dev/null
27937 do
27938   # Write chunks of a limited-size here document to conftest.frag.
27939   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27940   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27941   echo 'CEOF' >> $CONFIG_STATUS
27942   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27943   rm -f conftest.vals
27944   mv conftest.tail conftest.vals
27945 done
27946 rm -f conftest.vals
27947
27948 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27949 # marker @DEFS@.
27950 echo '  cat >> conftest.edit <<CEOF
27951 /@DEFS@/r conftest.frag
27952 /@DEFS@/d
27953 CEOF
27954 sed -f conftest.edit $tmp/in > $tmp/out
27955 rm -f $tmp/in
27956 mv $tmp/out $tmp/in
27957 rm -f conftest.edit conftest.frag
27958 ' >> $CONFIG_STATUS
27959
27960 cat >>$CONFIG_STATUS <<\EOF
27961   # Let's still pretend it is `configure' which instantiates (i.e., don't
27962   # use $as_me), people would be surprised to read:
27963   #    /* config.h.  Generated automatically by config.status.  */
27964   if test x"$ac_file" = x-; then
27965     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27966   else
27967     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27968   fi
27969   cat $tmp/in >>$tmp/config.h
27970   rm -f $tmp/in
27971   if test x"$ac_file" != x-; then
27972     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27973       { echo "$as_me:27973: $ac_file is unchanged" >&5
27974 echo "$as_me: $ac_file is unchanged" >&6;}
27975     else
27976       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27977          X"$ac_file" : 'X\(//\)[^/]' \| \
27978          X"$ac_file" : 'X\(//\)$' \| \
27979          X"$ac_file" : 'X\(/\)' \| \
27980          .     : '\(.\)' 2>/dev/null ||
27981 echo X"$ac_file" |
27982     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27983           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27984           /^X\(\/\/\)$/{ s//\1/; q; }
27985           /^X\(\/\).*/{ s//\1/; q; }
27986           s/.*/./; q'`
27987       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27988         { case "$ac_dir" in
27989   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27990   *)                      as_incr_dir=.;;
27991 esac
27992 as_dummy="$ac_dir"
27993 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27994   case $as_mkdir_dir in
27995     # Skip DOS drivespec
27996     ?:) as_incr_dir=$as_mkdir_dir ;;
27997     *)
27998       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27999       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
28000     ;;
28001   esac
28002 done; }
28003
28004       fi
28005       rm -f $ac_file
28006       mv $tmp/config.h $ac_file
28007     fi
28008   else
28009     cat $tmp/config.h
28010     rm -f $tmp/config.h
28011   fi
28012 done
28013 EOF
28014 cat >>$CONFIG_STATUS <<\EOF
28015 #
28016 # CONFIG_COMMANDS section.
28017 #
28018 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
28019   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
28020   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
28021
28022   case $ac_dest in
28023     default )
28024 if test "x$cf_with_tests" != xno ; then
28025
28026 for cf_dir in test
28027 do
28028         if test ! -d $srcdir/$cf_dir; then
28029                 continue
28030         elif test -f $srcdir/$cf_dir/programs; then
28031                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
28032         fi
28033 done
28034
28035 fi
28036
28037 cf_prefix=$LIB_PREFIX
28038
28039 case $cf_cv_shlib_version in
28040 (cygdll|msysdll|mingw|msvcdll)
28041         TINFO_NAME=$TINFO_ARG_SUFFIX
28042         TINFO_SUFFIX=.dll
28043         ;;
28044 esac
28045
28046 if test -n "$TINFO_SUFFIX" ; then
28047         case $TINFO_SUFFIX in
28048         (tw*)
28049                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
28050                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
28051                 ;;
28052         (t*)
28053                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
28054                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
28055                 ;;
28056         (w*)
28057                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
28058                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
28059                 ;;
28060         esac
28061 fi
28062
28063 for cf_dir in $SRC_SUBDIRS
28064 do
28065         if test ! -d $srcdir/$cf_dir ; then
28066                 continue
28067         elif test -f $srcdir/$cf_dir/modules; then
28068
28069                 SHARED_LIB=
28070                 Libs_To_Make=
28071                 cf_awk_program=
28072                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
28073                 then
28074                         cf_awk_program="$cf_awk_program\
28075 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
28076 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
28077 "
28078                 fi
28079
28080                 if test "x$WILDCARD_SYMS" = xno
28081                 then
28082                         cf_awk_program="$cf_awk_program\
28083 /[      ]_\\*;/ { skip=1; next; }\
28084 "
28085                 fi
28086
28087                 if test "x$cf_awk_program" != "x"
28088                 then
28089                         cat >>$cf_dir/Makefile <<CF_EOF
28090
28091 # Generated by CF_LIB_RULES
28092 resulting.map: $UNALTERED_SYMS
28093         $AWK 'BEGIN { skip = 1; last=""; } \
28094 $cf_awk_program \
28095 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
28096  skip = 0; last = \$\$0; } \
28097 END { print last; }' < $UNALTERED_SYMS >\$@
28098
28099 distclean::
28100         rm -f resulting.map
28101 CF_EOF
28102                 fi
28103
28104                 for cf_item in $cf_LIST_MODELS
28105                 do
28106
28107         case X$cf_item in
28108         (Xlibtool)
28109                 cf_suffix='.la'
28110                 cf_depsuf=$cf_suffix
28111                 ;;
28112         (Xdebug)
28113                 case $cf_cv_system_name in
28114                 (*-msvc*)
28115                         cf_suffix='_g.lib'
28116                         ;;
28117                 (*)
28118                         cf_suffix='_g.a'
28119                         ;;
28120                 esac
28121                 cf_depsuf=$cf_suffix
28122                 ;;
28123         (Xprofile)
28124                 case $cf_cv_system_name in
28125                 (*-msvc*)
28126                         cf_suffix='_p.lib'
28127                         ;;
28128                 (*)
28129                         cf_suffix='_p.a'
28130                         ;;
28131                 esac
28132                 cf_depsuf=$cf_suffix
28133                 ;;
28134         (Xshared)
28135                 case $cf_cv_system_name in
28136                 (aix[5-7]*)
28137                         cf_suffix='.so'
28138                         cf_depsuf=$cf_suffix
28139                         ;;
28140                 (*-msvc*)
28141                         cf_suffix='.dll'
28142                         cf_depsuf='.dll.lib'
28143                         ;;
28144                 (cygwin*|msys*|mingw*)
28145                         cf_suffix='.dll'
28146                         cf_depsuf='.dll.a'
28147                         ;;
28148                 (darwin*)
28149                         cf_suffix='.dylib'
28150                         cf_depsuf=$cf_suffix
28151                         ;;
28152                 (hpux*)
28153                         case $target in
28154                         (ia64*)
28155                                 cf_suffix='.so'
28156                                 cf_depsuf=$cf_suffix
28157                                 ;;
28158                         (*)
28159                                 cf_suffix='.sl'
28160                                 cf_depsuf=$cf_suffix
28161                                 ;;
28162                         esac
28163                         ;;
28164                 (*)
28165                         cf_suffix='.so'
28166                         cf_depsuf=$cf_suffix
28167                         ;;
28168                 esac
28169                 ;;
28170         (*)
28171                 case $target in
28172                 (*-msvc*)
28173                         cf_suffix='.lib'
28174                         ;;
28175                 (*)
28176                         cf_suffix='.a'
28177                         ;;
28178                 esac
28179                 cf_depsuf=$cf_suffix
28180                 ;;
28181         esac
28182         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28183         then
28184                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28185                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28186         fi
28187
28188                         if test "$cf_dir" = "c++"
28189                         then
28190
28191 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28192
28193 eval cf_libname=\$${cf_map_lib_basename}_NAME
28194
28195                         else
28196
28197 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28198
28199 eval cf_libname=\$${cf_map_lib_basename}_NAME
28200
28201                         fi
28202                         test -z "$cf_libname" && cf_libname="$cf_dir"
28203                         if test $cf_item = shared ; then
28204                                 if test -n "${LIB_SUFFIX}"
28205                                 then
28206                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28207                                 else
28208                                         cf_shared_suffix="$cf_suffix"
28209                                 fi
28210                                 if test "$cf_cv_do_symlinks" = yes ; then
28211                                         cf_version_name=
28212
28213                                         case "$cf_cv_shlib_version" in
28214                                         (rel)
28215                                                 cf_version_name=REL_VERSION
28216                                                 ;;
28217                                         (abi)
28218                                                 cf_version_name=ABI_VERSION
28219                                                 ;;
28220                                         esac
28221
28222                                         if test -n "$cf_version_name"
28223                                         then
28224                                                 case "$cf_cv_system_name" in
28225                                                 (darwin*)
28226                                                         # "w", etc?
28227                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28228                                                         ;;
28229                                                 (*)
28230                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28231                                                         ;;
28232                                                 esac
28233                                         fi
28234                                         if test -n "${USE_LIB_SUFFIX}"
28235                                         then
28236                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28237                                         else
28238                                                 cf_shared_suffix="$cf_suffix"
28239                                         fi
28240                                 fi
28241                                 # cygwin needs import library, and has unique naming convention
28242                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28243                                 # use 'cyg' prefix for shared lib.
28244                                 case $cf_cv_shlib_version in
28245                                 (cygdll)
28246                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28247                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28248                                         ;;
28249                                 (msysdll)
28250                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28251                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28252                                         ;;
28253                                 (mingw)
28254                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28255                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28256                                         ;;
28257                                 (msvcdll)
28258                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28259                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28260                                         ;;
28261                                 (*)
28262                                         cf_add_lib=
28263                                         ;;
28264                                 esac
28265                                 if test -n "$cf_add_lib"
28266                                 then
28267                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28268                                         continue
28269                                 fi
28270                         fi
28271                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28272                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28273                 done
28274
28275                 if test $cf_dir = ncurses ; then
28276                         cf_subsets="$LIB_SUBSETS"
28277                         cf_r_parts="$cf_subsets"
28278                         cf_liblist="$Libs_To_Make"
28279
28280                         while test -n "$cf_r_parts"
28281                         do
28282                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28283                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28284                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28285                                         cf_add_lib=
28286                                         case $cf_l_parts in
28287                                         (*termlib*)
28288                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28289                                                 ;;
28290                                         (*ticlib*)
28291                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28292                                                 ;;
28293                                         (*)
28294                                                 break
28295                                                 ;;
28296                                         esac
28297                                         if test -n "$cf_add_lib"; then
28298                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28299                                         fi
28300                                 else
28301                                         break
28302                                 fi
28303                         done
28304                 else
28305                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28306                 fi
28307
28308                 if test $cf_dir = c++; then
28309                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28310                                 cf_list=
28311                                 for cf_item in $Libs_To_Make
28312                                 do
28313                                         case $cf_item in
28314                                         (*.a)
28315                                                 ;;
28316                                         (*)
28317                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28318                                                 ;;
28319                                         esac
28320                                         for cf_test in $cf_list
28321                                         do
28322                                                 if test "$cf_test" = "$cf_item"
28323                                                 then
28324                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28325                                                         cf_item=
28326                                                         break
28327                                                 fi
28328                                         done
28329                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28330                                 done
28331                                 Libs_To_Make="$cf_list"
28332                         fi
28333                 fi
28334
28335                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28336                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28337                         $cf_dir/Makefile >$cf_dir/Makefile.out
28338                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28339
28340                 $AWK -f $srcdir/mk-0th.awk \
28341                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28342                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28343
28344                 for cf_subset in $cf_subsets
28345                 do
28346                         cf_subdirs=
28347                         for cf_item in $cf_LIST_MODELS
28348                         do
28349
28350                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28351
28352 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28353
28354                         CXX_MODEL=$cf_ITEM
28355                         if test "$CXX_MODEL" = SHARED; then
28356                                 case $cf_cv_shlib_version in
28357                                 (cygdll|msysdll|mingw|msvcdll)
28358                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28359
28360 echo "${as_me:-configure}:28360: testing overriding CXX_MODEL to SHARED ..." 1>&5
28361
28362                                         with_shared_cxx=yes
28363                                         ;;
28364                                 (*)
28365                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28366                                         ;;
28367                                 esac
28368                         fi
28369
28370         case X$cf_item in
28371         (Xlibtool)
28372                 cf_suffix='.la'
28373                 cf_depsuf=$cf_suffix
28374                 ;;
28375         (Xdebug)
28376                 case $cf_cv_system_name in
28377                 (*-msvc*)
28378                         cf_suffix='_g.lib'
28379                         ;;
28380                 (*)
28381                         cf_suffix='_g.a'
28382                         ;;
28383                 esac
28384                 cf_depsuf=$cf_suffix
28385                 ;;
28386         (Xprofile)
28387                 case $cf_cv_system_name in
28388                 (*-msvc*)
28389                         cf_suffix='_p.lib'
28390                         ;;
28391                 (*)
28392                         cf_suffix='_p.a'
28393                         ;;
28394                 esac
28395                 cf_depsuf=$cf_suffix
28396                 ;;
28397         (Xshared)
28398                 case $cf_cv_system_name in
28399                 (aix[5-7]*)
28400                         cf_suffix='.so'
28401                         cf_depsuf=$cf_suffix
28402                         ;;
28403                 (*-msvc*)
28404                         cf_suffix='.dll'
28405                         cf_depsuf='.dll.lib'
28406                         ;;
28407                 (cygwin*|msys*|mingw*)
28408                         cf_suffix='.dll'
28409                         cf_depsuf='.dll.a'
28410                         ;;
28411                 (darwin*)
28412                         cf_suffix='.dylib'
28413                         cf_depsuf=$cf_suffix
28414                         ;;
28415                 (hpux*)
28416                         case $target in
28417                         (ia64*)
28418                                 cf_suffix='.so'
28419                                 cf_depsuf=$cf_suffix
28420                                 ;;
28421                         (*)
28422                                 cf_suffix='.sl'
28423                                 cf_depsuf=$cf_suffix
28424                                 ;;
28425                         esac
28426                         ;;
28427                 (*)
28428                         cf_suffix='.so'
28429                         cf_depsuf=$cf_suffix
28430                         ;;
28431                 esac
28432                 ;;
28433         (*)
28434                 case $target in
28435                 (*-msvc*)
28436                         cf_suffix='.lib'
28437                         ;;
28438                 (*)
28439                         cf_suffix='.a'
28440                         ;;
28441                 esac
28442                 cf_depsuf=$cf_suffix
28443                 ;;
28444         esac
28445         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28446         then
28447                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28448                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28449         fi
28450
28451         case $cf_item in
28452         (libtool) cf_subdir='obj_lo'  ;;
28453         (normal)  cf_subdir='objects' ;;
28454         (debug)   cf_subdir='obj_g' ;;
28455         (profile) cf_subdir='obj_p' ;;
28456         (shared)
28457                 case $cf_cv_system_name in
28458                 (cygwin|msys)
28459                         cf_subdir='objects' ;;
28460                 (*)
28461                         cf_subdir='obj_s' ;;
28462                 esac
28463         esac
28464
28465                         # Test for case where we build libtinfo with a different name.
28466                         cf_libname=$cf_dir
28467                         if test $cf_dir = ncurses ; then
28468                                 case $cf_subset in
28469                                 (*base*)
28470                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28471                                         ;;
28472                                 (*termlib*)
28473                                         cf_libname=$TINFO_LIB_SUFFIX
28474                                         ;;
28475                                 (ticlib*)
28476                                         cf_libname=$TICS_LIB_SUFFIX
28477                                         ;;
28478                                 esac
28479                         elif test $cf_dir = c++ ; then
28480
28481 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28482
28483 eval cf_libname=\$${cf_map_lib_basename}_NAME
28484
28485                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28486                         else
28487
28488 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28489
28490 eval cf_libname=\$${cf_map_lib_basename}_NAME
28491
28492                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28493                         fi
28494                         if test -n "${USE_ARG_SUFFIX}" ; then
28495                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28496                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28497                         fi
28498
28499                         # These dependencies really are for development, not
28500                         # builds, but they are useful in porting, too.
28501                         cf_depend="../include/ncurses_cfg.h"
28502                         if test "$srcdir" = "."; then
28503                                 cf_reldir="."
28504                         else
28505                                 cf_reldir="\${srcdir}"
28506                         fi
28507
28508                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28509                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28510                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28511                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28512                         fi
28513
28514                         cf_dir_suffix=
28515                         old_cf_suffix="$cf_suffix"
28516                         if test "$cf_cv_shlib_version_infix" = yes ; then
28517                         if test -n "$USE_LIB_SUFFIX" ; then
28518                                 case $USE_LIB_SUFFIX in
28519                                 (tw*)
28520                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28521                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28522                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28523                                         ;;
28524                                 (t*)
28525                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28526                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28527                                         cf_dir_suffix=t$EXTRA_SUFFIX
28528                                         ;;
28529                                 (w*)
28530                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28531                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28532                                         cf_dir_suffix=w$EXTRA_SUFFIX
28533                                         ;;
28534                                 (*)
28535                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28536                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28537                                         cf_dir_suffix=$EXTRA_SUFFIX
28538                                         ;;
28539                                 esac
28540                         fi
28541                         fi
28542
28543                         $AWK -f $srcdir/mk-1st.awk \
28544                                 name=${cf_libname}${cf_dir_suffix} \
28545                                 traces=$LIB_TRACING \
28546                                 MODEL=$cf_ITEM \
28547                                 CXX_MODEL=$CXX_MODEL \
28548                                 model=$cf_subdir \
28549                                 prefix=$cf_prefix \
28550                                 suffix=$cf_suffix \
28551                                 subset=$cf_subset \
28552                                 driver=$cf_cv_term_driver \
28553                                 SymLink="$LN_S" \
28554                                 TermlibRoot=$TINFO_NAME \
28555                                 TermlibSuffix=$TINFO_SUFFIX \
28556                                 ShlibVer=$cf_cv_shlib_version \
28557                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28558                                 ReLink=${cf_cv_do_relink:-no} \
28559                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28560                                 DoLinks=$cf_cv_do_symlinks \
28561                                 rmSoLocs=$cf_cv_rm_so_locs \
28562                                 ldconfig="$LDCONFIG" \
28563                                 overwrite=$WITH_OVERWRITE \
28564                                 depend="$cf_depend" \
28565                                 host="$host" \
28566                                 libtool_version="$LIBTOOL_VERSION" \
28567                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28568
28569                         cf_suffix="$old_cf_suffix"
28570
28571                         for cf_subdir2 in $cf_subdirs lib
28572                         do
28573                                 test $cf_subdir = $cf_subdir2 && break
28574                         done
28575                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28576                         $AWK -f $srcdir/mk-2nd.awk \
28577                                 name=$cf_dir \
28578                                 traces=$LIB_TRACING \
28579                                 MODEL=$cf_ITEM \
28580                                 model=$cf_subdir \
28581                                 subset=$cf_subset \
28582                                 srcdir=$srcdir \
28583                                 echo=$WITH_ECHO \
28584                                 crenames=$cf_cv_prog_CC_c_o \
28585                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28586                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28587                         cf_subdirs="$cf_subdirs $cf_subdir"
28588                         done
28589                 done
28590         fi
28591
28592         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28593 done
28594
28595 for cf_dir in $SRC_SUBDIRS
28596 do
28597         if test ! -d $srcdir/$cf_dir ; then
28598                 continue
28599         fi
28600
28601         if test -f $cf_dir/Makefile ; then
28602                 case "$cf_dir" in
28603                 (Ada95)
28604                         echo 'libs \' >> Makefile
28605                         echo 'install.libs \' >> Makefile
28606                         echo 'uninstall.libs ::' >> Makefile
28607                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28608                         ;;
28609                 esac
28610         fi
28611
28612         if test -f $srcdir/$cf_dir/modules; then
28613                 echo >> Makefile
28614                 if test -f $srcdir/$cf_dir/headers; then
28615 cat >> Makefile <<CF_EOF
28616 install.includes \\
28617 uninstall.includes \\
28618 CF_EOF
28619                 fi
28620 if test "$cf_dir" != "c++" ; then
28621 echo 'lint \' >> Makefile
28622 fi
28623 cat >> Makefile <<CF_EOF
28624 libs \\
28625 lintlib \\
28626 install.libs \\
28627 uninstall.libs \\
28628 install.$cf_dir \\
28629 uninstall.$cf_dir ::
28630         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28631 CF_EOF
28632         elif test -f $srcdir/$cf_dir/headers; then
28633 cat >> Makefile <<CF_EOF
28634
28635 libs \\
28636 install.libs \\
28637 uninstall.libs \\
28638 install.includes \\
28639 uninstall.includes ::
28640         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28641 CF_EOF
28642 fi
28643 done
28644
28645 if test "x$cf_with_db_install" = xyes; then
28646 cat >> Makefile <<CF_EOF
28647
28648 install.libs uninstall.libs \\
28649 install.data uninstall.data ::
28650 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28651 CF_EOF
28652 else
28653 cat >> Makefile <<CF_EOF
28654
28655 install.libs uninstall.libs ::
28656         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28657 CF_EOF
28658 fi
28659
28660 if test "x$cf_with_manpages" = xyes; then
28661 cat >> Makefile <<CF_EOF
28662
28663 install.man \\
28664 uninstall.man ::
28665         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28666 CF_EOF
28667 fi
28668
28669 cat >> Makefile <<CF_EOF
28670
28671 distclean ::
28672         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28673         rm -f headers.sh headers.sed mk_shared_lib.sh
28674         rm -f edit_man.* man_alias.*
28675         rm -rf \${DIRS_TO_MAKE}
28676 CF_EOF
28677
28678 # Special case: tack's manpage lives in its own directory.
28679 if test "x$cf_with_manpages" = xyes; then
28680 if test "x$cf_with_tack" = "xyes"; then
28681 cat >> Makefile <<CF_EOF
28682
28683 install.man \\
28684 uninstall.man ::
28685         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28686 CF_EOF
28687 fi
28688 fi
28689
28690 rm -f headers.sed headers.sh
28691
28692 echo creating headers.sh
28693 cat >headers.sh <<CF_EOF
28694 #! $SHELL
28695 # This shell script is generated by the 'configure' script.  It is invoked in a
28696 # subdirectory of the build tree.  It generates a sed-script in the parent
28697 # directory that is used to adjust includes for header files that reside in a
28698 # subdirectory of /usr/include, etc.
28699 PRG=""
28700 while test \$# != 3
28701 do
28702 PRG="\$PRG \$1"; shift
28703 done
28704 DST=\$1
28705 REF=\$2
28706 SRC=\$3
28707 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28708 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28709 echo installing \$SRC in \$DST
28710 CF_EOF
28711
28712 if test $WITH_CURSES_H = yes; then
28713         cat >>headers.sh <<CF_EOF
28714 case \$DST in
28715 (/*/include/*)
28716         END=\`basename \$DST\`
28717         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28718         do
28719                 NAME=\`basename \$i\`
28720                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28721         done
28722         ;;
28723 (*)
28724         echo "" >> \$TMPSED
28725         ;;
28726 esac
28727 CF_EOF
28728
28729 else
28730         cat >>headers.sh <<CF_EOF
28731 case \$DST in
28732 (/*/include/*)
28733         END=\`basename \$DST\`
28734         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28735         do
28736                 NAME=\`basename \$i\`
28737                 if test "\$NAME" = "curses.h"
28738                 then
28739                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28740                         NAME=ncurses.h
28741                 fi
28742                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28743         done
28744         ;;
28745 (*)
28746         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28747         ;;
28748 esac
28749 CF_EOF
28750 fi
28751 cat >>headers.sh <<CF_EOF
28752 rm -f \$TMPSRC
28753 sed -f \$TMPSED \$SRC > \$TMPSRC
28754 NAME=\`basename \$SRC\`
28755 CF_EOF
28756 if test $WITH_CURSES_H != yes; then
28757         cat >>headers.sh <<CF_EOF
28758 test "\$NAME" = "curses.h" && NAME=ncurses.h
28759 CF_EOF
28760 fi
28761 cat >>headers.sh <<CF_EOF
28762 # Just in case someone gzip'd manpages, remove the conflicting copy.
28763 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28764
28765 eval \$PRG \$TMPSRC \$DST/\$NAME
28766 rm -f \$TMPSRC \$TMPSED
28767 CF_EOF
28768
28769 chmod 0755 headers.sh
28770
28771 for cf_dir in $SRC_SUBDIRS
28772 do
28773         if test ! -d $srcdir/$cf_dir ; then
28774                 continue
28775         fi
28776
28777         if test -f $srcdir/$cf_dir/headers; then
28778                 $AWK -f $srcdir/mk-hdr.awk \
28779                         subset="$LIB_SUBSETS" \
28780                         compat="$WITH_CURSES_H" \
28781                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28782         fi
28783
28784         if test -f $srcdir/$cf_dir/modules; then
28785                 if test "$cf_dir" != "c++" ; then
28786                         cat >>$cf_dir/Makefile <<"CF_EOF"
28787 depend : ${AUTO_SRC}
28788         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28789
28790 # DO NOT DELETE THIS LINE -- make depend depends on it.
28791 CF_EOF
28792                 fi
28793         fi
28794 done
28795
28796 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28797 if test -z "$USE_OLD_MAKERULES" ; then
28798         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28799 fi
28800 fi
28801  ;;
28802   esac
28803 done
28804 EOF
28805
28806 cat >>$CONFIG_STATUS <<\EOF
28807
28808 { (exit 0); exit 0; }
28809 EOF
28810 chmod +x $CONFIG_STATUS
28811 ac_clean_files=$ac_clean_files_save
28812
28813 # configure is writing to config.log, and then calls config.status.
28814 # config.status does its own redirection, appending to config.log.
28815 # Unfortunately, on DOS this fails, as config.log is still kept open
28816 # by configure, so config.status won't be able to write to it; its
28817 # output is simply discarded.  So we exec the FD to /dev/null,
28818 # effectively closing config.log, so it can be properly (re)opened and
28819 # appended to by config.status.  When coming back to configure, we
28820 # need to make the FD available again.
28821 if test "$no_create" != yes; then
28822   ac_cs_success=:
28823   exec 5>/dev/null
28824   $SHELL $CONFIG_STATUS || ac_cs_success=false
28825   exec 5>>config.log
28826   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28827   # would make configure fail if this is the last instruction.
28828   $ac_cs_success || { (exit 1); exit 1; }
28829 fi
28830 ${MAKE:-make} preinstall