]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20240414
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.715 .
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                                 -dll)
6041                                         isdll=1
6042                                         ;;
6043                                 -W* | -w*)
6044                                         # ignore warnings
6045                                         ;;
6046                                 -D*)
6047                                         clopts+=("\$1")
6048                                         ;;
6049                                 -I*)
6050                                         clopts+=("\$1")
6051                                         ;;
6052                                 -l*)
6053                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6054                                         ;;
6055                                 -L*)
6056                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6057                                         ;;
6058                                 *.obj | *.o)
6059                                         ldopts+=("\$1")
6060                                         ;;
6061                                 -Wl,*)
6062                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6063                                                 ldopts+=("\${linkarg}")
6064                                         done
6065                                         ;;
6066                                 *.lib)
6067                                         ldopts+=("\$1")
6068                                         ;;
6069                                 -o)
6070                                         shift
6071                                         ldopts+=("-out:\$1")
6072                                         ;;
6073                                 *)
6074                                         clopts+=("\$1")
6075                                         ldopts+=("\$1")
6076                                         ;;
6077                         esac
6078                         shift
6079                 done
6080                 if [ "\$isdll" -ne 0 ]; then
6081                         for lib in \${libs[*]}; do
6082                                 ldopts+=("\$lib.dll.lib")
6083                         done
6084                 else
6085                         for lib in \${libs[*]}; do
6086                                 ldopts+=("\$lib.lib")
6087                         done
6088                 fi
6089                 cat <<-EOF
6090                 Creating program
6091                 ** ld options:   "\${ldopts[@]}"
6092 EOF
6093                 exec \$LD \${ldopts[@]}
6094 CF_EOF
6095                 chmod +x mk_prog.sh
6096                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6097                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6098                 ;;
6099         (mingw*)
6100                 cf_cv_shlib_version=mingw
6101                 cf_cv_shlib_version_infix=mingw
6102                 shlibdir=$bindir
6103                 MAKE_DLLS=
6104                 if test "$DFT_LWR_MODEL" = "shared" ; then
6105                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6106                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6107                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6108                 fi
6109                 CC_SHARED_OPTS=
6110                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6111                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6112                 cat >mk_shared_lib.sh <<-CF_EOF
6113                 #!$SHELL
6114                 SHARED_LIB=\$1
6115                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6116                 shift
6117                 cat <<-EOF
6118                 Linking shared library
6119                 ** SHARED_LIB \$SHARED_LIB
6120                 ** IMPORT_LIB \$IMPORT_LIB
6121 EOF
6122                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6123 CF_EOF
6124                 chmod +x mk_shared_lib.sh
6125                 ;;
6126         (openbsd[2-9].*|mirbsd*)
6127                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6128                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6129                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6130                 fi
6131                 if test "$cf_cv_enable_rpath" = yes ; then
6132                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6133                 fi
6134                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6135
6136         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6137         if test "$cf_cv_shlib_version" = rel; then
6138                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6139         else
6140                 cf_cv_shared_soname='`basename $@`'
6141         fi
6142
6143                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6144                 ;;
6145         (nto-qnx*|openbsd*|freebsd[12].*)
6146                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6147                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6148                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6149                 ;;
6150         (dragonfly*|freebsd*)
6151                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6152                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6153                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6154                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6155                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6156                 fi
6157
6158         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6159         if test "$cf_cv_shlib_version" = rel; then
6160                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6161         else
6162                 cf_cv_shared_soname='`basename $@`'
6163         fi
6164
6165                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6166                 ;;
6167         (netbsd*)
6168                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6169                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6170                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6171                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6172                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6173                         if test "$cf_cv_shlib_version" = auto; then
6174                         if test -f /usr/libexec/ld.elf_so; then
6175                                 cf_cv_shlib_version=abi
6176                         else
6177                                 cf_cv_shlib_version=rel
6178                         fi
6179                         fi
6180
6181         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6182         if test "$cf_cv_shlib_version" = rel; then
6183                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6184         else
6185                 cf_cv_shared_soname='`basename $@`'
6186         fi
6187
6188                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6189                 else
6190                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6191                 fi
6192                 ;;
6193         (osf*|mls+*)
6194                 # tested with OSF/1 V3.2 and 'cc'
6195                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6196                 # link with shared libs).
6197                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6198                 case $host_os in
6199                 (osf4*)
6200                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6201                         ;;
6202                 esac
6203                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6204                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6205                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6206                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6207                 fi
6208                 cf_cv_rm_so_locs=yes
6209                 ;;
6210         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6211                 # tested with osr5.0.5
6212                 if test "$GCC" != yes; then
6213                         CC_SHARED_OPTS='-belf -KPIC'
6214                 fi
6215                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6216                 if test "$cf_cv_enable_rpath" = yes ; then
6217                         # only way is to set LD_RUN_PATH but no switch for it
6218                         RUN_PATH=$libdir
6219                 fi
6220                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6221                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6222                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6223                 ;;
6224         (sunos4*)
6225                 # tested with SunOS 4.1.1 and gcc 2.7.0
6226                 if test "$GCC" != yes; then
6227                         CC_SHARED_OPTS='-KPIC'
6228                 fi
6229                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6230                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6231                 ;;
6232         (solaris2*)
6233                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6234                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6235                 if test "$DFT_LWR_MODEL" = "shared" ; then
6236                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6237                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6238                 fi
6239                 if test "$cf_cv_enable_rpath" = yes ; then
6240                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6241                 fi
6242
6243         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6244         if test "$cf_cv_shlib_version" = rel; then
6245                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6246         else
6247                 cf_cv_shared_soname='`basename $@`'
6248         fi
6249
6250                 if test "$GCC" != yes; then
6251                         cf_save_CFLAGS="$CFLAGS"
6252                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6253                         do
6254                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6255                                 cat >conftest.$ac_ext <<_ACEOF
6256 #line 6256 "configure"
6257 #include "confdefs.h"
6258 #include <stdio.h>
6259 int
6260 main (void)
6261 {
6262 printf("Hello\n");
6263   ;
6264   return 0;
6265 }
6266 _ACEOF
6267 rm -f conftest.$ac_objext
6268 if { (eval echo "$as_me:6268: \"$ac_compile\"") >&5
6269   (eval $ac_compile) 2>&5
6270   ac_status=$?
6271   echo "$as_me:6271: \$? = $ac_status" >&5
6272   (exit $ac_status); } &&
6273          { ac_try='test -s conftest.$ac_objext'
6274   { (eval echo "$as_me:6274: \"$ac_try\"") >&5
6275   (eval $ac_try) 2>&5
6276   ac_status=$?
6277   echo "$as_me:6277: \$? = $ac_status" >&5
6278   (exit $ac_status); }; }; then
6279   break
6280 else
6281   echo "$as_me: failed program was:" >&5
6282 cat conftest.$ac_ext >&5
6283 fi
6284 rm -f conftest.$ac_objext conftest.$ac_ext
6285                         done
6286                         CFLAGS="$cf_save_CFLAGS"
6287                         CC_SHARED_OPTS=$cf_shared_opts
6288                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6289                 else
6290                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6291                 fi
6292                 ;;
6293         (sysv5uw7*|unix_sv*)
6294                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6295                 if test "$GCC" != yes; then
6296                         CC_SHARED_OPTS='-KPIC'
6297                 fi
6298                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6299                 ;;
6300         (*)
6301                 CC_SHARED_OPTS='unknown'
6302                 MK_SHARED_LIB='echo unknown'
6303                 ;;
6304         esac
6305
6306         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6307         case "$cf_cv_shlib_version" in
6308         (rel|abi)
6309                 case "$MK_SHARED_LIB" in
6310                 (*'-o $@')
6311                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6312                         ;;
6313                 (*)
6314                         { echo "$as_me:6314: WARNING: ignored --with-shlib-version" >&5
6315 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6316                         ;;
6317                 esac
6318                 ;;
6319         esac
6320
6321         if test -n "$cf_try_cflags"
6322         then
6323 cat > conftest.$ac_ext <<EOF
6324 #line 6324 "${as_me:-configure}"
6325 #include <stdio.h>
6326 int main(int argc, char *argv[])
6327 {
6328         printf("hello\n");
6329         return (argv[argc-1] == 0) ;
6330 }
6331 EOF
6332                 cf_save_CFLAGS="$CFLAGS"
6333                 for cf_opt in $cf_try_cflags
6334                 do
6335                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6336                         echo "$as_me:6336: checking if CFLAGS option -$cf_opt works" >&5
6337 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6338                         if { (eval echo "$as_me:6338: \"$ac_compile\"") >&5
6339   (eval $ac_compile) 2>&5
6340   ac_status=$?
6341   echo "$as_me:6341: \$? = $ac_status" >&5
6342   (exit $ac_status); }; then
6343                                 echo "$as_me:6343: result: yes" >&5
6344 echo "${ECHO_T}yes" >&6
6345                                 cf_save_CFLAGS="$CFLAGS"
6346                         else
6347                                 echo "$as_me:6347: result: no" >&5
6348 echo "${ECHO_T}no" >&6
6349                         fi
6350                 done
6351                 CFLAGS="$cf_save_CFLAGS"
6352         fi
6353
6354         # RPATH_LIST is a colon-separated list of directories
6355         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6356         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6357
6358         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6359
6360         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6361
6362 echo "${as_me:-configure}:6362: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6363
6364         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6365
6366 echo "${as_me:-configure}:6366: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6367
6368 for model in $cf_list_models; do
6369         case $model in
6370         (libtool)
6371
6372 echo "$as_me:6372: checking for additional libtool options" >&5
6373 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6374
6375 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6376 if test "${with_libtool_opts+set}" = set; then
6377   withval="$with_libtool_opts"
6378   with_libtool_opts=$withval
6379 else
6380   with_libtool_opts=no
6381 fi;
6382 echo "$as_me:6382: result: $with_libtool_opts" >&5
6383 echo "${ECHO_T}$with_libtool_opts" >&6
6384
6385 case .$with_libtool_opts in
6386 (.yes|.no|.)
6387         ;;
6388 (*)
6389         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6390         ;;
6391 esac
6392
6393 echo "$as_me:6393: checking if exported-symbols file should be used" >&5
6394 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6395
6396 # Check whether --with-export-syms or --without-export-syms was given.
6397 if test "${with_export_syms+set}" = set; then
6398   withval="$with_export_syms"
6399   with_export_syms=$withval
6400 else
6401   with_export_syms=no
6402 fi;
6403 if test "x$with_export_syms" = xyes
6404 then
6405         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6406
6407 fi
6408 echo "$as_me:6408: result: $with_export_syms" >&5
6409 echo "${ECHO_T}$with_export_syms" >&6
6410 if test "x$with_export_syms" != xno
6411 then
6412         EXPORT_SYMS="-export-symbols $with_export_syms"
6413
6414 fi
6415
6416                 ;;
6417         (shared)
6418                 if test "$CC_SHARED_OPTS" = "unknown"; then
6419                         { { echo "$as_me:6419: error: Shared libraries are not supported in this version" >&5
6420 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6421    { (exit 1); exit 1; }; }
6422                 fi
6423                 # workaround for inept transition to PIE vs PIC...
6424                 echo "$as_me:6424: checking if current CFLAGS link properly" >&5
6425 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6426                 cat >conftest.$ac_ext <<_ACEOF
6427 #line 6427 "configure"
6428 #include "confdefs.h"
6429 #include <stdio.h>
6430 int
6431 main (void)
6432 {
6433 printf("Hello work\n");
6434   ;
6435   return 0;
6436 }
6437 _ACEOF
6438 rm -f conftest.$ac_objext conftest$ac_exeext
6439 if { (eval echo "$as_me:6439: \"$ac_link\"") >&5
6440   (eval $ac_link) 2>&5
6441   ac_status=$?
6442   echo "$as_me:6442: \$? = $ac_status" >&5
6443   (exit $ac_status); } &&
6444          { ac_try='test -s conftest$ac_exeext'
6445   { (eval echo "$as_me:6445: \"$ac_try\"") >&5
6446   (eval $ac_try) 2>&5
6447   ac_status=$?
6448   echo "$as_me:6448: \$? = $ac_status" >&5
6449   (exit $ac_status); }; }; then
6450   cf_cflags_work=yes
6451 else
6452   echo "$as_me: failed program was:" >&5
6453 cat conftest.$ac_ext >&5
6454 cf_cflags_work=no
6455 fi
6456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6457                 echo "$as_me:6457: result: $cf_cflags_work" >&5
6458 echo "${ECHO_T}$cf_cflags_work" >&6
6459                 if test "$cf_cflags_work" = no
6460                 then
6461                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6462
6463 echo "${as_me:-configure}:6463: testing try to work around by appending shared-options ..." 1>&5
6464
6465                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6466                 fi
6467
6468 echo "$as_me:6468: checking if versioned-symbols file should be used" >&5
6469 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6470
6471 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6472 if test "${with_versioned_syms+set}" = set; then
6473   withval="$with_versioned_syms"
6474   with_versioned_syms=$withval
6475 else
6476   with_versioned_syms=no
6477 fi;
6478 case "x$with_versioned_syms" in
6479 (xyes)
6480         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6481
6482         ;;
6483 (xno)
6484         ;;
6485 (x/*)
6486         test -f "$with_versioned_syms" || { { echo "$as_me:6486: error: expected a filename: $with_versioned_syms" >&5
6487 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6488    { (exit 1); exit 1; }; }
6489         ;;
6490 (*)
6491         test -f "$with_versioned_syms" || { { echo "$as_me:6491: error: expected a filename: $with_versioned_syms" >&5
6492 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6493    { (exit 1); exit 1; }; }
6494         with_versioned_syms=`pwd`/"$with_versioned_syms"
6495         ;;
6496 esac
6497 echo "$as_me:6497: result: $with_versioned_syms" >&5
6498 echo "${ECHO_T}$with_versioned_syms" >&6
6499
6500 RESULTING_SYMS=
6501 VERSIONED_SYMS=
6502 WILDCARD_SYMS=
6503
6504 if test "x$with_versioned_syms" != xno
6505 then
6506         RESULTING_SYMS=$with_versioned_syms
6507         case "x$MK_SHARED_LIB" in
6508         (*-Wl,*)
6509                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6510                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6511                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6512
6513 echo "${as_me:-configure}:6513: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6514
6515                 ;;
6516         (*-dy\ *)
6517                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6518                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6519                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6520
6521 echo "${as_me:-configure}:6521: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6522
6523                 ;;
6524         (*)
6525                 { echo "$as_me:6525: WARNING: this system does not support versioned-symbols" >&5
6526 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6527                 ;;
6528         esac
6529
6530         # Linux ld can selectively override scope, e.g., of symbols beginning with
6531         # "_" by first declaring some as global, and then using a wildcard to
6532         # declare the others as local.  Some other loaders cannot do this.  Check
6533         # by constructing a (very) simple shared library and inspecting its
6534         # symbols.
6535         if test "x$VERSIONED_SYMS" != "x"
6536         then
6537                 echo "$as_me:6537: checking if wildcards can be used to selectively omit symbols" >&5
6538 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6539                 WILDCARD_SYMS=no
6540
6541                 # make sources
6542                 rm -f conftest.*
6543
6544                 cat >conftest.ver <<EOF
6545 module_1.0 {
6546 global:
6547         globalf1;
6548 local:
6549         localf1;
6550 };
6551 module_2.0 {
6552 global:
6553         globalf2;
6554 local:
6555         localf2;
6556         _*;
6557 } module_1.0;
6558 submodule_1.0 {
6559 global:
6560         subglobalf1;
6561         _ismissing;
6562 local:
6563         sublocalf1;
6564 };
6565 submodule_2.0 {
6566 global:
6567         subglobalf2;
6568 local:
6569         sublocalf2;
6570         _*;
6571 } submodule_1.0;
6572 EOF
6573                 cat >conftest.$ac_ext <<EOF
6574 #line 6574 "configure"
6575 int     _ismissing(void) { return 1; }
6576 int     _localf1(void) { return 1; }
6577 int     _localf2(void) { return 2; }
6578 int     globalf1(void) { return 1; }
6579 int     globalf2(void) { return 2; }
6580 int     _sublocalf1(void) { return 1; }
6581 int     _sublocalf2(void) { return 2; }
6582 int     subglobalf1(void) { return 1; }
6583 int     subglobalf2(void) { return 2; }
6584 EOF
6585                 cat >conftest.mk <<EOF
6586 CC=${CC}
6587 CFLAGS=${CFLAGS}
6588 CPPFLAGS=${CPPFLAGS}
6589 LDFLAGS=${LDFLAGS}
6590 LIBS=${LIBS}
6591 VERSIONED_SYMS=${VERSIONED_SYMS}
6592 RESULTING_SYMS=conftest.ver
6593 MK_SHARED_LIB=${MK_SHARED_LIB}
6594 conftest.so: conftest.$ac_cv_objext
6595                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6596 EOF
6597
6598                 # compile source, make library
6599                 if make -f conftest.mk 2>&5 >/dev/null
6600                 then
6601                         # test for missing symbol in either Data or Text section
6602                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6603                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6604                 fi
6605                 echo "$as_me:6605: result: $WILDCARD_SYMS" >&5
6606 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6607                 rm -f conftest.*
6608         fi
6609 fi
6610
6611                 ;;
6612         esac
6613 done
6614
6615 ### Checks for special libraries, must be done up-front.
6616 SHLIB_LIST=""
6617
6618 echo "$as_me:6618: checking if you want to link with the GPM mouse library" >&5
6619 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6620
6621 # Check whether --with-gpm or --without-gpm was given.
6622 if test "${with_gpm+set}" = set; then
6623   withval="$with_gpm"
6624   with_gpm=$withval
6625 else
6626   with_gpm=maybe
6627 fi;
6628 echo "$as_me:6628: result: $with_gpm" >&5
6629 echo "${ECHO_T}$with_gpm" >&6
6630
6631 if test "$with_gpm" != no ; then
6632         echo "$as_me:6632: checking for gpm.h" >&5
6633 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6634 if test "${ac_cv_header_gpm_h+set}" = set; then
6635   echo $ECHO_N "(cached) $ECHO_C" >&6
6636 else
6637   cat >conftest.$ac_ext <<_ACEOF
6638 #line 6638 "configure"
6639 #include "confdefs.h"
6640 #include <gpm.h>
6641 _ACEOF
6642 if { (eval echo "$as_me:6642: \"$ac_cpp conftest.$ac_ext\"") >&5
6643   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6644   ac_status=$?
6645   egrep -v '^ *\+' conftest.er1 >conftest.err
6646   rm -f conftest.er1
6647   cat conftest.err >&5
6648   echo "$as_me:6648: \$? = $ac_status" >&5
6649   (exit $ac_status); } >/dev/null; then
6650   if test -s conftest.err; then
6651     ac_cpp_err=$ac_c_preproc_warn_flag
6652   else
6653     ac_cpp_err=
6654   fi
6655 else
6656   ac_cpp_err=yes
6657 fi
6658 if test -z "$ac_cpp_err"; then
6659   ac_cv_header_gpm_h=yes
6660 else
6661   echo "$as_me: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   ac_cv_header_gpm_h=no
6664 fi
6665 rm -f conftest.err conftest.$ac_ext
6666 fi
6667 echo "$as_me:6667: result: $ac_cv_header_gpm_h" >&5
6668 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6669 if test $ac_cv_header_gpm_h = yes; then
6670
6671 cat >>confdefs.h <<\EOF
6672 #define HAVE_GPM_H 1
6673 EOF
6674
6675                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6676                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6677
6678 echo "${as_me:-configure}:6678: testing assuming we really have GPM library ..." 1>&5
6679
6680 cat >>confdefs.h <<\EOF
6681 #define HAVE_LIBGPM 1
6682 EOF
6683
6684                         with_gpm=yes
6685                 else
6686                         echo "$as_me:6686: checking for Gpm_Open in -lgpm" >&5
6687 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6688 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6689   echo $ECHO_N "(cached) $ECHO_C" >&6
6690 else
6691   ac_check_lib_save_LIBS=$LIBS
6692 LIBS="-lgpm  $LIBS"
6693 cat >conftest.$ac_ext <<_ACEOF
6694 #line 6694 "configure"
6695 #include "confdefs.h"
6696
6697 /* Override any gcc2 internal prototype to avoid an error.  */
6698 #ifdef __cplusplus
6699 extern "C"
6700 #endif
6701 /* We use char because int might match the return type of a gcc2
6702    builtin and then its argument prototype would still apply.  */
6703 char Gpm_Open ();
6704 int
6705 main (void)
6706 {
6707 Gpm_Open ();
6708   ;
6709   return 0;
6710 }
6711 _ACEOF
6712 rm -f conftest.$ac_objext conftest$ac_exeext
6713 if { (eval echo "$as_me:6713: \"$ac_link\"") >&5
6714   (eval $ac_link) 2>&5
6715   ac_status=$?
6716   echo "$as_me:6716: \$? = $ac_status" >&5
6717   (exit $ac_status); } &&
6718          { ac_try='test -s conftest$ac_exeext'
6719   { (eval echo "$as_me:6719: \"$ac_try\"") >&5
6720   (eval $ac_try) 2>&5
6721   ac_status=$?
6722   echo "$as_me:6722: \$? = $ac_status" >&5
6723   (exit $ac_status); }; }; then
6724   ac_cv_lib_gpm_Gpm_Open=yes
6725 else
6726   echo "$as_me: failed program was:" >&5
6727 cat conftest.$ac_ext >&5
6728 ac_cv_lib_gpm_Gpm_Open=no
6729 fi
6730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6731 LIBS=$ac_check_lib_save_LIBS
6732 fi
6733 echo "$as_me:6733: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6734 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6735 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6736   with_gpm=yes
6737 else
6738
6739                                 if test "$with_gpm" = maybe; then
6740                                         { echo "$as_me:6740: WARNING: Cannot link with GPM library" >&5
6741 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6742                                         with_gpm=no
6743                                 else
6744                                         { { echo "$as_me:6744: error: Cannot link with GPM library" >&5
6745 echo "$as_me: error: Cannot link with GPM library" >&2;}
6746    { (exit 1); exit 1; }; }
6747                                 fi
6748
6749 fi
6750
6751                 fi
6752
6753 else
6754
6755                 test "$with_gpm" != maybe && { echo "$as_me:6755: WARNING: Cannot find GPM header" >&5
6756 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6757                 with_gpm=no
6758
6759 fi
6760
6761 fi
6762
6763 if test "$with_gpm" != no ; then
6764         echo "$as_me:6764: checking if you want to load GPM dynamically" >&5
6765 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6766
6767 # Check whether --with-dlsym or --without-dlsym was given.
6768 if test "${with_dlsym+set}" = set; then
6769   withval="$with_dlsym"
6770   with_dlsym=$withval
6771 else
6772   with_dlsym=yes
6773 fi;
6774         echo "$as_me:6774: result: $with_dlsym" >&5
6775 echo "${ECHO_T}$with_dlsym" >&6
6776         if test "x$with_dlsym" = xyes ; then
6777
6778 cf_have_dlsym=no
6779 echo "$as_me:6779: checking for dlsym" >&5
6780 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6781 if test "${ac_cv_func_dlsym+set}" = set; then
6782   echo $ECHO_N "(cached) $ECHO_C" >&6
6783 else
6784   cat >conftest.$ac_ext <<_ACEOF
6785 #line 6785 "configure"
6786 #include "confdefs.h"
6787 #define dlsym autoconf_temporary
6788 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6789 #undef dlsym
6790
6791 #ifdef __cplusplus
6792 extern "C"
6793 #endif
6794
6795 /* We use char because int might match the return type of a gcc2
6796    builtin and then its argument prototype would still apply.  */
6797 char dlsym (void);
6798
6799 int
6800 main (void)
6801 {
6802
6803 /* The GNU C library defines stubs for functions which it implements
6804     to always fail with ENOSYS.  Some functions are actually named
6805     something starting with __ and the normal name is an alias.  */
6806 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6807 #error found stub for dlsym
6808 #endif
6809
6810         return dlsym ();
6811   ;
6812   return 0;
6813 }
6814 _ACEOF
6815 rm -f conftest.$ac_objext conftest$ac_exeext
6816 if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817   (eval $ac_link) 2>&5
6818   ac_status=$?
6819   echo "$as_me:6819: \$? = $ac_status" >&5
6820   (exit $ac_status); } &&
6821          { ac_try='test -s conftest$ac_exeext'
6822   { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6823   (eval $ac_try) 2>&5
6824   ac_status=$?
6825   echo "$as_me:6825: \$? = $ac_status" >&5
6826   (exit $ac_status); }; }; then
6827   ac_cv_func_dlsym=yes
6828 else
6829   echo "$as_me: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6831 ac_cv_func_dlsym=no
6832 fi
6833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6834 fi
6835 echo "$as_me:6835: result: $ac_cv_func_dlsym" >&5
6836 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6837 if test $ac_cv_func_dlsym = yes; then
6838   cf_have_dlsym=yes
6839 else
6840
6841 cf_have_libdl=no
6842 echo "$as_me:6842: checking for dlsym in -ldl" >&5
6843 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6844 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6845   echo $ECHO_N "(cached) $ECHO_C" >&6
6846 else
6847   ac_check_lib_save_LIBS=$LIBS
6848 LIBS="-ldl  $LIBS"
6849 cat >conftest.$ac_ext <<_ACEOF
6850 #line 6850 "configure"
6851 #include "confdefs.h"
6852
6853 /* Override any gcc2 internal prototype to avoid an error.  */
6854 #ifdef __cplusplus
6855 extern "C"
6856 #endif
6857 /* We use char because int might match the return type of a gcc2
6858    builtin and then its argument prototype would still apply.  */
6859 char dlsym ();
6860 int
6861 main (void)
6862 {
6863 dlsym ();
6864   ;
6865   return 0;
6866 }
6867 _ACEOF
6868 rm -f conftest.$ac_objext conftest$ac_exeext
6869 if { (eval echo "$as_me:6869: \"$ac_link\"") >&5
6870   (eval $ac_link) 2>&5
6871   ac_status=$?
6872   echo "$as_me:6872: \$? = $ac_status" >&5
6873   (exit $ac_status); } &&
6874          { ac_try='test -s conftest$ac_exeext'
6875   { (eval echo "$as_me:6875: \"$ac_try\"") >&5
6876   (eval $ac_try) 2>&5
6877   ac_status=$?
6878   echo "$as_me:6878: \$? = $ac_status" >&5
6879   (exit $ac_status); }; }; then
6880   ac_cv_lib_dl_dlsym=yes
6881 else
6882   echo "$as_me: failed program was:" >&5
6883 cat conftest.$ac_ext >&5
6884 ac_cv_lib_dl_dlsym=no
6885 fi
6886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6887 LIBS=$ac_check_lib_save_LIBS
6888 fi
6889 echo "$as_me:6889: result: $ac_cv_lib_dl_dlsym" >&5
6890 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6891 if test $ac_cv_lib_dl_dlsym = yes; then
6892
6893         cf_have_dlsym=yes
6894         cf_have_libdl=yes
6895 fi
6896
6897 fi
6898
6899 if test "$cf_have_dlsym" = yes ; then
6900         test "$cf_have_libdl" = yes && {
6901 cf_add_libs="$LIBS"
6902 # reverse order
6903 cf_add_0lib=
6904 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6905 # filter duplicates
6906 for cf_add_1lib in $cf_add_0lib; do
6907         for cf_add_2lib in $cf_add_libs; do
6908                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6909                         cf_add_1lib=
6910                         break
6911                 fi
6912         done
6913         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6914 done
6915 LIBS="$cf_add_libs"
6916  }
6917
6918         echo "$as_me:6918: checking whether able to link to dl*() functions" >&5
6919 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6920         cat >conftest.$ac_ext <<_ACEOF
6921 #line 6921 "configure"
6922 #include "confdefs.h"
6923 #include <dlfcn.h>
6924 int
6925 main (void)
6926 {
6927
6928                 void *obj;
6929                 if ((obj = dlopen("filename", 0)) != 0) {
6930                         if (dlsym(obj, "symbolname") == 0) {
6931                         dlclose(obj);
6932                         }
6933                 }
6934   ;
6935   return 0;
6936 }
6937 _ACEOF
6938 rm -f conftest.$ac_objext conftest$ac_exeext
6939 if { (eval echo "$as_me:6939: \"$ac_link\"") >&5
6940   (eval $ac_link) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit $ac_status); } &&
6944          { ac_try='test -s conftest$ac_exeext'
6945   { (eval echo "$as_me:6945: \"$ac_try\"") >&5
6946   (eval $ac_try) 2>&5
6947   ac_status=$?
6948   echo "$as_me:6948: \$? = $ac_status" >&5
6949   (exit $ac_status); }; }; then
6950
6951 cat >>confdefs.h <<\EOF
6952 #define HAVE_LIBDL 1
6953 EOF
6954
6955 else
6956   echo "$as_me: failed program was:" >&5
6957 cat conftest.$ac_ext >&5
6958
6959                 { { echo "$as_me:6959: error: Cannot link test program for libdl" >&5
6960 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6961    { (exit 1); exit 1; }; }
6962 fi
6963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6964         echo "$as_me:6964: result: ok" >&5
6965 echo "${ECHO_T}ok" >&6
6966 else
6967         { { echo "$as_me:6967: error: Cannot find dlsym function" >&5
6968 echo "$as_me: error: Cannot find dlsym function" >&2;}
6969    { (exit 1); exit 1; }; }
6970 fi
6971
6972                 if test "x$with_gpm" != xyes ; then
6973                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6974
6975 echo "${as_me:-configure}:6975: testing assuming soname for gpm is $with_gpm ..." 1>&5
6976
6977                         cf_cv_gpm_soname="$with_gpm"
6978                 else
6979
6980 echo "$as_me:6980: checking for soname of gpm library" >&5
6981 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6982 if test "${cf_cv_gpm_soname+set}" = set; then
6983   echo $ECHO_N "(cached) $ECHO_C" >&6
6984 else
6985
6986 cf_cv_gpm_soname=unknown
6987 if test "$cross_compiling" != yes ; then
6988 cat >conftest.$ac_ext <<CF_EOF
6989 #include <gpm.h>
6990 int main(void)
6991 {
6992 if (Gpm_Open(0,0)) Gpm_Close();
6993         ${cf_cv_main_return:-return}(0);
6994 }
6995 CF_EOF
6996 cf_save_LIBS="$LIBS"
6997
6998 cf_add_libs="$LIBS"
6999 # reverse order
7000 cf_add_0lib=
7001 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7002 # filter duplicates
7003 for cf_add_1lib in $cf_add_0lib; do
7004         for cf_add_2lib in $cf_add_libs; do
7005                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7006                         cf_add_1lib=
7007                         break
7008                 fi
7009         done
7010         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7011 done
7012 LIBS="$cf_add_libs"
7013
7014         if { (eval echo "$as_me:7014: \"$ac_compile\"") >&5
7015   (eval $ac_compile) 2>&5
7016   ac_status=$?
7017   echo "$as_me:7017: \$? = $ac_status" >&5
7018   (exit $ac_status); } ; then
7019                 if { (eval echo "$as_me:7019: \"$ac_link\"") >&5
7020   (eval $ac_link) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit $ac_status); } ; then
7024                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7025                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7026                 fi
7027         fi
7028 rm -rf conftest*
7029 LIBS="$cf_save_LIBS"
7030 fi
7031
7032 fi
7033 echo "$as_me:7033: result: $cf_cv_gpm_soname" >&5
7034 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7035
7036                 fi
7037                 test "$cf_cv_gpm_soname" != "unknown" &&
7038 cat >>confdefs.h <<EOF
7039 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7040 EOF
7041
7042                 SHLIB_LIST="-ldl $SHLIB_LIST"
7043
7044 cf_add_libs="$PRIVATE_LIBS"
7045 # reverse order
7046 cf_add_0lib=
7047 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7048 # filter duplicates
7049 for cf_add_1lib in $cf_add_0lib; do
7050         for cf_add_2lib in $cf_add_libs; do
7051                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7052                         cf_add_1lib=
7053                         break
7054                 fi
7055         done
7056         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7057 done
7058 PRIVATE_LIBS="$cf_add_libs"
7059
7060         else
7061                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7062
7063 cf_add_libs="$TEST_LIBS"
7064 # reverse order
7065 cf_add_0lib=
7066 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7067 # filter duplicates
7068 for cf_add_1lib in $cf_add_0lib; do
7069         for cf_add_2lib in $cf_add_libs; do
7070                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7071                         cf_add_1lib=
7072                         break
7073                 fi
7074         done
7075         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7076 done
7077 TEST_LIBS="$cf_add_libs"
7078
7079 cf_add_libs="$PRIVATE_LIBS"
7080 # reverse order
7081 cf_add_0lib=
7082 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7083 # filter duplicates
7084 for cf_add_1lib in $cf_add_0lib; do
7085         for cf_add_2lib in $cf_add_libs; do
7086                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7087                         cf_add_1lib=
7088                         break
7089                 fi
7090         done
7091         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7092 done
7093 PRIVATE_LIBS="$cf_add_libs"
7094
7095         fi
7096
7097 cat >>confdefs.h <<\EOF
7098 #define HAVE_LIBGPM 1
7099 EOF
7100
7101 echo "$as_me:7101: checking for Gpm_Wgetch in -lgpm" >&5
7102 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7103 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7104   echo $ECHO_N "(cached) $ECHO_C" >&6
7105 else
7106   ac_check_lib_save_LIBS=$LIBS
7107 LIBS="-lgpm  $LIBS"
7108 cat >conftest.$ac_ext <<_ACEOF
7109 #line 7109 "configure"
7110 #include "confdefs.h"
7111
7112 /* Override any gcc2 internal prototype to avoid an error.  */
7113 #ifdef __cplusplus
7114 extern "C"
7115 #endif
7116 /* We use char because int might match the return type of a gcc2
7117    builtin and then its argument prototype would still apply.  */
7118 char Gpm_Wgetch ();
7119 int
7120 main (void)
7121 {
7122 Gpm_Wgetch ();
7123   ;
7124   return 0;
7125 }
7126 _ACEOF
7127 rm -f conftest.$ac_objext conftest$ac_exeext
7128 if { (eval echo "$as_me:7128: \"$ac_link\"") >&5
7129   (eval $ac_link) 2>&5
7130   ac_status=$?
7131   echo "$as_me:7131: \$? = $ac_status" >&5
7132   (exit $ac_status); } &&
7133          { ac_try='test -s conftest$ac_exeext'
7134   { (eval echo "$as_me:7134: \"$ac_try\"") >&5
7135   (eval $ac_try) 2>&5
7136   ac_status=$?
7137   echo "$as_me:7137: \$? = $ac_status" >&5
7138   (exit $ac_status); }; }; then
7139   ac_cv_lib_gpm_Gpm_Wgetch=yes
7140 else
7141   echo "$as_me: failed program was:" >&5
7142 cat conftest.$ac_ext >&5
7143 ac_cv_lib_gpm_Gpm_Wgetch=no
7144 fi
7145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7146 LIBS=$ac_check_lib_save_LIBS
7147 fi
7148 echo "$as_me:7148: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7149 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7150 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7151
7152 echo "$as_me:7152: checking if GPM is weakly bound to curses library" >&5
7153 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7154 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7155   echo $ECHO_N "(cached) $ECHO_C" >&6
7156 else
7157
7158 cf_cv_check_gpm_wgetch=unknown
7159 if test "$cross_compiling" != yes ; then
7160
7161 cat >conftest.$ac_ext <<CF_EOF
7162 #include <gpm.h>
7163 int main(void)
7164 {
7165         Gpm_Wgetch();
7166         ${cf_cv_main_return:-return}(0);
7167 }
7168 CF_EOF
7169
7170         cf_save_LIBS="$LIBS"
7171         # This only works if we can look at the symbol table.  If a shared
7172         # library is stripped for install, we cannot use that.  So we're forced
7173         # to rely on the static library, noting that some packagers may not
7174         # include it.
7175         LIBS="-static -lgpm -dynamic $LIBS"
7176         if { (eval echo "$as_me:7176: \"$ac_compile\"") >&5
7177   (eval $ac_compile) 2>&5
7178   ac_status=$?
7179   echo "$as_me:7179: \$? = $ac_status" >&5
7180   (exit $ac_status); } ; then
7181                 if { (eval echo "$as_me:7181: \"$ac_link\"") >&5
7182   (eval $ac_link) 2>&5
7183   ac_status=$?
7184   echo "$as_me:7184: \$? = $ac_status" >&5
7185   (exit $ac_status); } ; then
7186                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7187                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7188                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7189                 fi
7190         fi
7191         rm -rf conftest*
7192         LIBS="$cf_save_LIBS"
7193 fi
7194
7195 fi
7196 echo "$as_me:7196: result: $cf_cv_check_gpm_wgetch" >&5
7197 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7198
7199 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7200         { echo "$as_me:7200: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7201 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7202 fi
7203
7204 fi
7205
7206 fi
7207
7208 echo "$as_me:7208: checking if you want to use PCRE2 for regular-expressions" >&5
7209 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7210
7211 # Check whether --with-pcre2 or --without-pcre2 was given.
7212 if test "${with_pcre2+set}" = set; then
7213   withval="$with_pcre2"
7214
7215 fi;
7216 test -z "$with_pcre2" && with_pcre2=no
7217 echo "$as_me:7217: result: $with_pcre2" >&5
7218 echo "${ECHO_T}$with_pcre2" >&6
7219
7220 if test "x$with_pcre2" != xno ; then
7221
7222 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7223         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7224
7225 echo "${as_me:-configure}:7225: testing found package libpcre2 ..." 1>&5
7226
7227         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7228         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7229         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7230
7231 echo "${as_me:-configure}:7231: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7232
7233         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7234
7235 echo "${as_me:-configure}:7235: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7236
7237 cf_fix_cppflags=no
7238 cf_new_cflags=
7239 cf_new_cppflags=
7240 cf_new_extra_cppflags=
7241
7242 for cf_add_cflags in $cf_pkgconfig_incs
7243 do
7244 case $cf_fix_cppflags in
7245 (no)
7246         case $cf_add_cflags in
7247         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7248                 case $cf_add_cflags in
7249                 (-D*)
7250                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7251
7252                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7253                                 && test -z "${cf_tst_cflags}" \
7254                                 && cf_fix_cppflags=yes
7255
7256                         if test $cf_fix_cppflags = yes ; then
7257
7258         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7259         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7260
7261                                 continue
7262                         elif test "${cf_tst_cflags}" = "\"'" ; then
7263
7264         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7265         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7266
7267                                 continue
7268                         fi
7269                         ;;
7270                 esac
7271                 case "$CPPFLAGS" in
7272                 (*$cf_add_cflags)
7273                         ;;
7274                 (*)
7275                         case $cf_add_cflags in
7276                         (-D*)
7277                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7278
7279 CPPFLAGS=`echo "$CPPFLAGS" | \
7280         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7281                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7282
7283                                 ;;
7284                         esac
7285
7286         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7287         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7288
7289                         ;;
7290                 esac
7291                 ;;
7292         (*)
7293
7294         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7295         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7296
7297                 ;;
7298         esac
7299         ;;
7300 (yes)
7301
7302         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7303         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7304
7305         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7306
7307         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7308                 && test -z "${cf_tst_cflags}" \
7309                 && cf_fix_cppflags=no
7310         ;;
7311 esac
7312 done
7313
7314 if test -n "$cf_new_cflags" ; then
7315
7316         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7317         CFLAGS="${CFLAGS}$cf_new_cflags"
7318
7319 fi
7320
7321 if test -n "$cf_new_cppflags" ; then
7322
7323         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7324         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7325
7326 fi
7327
7328 if test -n "$cf_new_extra_cppflags" ; then
7329
7330         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7331         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7332
7333 fi
7334
7335 cf_add_libs="$LIBS"
7336 # reverse order
7337 cf_add_0lib=
7338 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7339 # filter duplicates
7340 for cf_add_1lib in $cf_add_0lib; do
7341         for cf_add_2lib in $cf_add_libs; do
7342                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7343                         cf_add_1lib=
7344                         break
7345                 fi
7346         done
7347         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7348 done
7349 LIBS="$cf_add_libs"
7350
7351         :
7352 else
7353         cf_pkgconfig_incs=
7354         cf_pkgconfig_libs=
7355
7356 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7357         test -n "$verbose" && echo "    found package libpcre" 1>&6
7358
7359 echo "${as_me:-configure}:7359: testing found package libpcre ..." 1>&5
7360
7361         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7362         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7363         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7364
7365 echo "${as_me:-configure}:7365: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7366
7367         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7368
7369 echo "${as_me:-configure}:7369: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7370
7371 cf_fix_cppflags=no
7372 cf_new_cflags=
7373 cf_new_cppflags=
7374 cf_new_extra_cppflags=
7375
7376 for cf_add_cflags in $cf_pkgconfig_incs
7377 do
7378 case $cf_fix_cppflags in
7379 (no)
7380         case $cf_add_cflags in
7381         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7382                 case $cf_add_cflags in
7383                 (-D*)
7384                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7385
7386                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7387                                 && test -z "${cf_tst_cflags}" \
7388                                 && cf_fix_cppflags=yes
7389
7390                         if test $cf_fix_cppflags = yes ; then
7391
7392         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7393         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7394
7395                                 continue
7396                         elif test "${cf_tst_cflags}" = "\"'" ; then
7397
7398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7400
7401                                 continue
7402                         fi
7403                         ;;
7404                 esac
7405                 case "$CPPFLAGS" in
7406                 (*$cf_add_cflags)
7407                         ;;
7408                 (*)
7409                         case $cf_add_cflags in
7410                         (-D*)
7411                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7412
7413 CPPFLAGS=`echo "$CPPFLAGS" | \
7414         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7415                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7416
7417                                 ;;
7418                         esac
7419
7420         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7421         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7422
7423                         ;;
7424                 esac
7425                 ;;
7426         (*)
7427
7428         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7429         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7430
7431                 ;;
7432         esac
7433         ;;
7434 (yes)
7435
7436         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7437         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7438
7439         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7440
7441         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7442                 && test -z "${cf_tst_cflags}" \
7443                 && cf_fix_cppflags=no
7444         ;;
7445 esac
7446 done
7447
7448 if test -n "$cf_new_cflags" ; then
7449
7450         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7451         CFLAGS="${CFLAGS}$cf_new_cflags"
7452
7453 fi
7454
7455 if test -n "$cf_new_cppflags" ; then
7456
7457         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7458         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7459
7460 fi
7461
7462 if test -n "$cf_new_extra_cppflags" ; then
7463
7464         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7465         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7466
7467 fi
7468
7469 cf_add_libs="$LIBS"
7470 # reverse order
7471 cf_add_0lib=
7472 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7473 # filter duplicates
7474 for cf_add_1lib in $cf_add_0lib; do
7475         for cf_add_2lib in $cf_add_libs; do
7476                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7477                         cf_add_1lib=
7478                         break
7479                 fi
7480         done
7481         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7482 done
7483 LIBS="$cf_add_libs"
7484
7485         :
7486 else
7487         cf_pkgconfig_incs=
7488         cf_pkgconfig_libs=
7489
7490                         { { echo "$as_me:7490: error: Cannot find PCRE2 library" >&5
7491 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7492    { (exit 1); exit 1; }; }
7493 fi
7494
7495 fi
7496
7497 cat >>confdefs.h <<\EOF
7498 #define HAVE_LIB_PCRE2 1
7499 EOF
7500
7501         # if pkgconfig gave no results, look for the libraries directly
7502         case $LIBS in
7503         (*pcre2-posix*|*pcreposix*)
7504                 ;;
7505         (*)
7506                 echo "$as_me:7506: checking for regcomp in -lpcre2-posix" >&5
7507 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7508 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7509   echo $ECHO_N "(cached) $ECHO_C" >&6
7510 else
7511   ac_check_lib_save_LIBS=$LIBS
7512 LIBS="-lpcre2-posix  $LIBS"
7513 cat >conftest.$ac_ext <<_ACEOF
7514 #line 7514 "configure"
7515 #include "confdefs.h"
7516
7517 /* Override any gcc2 internal prototype to avoid an error.  */
7518 #ifdef __cplusplus
7519 extern "C"
7520 #endif
7521 /* We use char because int might match the return type of a gcc2
7522    builtin and then its argument prototype would still apply.  */
7523 char regcomp ();
7524 int
7525 main (void)
7526 {
7527 regcomp ();
7528   ;
7529   return 0;
7530 }
7531 _ACEOF
7532 rm -f conftest.$ac_objext conftest$ac_exeext
7533 if { (eval echo "$as_me:7533: \"$ac_link\"") >&5
7534   (eval $ac_link) 2>&5
7535   ac_status=$?
7536   echo "$as_me:7536: \$? = $ac_status" >&5
7537   (exit $ac_status); } &&
7538          { ac_try='test -s conftest$ac_exeext'
7539   { (eval echo "$as_me:7539: \"$ac_try\"") >&5
7540   (eval $ac_try) 2>&5
7541   ac_status=$?
7542   echo "$as_me:7542: \$? = $ac_status" >&5
7543   (exit $ac_status); }; }; then
7544   ac_cv_lib_pcre2_posix_regcomp=yes
7545 else
7546   echo "$as_me: failed program was:" >&5
7547 cat conftest.$ac_ext >&5
7548 ac_cv_lib_pcre2_posix_regcomp=no
7549 fi
7550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7551 LIBS=$ac_check_lib_save_LIBS
7552 fi
7553 echo "$as_me:7553: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7554 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7555 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7556
7557 cf_add_libs="$LIBS"
7558 # reverse order
7559 cf_add_0lib=
7560 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7561 # filter duplicates
7562 for cf_add_1lib in $cf_add_0lib; do
7563         for cf_add_2lib in $cf_add_libs; do
7564                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7565                         cf_add_1lib=
7566                         break
7567                 fi
7568         done
7569         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7570 done
7571 LIBS="$cf_add_libs"
7572
7573 else
7574   echo "$as_me:7574: checking for regcomp in -lpcreposix" >&5
7575 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7576 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579   ac_check_lib_save_LIBS=$LIBS
7580 LIBS="-lpcreposix  $LIBS"
7581 cat >conftest.$ac_ext <<_ACEOF
7582 #line 7582 "configure"
7583 #include "confdefs.h"
7584
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 #ifdef __cplusplus
7587 extern "C"
7588 #endif
7589 /* We use char because int might match the return type of a gcc2
7590    builtin and then its argument prototype would still apply.  */
7591 char regcomp ();
7592 int
7593 main (void)
7594 {
7595 regcomp ();
7596   ;
7597   return 0;
7598 }
7599 _ACEOF
7600 rm -f conftest.$ac_objext conftest$ac_exeext
7601 if { (eval echo "$as_me:7601: \"$ac_link\"") >&5
7602   (eval $ac_link) 2>&5
7603   ac_status=$?
7604   echo "$as_me:7604: \$? = $ac_status" >&5
7605   (exit $ac_status); } &&
7606          { ac_try='test -s conftest$ac_exeext'
7607   { (eval echo "$as_me:7607: \"$ac_try\"") >&5
7608   (eval $ac_try) 2>&5
7609   ac_status=$?
7610   echo "$as_me:7610: \$? = $ac_status" >&5
7611   (exit $ac_status); }; }; then
7612   ac_cv_lib_pcreposix_regcomp=yes
7613 else
7614   echo "$as_me: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7616 ac_cv_lib_pcreposix_regcomp=no
7617 fi
7618 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7619 LIBS=$ac_check_lib_save_LIBS
7620 fi
7621 echo "$as_me:7621: result: $ac_cv_lib_pcreposix_regcomp" >&5
7622 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7623 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7624
7625 cf_add_libs="$LIBS"
7626 # reverse order
7627 cf_add_0lib=
7628 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7629 # filter duplicates
7630 for cf_add_1lib in $cf_add_0lib; do
7631         for cf_add_2lib in $cf_add_libs; do
7632                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7633                         cf_add_1lib=
7634                         break
7635                 fi
7636         done
7637         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7638 done
7639 LIBS="$cf_add_libs"
7640
7641 else
7642   { { echo "$as_me:7642: error: Cannot find PCRE2 POSIX library" >&5
7643 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7644    { (exit 1); exit 1; }; }
7645 fi
7646
7647 fi
7648
7649                 ;;
7650         esac
7651
7652         # either way, check for the library header files
7653
7654 for ac_header in pcre2posix.h pcreposix.h
7655 do
7656 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7657 echo "$as_me:7657: checking for $ac_header" >&5
7658 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7659 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7660   echo $ECHO_N "(cached) $ECHO_C" >&6
7661 else
7662   cat >conftest.$ac_ext <<_ACEOF
7663 #line 7663 "configure"
7664 #include "confdefs.h"
7665 #include <$ac_header>
7666 _ACEOF
7667 if { (eval echo "$as_me:7667: \"$ac_cpp conftest.$ac_ext\"") >&5
7668   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7669   ac_status=$?
7670   egrep -v '^ *\+' conftest.er1 >conftest.err
7671   rm -f conftest.er1
7672   cat conftest.err >&5
7673   echo "$as_me:7673: \$? = $ac_status" >&5
7674   (exit $ac_status); } >/dev/null; then
7675   if test -s conftest.err; then
7676     ac_cpp_err=$ac_c_preproc_warn_flag
7677   else
7678     ac_cpp_err=
7679   fi
7680 else
7681   ac_cpp_err=yes
7682 fi
7683 if test -z "$ac_cpp_err"; then
7684   eval "$as_ac_Header=yes"
7685 else
7686   echo "$as_me: failed program was:" >&5
7687   cat conftest.$ac_ext >&5
7688   eval "$as_ac_Header=no"
7689 fi
7690 rm -f conftest.err conftest.$ac_ext
7691 fi
7692 echo "$as_me:7692: result: `eval echo '${'$as_ac_Header'}'`" >&5
7693 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7694 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7695   cat >>confdefs.h <<EOF
7696 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7697 EOF
7698
7699 fi
7700 done
7701
7702 fi
7703
7704 # not everyone has "test -c"
7705 if test -c /dev/sysmouse 2>/dev/null ; then
7706 echo "$as_me:7706: checking if you want to use sysmouse" >&5
7707 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7708
7709 # Check whether --with-sysmouse or --without-sysmouse was given.
7710 if test "${with_sysmouse+set}" = set; then
7711   withval="$with_sysmouse"
7712   cf_with_sysmouse=$withval
7713 else
7714   cf_with_sysmouse=maybe
7715 fi;
7716         if test "$cf_with_sysmouse" != no ; then
7717         cat >conftest.$ac_ext <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7720
7721 #include <osreldate.h>
7722 #if (__FreeBSD_version >= 400017)
7723 #include <sys/consio.h>
7724 #include <sys/fbio.h>
7725 #else
7726 #include <machine/console.h>
7727 #endif
7728
7729 int
7730 main (void)
7731 {
7732
7733         struct mouse_info the_mouse;
7734         ioctl(0, CONS_MOUSECTL, &the_mouse);
7735
7736   ;
7737   return 0;
7738 }
7739 _ACEOF
7740 rm -f conftest.$ac_objext
7741 if { (eval echo "$as_me:7741: \"$ac_compile\"") >&5
7742   (eval $ac_compile) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); } &&
7746          { ac_try='test -s conftest.$ac_objext'
7747   { (eval echo "$as_me:7747: \"$ac_try\"") >&5
7748   (eval $ac_try) 2>&5
7749   ac_status=$?
7750   echo "$as_me:7750: \$? = $ac_status" >&5
7751   (exit $ac_status); }; }; then
7752   cf_with_sysmouse=yes
7753 else
7754   echo "$as_me: failed program was:" >&5
7755 cat conftest.$ac_ext >&5
7756 cf_with_sysmouse=no
7757 fi
7758 rm -f conftest.$ac_objext conftest.$ac_ext
7759         fi
7760 echo "$as_me:7760: result: $cf_with_sysmouse" >&5
7761 echo "${ECHO_T}$cf_with_sysmouse" >&6
7762 test "$cf_with_sysmouse" = yes &&
7763 cat >>confdefs.h <<\EOF
7764 #define USE_SYSMOUSE 1
7765 EOF
7766
7767 fi
7768
7769 # pretend that ncurses==ncursesw==ncursest
7770 echo "$as_me:7770: checking if you want to disable library suffixes" >&5
7771 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7772
7773 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7774 if test "${enable_lib_suffixes+set}" = set; then
7775   enableval="$enable_lib_suffixes"
7776   test "$enableval" != no && enableval=yes
7777         if test "$enableval" != "yes" ; then
7778     disable_lib_suffixes=yes
7779         else
7780                 disable_lib_suffixes=no
7781         fi
7782 else
7783   enableval=yes
7784         disable_lib_suffixes=no
7785
7786 fi;
7787 echo "$as_me:7787: result: $disable_lib_suffixes" >&5
7788 echo "${ECHO_T}$disable_lib_suffixes" >&6
7789
7790 ### If we're building with rpath, try to link non-standard libs that way too.
7791 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7792
7793 echo "$as_me:7793: checking if rpath-hack should be disabled" >&5
7794 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7795
7796 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7797 if test "${enable_rpath_hack+set}" = set; then
7798   enableval="$enable_rpath_hack"
7799   test "$enableval" != no && enableval=yes
7800         if test "$enableval" != "yes" ; then
7801     cf_disable_rpath_hack=yes
7802         else
7803                 cf_disable_rpath_hack=no
7804         fi
7805 else
7806   enableval=yes
7807         cf_disable_rpath_hack=no
7808
7809 fi;
7810 echo "$as_me:7810: result: $cf_disable_rpath_hack" >&5
7811 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7812 if test "$cf_disable_rpath_hack" = no ; then
7813
7814 echo "$as_me:7814: checking for updated LDFLAGS" >&5
7815 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7816 if test -n "$LD_RPATH_OPT" ; then
7817         echo "$as_me:7817: result: maybe" >&5
7818 echo "${ECHO_T}maybe" >&6
7819
7820         for ac_prog in ldd
7821 do
7822   # Extract the first word of "$ac_prog", so it can be a program name with args.
7823 set dummy $ac_prog; ac_word=$2
7824 echo "$as_me:7824: checking for $ac_word" >&5
7825 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7826 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7827   echo $ECHO_N "(cached) $ECHO_C" >&6
7828 else
7829   if test -n "$cf_ldd_prog"; then
7830   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7831 else
7832   ac_save_IFS=$IFS; IFS=$ac_path_separator
7833 ac_dummy="$PATH"
7834 for ac_dir in $ac_dummy; do
7835   IFS=$ac_save_IFS
7836   test -z "$ac_dir" && ac_dir=.
7837   $as_executable_p "$ac_dir/$ac_word" || continue
7838 ac_cv_prog_cf_ldd_prog="$ac_prog"
7839 echo "$as_me:7839: found $ac_dir/$ac_word" >&5
7840 break
7841 done
7842
7843 fi
7844 fi
7845 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7846 if test -n "$cf_ldd_prog"; then
7847   echo "$as_me:7847: result: $cf_ldd_prog" >&5
7848 echo "${ECHO_T}$cf_ldd_prog" >&6
7849 else
7850   echo "$as_me:7850: result: no" >&5
7851 echo "${ECHO_T}no" >&6
7852 fi
7853
7854   test -n "$cf_ldd_prog" && break
7855 done
7856 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7857
7858         cf_rpath_list="/usr/lib /lib"
7859         if test "$cf_ldd_prog" != no
7860         then
7861                 cf_rpath_oops=
7862
7863 cat >conftest.$ac_ext <<_ACEOF
7864 #line 7864 "configure"
7865 #include "confdefs.h"
7866 #include <stdio.h>
7867 int
7868 main (void)
7869 {
7870 printf("Hello");
7871   ;
7872   return 0;
7873 }
7874 _ACEOF
7875 rm -f conftest.$ac_objext conftest$ac_exeext
7876 if { (eval echo "$as_me:7876: \"$ac_link\"") >&5
7877   (eval $ac_link) 2>&5
7878   ac_status=$?
7879   echo "$as_me:7879: \$? = $ac_status" >&5
7880   (exit $ac_status); } &&
7881          { ac_try='test -s conftest$ac_exeext'
7882   { (eval echo "$as_me:7882: \"$ac_try\"") >&5
7883   (eval $ac_try) 2>&5
7884   ac_status=$?
7885   echo "$as_me:7885: \$? = $ac_status" >&5
7886   (exit $ac_status); }; }; then
7887   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7888                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7889 else
7890   echo "$as_me: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892 fi
7893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7894
7895                 # If we passed the link-test, but get a "not found" on a given library,
7896                 # this could be due to inept reconfiguration of gcc to make it only
7897                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7898                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7899                 # /usr/local libraries.
7900                 if test -n "$cf_rpath_oops"
7901                 then
7902                         for cf_rpath_src in $cf_rpath_oops
7903                         do
7904                                 for cf_rpath_dir in \
7905                                         /usr/local \
7906                                         /usr/pkg \
7907                                         /opt/sfw
7908                                 do
7909                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7910                                         then
7911                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7912
7913 echo "${as_me:-configure}:7913: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7914
7915                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7916                                                 break
7917                                         fi
7918                                 done
7919                         done
7920                 fi
7921         fi
7922
7923         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7924
7925 echo "${as_me:-configure}:7925: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7926
7927 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7928
7929 echo "${as_me:-configure}:7929: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7930
7931 cf_rpath_dst=
7932 for cf_rpath_src in $LDFLAGS
7933 do
7934         case $cf_rpath_src in
7935         (-L*)
7936
7937                 # check if this refers to a directory which we will ignore
7938                 cf_rpath_skip=no
7939                 if test -n "$cf_rpath_list"
7940                 then
7941                         for cf_rpath_item in $cf_rpath_list
7942                         do
7943                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7944                                 then
7945                                         cf_rpath_skip=yes
7946                                         break
7947                                 fi
7948                         done
7949                 fi
7950
7951                 if test "$cf_rpath_skip" = no
7952                 then
7953                         # transform the option
7954                         if test "$LD_RPATH_OPT" = "-R " ; then
7955                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7956                         else
7957                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7958                         fi
7959
7960                         # if we have not already added this, add it now
7961                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7962                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7963                         then
7964                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7965
7966 echo "${as_me:-configure}:7966: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7967
7968                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7969                         fi
7970                 fi
7971                 ;;
7972         esac
7973         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7974 done
7975 LDFLAGS=$cf_rpath_dst
7976
7977 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7978
7979 echo "${as_me:-configure}:7979: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7980
7981 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7982
7983 echo "${as_me:-configure}:7983: testing ...checking LIBS $LIBS ..." 1>&5
7984
7985 cf_rpath_dst=
7986 for cf_rpath_src in $LIBS
7987 do
7988         case $cf_rpath_src in
7989         (-L*)
7990
7991                 # check if this refers to a directory which we will ignore
7992                 cf_rpath_skip=no
7993                 if test -n "$cf_rpath_list"
7994                 then
7995                         for cf_rpath_item in $cf_rpath_list
7996                         do
7997                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7998                                 then
7999                                         cf_rpath_skip=yes
8000                                         break
8001                                 fi
8002                         done
8003                 fi
8004
8005                 if test "$cf_rpath_skip" = no
8006                 then
8007                         # transform the option
8008                         if test "$LD_RPATH_OPT" = "-R " ; then
8009                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8010                         else
8011                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8012                         fi
8013
8014                         # if we have not already added this, add it now
8015                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8016                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8017                         then
8018                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8019
8020 echo "${as_me:-configure}:8020: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8021
8022                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8023                         fi
8024                 fi
8025                 ;;
8026         esac
8027         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8028 done
8029 LIBS=$cf_rpath_dst
8030
8031 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8032
8033 echo "${as_me:-configure}:8033: testing ...checked LIBS $LIBS ..." 1>&5
8034
8035         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8036
8037 echo "${as_me:-configure}:8037: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8038
8039 else
8040         echo "$as_me:8040: result: no" >&5
8041 echo "${ECHO_T}no" >&6
8042 fi
8043
8044 fi
8045
8046 fi
8047
8048 ### Depending on the system, someone may use rpath to build ncurses but not
8049 # want users of the package to rely upon that feature.  Give those people an
8050 # option to suppress that detail from EXTRA_LDFLAGS.
8051 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8052 if test -n "$EXTRA_PKG_LDFLAGS"
8053 then
8054         echo "$as_me:8054: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8055 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8056
8057 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8058 if test "${enable_pkg_ldflags+set}" = set; then
8059   enableval="$enable_pkg_ldflags"
8060   test "$enableval" != no && enableval=yes
8061         if test "$enableval" != "yes" ; then
8062     disable_pkg_ldflags=yes
8063         else
8064                 disable_pkg_ldflags=no
8065         fi
8066 else
8067   enableval=yes
8068         disable_pkg_ldflags=no
8069
8070 fi;
8071         echo "$as_me:8071: result: $disable_pkg_ldflags" >&5
8072 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8073         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8074 fi
8075
8076 ###############################################################################
8077
8078 ###     use option --with-extra-suffix to append suffix to headers and libraries
8079 echo "$as_me:8079: checking if you wish to append extra suffix to header/library paths" >&5
8080 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8081 EXTRA_SUFFIX=
8082
8083 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8084 if test "${with_extra_suffix+set}" = set; then
8085   withval="$with_extra_suffix"
8086   case x$withval in
8087         (no)
8088                 ;;
8089         (xyes|x)
8090                 EXTRA_SUFFIX=$cf_cv_abi_version
8091                 ;;
8092         (*)
8093                 EXTRA_SUFFIX=$withval
8094                 ;;
8095         esac
8096
8097 fi;
8098 echo "$as_me:8098: result: $EXTRA_SUFFIX" >&5
8099 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8100
8101 ###     use option --disable-overwrite to leave out the link to -lcurses
8102 echo "$as_me:8102: checking if you wish to install ncurses overwriting curses" >&5
8103 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8104
8105 # Check whether --enable-overwrite or --disable-overwrite was given.
8106 if test "${enable_overwrite+set}" = set; then
8107   enableval="$enable_overwrite"
8108   with_overwrite=$enableval
8109 else
8110   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8111 fi;
8112 echo "$as_me:8112: result: $with_overwrite" >&5
8113 echo "${ECHO_T}$with_overwrite" >&6
8114
8115 echo "$as_me:8115: checking if external terminfo-database is used" >&5
8116 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8117
8118 # Check whether --enable-database or --disable-database was given.
8119 if test "${enable_database+set}" = set; then
8120   enableval="$enable_database"
8121   use_database=$enableval
8122 else
8123   use_database=yes
8124 fi;
8125 echo "$as_me:8125: result: $use_database" >&5
8126 echo "${ECHO_T}$use_database" >&6
8127
8128 case $host_os in
8129 (os2*)
8130         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8131         ;;
8132 (*)
8133         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8134         ;;
8135 esac
8136
8137 NCURSES_USE_DATABASE=0
8138 if test "$use_database" != no ; then
8139         NCURSES_USE_DATABASE=1
8140
8141         echo "$as_me:8141: checking which terminfo source-file will be installed" >&5
8142 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8143
8144 # Check whether --with-database or --without-database was given.
8145 if test "${with_database+set}" = set; then
8146   withval="$with_database"
8147   TERMINFO_SRC=$withval
8148 fi;
8149         echo "$as_me:8149: result: $TERMINFO_SRC" >&5
8150 echo "${ECHO_T}$TERMINFO_SRC" >&6
8151
8152         echo "$as_me:8152: checking whether to use hashed database instead of directory/tree" >&5
8153 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8154
8155 # Check whether --with-hashed-db or --without-hashed-db was given.
8156 if test "${with_hashed_db+set}" = set; then
8157   withval="$with_hashed_db"
8158
8159 else
8160   with_hashed_db=no
8161 fi;
8162         echo "$as_me:8162: result: $with_hashed_db" >&5
8163 echo "${ECHO_T}$with_hashed_db" >&6
8164 else
8165         with_hashed_db=no
8166 fi
8167
8168 echo "$as_me:8168: checking for list of fallback descriptions" >&5
8169 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8170
8171 # Check whether --with-fallbacks or --without-fallbacks was given.
8172 if test "${with_fallbacks+set}" = set; then
8173   withval="$with_fallbacks"
8174   with_fallback=$withval
8175 else
8176   with_fallback=
8177 fi;
8178 echo "$as_me:8178: result: $with_fallback" >&5
8179 echo "${ECHO_T}$with_fallback" >&6
8180
8181 case ".$with_fallback" in
8182 (.|.no)
8183         FALLBACK_LIST=
8184         ;;
8185 (.yes)
8186         { echo "$as_me:8186: WARNING: expected a list of terminal descriptions" >&5
8187 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8188         ;;
8189 (*)
8190         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8191         ;;
8192 esac
8193
8194 USE_FALLBACKS=
8195 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8196
8197 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8198 # tree for generating the terminal descriptions that will be compiled into the
8199 # library.  If your toolchain is old, it may not handle current terminal
8200 # databases.  Use configure-options to point to the tools which will be used,
8201 # rather than the first ones found on the $PATH.
8202 if test -n "$ac_tool_prefix"; then
8203   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8204 set dummy ${ac_tool_prefix}tic; ac_word=$2
8205 echo "$as_me:8205: checking for $ac_word" >&5
8206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8207 if test "${ac_cv_prog_TIC+set}" = set; then
8208   echo $ECHO_N "(cached) $ECHO_C" >&6
8209 else
8210   if test -n "$TIC"; then
8211   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8212 else
8213   ac_save_IFS=$IFS; IFS=$ac_path_separator
8214 ac_dummy="$PATH"
8215 for ac_dir in $ac_dummy; do
8216   IFS=$ac_save_IFS
8217   test -z "$ac_dir" && ac_dir=.
8218   $as_executable_p "$ac_dir/$ac_word" || continue
8219 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8220 echo "$as_me:8220: found $ac_dir/$ac_word" >&5
8221 break
8222 done
8223
8224 fi
8225 fi
8226 TIC=$ac_cv_prog_TIC
8227 if test -n "$TIC"; then
8228   echo "$as_me:8228: result: $TIC" >&5
8229 echo "${ECHO_T}$TIC" >&6
8230 else
8231   echo "$as_me:8231: result: no" >&5
8232 echo "${ECHO_T}no" >&6
8233 fi
8234
8235 fi
8236 if test -z "$ac_cv_prog_TIC"; then
8237   ac_ct_TIC=$TIC
8238   # Extract the first word of "tic", so it can be a program name with args.
8239 set dummy tic; ac_word=$2
8240 echo "$as_me:8240: checking for $ac_word" >&5
8241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8242 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8243   echo $ECHO_N "(cached) $ECHO_C" >&6
8244 else
8245   if test -n "$ac_ct_TIC"; then
8246   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8247 else
8248   ac_save_IFS=$IFS; IFS=$ac_path_separator
8249 ac_dummy="$PATH"
8250 for ac_dir in $ac_dummy; do
8251   IFS=$ac_save_IFS
8252   test -z "$ac_dir" && ac_dir=.
8253   $as_executable_p "$ac_dir/$ac_word" || continue
8254 ac_cv_prog_ac_ct_TIC="tic"
8255 echo "$as_me:8255: found $ac_dir/$ac_word" >&5
8256 break
8257 done
8258
8259 fi
8260 fi
8261 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8262 if test -n "$ac_ct_TIC"; then
8263   echo "$as_me:8263: result: $ac_ct_TIC" >&5
8264 echo "${ECHO_T}$ac_ct_TIC" >&6
8265 else
8266   echo "$as_me:8266: result: no" >&5
8267 echo "${ECHO_T}no" >&6
8268 fi
8269
8270   TIC=$ac_ct_TIC
8271 else
8272   TIC="$ac_cv_prog_TIC"
8273 fi
8274
8275 if test -n "$ac_tool_prefix"; then
8276   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8277 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8278 echo "$as_me:8278: checking for $ac_word" >&5
8279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8280 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8281   echo $ECHO_N "(cached) $ECHO_C" >&6
8282 else
8283   if test -n "$INFOCMP"; then
8284   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8285 else
8286   ac_save_IFS=$IFS; IFS=$ac_path_separator
8287 ac_dummy="$PATH"
8288 for ac_dir in $ac_dummy; do
8289   IFS=$ac_save_IFS
8290   test -z "$ac_dir" && ac_dir=.
8291   $as_executable_p "$ac_dir/$ac_word" || continue
8292 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8293 echo "$as_me:8293: found $ac_dir/$ac_word" >&5
8294 break
8295 done
8296
8297 fi
8298 fi
8299 INFOCMP=$ac_cv_prog_INFOCMP
8300 if test -n "$INFOCMP"; then
8301   echo "$as_me:8301: result: $INFOCMP" >&5
8302 echo "${ECHO_T}$INFOCMP" >&6
8303 else
8304   echo "$as_me:8304: result: no" >&5
8305 echo "${ECHO_T}no" >&6
8306 fi
8307
8308 fi
8309 if test -z "$ac_cv_prog_INFOCMP"; then
8310   ac_ct_INFOCMP=$INFOCMP
8311   # Extract the first word of "infocmp", so it can be a program name with args.
8312 set dummy infocmp; ac_word=$2
8313 echo "$as_me:8313: checking for $ac_word" >&5
8314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8315 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8316   echo $ECHO_N "(cached) $ECHO_C" >&6
8317 else
8318   if test -n "$ac_ct_INFOCMP"; then
8319   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8320 else
8321   ac_save_IFS=$IFS; IFS=$ac_path_separator
8322 ac_dummy="$PATH"
8323 for ac_dir in $ac_dummy; do
8324   IFS=$ac_save_IFS
8325   test -z "$ac_dir" && ac_dir=.
8326   $as_executable_p "$ac_dir/$ac_word" || continue
8327 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8328 echo "$as_me:8328: found $ac_dir/$ac_word" >&5
8329 break
8330 done
8331
8332 fi
8333 fi
8334 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8335 if test -n "$ac_ct_INFOCMP"; then
8336   echo "$as_me:8336: result: $ac_ct_INFOCMP" >&5
8337 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8338 else
8339   echo "$as_me:8339: result: no" >&5
8340 echo "${ECHO_T}no" >&6
8341 fi
8342
8343   INFOCMP=$ac_ct_INFOCMP
8344 else
8345   INFOCMP="$ac_cv_prog_INFOCMP"
8346 fi
8347
8348 if test -n "$FALLBACK_LIST"
8349 then
8350
8351 # Check whether --with-tic-path or --without-tic-path was given.
8352 if test "${with_tic_path+set}" = set; then
8353   withval="$with_tic_path"
8354   echo "$as_me:8354: checking for tic program for fallbacks" >&5
8355 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8356                 TIC=$withval
8357                 echo "$as_me:8357: result: $TIC" >&5
8358 echo "${ECHO_T}$TIC" >&6
8359
8360 if test "x$prefix" != xNONE; then
8361         cf_path_syntax="$prefix"
8362 else
8363         cf_path_syntax="$ac_default_prefix"
8364 fi
8365
8366 case ".$TIC" in
8367 (.\$\(*\)*|.\'*\'*)
8368         ;;
8369 (..|./*|.\\*)
8370         ;;
8371 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8372         ;;
8373 (.\${*prefix}*|.\${*dir}*)
8374         eval TIC="$TIC"
8375         case ".$TIC" in
8376         (.NONE/*)
8377                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8378                 ;;
8379         esac
8380         ;;
8381 (.no|.NONE/*)
8382         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8383         ;;
8384 (*)
8385         { { echo "$as_me:8385: error: expected a pathname, not \"$TIC\"" >&5
8386 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8387    { (exit 1); exit 1; }; }
8388         ;;
8389 esac
8390
8391 else
8392
8393 test -z "$TIC" && TIC=tic
8394 for ac_prog in $TIC tic
8395 do
8396   # Extract the first word of "$ac_prog", so it can be a program name with args.
8397 set dummy $ac_prog; ac_word=$2
8398 echo "$as_me:8398: checking for $ac_word" >&5
8399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8400 if test "${ac_cv_path_TIC+set}" = set; then
8401   echo $ECHO_N "(cached) $ECHO_C" >&6
8402 else
8403   case $TIC in
8404   [\\/]* | ?:[\\/]*)
8405   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8406   ;;
8407   *)
8408   ac_save_IFS=$IFS; IFS=$ac_path_separator
8409 ac_dummy="$PATH:/usr/local/ncurses/bin"
8410 for ac_dir in $ac_dummy; do
8411   IFS=$ac_save_IFS
8412   test -z "$ac_dir" && ac_dir=.
8413   if $as_executable_p "$ac_dir/$ac_word"; then
8414    ac_cv_path_TIC="$ac_dir/$ac_word"
8415    echo "$as_me:8415: found $ac_dir/$ac_word" >&5
8416    break
8417 fi
8418 done
8419
8420   ;;
8421 esac
8422 fi
8423 TIC=$ac_cv_path_TIC
8424
8425 if test -n "$TIC"; then
8426   echo "$as_me:8426: result: $TIC" >&5
8427 echo "${ECHO_T}$TIC" >&6
8428 else
8429   echo "$as_me:8429: result: no" >&5
8430 echo "${ECHO_T}no" >&6
8431 fi
8432
8433   test -n "$TIC" && break
8434 done
8435 test -n "$TIC" || TIC="$TIC"
8436
8437 cf_path_prog=""
8438 cf_path_args=""
8439 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8440 for cf_temp in $ac_cv_path_TIC
8441 do
8442         if test -z "$cf_path_prog" ; then
8443                 if test "$with_full_paths" = yes ; then
8444
8445 if test "x$prefix" != xNONE; then
8446         cf_path_syntax="$prefix"
8447 else
8448         cf_path_syntax="$ac_default_prefix"
8449 fi
8450
8451 case ".$cf_temp" in
8452 (.\$\(*\)*|.\'*\'*)
8453         ;;
8454 (..|./*|.\\*)
8455         ;;
8456 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8457         ;;
8458 (.\${*prefix}*|.\${*dir}*)
8459         eval cf_temp="$cf_temp"
8460         case ".$cf_temp" in
8461         (.NONE/*)
8462                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8463                 ;;
8464         esac
8465         ;;
8466 (.no|.NONE/*)
8467         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8468         ;;
8469 (*)
8470         break
8471         ;;
8472 esac
8473
8474                         cf_path_prog="$cf_temp"
8475                 else
8476                         cf_path_prog="`basename $cf_temp`"
8477                 fi
8478         elif test -z "$cf_path_args" ; then
8479                 cf_path_args="$cf_temp"
8480         else
8481                 cf_path_args="$cf_path_args $cf_temp"
8482         fi
8483 done
8484 IFS="$cf_save_ifs"
8485
8486 if test -n "$cf_path_prog" ; then
8487
8488 echo "${as_me:-configure}:8488: testing defining path for ${cf_path_prog} ..." 1>&5
8489
8490 cat >>confdefs.h <<EOF
8491 #define TIC_PATH "$cf_path_prog"
8492 EOF
8493
8494         test -n "$cf_path_args" &&
8495 cat >>confdefs.h <<EOF
8496 #define TIC_ARGS "$cf_path_args"
8497 EOF
8498
8499 fi
8500
8501                 if test -z "$TIC"
8502                 then
8503                         { echo "$as_me:8503: WARNING: no tic program found for fallbacks" >&5
8504 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8505                 fi
8506
8507 fi;
8508
8509 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8510 if test "${with_infocmp_path+set}" = set; then
8511   withval="$with_infocmp_path"
8512   echo "$as_me:8512: checking for infocmp program for fallbacks" >&5
8513 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8514                 INFOCMP=$withval
8515                 echo "$as_me:8515: result: $INFOCMP" >&5
8516 echo "${ECHO_T}$INFOCMP" >&6
8517
8518 if test "x$prefix" != xNONE; then
8519         cf_path_syntax="$prefix"
8520 else
8521         cf_path_syntax="$ac_default_prefix"
8522 fi
8523
8524 case ".$INFOCMP" in
8525 (.\$\(*\)*|.\'*\'*)
8526         ;;
8527 (..|./*|.\\*)
8528         ;;
8529 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8530         ;;
8531 (.\${*prefix}*|.\${*dir}*)
8532         eval INFOCMP="$INFOCMP"
8533         case ".$INFOCMP" in
8534         (.NONE/*)
8535                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8536                 ;;
8537         esac
8538         ;;
8539 (.no|.NONE/*)
8540         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8541         ;;
8542 (*)
8543         { { echo "$as_me:8543: error: expected a pathname, not \"$INFOCMP\"" >&5
8544 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8545    { (exit 1); exit 1; }; }
8546         ;;
8547 esac
8548
8549 else
8550
8551 test -z "$INFOCMP" && INFOCMP=infocmp
8552 for ac_prog in $INFOCMP infocmp
8553 do
8554   # Extract the first word of "$ac_prog", so it can be a program name with args.
8555 set dummy $ac_prog; ac_word=$2
8556 echo "$as_me:8556: checking for $ac_word" >&5
8557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8558 if test "${ac_cv_path_INFOCMP+set}" = set; then
8559   echo $ECHO_N "(cached) $ECHO_C" >&6
8560 else
8561   case $INFOCMP in
8562   [\\/]* | ?:[\\/]*)
8563   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8564   ;;
8565   *)
8566   ac_save_IFS=$IFS; IFS=$ac_path_separator
8567 ac_dummy="$PATH:/usr/local/ncurses/bin"
8568 for ac_dir in $ac_dummy; do
8569   IFS=$ac_save_IFS
8570   test -z "$ac_dir" && ac_dir=.
8571   if $as_executable_p "$ac_dir/$ac_word"; then
8572    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8573    echo "$as_me:8573: found $ac_dir/$ac_word" >&5
8574    break
8575 fi
8576 done
8577
8578   ;;
8579 esac
8580 fi
8581 INFOCMP=$ac_cv_path_INFOCMP
8582
8583 if test -n "$INFOCMP"; then
8584   echo "$as_me:8584: result: $INFOCMP" >&5
8585 echo "${ECHO_T}$INFOCMP" >&6
8586 else
8587   echo "$as_me:8587: result: no" >&5
8588 echo "${ECHO_T}no" >&6
8589 fi
8590
8591   test -n "$INFOCMP" && break
8592 done
8593 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8594
8595 cf_path_prog=""
8596 cf_path_args=""
8597 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8598 for cf_temp in $ac_cv_path_INFOCMP
8599 do
8600         if test -z "$cf_path_prog" ; then
8601                 if test "$with_full_paths" = yes ; then
8602
8603 if test "x$prefix" != xNONE; then
8604         cf_path_syntax="$prefix"
8605 else
8606         cf_path_syntax="$ac_default_prefix"
8607 fi
8608
8609 case ".$cf_temp" in
8610 (.\$\(*\)*|.\'*\'*)
8611         ;;
8612 (..|./*|.\\*)
8613         ;;
8614 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8615         ;;
8616 (.\${*prefix}*|.\${*dir}*)
8617         eval cf_temp="$cf_temp"
8618         case ".$cf_temp" in
8619         (.NONE/*)
8620                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8621                 ;;
8622         esac
8623         ;;
8624 (.no|.NONE/*)
8625         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8626         ;;
8627 (*)
8628         break
8629         ;;
8630 esac
8631
8632                         cf_path_prog="$cf_temp"
8633                 else
8634                         cf_path_prog="`basename $cf_temp`"
8635                 fi
8636         elif test -z "$cf_path_args" ; then
8637                 cf_path_args="$cf_temp"
8638         else
8639                 cf_path_args="$cf_path_args $cf_temp"
8640         fi
8641 done
8642 IFS="$cf_save_ifs"
8643
8644 if test -n "$cf_path_prog" ; then
8645
8646 echo "${as_me:-configure}:8646: testing defining path for ${cf_path_prog} ..." 1>&5
8647
8648 cat >>confdefs.h <<EOF
8649 #define INFOCMP_PATH "$cf_path_prog"
8650 EOF
8651
8652         test -n "$cf_path_args" &&
8653 cat >>confdefs.h <<EOF
8654 #define INFOCMP_ARGS "$cf_path_args"
8655 EOF
8656
8657 fi
8658
8659                 if test -z "$INFOCMP"
8660                 then
8661                         { echo "$as_me:8661: WARNING: no infocmp program found for fallbacks" >&5
8662 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8663                 fi
8664
8665 fi;
8666
8667 fi
8668
8669 echo "$as_me:8669: checking if you want modern xterm or antique" >&5
8670 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8671
8672 # Check whether --with-xterm-new or --without-xterm-new was given.
8673 if test "${with_xterm_new+set}" = set; then
8674   withval="$with_xterm_new"
8675   with_xterm_new=$withval
8676 else
8677   with_xterm_new=yes
8678 fi;
8679 case $with_xterm_new in
8680 (no) with_xterm_new=xterm-old;;
8681 (*)      with_xterm_new=xterm-new;;
8682 esac
8683 echo "$as_me:8683: result: $with_xterm_new" >&5
8684 echo "${ECHO_T}$with_xterm_new" >&6
8685 WHICH_XTERM=$with_xterm_new
8686
8687 echo "$as_me:8687: checking if xterm backspace sends BS or DEL" >&5
8688 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8689
8690 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8691 if test "${with_xterm_kbs+set}" = set; then
8692   withval="$with_xterm_kbs"
8693   with_xterm_kbs=$withval
8694 else
8695   with_xterm_kbs=BS
8696 fi;
8697 case x$with_xterm_kbs in
8698 (xyes|xno|xBS|xbs|x8)
8699         with_xterm_kbs=BS
8700         ;;
8701 (xDEL|xdel|x127)
8702         with_xterm_kbs=DEL
8703         ;;
8704 (*)
8705         with_xterm_kbs=$withval
8706         ;;
8707 esac
8708 echo "$as_me:8708: result: $with_xterm_kbs" >&5
8709 echo "${ECHO_T}$with_xterm_kbs" >&6
8710 XTERM_KBS=$with_xterm_kbs
8711
8712 MAKE_TERMINFO=
8713 if test "$use_database" = no ; then
8714         TERMINFO="${datadir}/terminfo"
8715         MAKE_TERMINFO="#"
8716 else
8717
8718 echo "$as_me:8718: checking for list of terminfo directories" >&5
8719 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8720
8721 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8722 if test "${with_terminfo_dirs+set}" = set; then
8723   withval="$with_terminfo_dirs"
8724
8725 else
8726   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8727 fi;
8728 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8729 cf_dst_path=
8730 for cf_src_path in $withval
8731 do
8732
8733 if test "x$prefix" != xNONE; then
8734         cf_path_syntax="$prefix"
8735 else
8736         cf_path_syntax="$ac_default_prefix"
8737 fi
8738
8739 case ".$cf_src_path" in
8740 (.\$\(*\)*|.\'*\'*)
8741         ;;
8742 (..|./*|.\\*)
8743         ;;
8744 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8745         ;;
8746 (.\${*prefix}*|.\${*dir}*)
8747         eval cf_src_path="$cf_src_path"
8748         case ".$cf_src_path" in
8749         (.NONE/*)
8750                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8751                 ;;
8752         esac
8753         ;;
8754 (.no|.NONE/*)
8755         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8756         ;;
8757 (*)
8758         { { echo "$as_me:8758: error: expected a pathname, not \"$cf_src_path\"" >&5
8759 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8760    { (exit 1); exit 1; }; }
8761         ;;
8762 esac
8763
8764   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8765   cf_dst_path="${cf_dst_path}${cf_src_path}"
8766 done
8767 IFS="$ac_save_ifs"
8768
8769 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8770 # so we have to check/work around.  We do prefer the result of "eval"...
8771 eval cf_dst_eval="$cf_dst_path"
8772 case "x$cf_dst_eval" in
8773 (xNONE*)
8774         TERMINFO_DIRS=$cf_dst_path
8775         ;;
8776 (*)
8777         TERMINFO_DIRS="$cf_dst_eval"
8778         ;;
8779 esac
8780
8781 echo "$as_me:8781: result: $TERMINFO_DIRS" >&5
8782 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8783 test -n "$TERMINFO_DIRS" &&
8784 cat >>confdefs.h <<EOF
8785 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8786 EOF
8787
8788 case "x$TERMINFO" in
8789 x???:*)
8790         { echo "$as_me:8790: WARNING: ignoring non-directory/file TERMINFO value" >&5
8791 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8792         unset TERMINFO
8793         ;;
8794 esac
8795
8796 echo "$as_me:8796: checking for default terminfo directory" >&5
8797 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8798
8799 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8800 if test "${with_default_terminfo_dir+set}" = set; then
8801   withval="$with_default_terminfo_dir"
8802
8803 else
8804   withval="${TERMINFO:-${datadir}/terminfo}"
8805 fi; if test -n "${datadir}/terminfo" ; then
8806
8807 if test "x$prefix" != xNONE; then
8808         cf_path_syntax="$prefix"
8809 else
8810         cf_path_syntax="$ac_default_prefix"
8811 fi
8812
8813 case ".$withval" in
8814 (.\$\(*\)*|.\'*\'*)
8815         ;;
8816 (..|./*|.\\*)
8817         ;;
8818 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8819         ;;
8820 (.\${*prefix}*|.\${*dir}*)
8821         eval withval="$withval"
8822         case ".$withval" in
8823         (.NONE/*)
8824                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8825                 ;;
8826         esac
8827         ;;
8828 (.no|.NONE/*)
8829         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8830         ;;
8831 (*)
8832         { { echo "$as_me:8832: error: expected a pathname, not \"$withval\"" >&5
8833 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8834    { (exit 1); exit 1; }; }
8835         ;;
8836 esac
8837
8838 fi
8839 eval TERMINFO="$withval"
8840
8841 echo "$as_me:8841: result: $TERMINFO" >&5
8842 echo "${ECHO_T}$TERMINFO" >&6
8843
8844 cat >>confdefs.h <<EOF
8845 #define TERMINFO "$TERMINFO"
8846 EOF
8847
8848 fi
8849
8850 ###     use option --disable-big-core to make tic run on small machines
8851 ###     We need 4Mb, check if we can allocate 50% more than that.
8852 echo "$as_me:8852: checking if big-core option selected" >&5
8853 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8854
8855 # Check whether --enable-big-core or --disable-big-core was given.
8856 if test "${enable_big_core+set}" = set; then
8857   enableval="$enable_big_core"
8858   with_big_core=$enableval
8859 else
8860   if test "$cross_compiling" = yes; then
8861   with_big_core=no
8862 else
8863   cat >conftest.$ac_ext <<_ACEOF
8864 #line 8864 "configure"
8865 #include "confdefs.h"
8866
8867 #include <stdlib.h>
8868 #include <string.h>
8869 int main() {
8870         unsigned long n = 6000000L;
8871         char *s = malloc(n);
8872         if (s != 0)
8873                 s[0] = s[n-1] = 0;
8874         ${cf_cv_main_return:-return}(s == 0);
8875 }
8876 _ACEOF
8877 rm -f conftest$ac_exeext
8878 if { (eval echo "$as_me:8878: \"$ac_link\"") >&5
8879   (eval $ac_link) 2>&5
8880   ac_status=$?
8881   echo "$as_me:8881: \$? = $ac_status" >&5
8882   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8883   { (eval echo "$as_me:8883: \"$ac_try\"") >&5
8884   (eval $ac_try) 2>&5
8885   ac_status=$?
8886   echo "$as_me:8886: \$? = $ac_status" >&5
8887   (exit $ac_status); }; }; then
8888   with_big_core=yes
8889 else
8890   echo "$as_me: program exited with status $ac_status" >&5
8891 echo "$as_me: failed program was:" >&5
8892 cat conftest.$ac_ext >&5
8893 with_big_core=no
8894 fi
8895 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8896 fi
8897 fi;
8898 echo "$as_me:8898: result: $with_big_core" >&5
8899 echo "${ECHO_T}$with_big_core" >&6
8900 test "x$with_big_core" = "xyes" &&
8901 cat >>confdefs.h <<\EOF
8902 #define HAVE_BIG_CORE 1
8903 EOF
8904
8905 ### ISO C only guarantees 512-char strings, we have tables which load faster
8906 ### when constructed using "big" strings.  More than the C compiler, the awk
8907 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8908 echo "$as_me:8908: checking if big-strings option selected" >&5
8909 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8910
8911 # Check whether --enable-big-strings or --disable-big-strings was given.
8912 if test "${enable_big_strings+set}" = set; then
8913   enableval="$enable_big_strings"
8914   with_big_strings=$enableval
8915 else
8916
8917         case x$AWK in
8918         (x)
8919                 eval with_big_strings=no
8920                 ;;
8921         (*)
8922                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8923                         | $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
8924                         eval with_big_strings=yes
8925                 else
8926                         eval with_big_strings=no
8927                 fi
8928                 ;;
8929         esac
8930
8931 fi;
8932 echo "$as_me:8932: result: $with_big_strings" >&5
8933 echo "${ECHO_T}$with_big_strings" >&6
8934
8935 USE_BIG_STRINGS=0
8936 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8937
8938 ###     use option --enable-termcap to compile in the termcap fallback support
8939 echo "$as_me:8939: checking if you want termcap-fallback support" >&5
8940 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8941
8942 # Check whether --enable-termcap or --disable-termcap was given.
8943 if test "${enable_termcap+set}" = set; then
8944   enableval="$enable_termcap"
8945   with_termcap=$enableval
8946 else
8947   with_termcap=no
8948 fi;
8949 echo "$as_me:8949: result: $with_termcap" >&5
8950 echo "${ECHO_T}$with_termcap" >&6
8951
8952 NCURSES_USE_TERMCAP=0
8953 if test "x$with_termcap" != "xyes" ; then
8954         if test "$use_database" = no ; then
8955                 if test -z "$with_fallback" ; then
8956                         { { echo "$as_me:8956: error: You have disabled the database w/o specifying fallbacks" >&5
8957 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8958    { (exit 1); exit 1; }; }
8959                 fi
8960         fi
8961
8962 cat >>confdefs.h <<\EOF
8963 #define PURE_TERMINFO 1
8964 EOF
8965
8966 else
8967
8968         if test "$with_ticlib" != no ; then
8969                 { { echo "$as_me:8969: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8970 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8971    { (exit 1); exit 1; }; }
8972         fi
8973
8974         NCURSES_USE_TERMCAP=1
8975         echo "$as_me:8975: checking for list of termcap files" >&5
8976 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8977
8978 # Check whether --with-termpath or --without-termpath was given.
8979 if test "${with_termpath+set}" = set; then
8980   withval="$with_termpath"
8981
8982 else
8983   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8984 fi;
8985 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8986 cf_dst_path=
8987 for cf_src_path in $withval
8988 do
8989
8990 if test "x$prefix" != xNONE; then
8991         cf_path_syntax="$prefix"
8992 else
8993         cf_path_syntax="$ac_default_prefix"
8994 fi
8995
8996 case ".$cf_src_path" in
8997 (.\$\(*\)*|.\'*\'*)
8998         ;;
8999 (..|./*|.\\*)
9000         ;;
9001 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9002         ;;
9003 (.\${*prefix}*|.\${*dir}*)
9004         eval cf_src_path="$cf_src_path"
9005         case ".$cf_src_path" in
9006         (.NONE/*)
9007                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9008                 ;;
9009         esac
9010         ;;
9011 (.no|.NONE/*)
9012         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9013         ;;
9014 (*)
9015         { { echo "$as_me:9015: error: expected a pathname, not \"$cf_src_path\"" >&5
9016 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9017    { (exit 1); exit 1; }; }
9018         ;;
9019 esac
9020
9021   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9022   cf_dst_path="${cf_dst_path}${cf_src_path}"
9023 done
9024 IFS="$ac_save_ifs"
9025
9026 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9027 # so we have to check/work around.  We do prefer the result of "eval"...
9028 eval cf_dst_eval="$cf_dst_path"
9029 case "x$cf_dst_eval" in
9030 (xNONE*)
9031         TERMPATH=$cf_dst_path
9032         ;;
9033 (*)
9034         TERMPATH="$cf_dst_eval"
9035         ;;
9036 esac
9037
9038         echo "$as_me:9038: result: $TERMPATH" >&5
9039 echo "${ECHO_T}$TERMPATH" >&6
9040         test -n "$TERMPATH" &&
9041 cat >>confdefs.h <<EOF
9042 #define TERMPATH "$TERMPATH"
9043 EOF
9044
9045         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9046         echo "$as_me:9046: checking if fast termcap-loader is needed" >&5
9047 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9048
9049 # Check whether --enable-getcap or --disable-getcap was given.
9050 if test "${enable_getcap+set}" = set; then
9051   enableval="$enable_getcap"
9052   with_getcap=$enableval
9053 else
9054   with_getcap=no
9055 fi;
9056         echo "$as_me:9056: result: $with_getcap" >&5
9057 echo "${ECHO_T}$with_getcap" >&6
9058         test "x$with_getcap" = "xyes" &&
9059 cat >>confdefs.h <<\EOF
9060 #define USE_GETCAP 1
9061 EOF
9062
9063         echo "$as_me:9063: checking if translated termcaps will be cached in ~/.terminfo" >&5
9064 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9065
9066 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9067 if test "${enable_getcap_cache+set}" = set; then
9068   enableval="$enable_getcap_cache"
9069   with_getcap_cache=$enableval
9070 else
9071   with_getcap_cache=no
9072 fi;
9073         echo "$as_me:9073: result: $with_getcap_cache" >&5
9074 echo "${ECHO_T}$with_getcap_cache" >&6
9075         test "x$with_getcap_cache" = "xyes" &&
9076 cat >>confdefs.h <<\EOF
9077 #define USE_GETCAP_CACHE 1
9078 EOF
9079
9080 fi
9081
9082 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9083 echo "$as_me:9083: checking if ~/.terminfo is wanted" >&5
9084 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9085
9086 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9087 if test "${enable_home_terminfo+set}" = set; then
9088   enableval="$enable_home_terminfo"
9089   with_home_terminfo=$enableval
9090 else
9091   with_home_terminfo=yes
9092 fi;
9093 echo "$as_me:9093: result: $with_home_terminfo" >&5
9094 echo "${ECHO_T}$with_home_terminfo" >&6
9095 test "x$with_home_terminfo" = "xyes" &&
9096 cat >>confdefs.h <<\EOF
9097 #define USE_HOME_TERMINFO 1
9098 EOF
9099
9100 echo "$as_me:9100: checking if you want to use restricted environment when running as root" >&5
9101 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9102
9103 # Check whether --enable-root-environ or --disable-root-environ was given.
9104 if test "${enable_root_environ+set}" = set; then
9105   enableval="$enable_root_environ"
9106   with_root_environ=$enableval
9107 else
9108   with_root_environ=yes
9109 fi;
9110 echo "$as_me:9110: result: $with_root_environ" >&5
9111 echo "${ECHO_T}$with_root_environ" >&6
9112 test "x$with_root_environ" = xyes &&
9113 cat >>confdefs.h <<\EOF
9114 #define USE_ROOT_ENVIRON 1
9115 EOF
9116
9117 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9118 ###   to reduce storage requirements for the terminfo database.
9119
9120 for ac_header in \
9121 unistd.h \
9122
9123 do
9124 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9125 echo "$as_me:9125: checking for $ac_header" >&5
9126 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9127 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9128   echo $ECHO_N "(cached) $ECHO_C" >&6
9129 else
9130   cat >conftest.$ac_ext <<_ACEOF
9131 #line 9131 "configure"
9132 #include "confdefs.h"
9133 #include <$ac_header>
9134 _ACEOF
9135 if { (eval echo "$as_me:9135: \"$ac_cpp conftest.$ac_ext\"") >&5
9136   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9137   ac_status=$?
9138   egrep -v '^ *\+' conftest.er1 >conftest.err
9139   rm -f conftest.er1
9140   cat conftest.err >&5
9141   echo "$as_me:9141: \$? = $ac_status" >&5
9142   (exit $ac_status); } >/dev/null; then
9143   if test -s conftest.err; then
9144     ac_cpp_err=$ac_c_preproc_warn_flag
9145   else
9146     ac_cpp_err=
9147   fi
9148 else
9149   ac_cpp_err=yes
9150 fi
9151 if test -z "$ac_cpp_err"; then
9152   eval "$as_ac_Header=yes"
9153 else
9154   echo "$as_me: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   eval "$as_ac_Header=no"
9157 fi
9158 rm -f conftest.err conftest.$ac_ext
9159 fi
9160 echo "$as_me:9160: result: `eval echo '${'$as_ac_Header'}'`" >&5
9161 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9162 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9163   cat >>confdefs.h <<EOF
9164 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9165 EOF
9166
9167 fi
9168 done
9169
9170 for ac_func in \
9171         remove \
9172         unlink
9173 do
9174 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9175 echo "$as_me:9175: checking for $ac_func" >&5
9176 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9177 if eval "test \"\${$as_ac_var+set}\" = set"; then
9178   echo $ECHO_N "(cached) $ECHO_C" >&6
9179 else
9180   cat >conftest.$ac_ext <<_ACEOF
9181 #line 9181 "configure"
9182 #include "confdefs.h"
9183 #define $ac_func autoconf_temporary
9184 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9185 #undef $ac_func
9186
9187 #ifdef __cplusplus
9188 extern "C"
9189 #endif
9190
9191 /* We use char because int might match the return type of a gcc2
9192    builtin and then its argument prototype would still apply.  */
9193 char $ac_func (void);
9194
9195 int
9196 main (void)
9197 {
9198
9199 /* The GNU C library defines stubs for functions which it implements
9200     to always fail with ENOSYS.  Some functions are actually named
9201     something starting with __ and the normal name is an alias.  */
9202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9203 #error found stub for $ac_func
9204 #endif
9205
9206         return $ac_func ();
9207   ;
9208   return 0;
9209 }
9210 _ACEOF
9211 rm -f conftest.$ac_objext conftest$ac_exeext
9212 if { (eval echo "$as_me:9212: \"$ac_link\"") >&5
9213   (eval $ac_link) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); } &&
9217          { ac_try='test -s conftest$ac_exeext'
9218   { (eval echo "$as_me:9218: \"$ac_try\"") >&5
9219   (eval $ac_try) 2>&5
9220   ac_status=$?
9221   echo "$as_me:9221: \$? = $ac_status" >&5
9222   (exit $ac_status); }; }; then
9223   eval "$as_ac_var=yes"
9224 else
9225   echo "$as_me: failed program was:" >&5
9226 cat conftest.$ac_ext >&5
9227 eval "$as_ac_var=no"
9228 fi
9229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9230 fi
9231 echo "$as_me:9231: result: `eval echo '${'$as_ac_var'}'`" >&5
9232 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9233 if test `eval echo '${'$as_ac_var'}'` = yes; then
9234   cat >>confdefs.h <<EOF
9235 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9236 EOF
9237
9238 fi
9239 done
9240
9241 if test "$cross_compiling" = yes ; then
9242
9243 for ac_func in \
9244                 link \
9245                 symlink
9246 do
9247 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9248 echo "$as_me:9248: checking for $ac_func" >&5
9249 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9250 if eval "test \"\${$as_ac_var+set}\" = set"; then
9251   echo $ECHO_N "(cached) $ECHO_C" >&6
9252 else
9253   cat >conftest.$ac_ext <<_ACEOF
9254 #line 9254 "configure"
9255 #include "confdefs.h"
9256 #define $ac_func autoconf_temporary
9257 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9258 #undef $ac_func
9259
9260 #ifdef __cplusplus
9261 extern "C"
9262 #endif
9263
9264 /* We use char because int might match the return type of a gcc2
9265    builtin and then its argument prototype would still apply.  */
9266 char $ac_func (void);
9267
9268 int
9269 main (void)
9270 {
9271
9272 /* The GNU C library defines stubs for functions which it implements
9273     to always fail with ENOSYS.  Some functions are actually named
9274     something starting with __ and the normal name is an alias.  */
9275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9276 #error found stub for $ac_func
9277 #endif
9278
9279         return $ac_func ();
9280   ;
9281   return 0;
9282 }
9283 _ACEOF
9284 rm -f conftest.$ac_objext conftest$ac_exeext
9285 if { (eval echo "$as_me:9285: \"$ac_link\"") >&5
9286   (eval $ac_link) 2>&5
9287   ac_status=$?
9288   echo "$as_me:9288: \$? = $ac_status" >&5
9289   (exit $ac_status); } &&
9290          { ac_try='test -s conftest$ac_exeext'
9291   { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9292   (eval $ac_try) 2>&5
9293   ac_status=$?
9294   echo "$as_me:9294: \$? = $ac_status" >&5
9295   (exit $ac_status); }; }; then
9296   eval "$as_ac_var=yes"
9297 else
9298   echo "$as_me: failed program was:" >&5
9299 cat conftest.$ac_ext >&5
9300 eval "$as_ac_var=no"
9301 fi
9302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9303 fi
9304 echo "$as_me:9304: result: `eval echo '${'$as_ac_var'}'`" >&5
9305 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9306 if test `eval echo '${'$as_ac_var'}'` = yes; then
9307   cat >>confdefs.h <<EOF
9308 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9309 EOF
9310
9311 fi
9312 done
9313
9314 else
9315         echo "$as_me:9315: checking if link/symlink functions work" >&5
9316 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9317 if test "${cf_cv_link_funcs+set}" = set; then
9318   echo $ECHO_N "(cached) $ECHO_C" >&6
9319 else
9320
9321                 cf_cv_link_funcs=
9322                 for cf_func in link symlink ; do
9323                         if test "$cross_compiling" = yes; then
9324
9325                         eval 'ac_cv_func_'$cf_func'=error'
9326 else
9327   cat >conftest.$ac_ext <<_ACEOF
9328 #line 9328 "configure"
9329 #include "confdefs.h"
9330
9331 #include <sys/types.h>
9332 #include <sys/stat.h>
9333 #ifdef HAVE_UNISTD_H
9334 #include <unistd.h>
9335 #endif
9336 int main(void)
9337 {
9338         int fail = 0;
9339         char *src = "config.log";
9340         char *dst = "conftest.chk";
9341         struct stat src_sb;
9342         struct stat dst_sb;
9343
9344         stat(src, &src_sb);
9345         fail = ($cf_func("config.log", "conftest.chk") < 0)
9346             || (stat(dst, &dst_sb) < 0)
9347             || (dst_sb.st_mtime != src_sb.st_mtime);
9348 #ifdef HAVE_UNLINK
9349         unlink(dst);
9350 #else
9351         remove(dst);
9352 #endif
9353         ${cf_cv_main_return:-return} (fail);
9354 }
9355
9356 _ACEOF
9357 rm -f conftest$ac_exeext
9358 if { (eval echo "$as_me:9358: \"$ac_link\"") >&5
9359   (eval $ac_link) 2>&5
9360   ac_status=$?
9361   echo "$as_me:9361: \$? = $ac_status" >&5
9362   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9363   { (eval echo "$as_me:9363: \"$ac_try\"") >&5
9364   (eval $ac_try) 2>&5
9365   ac_status=$?
9366   echo "$as_me:9366: \$? = $ac_status" >&5
9367   (exit $ac_status); }; }; then
9368
9369                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9370                         eval 'ac_cv_func_'$cf_func'=yes'
9371 else
9372   echo "$as_me: program exited with status $ac_status" >&5
9373 echo "$as_me: failed program was:" >&5
9374 cat conftest.$ac_ext >&5
9375
9376                         eval 'ac_cv_func_'$cf_func'=no'
9377 fi
9378 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9379 fi
9380                 done
9381                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9382
9383 fi
9384 echo "$as_me:9384: result: $cf_cv_link_funcs" >&5
9385 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9386         test "$ac_cv_func_link"    = yes &&
9387 cat >>confdefs.h <<\EOF
9388 #define HAVE_LINK 1
9389 EOF
9390
9391         test "$ac_cv_func_symlink" = yes &&
9392 cat >>confdefs.h <<\EOF
9393 #define HAVE_SYMLINK 1
9394 EOF
9395
9396 fi
9397
9398 with_links=no
9399 with_symlinks=no
9400
9401 # soft links (symbolic links) are useful for some systems where hard links do
9402 # not work, or to make it simpler to copy terminfo trees around.
9403 if test "x$ac_cv_func_symlink" = xyes ; then
9404         echo "$as_me:9404: checking if tic should use symbolic links" >&5
9405 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9406
9407 # Check whether --enable-symlinks or --disable-symlinks was given.
9408 if test "${enable_symlinks+set}" = set; then
9409   enableval="$enable_symlinks"
9410   with_symlinks=$enableval
9411 else
9412   with_symlinks=no
9413 fi;
9414         echo "$as_me:9414: result: $with_symlinks" >&5
9415 echo "${ECHO_T}$with_symlinks" >&6
9416 fi
9417
9418 # If we have hard links and did not choose to use soft links instead, there is
9419 # no reason to make this choice optional - use the hard links.
9420 if test "$with_symlinks" = no ; then
9421         echo "$as_me:9421: checking if tic should use hard links" >&5
9422 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9423         if test "x$ac_cv_func_link" = xyes ; then
9424                 with_links=yes
9425         else
9426                 with_links=no
9427         fi
9428         echo "$as_me:9428: result: $with_links" >&5
9429 echo "${ECHO_T}$with_links" >&6
9430 fi
9431
9432 test "x$with_links" = xyes &&
9433 cat >>confdefs.h <<\EOF
9434 #define USE_LINKS 1
9435 EOF
9436
9437 test "x$with_symlinks" = xyes &&
9438 cat >>confdefs.h <<\EOF
9439 #define USE_SYMLINKS 1
9440 EOF
9441
9442 ###   use option --enable-broken-linker to force on use of broken-linker support
9443
9444 echo "$as_me:9444: checking if you want broken-linker support code" >&5
9445 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9446
9447 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9448 if test "${enable_broken_linker+set}" = set; then
9449   enableval="$enable_broken_linker"
9450   with_broken_linker=$enableval
9451 else
9452   with_broken_linker=no
9453 fi;
9454 echo "$as_me:9454: result: $with_broken_linker" >&5
9455 echo "${ECHO_T}$with_broken_linker" >&6
9456
9457 : ${BROKEN_LINKER:=0}
9458 if test "x$with_broken_linker" = xyes ; then
9459
9460 cat >>confdefs.h <<\EOF
9461 #define BROKEN_LINKER 1
9462 EOF
9463
9464         BROKEN_LINKER=1
9465 fi
9466
9467 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9468 echo "$as_me:9468: checking if tputs should process BSD-style prefix padding" >&5
9469 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9470
9471 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9472 if test "${enable_bsdpad+set}" = set; then
9473   enableval="$enable_bsdpad"
9474   with_bsdpad=$enableval
9475 else
9476   with_bsdpad=no
9477 fi;
9478 echo "$as_me:9478: result: $with_bsdpad" >&5
9479 echo "${ECHO_T}$with_bsdpad" >&6
9480 test "x$with_bsdpad" = xyes &&
9481 cat >>confdefs.h <<\EOF
9482 #define BSD_TPUTS 1
9483 EOF
9484
9485 ###   use option --enable-widec to turn on use of wide-character support
9486 NCURSES_CH_T=chtype
9487 NCURSES_LIBUTF8=0
9488
9489 NEED_WCHAR_H=0
9490 NCURSES_MBSTATE_T=0
9491 NCURSES_WCHAR_T=0
9492 NCURSES_WINT_T=0
9493
9494 # Check to define _XOPEN_SOURCE "automatically"
9495 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9496
9497 echo "$as_me:9497: checking if the POSIX test-macros are already defined" >&5
9498 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9499 if test "${cf_cv_posix_visible+set}" = set; then
9500   echo $ECHO_N "(cached) $ECHO_C" >&6
9501 else
9502
9503 cat >conftest.$ac_ext <<_ACEOF
9504 #line 9504 "configure"
9505 #include "confdefs.h"
9506 #include <stdio.h>
9507 int
9508 main (void)
9509 {
9510
9511 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9512         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9513         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9514         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9515 #error conflicting symbols found
9516 #endif
9517
9518   ;
9519   return 0;
9520 }
9521 _ACEOF
9522 rm -f conftest.$ac_objext
9523 if { (eval echo "$as_me:9523: \"$ac_compile\"") >&5
9524   (eval $ac_compile) 2>&5
9525   ac_status=$?
9526   echo "$as_me:9526: \$? = $ac_status" >&5
9527   (exit $ac_status); } &&
9528          { ac_try='test -s conftest.$ac_objext'
9529   { (eval echo "$as_me:9529: \"$ac_try\"") >&5
9530   (eval $ac_try) 2>&5
9531   ac_status=$?
9532   echo "$as_me:9532: \$? = $ac_status" >&5
9533   (exit $ac_status); }; }; then
9534   cf_cv_posix_visible=no
9535 else
9536   echo "$as_me: failed program was:" >&5
9537 cat conftest.$ac_ext >&5
9538 cf_cv_posix_visible=yes
9539 fi
9540 rm -f conftest.$ac_objext conftest.$ac_ext
9541
9542 fi
9543 echo "$as_me:9543: result: $cf_cv_posix_visible" >&5
9544 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9545
9546 if test "$cf_cv_posix_visible" = no; then
9547
9548 cf_XOPEN_SOURCE=600
9549 cf_POSIX_C_SOURCE=199506L
9550 cf_xopen_source=
9551
9552 case $host_os in
9553 (aix[4-7]*)
9554         cf_xopen_source="-D_ALL_SOURCE"
9555         ;;
9556 (msys)
9557         cf_XOPEN_SOURCE=600
9558         ;;
9559 (darwin[0-8].*)
9560         cf_xopen_source="-D_APPLE_C_SOURCE"
9561         ;;
9562 (darwin*)
9563         cf_xopen_source="-D_DARWIN_C_SOURCE"
9564         cf_XOPEN_SOURCE=
9565         ;;
9566 (freebsd*|dragonfly*|midnightbsd*)
9567         # 5.x headers associate
9568         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9569         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9570         cf_POSIX_C_SOURCE=200112L
9571         cf_XOPEN_SOURCE=600
9572         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9573         ;;
9574 (hpux11*)
9575         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9576         ;;
9577 (hpux*)
9578         cf_xopen_source="-D_HPUX_SOURCE"
9579         ;;
9580 (irix[56].*)
9581         cf_xopen_source="-D_SGI_SOURCE"
9582         cf_XOPEN_SOURCE=
9583         ;;
9584 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9585
9586 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9587
9588 echo "$as_me:9588: checking if this is the GNU C library" >&5
9589 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9590 if test "${cf_cv_gnu_library+set}" = set; then
9591   echo $ECHO_N "(cached) $ECHO_C" >&6
9592 else
9593
9594 cat >conftest.$ac_ext <<_ACEOF
9595 #line 9595 "configure"
9596 #include "confdefs.h"
9597 #include <sys/types.h>
9598 int
9599 main (void)
9600 {
9601
9602         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9603                 return 0;
9604         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9605                 return 0;
9606         #else
9607         #       error not GNU C library
9608         #endif
9609   ;
9610   return 0;
9611 }
9612 _ACEOF
9613 rm -f conftest.$ac_objext
9614 if { (eval echo "$as_me:9614: \"$ac_compile\"") >&5
9615   (eval $ac_compile) 2>&5
9616   ac_status=$?
9617   echo "$as_me:9617: \$? = $ac_status" >&5
9618   (exit $ac_status); } &&
9619          { ac_try='test -s conftest.$ac_objext'
9620   { (eval echo "$as_me:9620: \"$ac_try\"") >&5
9621   (eval $ac_try) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit $ac_status); }; }; then
9625   cf_cv_gnu_library=yes
9626 else
9627   echo "$as_me: failed program was:" >&5
9628 cat conftest.$ac_ext >&5
9629 cf_cv_gnu_library=no
9630 fi
9631 rm -f conftest.$ac_objext conftest.$ac_ext
9632
9633 fi
9634 echo "$as_me:9634: result: $cf_cv_gnu_library" >&5
9635 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9636
9637 if test x$cf_cv_gnu_library = xyes; then
9638
9639         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9640         # was changed to help a little.  newlib incorporated the change about 4
9641         # years later.
9642         echo "$as_me:9642: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9643 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9644 if test "${cf_cv_gnu_library_219+set}" = set; then
9645   echo $ECHO_N "(cached) $ECHO_C" >&6
9646 else
9647
9648                 cf_save="$CPPFLAGS"
9649
9650         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9651         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9652
9653                 cat >conftest.$ac_ext <<_ACEOF
9654 #line 9654 "configure"
9655 #include "confdefs.h"
9656 #include <sys/types.h>
9657 int
9658 main (void)
9659 {
9660
9661                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9662                                 return 0;
9663                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9664                                 return 0;
9665                         #else
9666                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9667                         #endif
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672 rm -f conftest.$ac_objext
9673 if { (eval echo "$as_me:9673: \"$ac_compile\"") >&5
9674   (eval $ac_compile) 2>&5
9675   ac_status=$?
9676   echo "$as_me:9676: \$? = $ac_status" >&5
9677   (exit $ac_status); } &&
9678          { ac_try='test -s conftest.$ac_objext'
9679   { (eval echo "$as_me:9679: \"$ac_try\"") >&5
9680   (eval $ac_try) 2>&5
9681   ac_status=$?
9682   echo "$as_me:9682: \$? = $ac_status" >&5
9683   (exit $ac_status); }; }; then
9684   cf_cv_gnu_library_219=yes
9685 else
9686   echo "$as_me: failed program was:" >&5
9687 cat conftest.$ac_ext >&5
9688 cf_cv_gnu_library_219=no
9689 fi
9690 rm -f conftest.$ac_objext conftest.$ac_ext
9691                 CPPFLAGS="$cf_save"
9692
9693 fi
9694 echo "$as_me:9694: result: $cf_cv_gnu_library_219" >&5
9695 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9696
9697         if test "x$cf_cv_gnu_library_219" = xyes; then
9698                 cf_save="$CPPFLAGS"
9699                 echo "$as_me:9699: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9700 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9701 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9702   echo $ECHO_N "(cached) $ECHO_C" >&6
9703 else
9704
9705 cf_fix_cppflags=no
9706 cf_new_cflags=
9707 cf_new_cppflags=
9708 cf_new_extra_cppflags=
9709
9710 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9711 do
9712 case $cf_fix_cppflags in
9713 (no)
9714         case $cf_add_cflags in
9715         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9716                 case $cf_add_cflags in
9717                 (-D*)
9718                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9719
9720                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9721                                 && test -z "${cf_tst_cflags}" \
9722                                 && cf_fix_cppflags=yes
9723
9724                         if test $cf_fix_cppflags = yes ; then
9725
9726         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9727         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9728
9729                                 continue
9730                         elif test "${cf_tst_cflags}" = "\"'" ; then
9731
9732         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9733         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9734
9735                                 continue
9736                         fi
9737                         ;;
9738                 esac
9739                 case "$CPPFLAGS" in
9740                 (*$cf_add_cflags)
9741                         ;;
9742                 (*)
9743                         case $cf_add_cflags in
9744                         (-D*)
9745                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9746
9747 CPPFLAGS=`echo "$CPPFLAGS" | \
9748         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9749                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9750
9751                                 ;;
9752                         esac
9753
9754         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9755         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9756
9757                         ;;
9758                 esac
9759                 ;;
9760         (*)
9761
9762         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9763         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9764
9765                 ;;
9766         esac
9767         ;;
9768 (yes)
9769
9770         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9771         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9772
9773         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9774
9775         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9776                 && test -z "${cf_tst_cflags}" \
9777                 && cf_fix_cppflags=no
9778         ;;
9779 esac
9780 done
9781
9782 if test -n "$cf_new_cflags" ; then
9783
9784         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9785         CFLAGS="${CFLAGS}$cf_new_cflags"
9786
9787 fi
9788
9789 if test -n "$cf_new_cppflags" ; then
9790
9791         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9792         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9793
9794 fi
9795
9796 if test -n "$cf_new_extra_cppflags" ; then
9797
9798         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9799         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9800
9801 fi
9802
9803                         cat >conftest.$ac_ext <<_ACEOF
9804 #line 9804 "configure"
9805 #include "confdefs.h"
9806
9807                                 #include <limits.h>
9808                                 #include <sys/types.h>
9809
9810 int
9811 main (void)
9812 {
9813
9814                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9815                                         return 0;
9816                                 #else
9817                                 #       error GNU C library is too old
9818                                 #endif
9819   ;
9820   return 0;
9821 }
9822 _ACEOF
9823 rm -f conftest.$ac_objext
9824 if { (eval echo "$as_me:9824: \"$ac_compile\"") >&5
9825   (eval $ac_compile) 2>&5
9826   ac_status=$?
9827   echo "$as_me:9827: \$? = $ac_status" >&5
9828   (exit $ac_status); } &&
9829          { ac_try='test -s conftest.$ac_objext'
9830   { (eval echo "$as_me:9830: \"$ac_try\"") >&5
9831   (eval $ac_try) 2>&5
9832   ac_status=$?
9833   echo "$as_me:9833: \$? = $ac_status" >&5
9834   (exit $ac_status); }; }; then
9835   cf_cv_gnu_dftsrc_219=yes
9836 else
9837   echo "$as_me: failed program was:" >&5
9838 cat conftest.$ac_ext >&5
9839 cf_cv_gnu_dftsrc_219=no
9840 fi
9841 rm -f conftest.$ac_objext conftest.$ac_ext
9842
9843 fi
9844 echo "$as_me:9844: result: $cf_cv_gnu_dftsrc_219" >&5
9845 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9846                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9847         else
9848                 cf_cv_gnu_dftsrc_219=maybe
9849         fi
9850
9851         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9852
9853                 echo "$as_me:9853: checking if we must define _GNU_SOURCE" >&5
9854 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9855 if test "${cf_cv_gnu_source+set}" = set; then
9856   echo $ECHO_N "(cached) $ECHO_C" >&6
9857 else
9858
9859                 cat >conftest.$ac_ext <<_ACEOF
9860 #line 9860 "configure"
9861 #include "confdefs.h"
9862 #include <sys/types.h>
9863 int
9864 main (void)
9865 {
9866
9867                         #ifndef _XOPEN_SOURCE
9868                         #error  expected _XOPEN_SOURCE to be defined
9869                         #endif
9870   ;
9871   return 0;
9872 }
9873 _ACEOF
9874 rm -f conftest.$ac_objext
9875 if { (eval echo "$as_me:9875: \"$ac_compile\"") >&5
9876   (eval $ac_compile) 2>&5
9877   ac_status=$?
9878   echo "$as_me:9878: \$? = $ac_status" >&5
9879   (exit $ac_status); } &&
9880          { ac_try='test -s conftest.$ac_objext'
9881   { (eval echo "$as_me:9881: \"$ac_try\"") >&5
9882   (eval $ac_try) 2>&5
9883   ac_status=$?
9884   echo "$as_me:9884: \$? = $ac_status" >&5
9885   (exit $ac_status); }; }; then
9886   cf_cv_gnu_source=no
9887 else
9888   echo "$as_me: failed program was:" >&5
9889 cat conftest.$ac_ext >&5
9890 cf_save="$CPPFLAGS"
9891
9892 cf_fix_cppflags=no
9893 cf_new_cflags=
9894 cf_new_cppflags=
9895 cf_new_extra_cppflags=
9896
9897 for cf_add_cflags in -D_GNU_SOURCE
9898 do
9899 case $cf_fix_cppflags in
9900 (no)
9901         case $cf_add_cflags in
9902         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9903                 case $cf_add_cflags in
9904                 (-D*)
9905                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9906
9907                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9908                                 && test -z "${cf_tst_cflags}" \
9909                                 && cf_fix_cppflags=yes
9910
9911                         if test $cf_fix_cppflags = yes ; then
9912
9913         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9914         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9915
9916                                 continue
9917                         elif test "${cf_tst_cflags}" = "\"'" ; then
9918
9919         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9920         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9921
9922                                 continue
9923                         fi
9924                         ;;
9925                 esac
9926                 case "$CPPFLAGS" in
9927                 (*$cf_add_cflags)
9928                         ;;
9929                 (*)
9930                         case $cf_add_cflags in
9931                         (-D*)
9932                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9933
9934 CPPFLAGS=`echo "$CPPFLAGS" | \
9935         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9936                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9937
9938                                 ;;
9939                         esac
9940
9941         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9942         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9943
9944                         ;;
9945                 esac
9946                 ;;
9947         (*)
9948
9949         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9950         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9951
9952                 ;;
9953         esac
9954         ;;
9955 (yes)
9956
9957         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9958         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9959
9960         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9961
9962         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9963                 && test -z "${cf_tst_cflags}" \
9964                 && cf_fix_cppflags=no
9965         ;;
9966 esac
9967 done
9968
9969 if test -n "$cf_new_cflags" ; then
9970
9971         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9972         CFLAGS="${CFLAGS}$cf_new_cflags"
9973
9974 fi
9975
9976 if test -n "$cf_new_cppflags" ; then
9977
9978         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9979         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9980
9981 fi
9982
9983 if test -n "$cf_new_extra_cppflags" ; then
9984
9985         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9986         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9987
9988 fi
9989
9990                          cat >conftest.$ac_ext <<_ACEOF
9991 #line 9991 "configure"
9992 #include "confdefs.h"
9993 #include <sys/types.h>
9994 int
9995 main (void)
9996 {
9997
9998                                 #ifdef _XOPEN_SOURCE
9999                                 #error  expected _XOPEN_SOURCE to be undefined
10000                                 #endif
10001   ;
10002   return 0;
10003 }
10004 _ACEOF
10005 rm -f conftest.$ac_objext
10006 if { (eval echo "$as_me:10006: \"$ac_compile\"") >&5
10007   (eval $ac_compile) 2>&5
10008   ac_status=$?
10009   echo "$as_me:10009: \$? = $ac_status" >&5
10010   (exit $ac_status); } &&
10011          { ac_try='test -s conftest.$ac_objext'
10012   { (eval echo "$as_me:10012: \"$ac_try\"") >&5
10013   (eval $ac_try) 2>&5
10014   ac_status=$?
10015   echo "$as_me:10015: \$? = $ac_status" >&5
10016   (exit $ac_status); }; }; then
10017   cf_cv_gnu_source=no
10018 else
10019   echo "$as_me: failed program was:" >&5
10020 cat conftest.$ac_ext >&5
10021 cf_cv_gnu_source=yes
10022 fi
10023 rm -f conftest.$ac_objext conftest.$ac_ext
10024                         CPPFLAGS="$cf_save"
10025
10026 fi
10027 rm -f conftest.$ac_objext conftest.$ac_ext
10028
10029 fi
10030 echo "$as_me:10030: result: $cf_cv_gnu_source" >&5
10031 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10032
10033                 if test "$cf_cv_gnu_source" = yes
10034                 then
10035                 echo "$as_me:10035: checking if we should also define _DEFAULT_SOURCE" >&5
10036 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10037 if test "${cf_cv_default_source+set}" = set; then
10038   echo $ECHO_N "(cached) $ECHO_C" >&6
10039 else
10040
10041         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10042         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10043
10044                         cat >conftest.$ac_ext <<_ACEOF
10045 #line 10045 "configure"
10046 #include "confdefs.h"
10047 #include <sys/types.h>
10048 int
10049 main (void)
10050 {
10051
10052                                 #ifdef _DEFAULT_SOURCE
10053                                 #error  expected _DEFAULT_SOURCE to be undefined
10054                                 #endif
10055   ;
10056   return 0;
10057 }
10058 _ACEOF
10059 rm -f conftest.$ac_objext
10060 if { (eval echo "$as_me:10060: \"$ac_compile\"") >&5
10061   (eval $ac_compile) 2>&5
10062   ac_status=$?
10063   echo "$as_me:10063: \$? = $ac_status" >&5
10064   (exit $ac_status); } &&
10065          { ac_try='test -s conftest.$ac_objext'
10066   { (eval echo "$as_me:10066: \"$ac_try\"") >&5
10067   (eval $ac_try) 2>&5
10068   ac_status=$?
10069   echo "$as_me:10069: \$? = $ac_status" >&5
10070   (exit $ac_status); }; }; then
10071   cf_cv_default_source=no
10072 else
10073   echo "$as_me: failed program was:" >&5
10074 cat conftest.$ac_ext >&5
10075 cf_cv_default_source=yes
10076 fi
10077 rm -f conftest.$ac_objext conftest.$ac_ext
10078
10079 fi
10080 echo "$as_me:10080: result: $cf_cv_default_source" >&5
10081 echo "${ECHO_T}$cf_cv_default_source" >&6
10082                         if test "$cf_cv_default_source" = yes
10083                         then
10084
10085         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10086         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10087
10088                         fi
10089                 fi
10090         fi
10091
10092 fi
10093
10094         ;;
10095 (minix*)
10096         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10097         ;;
10098 (mirbsd*)
10099         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10100         cf_XOPEN_SOURCE=
10101
10102 if test "$cf_cv_posix_visible" = no; then
10103
10104 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10105
10106 cf_save_CFLAGS="$CFLAGS"
10107 cf_save_CPPFLAGS="$CPPFLAGS"
10108
10109 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10110         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10111                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10112
10113 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10114         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10115                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10116
10117 echo "$as_me:10117: checking if we should define _POSIX_C_SOURCE" >&5
10118 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10119 if test "${cf_cv_posix_c_source+set}" = set; then
10120   echo $ECHO_N "(cached) $ECHO_C" >&6
10121 else
10122
10123 echo "${as_me:-configure}:10123: testing if the symbol is already defined go no further ..." 1>&5
10124
10125         cat >conftest.$ac_ext <<_ACEOF
10126 #line 10126 "configure"
10127 #include "confdefs.h"
10128 #include <sys/types.h>
10129 int
10130 main (void)
10131 {
10132
10133 #ifndef _POSIX_C_SOURCE
10134 make an error
10135 #endif
10136   ;
10137   return 0;
10138 }
10139 _ACEOF
10140 rm -f conftest.$ac_objext
10141 if { (eval echo "$as_me:10141: \"$ac_compile\"") >&5
10142   (eval $ac_compile) 2>&5
10143   ac_status=$?
10144   echo "$as_me:10144: \$? = $ac_status" >&5
10145   (exit $ac_status); } &&
10146          { ac_try='test -s conftest.$ac_objext'
10147   { (eval echo "$as_me:10147: \"$ac_try\"") >&5
10148   (eval $ac_try) 2>&5
10149   ac_status=$?
10150   echo "$as_me:10150: \$? = $ac_status" >&5
10151   (exit $ac_status); }; }; then
10152   cf_cv_posix_c_source=no
10153 else
10154   echo "$as_me: failed program was:" >&5
10155 cat conftest.$ac_ext >&5
10156 cf_want_posix_source=no
10157          case .$cf_POSIX_C_SOURCE in
10158          (.[12]??*)
10159                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10160                 ;;
10161          (.2)
10162                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10163                 cf_want_posix_source=yes
10164                 ;;
10165          (.*)
10166                 cf_want_posix_source=yes
10167                 ;;
10168          esac
10169          if test "$cf_want_posix_source" = yes ; then
10170                 cat >conftest.$ac_ext <<_ACEOF
10171 #line 10171 "configure"
10172 #include "confdefs.h"
10173 #include <sys/types.h>
10174 int
10175 main (void)
10176 {
10177
10178 #ifdef _POSIX_SOURCE
10179 make an error
10180 #endif
10181   ;
10182   return 0;
10183 }
10184 _ACEOF
10185 rm -f conftest.$ac_objext
10186 if { (eval echo "$as_me:10186: \"$ac_compile\"") >&5
10187   (eval $ac_compile) 2>&5
10188   ac_status=$?
10189   echo "$as_me:10189: \$? = $ac_status" >&5
10190   (exit $ac_status); } &&
10191          { ac_try='test -s conftest.$ac_objext'
10192   { (eval echo "$as_me:10192: \"$ac_try\"") >&5
10193   (eval $ac_try) 2>&5
10194   ac_status=$?
10195   echo "$as_me:10195: \$? = $ac_status" >&5
10196   (exit $ac_status); }; }; then
10197   :
10198 else
10199   echo "$as_me: failed program was:" >&5
10200 cat conftest.$ac_ext >&5
10201 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10202 fi
10203 rm -f conftest.$ac_objext conftest.$ac_ext
10204          fi
10205
10206 echo "${as_me:-configure}:10206: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10207
10208          CFLAGS="$cf_trim_CFLAGS"
10209          CPPFLAGS="$cf_trim_CPPFLAGS"
10210
10211         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10212         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10213
10214 echo "${as_me:-configure}:10214: testing if the second compile does not leave our definition intact error ..." 1>&5
10215
10216          cat >conftest.$ac_ext <<_ACEOF
10217 #line 10217 "configure"
10218 #include "confdefs.h"
10219 #include <sys/types.h>
10220 int
10221 main (void)
10222 {
10223
10224 #ifndef _POSIX_C_SOURCE
10225 make an error
10226 #endif
10227   ;
10228   return 0;
10229 }
10230 _ACEOF
10231 rm -f conftest.$ac_objext
10232 if { (eval echo "$as_me:10232: \"$ac_compile\"") >&5
10233   (eval $ac_compile) 2>&5
10234   ac_status=$?
10235   echo "$as_me:10235: \$? = $ac_status" >&5
10236   (exit $ac_status); } &&
10237          { ac_try='test -s conftest.$ac_objext'
10238   { (eval echo "$as_me:10238: \"$ac_try\"") >&5
10239   (eval $ac_try) 2>&5
10240   ac_status=$?
10241   echo "$as_me:10241: \$? = $ac_status" >&5
10242   (exit $ac_status); }; }; then
10243   :
10244 else
10245   echo "$as_me: failed program was:" >&5
10246 cat conftest.$ac_ext >&5
10247 cf_cv_posix_c_source=no
10248 fi
10249 rm -f conftest.$ac_objext conftest.$ac_ext
10250          CFLAGS="$cf_save_CFLAGS"
10251          CPPFLAGS="$cf_save_CPPFLAGS"
10252
10253 fi
10254 rm -f conftest.$ac_objext conftest.$ac_ext
10255
10256 fi
10257 echo "$as_me:10257: result: $cf_cv_posix_c_source" >&5
10258 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10259
10260 if test "$cf_cv_posix_c_source" != no ; then
10261         CFLAGS="$cf_trim_CFLAGS"
10262         CPPFLAGS="$cf_trim_CPPFLAGS"
10263
10264 cf_fix_cppflags=no
10265 cf_new_cflags=
10266 cf_new_cppflags=
10267 cf_new_extra_cppflags=
10268
10269 for cf_add_cflags in $cf_cv_posix_c_source
10270 do
10271 case $cf_fix_cppflags in
10272 (no)
10273         case $cf_add_cflags in
10274         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10275                 case $cf_add_cflags in
10276                 (-D*)
10277                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10278
10279                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10280                                 && test -z "${cf_tst_cflags}" \
10281                                 && cf_fix_cppflags=yes
10282
10283                         if test $cf_fix_cppflags = yes ; then
10284
10285         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10286         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10287
10288                                 continue
10289                         elif test "${cf_tst_cflags}" = "\"'" ; then
10290
10291         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10292         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10293
10294                                 continue
10295                         fi
10296                         ;;
10297                 esac
10298                 case "$CPPFLAGS" in
10299                 (*$cf_add_cflags)
10300                         ;;
10301                 (*)
10302                         case $cf_add_cflags in
10303                         (-D*)
10304                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10305
10306 CPPFLAGS=`echo "$CPPFLAGS" | \
10307         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10308                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10309
10310                                 ;;
10311                         esac
10312
10313         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10314         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10315
10316                         ;;
10317                 esac
10318                 ;;
10319         (*)
10320
10321         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10322         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10323
10324                 ;;
10325         esac
10326         ;;
10327 (yes)
10328
10329         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10330         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10331
10332         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10333
10334         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10335                 && test -z "${cf_tst_cflags}" \
10336                 && cf_fix_cppflags=no
10337         ;;
10338 esac
10339 done
10340
10341 if test -n "$cf_new_cflags" ; then
10342
10343         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10344         CFLAGS="${CFLAGS}$cf_new_cflags"
10345
10346 fi
10347
10348 if test -n "$cf_new_cppflags" ; then
10349
10350         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10351         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10352
10353 fi
10354
10355 if test -n "$cf_new_extra_cppflags" ; then
10356
10357         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10358         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10359
10360 fi
10361
10362 fi
10363
10364 fi # cf_cv_posix_visible
10365
10366         ;;
10367 (netbsd*)
10368         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10369         ;;
10370 (openbsd[4-9]*)
10371         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10372         cf_xopen_source="-D_BSD_SOURCE"
10373         cf_XOPEN_SOURCE=600
10374         ;;
10375 (openbsd*)
10376         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10377         ;;
10378 (osf[45]*)
10379         cf_xopen_source="-D_OSF_SOURCE"
10380         ;;
10381 (nto-qnx*)
10382         cf_xopen_source="-D_QNX_SOURCE"
10383         ;;
10384 (sco*)
10385         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10386         ;;
10387 (solaris2.*)
10388         cf_xopen_source="-D__EXTENSIONS__"
10389         cf_cv_xopen_source=broken
10390         ;;
10391 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10392         cf_XOPEN_SOURCE=
10393         cf_POSIX_C_SOURCE=
10394         ;;
10395 (*)
10396
10397 echo "$as_me:10397: checking if we should define _XOPEN_SOURCE" >&5
10398 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10399 if test "${cf_cv_xopen_source+set}" = set; then
10400   echo $ECHO_N "(cached) $ECHO_C" >&6
10401 else
10402
10403         cat >conftest.$ac_ext <<_ACEOF
10404 #line 10404 "configure"
10405 #include "confdefs.h"
10406
10407 #include <stdlib.h>
10408 #include <string.h>
10409 #include <sys/types.h>
10410
10411 int
10412 main (void)
10413 {
10414
10415 #ifndef _XOPEN_SOURCE
10416 make an error
10417 #endif
10418   ;
10419   return 0;
10420 }
10421 _ACEOF
10422 rm -f conftest.$ac_objext
10423 if { (eval echo "$as_me:10423: \"$ac_compile\"") >&5
10424   (eval $ac_compile) 2>&5
10425   ac_status=$?
10426   echo "$as_me:10426: \$? = $ac_status" >&5
10427   (exit $ac_status); } &&
10428          { ac_try='test -s conftest.$ac_objext'
10429   { (eval echo "$as_me:10429: \"$ac_try\"") >&5
10430   (eval $ac_try) 2>&5
10431   ac_status=$?
10432   echo "$as_me:10432: \$? = $ac_status" >&5
10433   (exit $ac_status); }; }; then
10434   cf_cv_xopen_source=no
10435 else
10436   echo "$as_me: failed program was:" >&5
10437 cat conftest.$ac_ext >&5
10438 cf_save="$CPPFLAGS"
10439
10440         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10441         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10442
10443          cat >conftest.$ac_ext <<_ACEOF
10444 #line 10444 "configure"
10445 #include "confdefs.h"
10446
10447 #include <stdlib.h>
10448 #include <string.h>
10449 #include <sys/types.h>
10450
10451 int
10452 main (void)
10453 {
10454
10455 #ifdef _XOPEN_SOURCE
10456 make an error
10457 #endif
10458   ;
10459   return 0;
10460 }
10461 _ACEOF
10462 rm -f conftest.$ac_objext
10463 if { (eval echo "$as_me:10463: \"$ac_compile\"") >&5
10464   (eval $ac_compile) 2>&5
10465   ac_status=$?
10466   echo "$as_me:10466: \$? = $ac_status" >&5
10467   (exit $ac_status); } &&
10468          { ac_try='test -s conftest.$ac_objext'
10469   { (eval echo "$as_me:10469: \"$ac_try\"") >&5
10470   (eval $ac_try) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit $ac_status); }; }; then
10474   cf_cv_xopen_source=no
10475 else
10476   echo "$as_me: failed program was:" >&5
10477 cat conftest.$ac_ext >&5
10478 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10479 fi
10480 rm -f conftest.$ac_objext conftest.$ac_ext
10481         CPPFLAGS="$cf_save"
10482
10483 fi
10484 rm -f conftest.$ac_objext conftest.$ac_ext
10485
10486 fi
10487 echo "$as_me:10487: result: $cf_cv_xopen_source" >&5
10488 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10489
10490 if test "$cf_cv_xopen_source" != no ; then
10491
10492 CFLAGS=`echo "$CFLAGS" | \
10493         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10494                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10495
10496 CPPFLAGS=`echo "$CPPFLAGS" | \
10497         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10498                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10499
10500         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10501
10502 cf_fix_cppflags=no
10503 cf_new_cflags=
10504 cf_new_cppflags=
10505 cf_new_extra_cppflags=
10506
10507 for cf_add_cflags in $cf_temp_xopen_source
10508 do
10509 case $cf_fix_cppflags in
10510 (no)
10511         case $cf_add_cflags in
10512         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10513                 case $cf_add_cflags in
10514                 (-D*)
10515                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10516
10517                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10518                                 && test -z "${cf_tst_cflags}" \
10519                                 && cf_fix_cppflags=yes
10520
10521                         if test $cf_fix_cppflags = yes ; then
10522
10523         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10524         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10525
10526                                 continue
10527                         elif test "${cf_tst_cflags}" = "\"'" ; then
10528
10529         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10530         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10531
10532                                 continue
10533                         fi
10534                         ;;
10535                 esac
10536                 case "$CPPFLAGS" in
10537                 (*$cf_add_cflags)
10538                         ;;
10539                 (*)
10540                         case $cf_add_cflags in
10541                         (-D*)
10542                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10543
10544 CPPFLAGS=`echo "$CPPFLAGS" | \
10545         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10546                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10547
10548                                 ;;
10549                         esac
10550
10551         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10552         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10553
10554                         ;;
10555                 esac
10556                 ;;
10557         (*)
10558
10559         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10560         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10561
10562                 ;;
10563         esac
10564         ;;
10565 (yes)
10566
10567         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10568         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10569
10570         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10571
10572         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10573                 && test -z "${cf_tst_cflags}" \
10574                 && cf_fix_cppflags=no
10575         ;;
10576 esac
10577 done
10578
10579 if test -n "$cf_new_cflags" ; then
10580
10581         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10582         CFLAGS="${CFLAGS}$cf_new_cflags"
10583
10584 fi
10585
10586 if test -n "$cf_new_cppflags" ; then
10587
10588         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10589         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10590
10591 fi
10592
10593 if test -n "$cf_new_extra_cppflags" ; then
10594
10595         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10596         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10597
10598 fi
10599
10600 fi
10601
10602 if test "$cf_cv_posix_visible" = no; then
10603
10604 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10605
10606 cf_save_CFLAGS="$CFLAGS"
10607 cf_save_CPPFLAGS="$CPPFLAGS"
10608
10609 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10610         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10611                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10612
10613 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10614         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10615                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10616
10617 echo "$as_me:10617: checking if we should define _POSIX_C_SOURCE" >&5
10618 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10619 if test "${cf_cv_posix_c_source+set}" = set; then
10620   echo $ECHO_N "(cached) $ECHO_C" >&6
10621 else
10622
10623 echo "${as_me:-configure}:10623: testing if the symbol is already defined go no further ..." 1>&5
10624
10625         cat >conftest.$ac_ext <<_ACEOF
10626 #line 10626 "configure"
10627 #include "confdefs.h"
10628 #include <sys/types.h>
10629 int
10630 main (void)
10631 {
10632
10633 #ifndef _POSIX_C_SOURCE
10634 make an error
10635 #endif
10636   ;
10637   return 0;
10638 }
10639 _ACEOF
10640 rm -f conftest.$ac_objext
10641 if { (eval echo "$as_me:10641: \"$ac_compile\"") >&5
10642   (eval $ac_compile) 2>&5
10643   ac_status=$?
10644   echo "$as_me:10644: \$? = $ac_status" >&5
10645   (exit $ac_status); } &&
10646          { ac_try='test -s conftest.$ac_objext'
10647   { (eval echo "$as_me:10647: \"$ac_try\"") >&5
10648   (eval $ac_try) 2>&5
10649   ac_status=$?
10650   echo "$as_me:10650: \$? = $ac_status" >&5
10651   (exit $ac_status); }; }; then
10652   cf_cv_posix_c_source=no
10653 else
10654   echo "$as_me: failed program was:" >&5
10655 cat conftest.$ac_ext >&5
10656 cf_want_posix_source=no
10657          case .$cf_POSIX_C_SOURCE in
10658          (.[12]??*)
10659                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10660                 ;;
10661          (.2)
10662                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10663                 cf_want_posix_source=yes
10664                 ;;
10665          (.*)
10666                 cf_want_posix_source=yes
10667                 ;;
10668          esac
10669          if test "$cf_want_posix_source" = yes ; then
10670                 cat >conftest.$ac_ext <<_ACEOF
10671 #line 10671 "configure"
10672 #include "confdefs.h"
10673 #include <sys/types.h>
10674 int
10675 main (void)
10676 {
10677
10678 #ifdef _POSIX_SOURCE
10679 make an error
10680 #endif
10681   ;
10682   return 0;
10683 }
10684 _ACEOF
10685 rm -f conftest.$ac_objext
10686 if { (eval echo "$as_me:10686: \"$ac_compile\"") >&5
10687   (eval $ac_compile) 2>&5
10688   ac_status=$?
10689   echo "$as_me:10689: \$? = $ac_status" >&5
10690   (exit $ac_status); } &&
10691          { ac_try='test -s conftest.$ac_objext'
10692   { (eval echo "$as_me:10692: \"$ac_try\"") >&5
10693   (eval $ac_try) 2>&5
10694   ac_status=$?
10695   echo "$as_me:10695: \$? = $ac_status" >&5
10696   (exit $ac_status); }; }; then
10697   :
10698 else
10699   echo "$as_me: failed program was:" >&5
10700 cat conftest.$ac_ext >&5
10701 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10702 fi
10703 rm -f conftest.$ac_objext conftest.$ac_ext
10704          fi
10705
10706 echo "${as_me:-configure}:10706: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10707
10708          CFLAGS="$cf_trim_CFLAGS"
10709          CPPFLAGS="$cf_trim_CPPFLAGS"
10710
10711         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10712         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10713
10714 echo "${as_me:-configure}:10714: testing if the second compile does not leave our definition intact error ..." 1>&5
10715
10716          cat >conftest.$ac_ext <<_ACEOF
10717 #line 10717 "configure"
10718 #include "confdefs.h"
10719 #include <sys/types.h>
10720 int
10721 main (void)
10722 {
10723
10724 #ifndef _POSIX_C_SOURCE
10725 make an error
10726 #endif
10727   ;
10728   return 0;
10729 }
10730 _ACEOF
10731 rm -f conftest.$ac_objext
10732 if { (eval echo "$as_me:10732: \"$ac_compile\"") >&5
10733   (eval $ac_compile) 2>&5
10734   ac_status=$?
10735   echo "$as_me:10735: \$? = $ac_status" >&5
10736   (exit $ac_status); } &&
10737          { ac_try='test -s conftest.$ac_objext'
10738   { (eval echo "$as_me:10738: \"$ac_try\"") >&5
10739   (eval $ac_try) 2>&5
10740   ac_status=$?
10741   echo "$as_me:10741: \$? = $ac_status" >&5
10742   (exit $ac_status); }; }; then
10743   :
10744 else
10745   echo "$as_me: failed program was:" >&5
10746 cat conftest.$ac_ext >&5
10747 cf_cv_posix_c_source=no
10748 fi
10749 rm -f conftest.$ac_objext conftest.$ac_ext
10750          CFLAGS="$cf_save_CFLAGS"
10751          CPPFLAGS="$cf_save_CPPFLAGS"
10752
10753 fi
10754 rm -f conftest.$ac_objext conftest.$ac_ext
10755
10756 fi
10757 echo "$as_me:10757: result: $cf_cv_posix_c_source" >&5
10758 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10759
10760 if test "$cf_cv_posix_c_source" != no ; then
10761         CFLAGS="$cf_trim_CFLAGS"
10762         CPPFLAGS="$cf_trim_CPPFLAGS"
10763
10764 cf_fix_cppflags=no
10765 cf_new_cflags=
10766 cf_new_cppflags=
10767 cf_new_extra_cppflags=
10768
10769 for cf_add_cflags in $cf_cv_posix_c_source
10770 do
10771 case $cf_fix_cppflags in
10772 (no)
10773         case $cf_add_cflags in
10774         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10775                 case $cf_add_cflags in
10776                 (-D*)
10777                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10778
10779                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10780                                 && test -z "${cf_tst_cflags}" \
10781                                 && cf_fix_cppflags=yes
10782
10783                         if test $cf_fix_cppflags = yes ; then
10784
10785         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10786         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10787
10788                                 continue
10789                         elif test "${cf_tst_cflags}" = "\"'" ; then
10790
10791         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10792         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10793
10794                                 continue
10795                         fi
10796                         ;;
10797                 esac
10798                 case "$CPPFLAGS" in
10799                 (*$cf_add_cflags)
10800                         ;;
10801                 (*)
10802                         case $cf_add_cflags in
10803                         (-D*)
10804                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10805
10806 CPPFLAGS=`echo "$CPPFLAGS" | \
10807         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10808                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10809
10810                                 ;;
10811                         esac
10812
10813         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10814         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10815
10816                         ;;
10817                 esac
10818                 ;;
10819         (*)
10820
10821         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10822         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10823
10824                 ;;
10825         esac
10826         ;;
10827 (yes)
10828
10829         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10830         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10831
10832         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10833
10834         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10835                 && test -z "${cf_tst_cflags}" \
10836                 && cf_fix_cppflags=no
10837         ;;
10838 esac
10839 done
10840
10841 if test -n "$cf_new_cflags" ; then
10842
10843         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10844         CFLAGS="${CFLAGS}$cf_new_cflags"
10845
10846 fi
10847
10848 if test -n "$cf_new_cppflags" ; then
10849
10850         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10851         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10852
10853 fi
10854
10855 if test -n "$cf_new_extra_cppflags" ; then
10856
10857         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10858         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10859
10860 fi
10861
10862 fi
10863
10864 fi # cf_cv_posix_visible
10865
10866         ;;
10867 esac
10868
10869 if test -n "$cf_xopen_source" ; then
10870
10871 cf_fix_cppflags=no
10872 cf_new_cflags=
10873 cf_new_cppflags=
10874 cf_new_extra_cppflags=
10875
10876 for cf_add_cflags in $cf_xopen_source
10877 do
10878 case $cf_fix_cppflags in
10879 (no)
10880         case $cf_add_cflags in
10881         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10882                 case $cf_add_cflags in
10883                 (-D*)
10884                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10885
10886                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10887                                 && test -z "${cf_tst_cflags}" \
10888                                 && cf_fix_cppflags=yes
10889
10890                         if test $cf_fix_cppflags = yes ; then
10891
10892         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10893         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10894
10895                                 continue
10896                         elif test "${cf_tst_cflags}" = "\"'" ; then
10897
10898         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10899         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10900
10901                                 continue
10902                         fi
10903                         ;;
10904                 esac
10905                 case "$CPPFLAGS" in
10906                 (*$cf_add_cflags)
10907                         ;;
10908                 (*)
10909                         case $cf_add_cflags in
10910                         (-D*)
10911                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10912
10913 CPPFLAGS=`echo "$CPPFLAGS" | \
10914         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10915                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10916
10917                                 ;;
10918                         esac
10919
10920         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10921         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10922
10923                         ;;
10924                 esac
10925                 ;;
10926         (*)
10927
10928         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10929         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10930
10931                 ;;
10932         esac
10933         ;;
10934 (yes)
10935
10936         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10937         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10938
10939         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10940
10941         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10942                 && test -z "${cf_tst_cflags}" \
10943                 && cf_fix_cppflags=no
10944         ;;
10945 esac
10946 done
10947
10948 if test -n "$cf_new_cflags" ; then
10949         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10950
10951 echo "${as_me:-configure}:10951: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10952
10953         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10954         CFLAGS="${CFLAGS}$cf_new_cflags"
10955
10956 fi
10957
10958 if test -n "$cf_new_cppflags" ; then
10959         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10960
10961 echo "${as_me:-configure}:10961: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10962
10963         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10964         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10965
10966 fi
10967
10968 if test -n "$cf_new_extra_cppflags" ; then
10969         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10970
10971 echo "${as_me:-configure}:10971: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10972
10973         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10974         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10975
10976 fi
10977
10978 fi
10979
10980 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10981         echo "$as_me:10981: checking if _XOPEN_SOURCE really is set" >&5
10982 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10983         cat >conftest.$ac_ext <<_ACEOF
10984 #line 10984 "configure"
10985 #include "confdefs.h"
10986 #include <stdlib.h>
10987 int
10988 main (void)
10989 {
10990
10991 #ifndef _XOPEN_SOURCE
10992 make an error
10993 #endif
10994   ;
10995   return 0;
10996 }
10997 _ACEOF
10998 rm -f conftest.$ac_objext
10999 if { (eval echo "$as_me:10999: \"$ac_compile\"") >&5
11000   (eval $ac_compile) 2>&5
11001   ac_status=$?
11002   echo "$as_me:11002: \$? = $ac_status" >&5
11003   (exit $ac_status); } &&
11004          { ac_try='test -s conftest.$ac_objext'
11005   { (eval echo "$as_me:11005: \"$ac_try\"") >&5
11006   (eval $ac_try) 2>&5
11007   ac_status=$?
11008   echo "$as_me:11008: \$? = $ac_status" >&5
11009   (exit $ac_status); }; }; then
11010   cf_XOPEN_SOURCE_set=yes
11011 else
11012   echo "$as_me: failed program was:" >&5
11013 cat conftest.$ac_ext >&5
11014 cf_XOPEN_SOURCE_set=no
11015 fi
11016 rm -f conftest.$ac_objext conftest.$ac_ext
11017         echo "$as_me:11017: result: $cf_XOPEN_SOURCE_set" >&5
11018 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11019         if test $cf_XOPEN_SOURCE_set = yes
11020         then
11021                 cat >conftest.$ac_ext <<_ACEOF
11022 #line 11022 "configure"
11023 #include "confdefs.h"
11024 #include <stdlib.h>
11025 int
11026 main (void)
11027 {
11028
11029 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11030 make an error
11031 #endif
11032   ;
11033   return 0;
11034 }
11035 _ACEOF
11036 rm -f conftest.$ac_objext
11037 if { (eval echo "$as_me:11037: \"$ac_compile\"") >&5
11038   (eval $ac_compile) 2>&5
11039   ac_status=$?
11040   echo "$as_me:11040: \$? = $ac_status" >&5
11041   (exit $ac_status); } &&
11042          { ac_try='test -s conftest.$ac_objext'
11043   { (eval echo "$as_me:11043: \"$ac_try\"") >&5
11044   (eval $ac_try) 2>&5
11045   ac_status=$?
11046   echo "$as_me:11046: \$? = $ac_status" >&5
11047   (exit $ac_status); }; }; then
11048   cf_XOPEN_SOURCE_set_ok=yes
11049 else
11050   echo "$as_me: failed program was:" >&5
11051 cat conftest.$ac_ext >&5
11052 cf_XOPEN_SOURCE_set_ok=no
11053 fi
11054 rm -f conftest.$ac_objext conftest.$ac_ext
11055                 if test $cf_XOPEN_SOURCE_set_ok = no
11056                 then
11057                         { echo "$as_me:11057: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11058 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11059                 fi
11060         else
11061
11062 echo "$as_me:11062: checking if we should define _XOPEN_SOURCE" >&5
11063 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11064 if test "${cf_cv_xopen_source+set}" = set; then
11065   echo $ECHO_N "(cached) $ECHO_C" >&6
11066 else
11067
11068         cat >conftest.$ac_ext <<_ACEOF
11069 #line 11069 "configure"
11070 #include "confdefs.h"
11071
11072 #include <stdlib.h>
11073 #include <string.h>
11074 #include <sys/types.h>
11075
11076 int
11077 main (void)
11078 {
11079
11080 #ifndef _XOPEN_SOURCE
11081 make an error
11082 #endif
11083   ;
11084   return 0;
11085 }
11086 _ACEOF
11087 rm -f conftest.$ac_objext
11088 if { (eval echo "$as_me:11088: \"$ac_compile\"") >&5
11089   (eval $ac_compile) 2>&5
11090   ac_status=$?
11091   echo "$as_me:11091: \$? = $ac_status" >&5
11092   (exit $ac_status); } &&
11093          { ac_try='test -s conftest.$ac_objext'
11094   { (eval echo "$as_me:11094: \"$ac_try\"") >&5
11095   (eval $ac_try) 2>&5
11096   ac_status=$?
11097   echo "$as_me:11097: \$? = $ac_status" >&5
11098   (exit $ac_status); }; }; then
11099   cf_cv_xopen_source=no
11100 else
11101   echo "$as_me: failed program was:" >&5
11102 cat conftest.$ac_ext >&5
11103 cf_save="$CPPFLAGS"
11104
11105         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11106         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11107
11108          cat >conftest.$ac_ext <<_ACEOF
11109 #line 11109 "configure"
11110 #include "confdefs.h"
11111
11112 #include <stdlib.h>
11113 #include <string.h>
11114 #include <sys/types.h>
11115
11116 int
11117 main (void)
11118 {
11119
11120 #ifdef _XOPEN_SOURCE
11121 make an error
11122 #endif
11123   ;
11124   return 0;
11125 }
11126 _ACEOF
11127 rm -f conftest.$ac_objext
11128 if { (eval echo "$as_me:11128: \"$ac_compile\"") >&5
11129   (eval $ac_compile) 2>&5
11130   ac_status=$?
11131   echo "$as_me:11131: \$? = $ac_status" >&5
11132   (exit $ac_status); } &&
11133          { ac_try='test -s conftest.$ac_objext'
11134   { (eval echo "$as_me:11134: \"$ac_try\"") >&5
11135   (eval $ac_try) 2>&5
11136   ac_status=$?
11137   echo "$as_me:11137: \$? = $ac_status" >&5
11138   (exit $ac_status); }; }; then
11139   cf_cv_xopen_source=no
11140 else
11141   echo "$as_me: failed program was:" >&5
11142 cat conftest.$ac_ext >&5
11143 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11144 fi
11145 rm -f conftest.$ac_objext conftest.$ac_ext
11146         CPPFLAGS="$cf_save"
11147
11148 fi
11149 rm -f conftest.$ac_objext conftest.$ac_ext
11150
11151 fi
11152 echo "$as_me:11152: result: $cf_cv_xopen_source" >&5
11153 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11154
11155 if test "$cf_cv_xopen_source" != no ; then
11156
11157 CFLAGS=`echo "$CFLAGS" | \
11158         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11159                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11160
11161 CPPFLAGS=`echo "$CPPFLAGS" | \
11162         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11163                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11164
11165         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11166
11167 cf_fix_cppflags=no
11168 cf_new_cflags=
11169 cf_new_cppflags=
11170 cf_new_extra_cppflags=
11171
11172 for cf_add_cflags in $cf_temp_xopen_source
11173 do
11174 case $cf_fix_cppflags in
11175 (no)
11176         case $cf_add_cflags in
11177         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11178                 case $cf_add_cflags in
11179                 (-D*)
11180                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11181
11182                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11183                                 && test -z "${cf_tst_cflags}" \
11184                                 && cf_fix_cppflags=yes
11185
11186                         if test $cf_fix_cppflags = yes ; then
11187
11188         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11189         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11190
11191                                 continue
11192                         elif test "${cf_tst_cflags}" = "\"'" ; then
11193
11194         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11195         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11196
11197                                 continue
11198                         fi
11199                         ;;
11200                 esac
11201                 case "$CPPFLAGS" in
11202                 (*$cf_add_cflags)
11203                         ;;
11204                 (*)
11205                         case $cf_add_cflags in
11206                         (-D*)
11207                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11208
11209 CPPFLAGS=`echo "$CPPFLAGS" | \
11210         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11211                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11212
11213                                 ;;
11214                         esac
11215
11216         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11217         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11218
11219                         ;;
11220                 esac
11221                 ;;
11222         (*)
11223
11224         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11225         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11226
11227                 ;;
11228         esac
11229         ;;
11230 (yes)
11231
11232         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11233         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11234
11235         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11236
11237         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11238                 && test -z "${cf_tst_cflags}" \
11239                 && cf_fix_cppflags=no
11240         ;;
11241 esac
11242 done
11243
11244 if test -n "$cf_new_cflags" ; then
11245
11246         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11247         CFLAGS="${CFLAGS}$cf_new_cflags"
11248
11249 fi
11250
11251 if test -n "$cf_new_cppflags" ; then
11252
11253         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11254         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11255
11256 fi
11257
11258 if test -n "$cf_new_extra_cppflags" ; then
11259
11260         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11261         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11262
11263 fi
11264
11265 fi
11266
11267         fi
11268 fi
11269 fi # cf_cv_posix_visible
11270
11271 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11272
11273 # Work around breakage on OS X
11274
11275 echo "$as_me:11275: checking if SIGWINCH is defined" >&5
11276 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11277 if test "${cf_cv_define_sigwinch+set}" = set; then
11278   echo $ECHO_N "(cached) $ECHO_C" >&6
11279 else
11280
11281         cat >conftest.$ac_ext <<_ACEOF
11282 #line 11282 "configure"
11283 #include "confdefs.h"
11284
11285 #include <sys/types.h>
11286 #include <sys/signal.h>
11287
11288 int
11289 main (void)
11290 {
11291 int x = SIGWINCH; (void)x
11292   ;
11293   return 0;
11294 }
11295 _ACEOF
11296 rm -f conftest.$ac_objext
11297 if { (eval echo "$as_me:11297: \"$ac_compile\"") >&5
11298   (eval $ac_compile) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); } &&
11302          { ac_try='test -s conftest.$ac_objext'
11303   { (eval echo "$as_me:11303: \"$ac_try\"") >&5
11304   (eval $ac_try) 2>&5
11305   ac_status=$?
11306   echo "$as_me:11306: \$? = $ac_status" >&5
11307   (exit $ac_status); }; }; then
11308   cf_cv_define_sigwinch=yes
11309 else
11310   echo "$as_me: failed program was:" >&5
11311 cat conftest.$ac_ext >&5
11312 cat >conftest.$ac_ext <<_ACEOF
11313 #line 11313 "configure"
11314 #include "confdefs.h"
11315
11316 #undef _XOPEN_SOURCE
11317 #undef _POSIX_SOURCE
11318 #undef _POSIX_C_SOURCE
11319 #include <sys/types.h>
11320 #include <sys/signal.h>
11321
11322 int
11323 main (void)
11324 {
11325 int x = SIGWINCH; (void)x
11326   ;
11327   return 0;
11328 }
11329 _ACEOF
11330 rm -f conftest.$ac_objext
11331 if { (eval echo "$as_me:11331: \"$ac_compile\"") >&5
11332   (eval $ac_compile) 2>&5
11333   ac_status=$?
11334   echo "$as_me:11334: \$? = $ac_status" >&5
11335   (exit $ac_status); } &&
11336          { ac_try='test -s conftest.$ac_objext'
11337   { (eval echo "$as_me:11337: \"$ac_try\"") >&5
11338   (eval $ac_try) 2>&5
11339   ac_status=$?
11340   echo "$as_me:11340: \$? = $ac_status" >&5
11341   (exit $ac_status); }; }; then
11342   cf_cv_define_sigwinch=maybe
11343 else
11344   echo "$as_me: failed program was:" >&5
11345 cat conftest.$ac_ext >&5
11346 cf_cv_define_sigwinch=no
11347 fi
11348 rm -f conftest.$ac_objext conftest.$ac_ext
11349
11350 fi
11351 rm -f conftest.$ac_objext conftest.$ac_ext
11352
11353 fi
11354 echo "$as_me:11354: result: $cf_cv_define_sigwinch" >&5
11355 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11356
11357 if test "$cf_cv_define_sigwinch" = maybe ; then
11358 echo "$as_me:11358: checking for actual SIGWINCH definition" >&5
11359 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11360 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11361   echo $ECHO_N "(cached) $ECHO_C" >&6
11362 else
11363
11364 cf_cv_fixup_sigwinch=unknown
11365 cf_sigwinch=32
11366 while test $cf_sigwinch != 1
11367 do
11368         cat >conftest.$ac_ext <<_ACEOF
11369 #line 11369 "configure"
11370 #include "confdefs.h"
11371
11372 #undef _XOPEN_SOURCE
11373 #undef _POSIX_SOURCE
11374 #undef _POSIX_C_SOURCE
11375 #include <sys/types.h>
11376 #include <sys/signal.h>
11377
11378 int
11379 main (void)
11380 {
11381
11382 #if SIGWINCH != $cf_sigwinch
11383 make an error
11384 #endif
11385 int x = SIGWINCH; (void)x
11386   ;
11387   return 0;
11388 }
11389 _ACEOF
11390 rm -f conftest.$ac_objext
11391 if { (eval echo "$as_me:11391: \"$ac_compile\"") >&5
11392   (eval $ac_compile) 2>&5
11393   ac_status=$?
11394   echo "$as_me:11394: \$? = $ac_status" >&5
11395   (exit $ac_status); } &&
11396          { ac_try='test -s conftest.$ac_objext'
11397   { (eval echo "$as_me:11397: \"$ac_try\"") >&5
11398   (eval $ac_try) 2>&5
11399   ac_status=$?
11400   echo "$as_me:11400: \$? = $ac_status" >&5
11401   (exit $ac_status); }; }; then
11402   cf_cv_fixup_sigwinch=$cf_sigwinch
11403          break
11404 else
11405   echo "$as_me: failed program was:" >&5
11406 cat conftest.$ac_ext >&5
11407 fi
11408 rm -f conftest.$ac_objext conftest.$ac_ext
11409
11410 cf_sigwinch=`expr $cf_sigwinch - 1`
11411 done
11412
11413 fi
11414 echo "$as_me:11414: result: $cf_cv_fixup_sigwinch" >&5
11415 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11416
11417         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11418                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11419         fi
11420 fi
11421
11422 # Checks for CODESET support.
11423
11424 echo "$as_me:11424: checking for nl_langinfo and CODESET" >&5
11425 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11426 if test "${am_cv_langinfo_codeset+set}" = set; then
11427   echo $ECHO_N "(cached) $ECHO_C" >&6
11428 else
11429   cat >conftest.$ac_ext <<_ACEOF
11430 #line 11430 "configure"
11431 #include "confdefs.h"
11432 #include <langinfo.h>
11433 int
11434 main (void)
11435 {
11436 char* cs = nl_langinfo(CODESET); (void)cs
11437   ;
11438   return 0;
11439 }
11440 _ACEOF
11441 rm -f conftest.$ac_objext conftest$ac_exeext
11442 if { (eval echo "$as_me:11442: \"$ac_link\"") >&5
11443   (eval $ac_link) 2>&5
11444   ac_status=$?
11445   echo "$as_me:11445: \$? = $ac_status" >&5
11446   (exit $ac_status); } &&
11447          { ac_try='test -s conftest$ac_exeext'
11448   { (eval echo "$as_me:11448: \"$ac_try\"") >&5
11449   (eval $ac_try) 2>&5
11450   ac_status=$?
11451   echo "$as_me:11451: \$? = $ac_status" >&5
11452   (exit $ac_status); }; }; then
11453   am_cv_langinfo_codeset=yes
11454 else
11455   echo "$as_me: failed program was:" >&5
11456 cat conftest.$ac_ext >&5
11457 am_cv_langinfo_codeset=no
11458 fi
11459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11460
11461 fi
11462 echo "$as_me:11462: result: $am_cv_langinfo_codeset" >&5
11463 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11464         if test $am_cv_langinfo_codeset = yes; then
11465
11466 cat >>confdefs.h <<\EOF
11467 #define HAVE_LANGINFO_CODESET 1
11468 EOF
11469
11470         fi
11471
11472 # use these variables to work around a defect in gcc's fixincludes.
11473 NCURSES_OK_WCHAR_T=
11474 NCURSES_OK_WINT_T=
11475
11476 echo "$as_me:11476: checking if you want wide-character code" >&5
11477 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11478
11479 # Check whether --enable-widec or --disable-widec was given.
11480 if test "${enable_widec+set}" = set; then
11481   enableval="$enable_widec"
11482   with_widec=$enableval
11483 else
11484   with_widec=no
11485 fi;
11486 echo "$as_me:11486: result: $with_widec" >&5
11487 echo "${ECHO_T}$with_widec" >&6
11488
11489 NCURSES_WCWIDTH_GRAPHICS=1
11490
11491 if test "x$with_widec" = xyes ; then
11492         if test "x$disable_lib_suffixes" = xno ; then
11493                 LIB_SUFFIX="w${LIB_SUFFIX}"
11494         fi
11495
11496 cat >>confdefs.h <<\EOF
11497 #define USE_WIDEC_SUPPORT 1
11498 EOF
11499
11500 cat >>confdefs.h <<\EOF
11501 #define NCURSES_WIDECHAR 1
11502 EOF
11503
11504 for ac_header in \
11505 wchar.h \
11506 wctype.h \
11507
11508 do
11509 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11510 echo "$as_me:11510: checking for $ac_header" >&5
11511 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11512 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11513   echo $ECHO_N "(cached) $ECHO_C" >&6
11514 else
11515   cat >conftest.$ac_ext <<_ACEOF
11516 #line 11516 "configure"
11517 #include "confdefs.h"
11518 #include <$ac_header>
11519 _ACEOF
11520 if { (eval echo "$as_me:11520: \"$ac_cpp conftest.$ac_ext\"") >&5
11521   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11522   ac_status=$?
11523   egrep -v '^ *\+' conftest.er1 >conftest.err
11524   rm -f conftest.er1
11525   cat conftest.err >&5
11526   echo "$as_me:11526: \$? = $ac_status" >&5
11527   (exit $ac_status); } >/dev/null; then
11528   if test -s conftest.err; then
11529     ac_cpp_err=$ac_c_preproc_warn_flag
11530   else
11531     ac_cpp_err=
11532   fi
11533 else
11534   ac_cpp_err=yes
11535 fi
11536 if test -z "$ac_cpp_err"; then
11537   eval "$as_ac_Header=yes"
11538 else
11539   echo "$as_me: failed program was:" >&5
11540   cat conftest.$ac_ext >&5
11541   eval "$as_ac_Header=no"
11542 fi
11543 rm -f conftest.err conftest.$ac_ext
11544 fi
11545 echo "$as_me:11545: result: `eval echo '${'$as_ac_Header'}'`" >&5
11546 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11547 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11548   cat >>confdefs.h <<EOF
11549 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11550 EOF
11551
11552 fi
11553 done
11554
11555 echo "$as_me:11555: checking if wchar.h can be used as is" >&5
11556 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11557 if test "${cf_cv_wchar_h_okay+set}" = set; then
11558   echo $ECHO_N "(cached) $ECHO_C" >&6
11559 else
11560
11561 cat >conftest.$ac_ext <<_ACEOF
11562 #line 11562 "configure"
11563 #include "confdefs.h"
11564
11565 #include <stdlib.h>
11566 #ifdef HAVE_WCHAR_H
11567 #include <wchar.h>
11568 #endif
11569 #ifdef HAVE_WCTYPE_H
11570 #include <wctype.h>
11571 #endif
11572
11573 int
11574 main (void)
11575 {
11576
11577         wint_t foo = 0;
11578         int bar = iswpunct(foo)
11579   ;
11580   return 0;
11581 }
11582 _ACEOF
11583 rm -f conftest.$ac_objext
11584 if { (eval echo "$as_me:11584: \"$ac_compile\"") >&5
11585   (eval $ac_compile) 2>&5
11586   ac_status=$?
11587   echo "$as_me:11587: \$? = $ac_status" >&5
11588   (exit $ac_status); } &&
11589          { ac_try='test -s conftest.$ac_objext'
11590   { (eval echo "$as_me:11590: \"$ac_try\"") >&5
11591   (eval $ac_try) 2>&5
11592   ac_status=$?
11593   echo "$as_me:11593: \$? = $ac_status" >&5
11594   (exit $ac_status); }; }; then
11595   cf_cv_wchar_h_okay=yes
11596 else
11597   echo "$as_me: failed program was:" >&5
11598 cat conftest.$ac_ext >&5
11599 cf_cv_wchar_h_okay=no
11600 fi
11601 rm -f conftest.$ac_objext conftest.$ac_ext
11602 fi
11603 echo "$as_me:11603: result: $cf_cv_wchar_h_okay" >&5
11604 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11605
11606 if test $cf_cv_wchar_h_okay = no
11607 then
11608
11609 echo "$as_me:11609: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11610 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11611 cat >conftest.$ac_ext <<_ACEOF
11612 #line 11612 "configure"
11613 #include "confdefs.h"
11614 #include <sys/types.h>
11615
11616 int
11617 main (void)
11618 {
11619
11620 #ifndef _XOPEN_SOURCE_EXTENDED
11621 make an error
11622 #endif
11623   ;
11624   return 0;
11625 }
11626 _ACEOF
11627 rm -f conftest.$ac_objext
11628 if { (eval echo "$as_me:11628: \"$ac_compile\"") >&5
11629   (eval $ac_compile) 2>&5
11630   ac_status=$?
11631   echo "$as_me:11631: \$? = $ac_status" >&5
11632   (exit $ac_status); } &&
11633          { ac_try='test -s conftest.$ac_objext'
11634   { (eval echo "$as_me:11634: \"$ac_try\"") >&5
11635   (eval $ac_try) 2>&5
11636   ac_status=$?
11637   echo "$as_me:11637: \$? = $ac_status" >&5
11638   (exit $ac_status); }; }; then
11639   cf_result=no
11640 else
11641   echo "$as_me: failed program was:" >&5
11642 cat conftest.$ac_ext >&5
11643 cf_result=yes
11644 fi
11645 rm -f conftest.$ac_objext conftest.$ac_ext
11646 echo "$as_me:11646: result: $cf_result" >&5
11647 echo "${ECHO_T}$cf_result" >&6
11648
11649 if test "$cf_result" = yes ; then
11650         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11651 elif test "x" != "x" ; then
11652         echo "$as_me:11652: checking checking for compatible value versus " >&5
11653 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11654         cat >conftest.$ac_ext <<_ACEOF
11655 #line 11655 "configure"
11656 #include "confdefs.h"
11657 #include <sys/types.h>
11658
11659 int
11660 main (void)
11661 {
11662
11663 #if _XOPEN_SOURCE_EXTENDED- < 0
11664 make an error
11665 #endif
11666   ;
11667   return 0;
11668 }
11669 _ACEOF
11670 rm -f conftest.$ac_objext
11671 if { (eval echo "$as_me:11671: \"$ac_compile\"") >&5
11672   (eval $ac_compile) 2>&5
11673   ac_status=$?
11674   echo "$as_me:11674: \$? = $ac_status" >&5
11675   (exit $ac_status); } &&
11676          { ac_try='test -s conftest.$ac_objext'
11677   { (eval echo "$as_me:11677: \"$ac_try\"") >&5
11678   (eval $ac_try) 2>&5
11679   ac_status=$?
11680   echo "$as_me:11680: \$? = $ac_status" >&5
11681   (exit $ac_status); }; }; then
11682   cf_result=yes
11683 else
11684   echo "$as_me: failed program was:" >&5
11685 cat conftest.$ac_ext >&5
11686 cf_result=no
11687 fi
11688 rm -f conftest.$ac_objext conftest.$ac_ext
11689         echo "$as_me:11689: result: $cf_result" >&5
11690 echo "${ECHO_T}$cf_result" >&6
11691         if test "$cf_result" = no ; then
11692                 # perhaps we can override it - try...
11693                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11694         fi
11695 fi
11696
11697 fi
11698
11699 echo "$as_me:11699: checking if wcwidth agrees graphics are single-width" >&5
11700 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11701 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11702   echo $ECHO_N "(cached) $ECHO_C" >&6
11703 else
11704
11705 cat >conftest.in <<CF_EOF
11706 -       VT100 symbols
11707 0x250c  upper left corner
11708 0x2514  lower left corner
11709 0x2510  upper right corner
11710 0x2518  lower right corner
11711 0x251c  tee pointing left
11712 0x2524  tee pointing right
11713 0x2534  tee pointing up
11714 0x252c  tee pointing down
11715 0x2500  horizontal line
11716 0x2502  vertical line
11717 0x253c  large plus or crossover
11718 0x23ba  scan line 1
11719 0x23bd  scan line 9
11720 0x25c6  diamond
11721 0x2592  checker board (stipple)
11722 0x00b0  degree symbol
11723 0x00b1  plus/minus
11724 0x00b7  bullet
11725 -       Teletype 5410v1 symbols
11726 0x2190  arrow pointing left
11727 0x2192  arrow pointing right
11728 0x2193  arrow pointing down
11729 0x2191  arrow pointing up
11730 0x2592  board of squares
11731 0x2603  lantern symbol
11732 0x25ae  solid square block
11733 -       these defaults were invented for ncurses
11734 0x23bb  scan line 3
11735 0x23bc  scan line 7
11736 0x2264  less-than-or-equal-to
11737 0x2265  greater-than-or-equal-to
11738 0x03c0  greek pi
11739 0x2260  not-equal
11740 0x00a3  pound-sterling symbol
11741 -       thick-line-drawing
11742 0x250f  upper left corner
11743 0x2517  lower left corner
11744 0x2513  upper right corner
11745 0x251b  lower right corner
11746 0x2523  tee pointing left
11747 0x252b  tee pointing right
11748 0x253b  tee pointing up
11749 0x2533  tee pointing down
11750 0x2501  horizontal line
11751 0x2503  vertical line
11752 0x254b  large plus or crossover
11753 -       double-line-drawing
11754 0x2554  upper left corner
11755 0x255a  lower left corner
11756 0x2557  upper right corner
11757 0x255d  lower right corner
11758 0x2563  tee pointing left
11759 0x2560  tee pointing right
11760 0x2569  tee pointing up
11761 0x2566  tee pointing down
11762 0x2550  horizontal line
11763 0x2551  vertical line
11764 0x256c  large plus or crossover
11765 CF_EOF
11766 if test "$cross_compiling" = yes; then
11767   cf_cv_wcwidth_graphics=unknown
11768 else
11769   cat >conftest.$ac_ext <<_ACEOF
11770 #line 11770 "configure"
11771 #include "confdefs.h"
11772
11773 #include <locale.h>
11774 #include <stdio.h>
11775 #include <wchar.h>
11776
11777 #define MY_LEN 80
11778
11779 int
11780 main(void)
11781 {
11782         FILE *fp;
11783         int value;
11784         char buffer[MY_LEN + 1];
11785         char notes[MY_LEN + 1];
11786         int totals = 0;
11787         int passed = 0;
11788
11789         if (setlocale(LC_ALL, "en_US.UTF8") ||
11790                 setlocale(LC_ALL, "en_US.UTF-8") ||
11791                 setlocale(LC_ALL, "en_US.utf8") ||
11792                 setlocale(LC_ALL, "en_US.utf-8")) {
11793                 if ((fp = fopen("conftest.in", "r")) != 0) {
11794                         while (fgets(buffer, MY_LEN, fp) != 0) {
11795                                 if (*buffer == '-') {
11796                                         fprintf(stderr, "\t%s", buffer);
11797                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11798                                         ++totals;
11799                                         if (wcwidth(value) == 1)
11800                                                 ++passed;
11801                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11802                                 } else {
11803                                         fprintf(stderr, "?\t%s", buffer);
11804                                 }
11805                         }
11806                 }
11807         }
11808         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11809         return (totals == passed) ? 0 : 1;
11810 }
11811
11812 _ACEOF
11813 rm -f conftest$ac_exeext
11814 if { (eval echo "$as_me:11814: \"$ac_link\"") >&5
11815   (eval $ac_link) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11819   { (eval echo "$as_me:11819: \"$ac_try\"") >&5
11820   (eval $ac_try) 2>&5
11821   ac_status=$?
11822   echo "$as_me:11822: \$? = $ac_status" >&5
11823   (exit $ac_status); }; }; then
11824   cf_cv_wcwidth_graphics=yes
11825 else
11826   echo "$as_me: program exited with status $ac_status" >&5
11827 echo "$as_me: failed program was:" >&5
11828 cat conftest.$ac_ext >&5
11829 cf_cv_wcwidth_graphics=no
11830 fi
11831 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11832 fi
11833
11834 fi
11835 echo "$as_me:11835: result: $cf_cv_wcwidth_graphics" >&5
11836 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11837
11838         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11839
11840         # with_overwrite=no
11841         NCURSES_CH_T=cchar_t
11842
11843 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11844 do
11845 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11846 echo "$as_me:11846: checking for $ac_func" >&5
11847 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11848 if eval "test \"\${$as_ac_var+set}\" = set"; then
11849   echo $ECHO_N "(cached) $ECHO_C" >&6
11850 else
11851   cat >conftest.$ac_ext <<_ACEOF
11852 #line 11852 "configure"
11853 #include "confdefs.h"
11854 #define $ac_func autoconf_temporary
11855 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11856 #undef $ac_func
11857
11858 #ifdef __cplusplus
11859 extern "C"
11860 #endif
11861
11862 /* We use char because int might match the return type of a gcc2
11863    builtin and then its argument prototype would still apply.  */
11864 char $ac_func (void);
11865
11866 int
11867 main (void)
11868 {
11869
11870 /* The GNU C library defines stubs for functions which it implements
11871     to always fail with ENOSYS.  Some functions are actually named
11872     something starting with __ and the normal name is an alias.  */
11873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11874 #error found stub for $ac_func
11875 #endif
11876
11877         return $ac_func ();
11878   ;
11879   return 0;
11880 }
11881 _ACEOF
11882 rm -f conftest.$ac_objext conftest$ac_exeext
11883 if { (eval echo "$as_me:11883: \"$ac_link\"") >&5
11884   (eval $ac_link) 2>&5
11885   ac_status=$?
11886   echo "$as_me:11886: \$? = $ac_status" >&5
11887   (exit $ac_status); } &&
11888          { ac_try='test -s conftest$ac_exeext'
11889   { (eval echo "$as_me:11889: \"$ac_try\"") >&5
11890   (eval $ac_try) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit $ac_status); }; }; then
11894   eval "$as_ac_var=yes"
11895 else
11896   echo "$as_me: failed program was:" >&5
11897 cat conftest.$ac_ext >&5
11898 eval "$as_ac_var=no"
11899 fi
11900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11901 fi
11902 echo "$as_me:11902: result: `eval echo '${'$as_ac_var'}'`" >&5
11903 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11904 if test `eval echo '${'$as_ac_var'}'` = yes; then
11905   cat >>confdefs.h <<EOF
11906 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11907 EOF
11908
11909 fi
11910 done
11911
11912         if test "x$ac_cv_func_putwc" != xyes ; then
11913
11914 echo "$as_me:11914: checking for multibyte character support" >&5
11915 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11916 if test "${cf_cv_utf8_lib+set}" = set; then
11917   echo $ECHO_N "(cached) $ECHO_C" >&6
11918 else
11919
11920         cf_save_LIBS="$LIBS"
11921         cat >conftest.$ac_ext <<_ACEOF
11922 #line 11922 "configure"
11923 #include "confdefs.h"
11924
11925 #include <stdlib.h>
11926 int
11927 main (void)
11928 {
11929 putwc(0,0);
11930   ;
11931   return 0;
11932 }
11933 _ACEOF
11934 rm -f conftest.$ac_objext conftest$ac_exeext
11935 if { (eval echo "$as_me:11935: \"$ac_link\"") >&5
11936   (eval $ac_link) 2>&5
11937   ac_status=$?
11938   echo "$as_me:11938: \$? = $ac_status" >&5
11939   (exit $ac_status); } &&
11940          { ac_try='test -s conftest$ac_exeext'
11941   { (eval echo "$as_me:11941: \"$ac_try\"") >&5
11942   (eval $ac_try) 2>&5
11943   ac_status=$?
11944   echo "$as_me:11944: \$? = $ac_status" >&5
11945   (exit $ac_status); }; }; then
11946   cf_cv_utf8_lib=yes
11947 else
11948   echo "$as_me: failed program was:" >&5
11949 cat conftest.$ac_ext >&5
11950
11951 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11952 # will be set on completion of the AC_TRY_LINK below.
11953 cf_cv_header_path_utf8=
11954 cf_cv_library_path_utf8=
11955
11956 echo "${as_me:-configure}:11956: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11957
11958 cf_save_LIBS="$LIBS"
11959
11960 cat >conftest.$ac_ext <<_ACEOF
11961 #line 11961 "configure"
11962 #include "confdefs.h"
11963
11964 #include <libutf8.h>
11965 int
11966 main (void)
11967 {
11968 putwc(0,0);
11969   ;
11970   return 0;
11971 }
11972 _ACEOF
11973 rm -f conftest.$ac_objext conftest$ac_exeext
11974 if { (eval echo "$as_me:11974: \"$ac_link\"") >&5
11975   (eval $ac_link) 2>&5
11976   ac_status=$?
11977   echo "$as_me:11977: \$? = $ac_status" >&5
11978   (exit $ac_status); } &&
11979          { ac_try='test -s conftest$ac_exeext'
11980   { (eval echo "$as_me:11980: \"$ac_try\"") >&5
11981   (eval $ac_try) 2>&5
11982   ac_status=$?
11983   echo "$as_me:11983: \$? = $ac_status" >&5
11984   (exit $ac_status); }; }; then
11985
11986         cf_cv_find_linkage_utf8=yes
11987         cf_cv_header_path_utf8=/usr/include
11988         cf_cv_library_path_utf8=/usr/lib
11989
11990 else
11991   echo "$as_me: failed program was:" >&5
11992 cat conftest.$ac_ext >&5
11993
11994 LIBS="-lutf8  $cf_save_LIBS"
11995
11996 cat >conftest.$ac_ext <<_ACEOF
11997 #line 11997 "configure"
11998 #include "confdefs.h"
11999
12000 #include <libutf8.h>
12001 int
12002 main (void)
12003 {
12004 putwc(0,0);
12005   ;
12006   return 0;
12007 }
12008 _ACEOF
12009 rm -f conftest.$ac_objext conftest$ac_exeext
12010 if { (eval echo "$as_me:12010: \"$ac_link\"") >&5
12011   (eval $ac_link) 2>&5
12012   ac_status=$?
12013   echo "$as_me:12013: \$? = $ac_status" >&5
12014   (exit $ac_status); } &&
12015          { ac_try='test -s conftest$ac_exeext'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); }; }; then
12021
12022         cf_cv_find_linkage_utf8=yes
12023         cf_cv_header_path_utf8=/usr/include
12024         cf_cv_library_path_utf8=/usr/lib
12025         cf_cv_library_file_utf8="-lutf8"
12026
12027 else
12028   echo "$as_me: failed program was:" >&5
12029 cat conftest.$ac_ext >&5
12030
12031         cf_cv_find_linkage_utf8=no
12032         LIBS="$cf_save_LIBS"
12033
12034         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12035
12036 echo "${as_me:-configure}:12036: testing find linkage for utf8 library ..." 1>&5
12037
12038 echo "${as_me:-configure}:12038: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12039
12040         cf_save_CPPFLAGS="$CPPFLAGS"
12041         cf_test_CPPFLAGS="$CPPFLAGS"
12042
12043 cf_search=
12044
12045 # collect the current set of include-directories from compiler flags
12046 cf_header_path_list=""
12047 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12048         for cf_header_path in $CPPFLAGS $CFLAGS
12049         do
12050                 case $cf_header_path in
12051                 (-I*)
12052                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12053
12054 test "x$cf_header_path" != "xNONE" && \
12055 test -d "$cf_header_path" && \
12056  {
12057         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12058         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
12059         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
12060         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12061         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
12062         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12063 }
12064
12065                         cf_header_path_list="$cf_header_path_list $cf_search"
12066                         ;;
12067                 esac
12068         done
12069 fi
12070
12071 # add the variations for the package we are looking for
12072
12073 cf_search=
12074
12075 test "x$prefix" != "xNONE" && \
12076 test -d "$prefix" && \
12077  {
12078         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12079         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
12080         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
12081         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
12082         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
12083         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12084 }
12085
12086 for cf_subdir_prefix in \
12087         /usr \
12088         /usr/local \
12089         /usr/pkg \
12090         /opt \
12091         /opt/local \
12092         $HOME
12093 do
12094
12095 test "x$cf_subdir_prefix" != "x$prefix" && \
12096 test -d "$cf_subdir_prefix" && \
12097 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12098         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12099         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
12100         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12101         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12102         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12103         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12104 }
12105
12106 done
12107
12108 test "$includedir" != NONE && \
12109 test "$includedir" != "/usr/include" && \
12110 test -d "$includedir" && {
12111         test -d $includedir &&    cf_search="$cf_search $includedir"
12112         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
12113 }
12114
12115 test "$oldincludedir" != NONE && \
12116 test "$oldincludedir" != "/usr/include" && \
12117 test -d "$oldincludedir" && {
12118         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
12119         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
12120 }
12121
12122 cf_search="$cf_search $cf_header_path_list"
12123
12124         for cf_cv_header_path_utf8 in $cf_search
12125         do
12126                 if test -d $cf_cv_header_path_utf8 ; then
12127                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12128
12129 echo "${as_me:-configure}:12129: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12130
12131                         CPPFLAGS="$cf_save_CPPFLAGS"
12132
12133         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12134         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12135
12136                         cat >conftest.$ac_ext <<_ACEOF
12137 #line 12137 "configure"
12138 #include "confdefs.h"
12139
12140 #include <libutf8.h>
12141 int
12142 main (void)
12143 {
12144 putwc(0,0);
12145   ;
12146   return 0;
12147 }
12148 _ACEOF
12149 rm -f conftest.$ac_objext
12150 if { (eval echo "$as_me:12150: \"$ac_compile\"") >&5
12151   (eval $ac_compile) 2>&5
12152   ac_status=$?
12153   echo "$as_me:12153: \$? = $ac_status" >&5
12154   (exit $ac_status); } &&
12155          { ac_try='test -s conftest.$ac_objext'
12156   { (eval echo "$as_me:12156: \"$ac_try\"") >&5
12157   (eval $ac_try) 2>&5
12158   ac_status=$?
12159   echo "$as_me:12159: \$? = $ac_status" >&5
12160   (exit $ac_status); }; }; then
12161
12162                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12163
12164 echo "${as_me:-configure}:12164: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12165
12166                                 cf_cv_find_linkage_utf8=maybe
12167                                 cf_test_CPPFLAGS="$CPPFLAGS"
12168                                 break
12169 else
12170   echo "$as_me: failed program was:" >&5
12171 cat conftest.$ac_ext >&5
12172
12173                                 CPPFLAGS="$cf_save_CPPFLAGS"
12174
12175 fi
12176 rm -f conftest.$ac_objext conftest.$ac_ext
12177                 fi
12178         done
12179
12180         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12181
12182 echo "${as_me:-configure}:12182: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12183
12184                 cf_save_LIBS="$LIBS"
12185                 cf_save_LDFLAGS="$LDFLAGS"
12186
12187                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12188
12189 cf_search=
12190 cf_library_path_list=""
12191 if test -n "${LDFLAGS}${LIBS}" ; then
12192         for cf_library_path in $LDFLAGS $LIBS
12193         do
12194                 case $cf_library_path in
12195                 (-L*)
12196                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12197
12198 test "x$cf_library_path" != "xNONE" && \
12199 test -d "$cf_library_path" && \
12200  {
12201         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12202         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12203         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12204         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12205         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12206         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12207 }
12208
12209                         cf_library_path_list="$cf_library_path_list $cf_search"
12210                         ;;
12211                 esac
12212         done
12213 fi
12214
12215 cf_search=
12216
12217 test "x$prefix" != "xNONE" && \
12218 test -d "$prefix" && \
12219  {
12220         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12221         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12222         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12223         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12224         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12225         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12226 }
12227
12228 for cf_subdir_prefix in \
12229         /usr \
12230         /usr/local \
12231         /usr/pkg \
12232         /opt \
12233         /opt/local \
12234         $HOME
12235 do
12236
12237 test "x$cf_subdir_prefix" != "x$prefix" && \
12238 test -d "$cf_subdir_prefix" && \
12239 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12240         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12241         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12242         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12243         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12244         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12245         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12246 }
12247
12248 done
12249
12250 cf_search="$cf_library_path_list $cf_search"
12251
12252                         for cf_cv_library_path_utf8 in $cf_search
12253                         do
12254                                 if test -d $cf_cv_library_path_utf8 ; then
12255                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12256
12257 echo "${as_me:-configure}:12257: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12258
12259                                         CPPFLAGS="$cf_test_CPPFLAGS"
12260                                         LIBS="-lutf8  $cf_save_LIBS"
12261                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12262                                         cat >conftest.$ac_ext <<_ACEOF
12263 #line 12263 "configure"
12264 #include "confdefs.h"
12265
12266 #include <libutf8.h>
12267 int
12268 main (void)
12269 {
12270 putwc(0,0);
12271   ;
12272   return 0;
12273 }
12274 _ACEOF
12275 rm -f conftest.$ac_objext conftest$ac_exeext
12276 if { (eval echo "$as_me:12276: \"$ac_link\"") >&5
12277   (eval $ac_link) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit $ac_status); } &&
12281          { ac_try='test -s conftest$ac_exeext'
12282   { (eval echo "$as_me:12282: \"$ac_try\"") >&5
12283   (eval $ac_try) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit $ac_status); }; }; then
12287
12288                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12289
12290 echo "${as_me:-configure}:12290: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12291
12292                                         cf_cv_find_linkage_utf8=yes
12293                                         cf_cv_library_file_utf8="-lutf8"
12294                                         break
12295 else
12296   echo "$as_me: failed program was:" >&5
12297 cat conftest.$ac_ext >&5
12298
12299                                         CPPFLAGS="$cf_save_CPPFLAGS"
12300                                         LIBS="$cf_save_LIBS"
12301                                         LDFLAGS="$cf_save_LDFLAGS"
12302
12303 fi
12304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12305                                 fi
12306                         done
12307                         CPPFLAGS="$cf_save_CPPFLAGS"
12308                         LDFLAGS="$cf_save_LDFLAGS"
12309                 fi
12310
12311         else
12312                 cf_cv_find_linkage_utf8=no
12313         fi
12314
12315 fi
12316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12317
12318 fi
12319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12320
12321 LIBS="$cf_save_LIBS"
12322
12323 if test "$cf_cv_find_linkage_utf8" = yes ; then
12324 cf_cv_utf8_lib=add-on
12325 else
12326 cf_cv_utf8_lib=no
12327 fi
12328
12329 fi
12330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12331 fi
12332 echo "$as_me:12332: result: $cf_cv_utf8_lib" >&5
12333 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12334
12335 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12336 # ncurses/ncursesw:
12337 if test "$cf_cv_utf8_lib" = "add-on" ; then
12338
12339 cat >>confdefs.h <<\EOF
12340 #define HAVE_LIBUTF8_H 1
12341 EOF
12342
12343 if test -n "$cf_cv_header_path_utf8" ; then
12344   for cf_add_incdir in $cf_cv_header_path_utf8
12345   do
12346         while test $cf_add_incdir != /usr/include
12347         do
12348           if test -d $cf_add_incdir
12349           then
12350                 cf_have_incdir=no
12351                 if test -n "$CFLAGS$CPPFLAGS" ; then
12352                   # a loop is needed to ensure we can add subdirs of existing dirs
12353                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12354                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12355                           cf_have_incdir=yes; break
12356                         fi
12357                   done
12358                 fi
12359
12360                 if test "$cf_have_incdir" = no ; then
12361                   if test "$cf_add_incdir" = /usr/local/include ; then
12362                         if test "$GCC" = yes
12363                         then
12364                           cf_save_CPPFLAGS=$CPPFLAGS
12365
12366         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12367         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12368
12369                           cat >conftest.$ac_ext <<_ACEOF
12370 #line 12370 "configure"
12371 #include "confdefs.h"
12372 #include <stdio.h>
12373 int
12374 main (void)
12375 {
12376 printf("Hello")
12377   ;
12378   return 0;
12379 }
12380 _ACEOF
12381 rm -f conftest.$ac_objext
12382 if { (eval echo "$as_me:12382: \"$ac_compile\"") >&5
12383   (eval $ac_compile) 2>&5
12384   ac_status=$?
12385   echo "$as_me:12385: \$? = $ac_status" >&5
12386   (exit $ac_status); } &&
12387          { ac_try='test -s conftest.$ac_objext'
12388   { (eval echo "$as_me:12388: \"$ac_try\"") >&5
12389   (eval $ac_try) 2>&5
12390   ac_status=$?
12391   echo "$as_me:12391: \$? = $ac_status" >&5
12392   (exit $ac_status); }; }; then
12393   :
12394 else
12395   echo "$as_me: failed program was:" >&5
12396 cat conftest.$ac_ext >&5
12397 cf_have_incdir=yes
12398 fi
12399 rm -f conftest.$ac_objext conftest.$ac_ext
12400                           CPPFLAGS=$cf_save_CPPFLAGS
12401                         fi
12402                   fi
12403                 fi
12404
12405                 if test "$cf_have_incdir" = no ; then
12406                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12407
12408 echo "${as_me:-configure}:12408: testing adding $cf_add_incdir to include-path ..." 1>&5
12409
12410                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12411
12412                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12413                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12414                   cf_add_incdir="$cf_top_incdir"
12415                 else
12416                   break
12417                 fi
12418           else
12419                 break
12420           fi
12421         done
12422   done
12423 fi
12424
12425 if test -n "$cf_cv_library_path_utf8" ; then
12426         for cf_add_libdir in $cf_cv_library_path_utf8
12427         do
12428                 if test $cf_add_libdir = /usr/lib ; then
12429                         :
12430                 elif test -d $cf_add_libdir
12431                 then
12432                         cf_have_libdir=no
12433                         if test -n "$LDFLAGS$LIBS" ; then
12434                                 # a loop is needed to ensure we can add subdirs of existing dirs
12435                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12436                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12437                                                 cf_have_libdir=yes; break
12438                                         fi
12439                                 done
12440                         fi
12441                         if test "$cf_have_libdir" = no ; then
12442                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12443
12444 echo "${as_me:-configure}:12444: testing adding $cf_add_libdir to library-path ..." 1>&5
12445
12446                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12447                         fi
12448                 fi
12449         done
12450 fi
12451
12452 cf_add_libs="$LIBS"
12453 # reverse order
12454 cf_add_0lib=
12455 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12456 # filter duplicates
12457 for cf_add_1lib in $cf_add_0lib; do
12458         for cf_add_2lib in $cf_add_libs; do
12459                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12460                         cf_add_1lib=
12461                         break
12462                 fi
12463         done
12464         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12465 done
12466 LIBS="$cf_add_libs"
12467
12468 fi
12469
12470                 if test "$cf_cv_utf8_lib" != no ; then
12471                         NCURSES_LIBUTF8=1
12472                 fi
12473         fi
12474
12475 # This is needed on Tru64 5.0 to declare mbstate_t
12476 echo "$as_me:12476: checking if we must include wchar.h to declare mbstate_t" >&5
12477 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12478 if test "${cf_cv_mbstate_t+set}" = set; then
12479   echo $ECHO_N "(cached) $ECHO_C" >&6
12480 else
12481
12482 cat >conftest.$ac_ext <<_ACEOF
12483 #line 12483 "configure"
12484 #include "confdefs.h"
12485
12486 #include <stdlib.h>
12487 #include <stdarg.h>
12488 #include <stdio.h>
12489 #ifdef HAVE_LIBUTF8_H
12490 #include <libutf8.h>
12491 #endif
12492 int
12493 main (void)
12494 {
12495 mbstate_t state
12496   ;
12497   return 0;
12498 }
12499 _ACEOF
12500 rm -f conftest.$ac_objext
12501 if { (eval echo "$as_me:12501: \"$ac_compile\"") >&5
12502   (eval $ac_compile) 2>&5
12503   ac_status=$?
12504   echo "$as_me:12504: \$? = $ac_status" >&5
12505   (exit $ac_status); } &&
12506          { ac_try='test -s conftest.$ac_objext'
12507   { (eval echo "$as_me:12507: \"$ac_try\"") >&5
12508   (eval $ac_try) 2>&5
12509   ac_status=$?
12510   echo "$as_me:12510: \$? = $ac_status" >&5
12511   (exit $ac_status); }; }; then
12512   cf_cv_mbstate_t=no
12513 else
12514   echo "$as_me: failed program was:" >&5
12515 cat conftest.$ac_ext >&5
12516 cat >conftest.$ac_ext <<_ACEOF
12517 #line 12517 "configure"
12518 #include "confdefs.h"
12519
12520 #include <stdlib.h>
12521 #include <stdarg.h>
12522 #include <stdio.h>
12523 #include <wchar.h>
12524 #ifdef HAVE_LIBUTF8_H
12525 #include <libutf8.h>
12526 #endif
12527 int
12528 main (void)
12529 {
12530 mbstate_t value
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 rm -f conftest.$ac_objext
12536 if { (eval echo "$as_me:12536: \"$ac_compile\"") >&5
12537   (eval $ac_compile) 2>&5
12538   ac_status=$?
12539   echo "$as_me:12539: \$? = $ac_status" >&5
12540   (exit $ac_status); } &&
12541          { ac_try='test -s conftest.$ac_objext'
12542   { (eval echo "$as_me:12542: \"$ac_try\"") >&5
12543   (eval $ac_try) 2>&5
12544   ac_status=$?
12545   echo "$as_me:12545: \$? = $ac_status" >&5
12546   (exit $ac_status); }; }; then
12547   cf_cv_mbstate_t=yes
12548 else
12549   echo "$as_me: failed program was:" >&5
12550 cat conftest.$ac_ext >&5
12551 cf_cv_mbstate_t=unknown
12552 fi
12553 rm -f conftest.$ac_objext conftest.$ac_ext
12554 fi
12555 rm -f conftest.$ac_objext conftest.$ac_ext
12556 fi
12557 echo "$as_me:12557: result: $cf_cv_mbstate_t" >&5
12558 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12559
12560 if test "$cf_cv_mbstate_t" = yes ; then
12561
12562 cat >>confdefs.h <<\EOF
12563 #define NEED_WCHAR_H 1
12564 EOF
12565
12566         NEED_WCHAR_H=1
12567 fi
12568
12569 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12570 if test "$cf_cv_mbstate_t" = unknown ; then
12571         NCURSES_MBSTATE_T=1
12572 fi
12573
12574 # This is needed on Tru64 5.0 to declare wchar_t
12575 echo "$as_me:12575: checking if we must include wchar.h to declare wchar_t" >&5
12576 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12577 if test "${cf_cv_wchar_t+set}" = set; then
12578   echo $ECHO_N "(cached) $ECHO_C" >&6
12579 else
12580
12581 cat >conftest.$ac_ext <<_ACEOF
12582 #line 12582 "configure"
12583 #include "confdefs.h"
12584
12585 #include <stdlib.h>
12586 #include <stdarg.h>
12587 #include <stdio.h>
12588 #ifdef HAVE_LIBUTF8_H
12589 #include <libutf8.h>
12590 #endif
12591 int
12592 main (void)
12593 {
12594 wchar_t state
12595   ;
12596   return 0;
12597 }
12598 _ACEOF
12599 rm -f conftest.$ac_objext
12600 if { (eval echo "$as_me:12600: \"$ac_compile\"") >&5
12601   (eval $ac_compile) 2>&5
12602   ac_status=$?
12603   echo "$as_me:12603: \$? = $ac_status" >&5
12604   (exit $ac_status); } &&
12605          { ac_try='test -s conftest.$ac_objext'
12606   { (eval echo "$as_me:12606: \"$ac_try\"") >&5
12607   (eval $ac_try) 2>&5
12608   ac_status=$?
12609   echo "$as_me:12609: \$? = $ac_status" >&5
12610   (exit $ac_status); }; }; then
12611   cf_cv_wchar_t=no
12612 else
12613   echo "$as_me: failed program was:" >&5
12614 cat conftest.$ac_ext >&5
12615 cat >conftest.$ac_ext <<_ACEOF
12616 #line 12616 "configure"
12617 #include "confdefs.h"
12618
12619 #include <stdlib.h>
12620 #include <stdarg.h>
12621 #include <stdio.h>
12622 #include <wchar.h>
12623 #ifdef HAVE_LIBUTF8_H
12624 #include <libutf8.h>
12625 #endif
12626 int
12627 main (void)
12628 {
12629 wchar_t value
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 rm -f conftest.$ac_objext
12635 if { (eval echo "$as_me:12635: \"$ac_compile\"") >&5
12636   (eval $ac_compile) 2>&5
12637   ac_status=$?
12638   echo "$as_me:12638: \$? = $ac_status" >&5
12639   (exit $ac_status); } &&
12640          { ac_try='test -s conftest.$ac_objext'
12641   { (eval echo "$as_me:12641: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:12644: \$? = $ac_status" >&5
12645   (exit $ac_status); }; }; then
12646   cf_cv_wchar_t=yes
12647 else
12648   echo "$as_me: failed program was:" >&5
12649 cat conftest.$ac_ext >&5
12650 cf_cv_wchar_t=unknown
12651 fi
12652 rm -f conftest.$ac_objext conftest.$ac_ext
12653 fi
12654 rm -f conftest.$ac_objext conftest.$ac_ext
12655 fi
12656 echo "$as_me:12656: result: $cf_cv_wchar_t" >&5
12657 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12658
12659 if test "$cf_cv_wchar_t" = yes ; then
12660
12661 cat >>confdefs.h <<\EOF
12662 #define NEED_WCHAR_H 1
12663 EOF
12664
12665         NEED_WCHAR_H=1
12666 fi
12667
12668 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12669 if test "$cf_cv_wchar_t" = unknown ; then
12670         NCURSES_WCHAR_T=1
12671 fi
12672
12673 # if we find wchar_t in either place, use substitution to provide a fallback.
12674 if test "$cf_cv_wchar_t" != unknown ; then
12675         NCURSES_OK_WCHAR_T=1
12676 fi
12677
12678 # This is needed on Tru64 5.0 to declare wint_t
12679 echo "$as_me:12679: checking if we must include wchar.h to declare wint_t" >&5
12680 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12681 if test "${cf_cv_wint_t+set}" = set; then
12682   echo $ECHO_N "(cached) $ECHO_C" >&6
12683 else
12684
12685 cat >conftest.$ac_ext <<_ACEOF
12686 #line 12686 "configure"
12687 #include "confdefs.h"
12688
12689 #include <stdlib.h>
12690 #include <stdarg.h>
12691 #include <stdio.h>
12692 #ifdef HAVE_LIBUTF8_H
12693 #include <libutf8.h>
12694 #endif
12695 int
12696 main (void)
12697 {
12698 wint_t state
12699   ;
12700   return 0;
12701 }
12702 _ACEOF
12703 rm -f conftest.$ac_objext
12704 if { (eval echo "$as_me:12704: \"$ac_compile\"") >&5
12705   (eval $ac_compile) 2>&5
12706   ac_status=$?
12707   echo "$as_me:12707: \$? = $ac_status" >&5
12708   (exit $ac_status); } &&
12709          { ac_try='test -s conftest.$ac_objext'
12710   { (eval echo "$as_me:12710: \"$ac_try\"") >&5
12711   (eval $ac_try) 2>&5
12712   ac_status=$?
12713   echo "$as_me:12713: \$? = $ac_status" >&5
12714   (exit $ac_status); }; }; then
12715   cf_cv_wint_t=no
12716 else
12717   echo "$as_me: failed program was:" >&5
12718 cat conftest.$ac_ext >&5
12719 cat >conftest.$ac_ext <<_ACEOF
12720 #line 12720 "configure"
12721 #include "confdefs.h"
12722
12723 #include <stdlib.h>
12724 #include <stdarg.h>
12725 #include <stdio.h>
12726 #include <wchar.h>
12727 #ifdef HAVE_LIBUTF8_H
12728 #include <libutf8.h>
12729 #endif
12730 int
12731 main (void)
12732 {
12733 wint_t value
12734   ;
12735   return 0;
12736 }
12737 _ACEOF
12738 rm -f conftest.$ac_objext
12739 if { (eval echo "$as_me:12739: \"$ac_compile\"") >&5
12740   (eval $ac_compile) 2>&5
12741   ac_status=$?
12742   echo "$as_me:12742: \$? = $ac_status" >&5
12743   (exit $ac_status); } &&
12744          { ac_try='test -s conftest.$ac_objext'
12745   { (eval echo "$as_me:12745: \"$ac_try\"") >&5
12746   (eval $ac_try) 2>&5
12747   ac_status=$?
12748   echo "$as_me:12748: \$? = $ac_status" >&5
12749   (exit $ac_status); }; }; then
12750   cf_cv_wint_t=yes
12751 else
12752   echo "$as_me: failed program was:" >&5
12753 cat conftest.$ac_ext >&5
12754 cf_cv_wint_t=unknown
12755 fi
12756 rm -f conftest.$ac_objext conftest.$ac_ext
12757 fi
12758 rm -f conftest.$ac_objext conftest.$ac_ext
12759 fi
12760 echo "$as_me:12760: result: $cf_cv_wint_t" >&5
12761 echo "${ECHO_T}$cf_cv_wint_t" >&6
12762
12763 if test "$cf_cv_wint_t" = yes ; then
12764
12765 cat >>confdefs.h <<\EOF
12766 #define NEED_WCHAR_H 1
12767 EOF
12768
12769         NEED_WCHAR_H=1
12770 fi
12771
12772 # if we do not find wint_t in either place, use substitution to provide a fallback.
12773 if test "$cf_cv_wint_t" = unknown ; then
12774         NCURSES_WINT_T=1
12775 fi
12776
12777 # if we find wint_t in either place, use substitution to provide a fallback.
12778 if test "$cf_cv_wint_t" != unknown ; then
12779         NCURSES_OK_WINT_T=1
12780 fi
12781
12782         if test "$NCURSES_MBSTATE_T" != 0; then
12783
12784 cat >>confdefs.h <<\EOF
12785 #define NEED_MBSTATE_T_DEF 1
12786 EOF
12787
12788         fi
12789 fi
12790
12791 ###   use option --disable-lp64 to allow long chtype
12792 echo "$as_me:12792: checking whether to enable _LP64 definition in curses.h" >&5
12793 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12794
12795 # Check whether --enable-lp64 or --disable-lp64 was given.
12796 if test "${enable_lp64+set}" = set; then
12797   enableval="$enable_lp64"
12798   with_lp64=$enableval
12799 else
12800   with_lp64=$cf_dft_with_lp64
12801 fi;
12802 echo "$as_me:12802: result: $with_lp64" >&5
12803 echo "${ECHO_T}$with_lp64" >&6
12804
12805 if test "x$with_lp64" = xyes ; then
12806         cf_cv_enable_lp64=1
12807 else
12808         cf_cv_enable_lp64=0
12809 fi
12810
12811 # Check whether --enable-largefile or --disable-largefile was given.
12812 if test "${enable_largefile+set}" = set; then
12813   enableval="$enable_largefile"
12814
12815 fi;
12816 if test "$enable_largefile" != no; then
12817
12818   echo "$as_me:12818: checking for special C compiler options needed for large files" >&5
12819 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12820 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12821   echo $ECHO_N "(cached) $ECHO_C" >&6
12822 else
12823   ac_cv_sys_largefile_CC=no
12824      if test "$GCC" != yes; then
12825        ac_save_CC=$CC
12826        while :; do
12827          # IRIX 6.2 and later do not support large files by default,
12828          # so use the C compiler's -n32 option if that helps.
12829          cat >conftest.$ac_ext <<_ACEOF
12830 #line 12830 "configure"
12831 #include "confdefs.h"
12832 #include <sys/types.h>
12833  /* Check that off_t can represent 2**63 - 1 correctly.
12834     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12835     since some C++ compilers masquerading as C compilers
12836     incorrectly reject 9223372036854775807.  */
12837 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12838   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12839                        && LARGE_OFF_T % 2147483647 == 1)
12840                       ? 1 : -1];
12841 int
12842 main (void)
12843 {
12844
12845   ;
12846   return 0;
12847 }
12848 _ACEOF
12849          rm -f conftest.$ac_objext
12850 if { (eval echo "$as_me:12850: \"$ac_compile\"") >&5
12851   (eval $ac_compile) 2>&5
12852   ac_status=$?
12853   echo "$as_me:12853: \$? = $ac_status" >&5
12854   (exit $ac_status); } &&
12855          { ac_try='test -s conftest.$ac_objext'
12856   { (eval echo "$as_me:12856: \"$ac_try\"") >&5
12857   (eval $ac_try) 2>&5
12858   ac_status=$?
12859   echo "$as_me:12859: \$? = $ac_status" >&5
12860   (exit $ac_status); }; }; then
12861   break
12862 else
12863   echo "$as_me: failed program was:" >&5
12864 cat conftest.$ac_ext >&5
12865 fi
12866 rm -f conftest.$ac_objext
12867          CC="$CC -n32"
12868          rm -f conftest.$ac_objext
12869 if { (eval echo "$as_me:12869: \"$ac_compile\"") >&5
12870   (eval $ac_compile) 2>&5
12871   ac_status=$?
12872   echo "$as_me:12872: \$? = $ac_status" >&5
12873   (exit $ac_status); } &&
12874          { ac_try='test -s conftest.$ac_objext'
12875   { (eval echo "$as_me:12875: \"$ac_try\"") >&5
12876   (eval $ac_try) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit $ac_status); }; }; then
12880   ac_cv_sys_largefile_CC=' -n32'; break
12881 else
12882   echo "$as_me: failed program was:" >&5
12883 cat conftest.$ac_ext >&5
12884 fi
12885 rm -f conftest.$ac_objext
12886          break
12887        done
12888        CC=$ac_save_CC
12889        rm -f conftest.$ac_ext
12890     fi
12891 fi
12892 echo "$as_me:12892: result: $ac_cv_sys_largefile_CC" >&5
12893 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12894   if test "$ac_cv_sys_largefile_CC" != no; then
12895     CC=$CC$ac_cv_sys_largefile_CC
12896   fi
12897
12898   echo "$as_me:12898: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12899 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12900 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12901   echo $ECHO_N "(cached) $ECHO_C" >&6
12902 else
12903   while :; do
12904   ac_cv_sys_file_offset_bits=no
12905   cat >conftest.$ac_ext <<_ACEOF
12906 #line 12906 "configure"
12907 #include "confdefs.h"
12908 #include <sys/types.h>
12909  /* Check that off_t can represent 2**63 - 1 correctly.
12910     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12911     since some C++ compilers masquerading as C compilers
12912     incorrectly reject 9223372036854775807.  */
12913 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12914   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12915                        && LARGE_OFF_T % 2147483647 == 1)
12916                       ? 1 : -1];
12917 int
12918 main (void)
12919 {
12920
12921   ;
12922   return 0;
12923 }
12924 _ACEOF
12925 rm -f conftest.$ac_objext
12926 if { (eval echo "$as_me:12926: \"$ac_compile\"") >&5
12927   (eval $ac_compile) 2>&5
12928   ac_status=$?
12929   echo "$as_me:12929: \$? = $ac_status" >&5
12930   (exit $ac_status); } &&
12931          { ac_try='test -s conftest.$ac_objext'
12932   { (eval echo "$as_me:12932: \"$ac_try\"") >&5
12933   (eval $ac_try) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); }; }; then
12937   break
12938 else
12939   echo "$as_me: failed program was:" >&5
12940 cat conftest.$ac_ext >&5
12941 fi
12942 rm -f conftest.$ac_objext conftest.$ac_ext
12943   cat >conftest.$ac_ext <<_ACEOF
12944 #line 12944 "configure"
12945 #include "confdefs.h"
12946 #define _FILE_OFFSET_BITS 64
12947 #include <sys/types.h>
12948  /* Check that off_t can represent 2**63 - 1 correctly.
12949     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12950     since some C++ compilers masquerading as C compilers
12951     incorrectly reject 9223372036854775807.  */
12952 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12953   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12954                        && LARGE_OFF_T % 2147483647 == 1)
12955                       ? 1 : -1];
12956 int
12957 main (void)
12958 {
12959
12960   ;
12961   return 0;
12962 }
12963 _ACEOF
12964 rm -f conftest.$ac_objext
12965 if { (eval echo "$as_me:12965: \"$ac_compile\"") >&5
12966   (eval $ac_compile) 2>&5
12967   ac_status=$?
12968   echo "$as_me:12968: \$? = $ac_status" >&5
12969   (exit $ac_status); } &&
12970          { ac_try='test -s conftest.$ac_objext'
12971   { (eval echo "$as_me:12971: \"$ac_try\"") >&5
12972   (eval $ac_try) 2>&5
12973   ac_status=$?
12974   echo "$as_me:12974: \$? = $ac_status" >&5
12975   (exit $ac_status); }; }; then
12976   ac_cv_sys_file_offset_bits=64; break
12977 else
12978   echo "$as_me: failed program was:" >&5
12979 cat conftest.$ac_ext >&5
12980 fi
12981 rm -f conftest.$ac_objext conftest.$ac_ext
12982   break
12983 done
12984 fi
12985 echo "$as_me:12985: result: $ac_cv_sys_file_offset_bits" >&5
12986 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12987 if test "$ac_cv_sys_file_offset_bits" != no; then
12988
12989 cat >>confdefs.h <<EOF
12990 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12991 EOF
12992
12993 fi
12994 rm -rf conftest*
12995   echo "$as_me:12995: checking for _LARGE_FILES value needed for large files" >&5
12996 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12997 if test "${ac_cv_sys_large_files+set}" = set; then
12998   echo $ECHO_N "(cached) $ECHO_C" >&6
12999 else
13000   while :; do
13001   ac_cv_sys_large_files=no
13002   cat >conftest.$ac_ext <<_ACEOF
13003 #line 13003 "configure"
13004 #include "confdefs.h"
13005 #include <sys/types.h>
13006  /* Check that off_t can represent 2**63 - 1 correctly.
13007     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13008     since some C++ compilers masquerading as C compilers
13009     incorrectly reject 9223372036854775807.  */
13010 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13011   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13012                        && LARGE_OFF_T % 2147483647 == 1)
13013                       ? 1 : -1];
13014 int
13015 main (void)
13016 {
13017
13018   ;
13019   return 0;
13020 }
13021 _ACEOF
13022 rm -f conftest.$ac_objext
13023 if { (eval echo "$as_me:13023: \"$ac_compile\"") >&5
13024   (eval $ac_compile) 2>&5
13025   ac_status=$?
13026   echo "$as_me:13026: \$? = $ac_status" >&5
13027   (exit $ac_status); } &&
13028          { ac_try='test -s conftest.$ac_objext'
13029   { (eval echo "$as_me:13029: \"$ac_try\"") >&5
13030   (eval $ac_try) 2>&5
13031   ac_status=$?
13032   echo "$as_me:13032: \$? = $ac_status" >&5
13033   (exit $ac_status); }; }; then
13034   break
13035 else
13036   echo "$as_me: failed program was:" >&5
13037 cat conftest.$ac_ext >&5
13038 fi
13039 rm -f conftest.$ac_objext conftest.$ac_ext
13040   cat >conftest.$ac_ext <<_ACEOF
13041 #line 13041 "configure"
13042 #include "confdefs.h"
13043 #define _LARGE_FILES 1
13044 #include <sys/types.h>
13045  /* Check that off_t can represent 2**63 - 1 correctly.
13046     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13047     since some C++ compilers masquerading as C compilers
13048     incorrectly reject 9223372036854775807.  */
13049 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13050   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13051                        && LARGE_OFF_T % 2147483647 == 1)
13052                       ? 1 : -1];
13053 int
13054 main (void)
13055 {
13056
13057   ;
13058   return 0;
13059 }
13060 _ACEOF
13061 rm -f conftest.$ac_objext
13062 if { (eval echo "$as_me:13062: \"$ac_compile\"") >&5
13063   (eval $ac_compile) 2>&5
13064   ac_status=$?
13065   echo "$as_me:13065: \$? = $ac_status" >&5
13066   (exit $ac_status); } &&
13067          { ac_try='test -s conftest.$ac_objext'
13068   { (eval echo "$as_me:13068: \"$ac_try\"") >&5
13069   (eval $ac_try) 2>&5
13070   ac_status=$?
13071   echo "$as_me:13071: \$? = $ac_status" >&5
13072   (exit $ac_status); }; }; then
13073   ac_cv_sys_large_files=1; break
13074 else
13075   echo "$as_me: failed program was:" >&5
13076 cat conftest.$ac_ext >&5
13077 fi
13078 rm -f conftest.$ac_objext conftest.$ac_ext
13079   break
13080 done
13081 fi
13082 echo "$as_me:13082: result: $ac_cv_sys_large_files" >&5
13083 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13084 if test "$ac_cv_sys_large_files" != no; then
13085
13086 cat >>confdefs.h <<EOF
13087 #define _LARGE_FILES $ac_cv_sys_large_files
13088 EOF
13089
13090 fi
13091 rm -rf conftest*
13092 fi
13093
13094         if test "$enable_largefile" != no ; then
13095         echo "$as_me:13095: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13096 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13097 if test "${ac_cv_sys_largefile_source+set}" = set; then
13098   echo $ECHO_N "(cached) $ECHO_C" >&6
13099 else
13100   while :; do
13101   ac_cv_sys_largefile_source=no
13102   cat >conftest.$ac_ext <<_ACEOF
13103 #line 13103 "configure"
13104 #include "confdefs.h"
13105 #include <stdio.h>
13106 int
13107 main (void)
13108 {
13109 return !fseeko;
13110   ;
13111   return 0;
13112 }
13113 _ACEOF
13114 rm -f conftest.$ac_objext
13115 if { (eval echo "$as_me:13115: \"$ac_compile\"") >&5
13116   (eval $ac_compile) 2>&5
13117   ac_status=$?
13118   echo "$as_me:13118: \$? = $ac_status" >&5
13119   (exit $ac_status); } &&
13120          { ac_try='test -s conftest.$ac_objext'
13121   { (eval echo "$as_me:13121: \"$ac_try\"") >&5
13122   (eval $ac_try) 2>&5
13123   ac_status=$?
13124   echo "$as_me:13124: \$? = $ac_status" >&5
13125   (exit $ac_status); }; }; then
13126   break
13127 else
13128   echo "$as_me: failed program was:" >&5
13129 cat conftest.$ac_ext >&5
13130 fi
13131 rm -f conftest.$ac_objext conftest.$ac_ext
13132   cat >conftest.$ac_ext <<_ACEOF
13133 #line 13133 "configure"
13134 #include "confdefs.h"
13135 #define _LARGEFILE_SOURCE 1
13136 #include <stdio.h>
13137 int
13138 main (void)
13139 {
13140 return !fseeko;
13141   ;
13142   return 0;
13143 }
13144 _ACEOF
13145 rm -f conftest.$ac_objext
13146 if { (eval echo "$as_me:13146: \"$ac_compile\"") >&5
13147   (eval $ac_compile) 2>&5
13148   ac_status=$?
13149   echo "$as_me:13149: \$? = $ac_status" >&5
13150   (exit $ac_status); } &&
13151          { ac_try='test -s conftest.$ac_objext'
13152   { (eval echo "$as_me:13152: \"$ac_try\"") >&5
13153   (eval $ac_try) 2>&5
13154   ac_status=$?
13155   echo "$as_me:13155: \$? = $ac_status" >&5
13156   (exit $ac_status); }; }; then
13157   ac_cv_sys_largefile_source=1; break
13158 else
13159   echo "$as_me: failed program was:" >&5
13160 cat conftest.$ac_ext >&5
13161 fi
13162 rm -f conftest.$ac_objext conftest.$ac_ext
13163   break
13164 done
13165 fi
13166 echo "$as_me:13166: result: $ac_cv_sys_largefile_source" >&5
13167 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13168 if test "$ac_cv_sys_largefile_source" != no; then
13169
13170 cat >>confdefs.h <<EOF
13171 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13172 EOF
13173
13174 fi
13175 rm -rf conftest*
13176
13177 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13178 # in glibc 2.1.3, but that breaks too many other things.
13179 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13180 echo "$as_me:13180: checking for fseeko" >&5
13181 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13182 if test "${ac_cv_func_fseeko+set}" = set; then
13183   echo $ECHO_N "(cached) $ECHO_C" >&6
13184 else
13185   cat >conftest.$ac_ext <<_ACEOF
13186 #line 13186 "configure"
13187 #include "confdefs.h"
13188 #include <stdio.h>
13189 int
13190 main (void)
13191 {
13192 return fseeko && fseeko (stdin, 0, 0);
13193   ;
13194   return 0;
13195 }
13196 _ACEOF
13197 rm -f conftest.$ac_objext conftest$ac_exeext
13198 if { (eval echo "$as_me:13198: \"$ac_link\"") >&5
13199   (eval $ac_link) 2>&5
13200   ac_status=$?
13201   echo "$as_me:13201: \$? = $ac_status" >&5
13202   (exit $ac_status); } &&
13203          { ac_try='test -s conftest$ac_exeext'
13204   { (eval echo "$as_me:13204: \"$ac_try\"") >&5
13205   (eval $ac_try) 2>&5
13206   ac_status=$?
13207   echo "$as_me:13207: \$? = $ac_status" >&5
13208   (exit $ac_status); }; }; then
13209   ac_cv_func_fseeko=yes
13210 else
13211   echo "$as_me: failed program was:" >&5
13212 cat conftest.$ac_ext >&5
13213 ac_cv_func_fseeko=no
13214 fi
13215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13216 fi
13217 echo "$as_me:13217: result: $ac_cv_func_fseeko" >&5
13218 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13219 if test $ac_cv_func_fseeko = yes; then
13220
13221 cat >>confdefs.h <<\EOF
13222 #define HAVE_FSEEKO 1
13223 EOF
13224
13225 fi
13226
13227         # Normally we would collect these definitions in the config.h,
13228         # but (like _XOPEN_SOURCE), some environments rely on having these
13229         # defined before any of the system headers are included.  Another
13230         # case comes up with C++, e.g., on AIX the compiler compiles the
13231         # header files by themselves before looking at the body files it is
13232         # told to compile.  For ncurses, those header files do not include
13233         # the config.h
13234         if test "$ac_cv_sys_large_files" != no
13235         then
13236
13237         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13238         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13239
13240         fi
13241         if test "$ac_cv_sys_largefile_source" != no
13242         then
13243
13244         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13245         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13246
13247         fi
13248         if test "$ac_cv_sys_file_offset_bits" != no
13249         then
13250
13251         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13252         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13253
13254         fi
13255
13256         echo "$as_me:13256: checking whether to use struct dirent64" >&5
13257 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13258 if test "${cf_cv_struct_dirent64+set}" = set; then
13259   echo $ECHO_N "(cached) $ECHO_C" >&6
13260 else
13261
13262                 cat >conftest.$ac_ext <<_ACEOF
13263 #line 13263 "configure"
13264 #include "confdefs.h"
13265
13266 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13267 #include <sys/types.h>
13268 #include <dirent.h>
13269
13270 int
13271 main (void)
13272 {
13273
13274                 /* if transitional largefile support is setup, this is true */
13275                 extern struct dirent64 * readdir(DIR *);
13276                 struct dirent64 *x = readdir((DIR *)0);
13277                 struct dirent *y = readdir((DIR *)0);
13278                 int z = x - y;
13279                 (void)z;
13280
13281   ;
13282   return 0;
13283 }
13284 _ACEOF
13285 rm -f conftest.$ac_objext
13286 if { (eval echo "$as_me:13286: \"$ac_compile\"") >&5
13287   (eval $ac_compile) 2>&5
13288   ac_status=$?
13289   echo "$as_me:13289: \$? = $ac_status" >&5
13290   (exit $ac_status); } &&
13291          { ac_try='test -s conftest.$ac_objext'
13292   { (eval echo "$as_me:13292: \"$ac_try\"") >&5
13293   (eval $ac_try) 2>&5
13294   ac_status=$?
13295   echo "$as_me:13295: \$? = $ac_status" >&5
13296   (exit $ac_status); }; }; then
13297   cf_cv_struct_dirent64=yes
13298 else
13299   echo "$as_me: failed program was:" >&5
13300 cat conftest.$ac_ext >&5
13301 cf_cv_struct_dirent64=no
13302 fi
13303 rm -f conftest.$ac_objext conftest.$ac_ext
13304
13305 fi
13306 echo "$as_me:13306: result: $cf_cv_struct_dirent64" >&5
13307 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13308         test "$cf_cv_struct_dirent64" = yes &&
13309 cat >>confdefs.h <<\EOF
13310 #define HAVE_STRUCT_DIRENT64 1
13311 EOF
13312
13313         fi
13314
13315 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13316 echo "$as_me:13316: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13317 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13318
13319 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13320 if test "${enable_tparm_varargs+set}" = set; then
13321   enableval="$enable_tparm_varargs"
13322   with_tparm_varargs=$enableval
13323 else
13324   with_tparm_varargs=yes
13325 fi;
13326 echo "$as_me:13326: result: $with_tparm_varargs" >&5
13327 echo "${ECHO_T}$with_tparm_varargs" >&6
13328 NCURSES_TPARM_VARARGS=0
13329 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13330
13331 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13332 if test "$with_ticlib" != no ; then
13333 echo "$as_me:13333: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13334 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13335
13336 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13337 if test "${enable_tic_depends+set}" = set; then
13338   enableval="$enable_tic_depends"
13339   with_tic_depends=$enableval
13340 else
13341   with_tic_depends=yes
13342 fi;
13343 echo "$as_me:13343: result: $with_tic_depends" >&5
13344 echo "${ECHO_T}$with_tic_depends" >&6
13345 else
13346         with_tic_depends=no
13347 fi
13348
13349 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13350 echo "$as_me:13350: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13351 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13352
13353 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13354 if test "${enable_wattr_macros+set}" = set; then
13355   enableval="$enable_wattr_macros"
13356   with_wattr_macros=$enableval
13357 else
13358   with_wattr_macros=yes
13359 fi;
13360 if [ "x$with_wattr_macros" != xyes ]; then
13361         NCURSES_WATTR_MACROS=0
13362         echo "$as_me:13362: result: yes" >&5
13363 echo "${ECHO_T}yes" >&6
13364 else
13365         NCURSES_WATTR_MACROS=1
13366         echo "$as_me:13366: result: no" >&5
13367 echo "${ECHO_T}no" >&6
13368 fi
13369
13370 echo "$as_me:13370: checking for X11 rgb file" >&5
13371 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13372
13373 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13374 if test "${with_x11_rgb+set}" = set; then
13375   withval="$with_x11_rgb"
13376   RGB_PATH=$withval
13377 else
13378   RGB_PATH=auto
13379 fi;
13380
13381 if test "x$RGB_PATH" = xauto
13382 then
13383         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13384         for cf_path in \
13385                 /opt/local/share/X11/rgb.txt \
13386                 /opt/X11/share/X11/rgb.txt \
13387                 /usr/share/X11/rgb.txt \
13388                 /usr/X11/share/X11/rgb.txt \
13389                 /usr/X11/lib/X11/rgb.txt \
13390                 /usr/lib/X11/rgb.txt \
13391                 /etc/X11/rgb.txt \
13392                 /usr/pkg/lib/X11/rgb.txt \
13393                 /usr/X11R7/lib/X11/rgb.txt \
13394                 /usr/X11R6/lib/X11/rgb.txt \
13395                 /usr/X11R5/lib/X11/rgb.txt \
13396                 /usr/X11R4/lib/X11/rgb.txt \
13397                 /usr/local/lib/X11/rgb.txt \
13398                 /usr/local/share/X11/rgb.txt \
13399                 /usr/lib64/X11/rgb.txt
13400         do
13401                 if test -f "$cf_path" ; then
13402                         RGB_PATH="$cf_path"
13403                         break
13404                 fi
13405         done
13406 else
13407         cf_path=$RGB_PATH
13408
13409 if test "x$prefix" != xNONE; then
13410         cf_path_syntax="$prefix"
13411 else
13412         cf_path_syntax="$ac_default_prefix"
13413 fi
13414
13415 case ".$cf_path" in
13416 (.\$\(*\)*|.\'*\'*)
13417         ;;
13418 (..|./*|.\\*)
13419         ;;
13420 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13421         ;;
13422 (.\${*prefix}*|.\${*dir}*)
13423         eval cf_path="$cf_path"
13424         case ".$cf_path" in
13425         (.NONE/*)
13426                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13427                 ;;
13428         esac
13429         ;;
13430 (.no|.NONE/*)
13431         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13432         ;;
13433 (*)
13434         { { echo "$as_me:13434: error: expected a pathname, not \"$cf_path\"" >&5
13435 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13436    { (exit 1); exit 1; }; }
13437         ;;
13438 esac
13439
13440 fi
13441
13442 echo "$as_me:13442: result: $RGB_PATH" >&5
13443 echo "${ECHO_T}$RGB_PATH" >&6
13444
13445 cat >>confdefs.h <<EOF
13446 #define RGB_PATH "$cf_path"
13447 EOF
13448
13449 no_x11_rgb=
13450 if test "$RGB_PATH" = no
13451 then
13452         no_x11_rgb="#"
13453 fi
13454
13455 ###   use option --with-bool to override bool's type
13456 echo "$as_me:13456: checking for type of bool" >&5
13457 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13458
13459 # Check whether --with-bool or --without-bool was given.
13460 if test "${with_bool+set}" = set; then
13461   withval="$with_bool"
13462   NCURSES_BOOL="$withval"
13463 else
13464   NCURSES_BOOL=auto
13465 fi;
13466 echo "$as_me:13466: result: $NCURSES_BOOL" >&5
13467 echo "${ECHO_T}$NCURSES_BOOL" >&6
13468
13469 echo "$as_me:13469: checking for alternate terminal capabilities file" >&5
13470 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13471
13472 # Check whether --with-caps or --without-caps was given.
13473 if test "${with_caps+set}" = set; then
13474   withval="$with_caps"
13475   TERMINFO_CAPS=Caps.$withval
13476 else
13477   TERMINFO_CAPS=Caps
13478 fi;
13479 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13480 echo "$as_me:13480: result: $TERMINFO_CAPS" >&5
13481 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13482
13483 ###   use option --with-chtype to override chtype's type
13484 echo "$as_me:13484: checking for type of chtype" >&5
13485 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13486
13487 # Check whether --with-chtype or --without-chtype was given.
13488 if test "${with_chtype+set}" = set; then
13489   withval="$with_chtype"
13490   NCURSES_CHTYPE="$withval"
13491 else
13492   NCURSES_CHTYPE=$cf_dft_chtype
13493 fi;
13494 echo "$as_me:13494: result: $NCURSES_CHTYPE" >&5
13495 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13496
13497 ###   use option --with-ospeed to override ospeed's type
13498 echo "$as_me:13498: checking for type of ospeed" >&5
13499 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13500
13501 # Check whether --with-ospeed or --without-ospeed was given.
13502 if test "${with_ospeed+set}" = set; then
13503   withval="$with_ospeed"
13504   NCURSES_OSPEED="$withval"
13505 else
13506   NCURSES_OSPEED=short
13507 fi;
13508 echo "$as_me:13508: result: $NCURSES_OSPEED" >&5
13509 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13510
13511 ###   use option --with-mmask-t to override mmask_t's type
13512 echo "$as_me:13512: checking for type of mmask_t" >&5
13513 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13514
13515 # Check whether --with-mmask-t or --without-mmask-t was given.
13516 if test "${with_mmask_t+set}" = set; then
13517   withval="$with_mmask_t"
13518   NCURSES_MMASK_T="$withval"
13519 else
13520   NCURSES_MMASK_T=$cf_dft_mmask_t
13521 fi;
13522 echo "$as_me:13522: result: $NCURSES_MMASK_T" >&5
13523 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13524
13525 ###   use option --with-ccharw-max to override CCHARW_MAX size
13526 echo "$as_me:13526: checking for size CCHARW_MAX" >&5
13527 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13528
13529 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13530 if test "${with_ccharw_max+set}" = set; then
13531   withval="$with_ccharw_max"
13532   NCURSES_CCHARW_MAX="$withval"
13533 else
13534   NCURSES_CCHARW_MAX=5
13535 fi;
13536 echo "$as_me:13536: result: $NCURSES_CCHARW_MAX" >&5
13537 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13538
13539 echo "$as_me:13539: checking for ANSI C header files" >&5
13540 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13541 if test "${ac_cv_header_stdc+set}" = set; then
13542   echo $ECHO_N "(cached) $ECHO_C" >&6
13543 else
13544   cat >conftest.$ac_ext <<_ACEOF
13545 #line 13545 "configure"
13546 #include "confdefs.h"
13547 #include <stdlib.h>
13548 #include <stdarg.h>
13549 #include <string.h>
13550 #include <float.h>
13551
13552 _ACEOF
13553 if { (eval echo "$as_me:13553: \"$ac_cpp conftest.$ac_ext\"") >&5
13554   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13555   ac_status=$?
13556   egrep -v '^ *\+' conftest.er1 >conftest.err
13557   rm -f conftest.er1
13558   cat conftest.err >&5
13559   echo "$as_me:13559: \$? = $ac_status" >&5
13560   (exit $ac_status); } >/dev/null; then
13561   if test -s conftest.err; then
13562     ac_cpp_err=$ac_c_preproc_warn_flag
13563   else
13564     ac_cpp_err=
13565   fi
13566 else
13567   ac_cpp_err=yes
13568 fi
13569 if test -z "$ac_cpp_err"; then
13570   ac_cv_header_stdc=yes
13571 else
13572   echo "$as_me: failed program was:" >&5
13573   cat conftest.$ac_ext >&5
13574   ac_cv_header_stdc=no
13575 fi
13576 rm -f conftest.err conftest.$ac_ext
13577
13578 if test $ac_cv_header_stdc = yes; then
13579   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13580   cat >conftest.$ac_ext <<_ACEOF
13581 #line 13581 "configure"
13582 #include "confdefs.h"
13583 #include <string.h>
13584
13585 _ACEOF
13586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13587   egrep "memchr" >/dev/null 2>&1; then
13588   :
13589 else
13590   ac_cv_header_stdc=no
13591 fi
13592 rm -rf conftest*
13593
13594 fi
13595
13596 if test $ac_cv_header_stdc = yes; then
13597   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13598   cat >conftest.$ac_ext <<_ACEOF
13599 #line 13599 "configure"
13600 #include "confdefs.h"
13601 #include <stdlib.h>
13602
13603 _ACEOF
13604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13605   egrep "free" >/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   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13616   if test "$cross_compiling" = yes; then
13617   :
13618 else
13619   cat >conftest.$ac_ext <<_ACEOF
13620 #line 13620 "configure"
13621 #include "confdefs.h"
13622 #include <ctype.h>
13623 #if ((' ' & 0x0FF) == 0x020)
13624 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13625 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13626 #else
13627 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13628                      || ('j' <= (c) && (c) <= 'r') \
13629                      || ('s' <= (c) && (c) <= 'z'))
13630 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13631 #endif
13632
13633 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13634 int
13635 main (void)
13636 {
13637   int i;
13638   for (i = 0; i < 256; i++)
13639     if (XOR (islower (i), ISLOWER (i))
13640         || toupper (i) != TOUPPER (i))
13641       $ac_main_return(2);
13642   $ac_main_return (0);
13643 }
13644 _ACEOF
13645 rm -f conftest$ac_exeext
13646 if { (eval echo "$as_me:13646: \"$ac_link\"") >&5
13647   (eval $ac_link) 2>&5
13648   ac_status=$?
13649   echo "$as_me:13649: \$? = $ac_status" >&5
13650   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13651   { (eval echo "$as_me:13651: \"$ac_try\"") >&5
13652   (eval $ac_try) 2>&5
13653   ac_status=$?
13654   echo "$as_me:13654: \$? = $ac_status" >&5
13655   (exit $ac_status); }; }; then
13656   :
13657 else
13658   echo "$as_me: program exited with status $ac_status" >&5
13659 echo "$as_me: failed program was:" >&5
13660 cat conftest.$ac_ext >&5
13661 ac_cv_header_stdc=no
13662 fi
13663 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13664 fi
13665 fi
13666 fi
13667 echo "$as_me:13667: result: $ac_cv_header_stdc" >&5
13668 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13669 if test $ac_cv_header_stdc = yes; then
13670
13671 cat >>confdefs.h <<\EOF
13672 #define STDC_HEADERS 1
13673 EOF
13674
13675 fi
13676
13677 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13678
13679 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13680                   inttypes.h stdint.h unistd.h
13681 do
13682 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13683 echo "$as_me:13683: checking for $ac_header" >&5
13684 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13685 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13686   echo $ECHO_N "(cached) $ECHO_C" >&6
13687 else
13688   cat >conftest.$ac_ext <<_ACEOF
13689 #line 13689 "configure"
13690 #include "confdefs.h"
13691 $ac_includes_default
13692 #include <$ac_header>
13693 _ACEOF
13694 rm -f conftest.$ac_objext
13695 if { (eval echo "$as_me:13695: \"$ac_compile\"") >&5
13696   (eval $ac_compile) 2>&5
13697   ac_status=$?
13698   echo "$as_me:13698: \$? = $ac_status" >&5
13699   (exit $ac_status); } &&
13700          { ac_try='test -s conftest.$ac_objext'
13701   { (eval echo "$as_me:13701: \"$ac_try\"") >&5
13702   (eval $ac_try) 2>&5
13703   ac_status=$?
13704   echo "$as_me:13704: \$? = $ac_status" >&5
13705   (exit $ac_status); }; }; then
13706   eval "$as_ac_Header=yes"
13707 else
13708   echo "$as_me: failed program was:" >&5
13709 cat conftest.$ac_ext >&5
13710 eval "$as_ac_Header=no"
13711 fi
13712 rm -f conftest.$ac_objext conftest.$ac_ext
13713 fi
13714 echo "$as_me:13714: result: `eval echo '${'$as_ac_Header'}'`" >&5
13715 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13716 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13717   cat >>confdefs.h <<EOF
13718 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13719 EOF
13720
13721 fi
13722 done
13723
13724 echo "$as_me:13724: checking for signed char" >&5
13725 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13726 if test "${ac_cv_type_signed_char+set}" = set; then
13727   echo $ECHO_N "(cached) $ECHO_C" >&6
13728 else
13729   cat >conftest.$ac_ext <<_ACEOF
13730 #line 13730 "configure"
13731 #include "confdefs.h"
13732 $ac_includes_default
13733 int
13734 main (void)
13735 {
13736 if ((signed char *) 0)
13737   return 0;
13738 if (sizeof (signed char))
13739   return 0;
13740   ;
13741   return 0;
13742 }
13743 _ACEOF
13744 rm -f conftest.$ac_objext
13745 if { (eval echo "$as_me:13745: \"$ac_compile\"") >&5
13746   (eval $ac_compile) 2>&5
13747   ac_status=$?
13748   echo "$as_me:13748: \$? = $ac_status" >&5
13749   (exit $ac_status); } &&
13750          { ac_try='test -s conftest.$ac_objext'
13751   { (eval echo "$as_me:13751: \"$ac_try\"") >&5
13752   (eval $ac_try) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit $ac_status); }; }; then
13756   ac_cv_type_signed_char=yes
13757 else
13758   echo "$as_me: failed program was:" >&5
13759 cat conftest.$ac_ext >&5
13760 ac_cv_type_signed_char=no
13761 fi
13762 rm -f conftest.$ac_objext conftest.$ac_ext
13763 fi
13764 echo "$as_me:13764: result: $ac_cv_type_signed_char" >&5
13765 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13766
13767 echo "$as_me:13767: checking size of signed char" >&5
13768 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13769 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13770   echo $ECHO_N "(cached) $ECHO_C" >&6
13771 else
13772   if test "$ac_cv_type_signed_char" = yes; then
13773   if test "$cross_compiling" = yes; then
13774   # Depending upon the size, compute the lo and hi bounds.
13775 cat >conftest.$ac_ext <<_ACEOF
13776 #line 13776 "configure"
13777 #include "confdefs.h"
13778 $ac_includes_default
13779 int
13780 main (void)
13781 {
13782 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13783   ;
13784   return 0;
13785 }
13786 _ACEOF
13787 rm -f conftest.$ac_objext
13788 if { (eval echo "$as_me:13788: \"$ac_compile\"") >&5
13789   (eval $ac_compile) 2>&5
13790   ac_status=$?
13791   echo "$as_me:13791: \$? = $ac_status" >&5
13792   (exit $ac_status); } &&
13793          { ac_try='test -s conftest.$ac_objext'
13794   { (eval echo "$as_me:13794: \"$ac_try\"") >&5
13795   (eval $ac_try) 2>&5
13796   ac_status=$?
13797   echo "$as_me:13797: \$? = $ac_status" >&5
13798   (exit $ac_status); }; }; then
13799   ac_lo=0 ac_mid=0
13800   while :; do
13801     cat >conftest.$ac_ext <<_ACEOF
13802 #line 13802 "configure"
13803 #include "confdefs.h"
13804 $ac_includes_default
13805 int
13806 main (void)
13807 {
13808 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13809   ;
13810   return 0;
13811 }
13812 _ACEOF
13813 rm -f conftest.$ac_objext
13814 if { (eval echo "$as_me:13814: \"$ac_compile\"") >&5
13815   (eval $ac_compile) 2>&5
13816   ac_status=$?
13817   echo "$as_me:13817: \$? = $ac_status" >&5
13818   (exit $ac_status); } &&
13819          { ac_try='test -s conftest.$ac_objext'
13820   { (eval echo "$as_me:13820: \"$ac_try\"") >&5
13821   (eval $ac_try) 2>&5
13822   ac_status=$?
13823   echo "$as_me:13823: \$? = $ac_status" >&5
13824   (exit $ac_status); }; }; then
13825   ac_hi=$ac_mid; break
13826 else
13827   echo "$as_me: failed program was:" >&5
13828 cat conftest.$ac_ext >&5
13829 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13830 fi
13831 rm -f conftest.$ac_objext conftest.$ac_ext
13832   done
13833 else
13834   echo "$as_me: failed program was:" >&5
13835 cat conftest.$ac_ext >&5
13836 ac_hi=-1 ac_mid=-1
13837   while :; do
13838     cat >conftest.$ac_ext <<_ACEOF
13839 #line 13839 "configure"
13840 #include "confdefs.h"
13841 $ac_includes_default
13842 int
13843 main (void)
13844 {
13845 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13846   ;
13847   return 0;
13848 }
13849 _ACEOF
13850 rm -f conftest.$ac_objext
13851 if { (eval echo "$as_me:13851: \"$ac_compile\"") >&5
13852   (eval $ac_compile) 2>&5
13853   ac_status=$?
13854   echo "$as_me:13854: \$? = $ac_status" >&5
13855   (exit $ac_status); } &&
13856          { ac_try='test -s conftest.$ac_objext'
13857   { (eval echo "$as_me:13857: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:13860: \$? = $ac_status" >&5
13861   (exit $ac_status); }; }; then
13862   ac_lo=$ac_mid; break
13863 else
13864   echo "$as_me: failed program was:" >&5
13865 cat conftest.$ac_ext >&5
13866 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13867 fi
13868 rm -f conftest.$ac_objext conftest.$ac_ext
13869   done
13870 fi
13871 rm -f conftest.$ac_objext conftest.$ac_ext
13872 # Binary search between lo and hi bounds.
13873 while test "x$ac_lo" != "x$ac_hi"; do
13874   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13875   cat >conftest.$ac_ext <<_ACEOF
13876 #line 13876 "configure"
13877 #include "confdefs.h"
13878 $ac_includes_default
13879 int
13880 main (void)
13881 {
13882 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13883   ;
13884   return 0;
13885 }
13886 _ACEOF
13887 rm -f conftest.$ac_objext
13888 if { (eval echo "$as_me:13888: \"$ac_compile\"") >&5
13889   (eval $ac_compile) 2>&5
13890   ac_status=$?
13891   echo "$as_me:13891: \$? = $ac_status" >&5
13892   (exit $ac_status); } &&
13893          { ac_try='test -s conftest.$ac_objext'
13894   { (eval echo "$as_me:13894: \"$ac_try\"") >&5
13895   (eval $ac_try) 2>&5
13896   ac_status=$?
13897   echo "$as_me:13897: \$? = $ac_status" >&5
13898   (exit $ac_status); }; }; then
13899   ac_hi=$ac_mid
13900 else
13901   echo "$as_me: failed program was:" >&5
13902 cat conftest.$ac_ext >&5
13903 ac_lo=`expr $ac_mid + 1`
13904 fi
13905 rm -f conftest.$ac_objext conftest.$ac_ext
13906 done
13907 ac_cv_sizeof_signed_char=$ac_lo
13908 else
13909   if test "$cross_compiling" = yes; then
13910   { { echo "$as_me:13910: error: cannot run test program while cross compiling" >&5
13911 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13912    { (exit 1); exit 1; }; }
13913 else
13914   cat >conftest.$ac_ext <<_ACEOF
13915 #line 13915 "configure"
13916 #include "confdefs.h"
13917 $ac_includes_default
13918 int
13919 main (void)
13920 {
13921 FILE *f = fopen ("conftest.val", "w");
13922 if (!f)
13923   $ac_main_return (1);
13924 fprintf (f, "%d", (sizeof (signed char)));
13925 fclose (f);
13926   ;
13927   return 0;
13928 }
13929 _ACEOF
13930 rm -f conftest$ac_exeext
13931 if { (eval echo "$as_me:13931: \"$ac_link\"") >&5
13932   (eval $ac_link) 2>&5
13933   ac_status=$?
13934   echo "$as_me:13934: \$? = $ac_status" >&5
13935   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13936   { (eval echo "$as_me:13936: \"$ac_try\"") >&5
13937   (eval $ac_try) 2>&5
13938   ac_status=$?
13939   echo "$as_me:13939: \$? = $ac_status" >&5
13940   (exit $ac_status); }; }; then
13941   ac_cv_sizeof_signed_char=`cat conftest.val`
13942 else
13943   echo "$as_me: program exited with status $ac_status" >&5
13944 echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13946 fi
13947 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13948 fi
13949 fi
13950 rm -f conftest.val
13951 else
13952   ac_cv_sizeof_signed_char=0
13953 fi
13954 fi
13955 echo "$as_me:13955: result: $ac_cv_sizeof_signed_char" >&5
13956 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13957 cat >>confdefs.h <<EOF
13958 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13959 EOF
13960
13961 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13962         NCURSES_SBOOL="signed char"
13963 else
13964         NCURSES_SBOOL="char"
13965 fi
13966 echo "$as_me:13966: checking if you want to use signed Boolean array in term.h" >&5
13967 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13968
13969 # Check whether --enable-signed-char or --disable-signed-char was given.
13970 if test "${enable_signed_char+set}" = set; then
13971   enableval="$enable_signed_char"
13972   with_signed_char=$enableval
13973 else
13974   with_signed_char=no
13975 fi;
13976 echo "$as_me:13976: result: $with_signed_char" >&5
13977 echo "${ECHO_T}$with_signed_char" >&6
13978 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13979
13980 ###   use option --with-tparm-arg to override tparm's argument type
13981 echo "$as_me:13981: checking for type of tparm args" >&5
13982 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13983
13984 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13985 if test "${with_tparm_arg+set}" = set; then
13986   withval="$with_tparm_arg"
13987   NCURSES_TPARM_ARG="$withval"
13988 else
13989   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13990 fi;
13991 echo "$as_me:13991: result: $NCURSES_TPARM_ARG" >&5
13992 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13993
13994 ### Enable compiling-in rcs id's
13995 echo "$as_me:13995: checking if RCS identifiers should be compiled-in" >&5
13996 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13997
13998 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13999 if test "${with_rcs_ids+set}" = set; then
14000   withval="$with_rcs_ids"
14001   with_rcs_ids=$withval
14002 else
14003   with_rcs_ids=no
14004 fi;
14005 echo "$as_me:14005: result: $with_rcs_ids" >&5
14006 echo "${ECHO_T}$with_rcs_ids" >&6
14007 test "x$with_rcs_ids" = xyes &&
14008 cat >>confdefs.h <<\EOF
14009 #define USE_RCS_IDS 1
14010 EOF
14011
14012 ###############################################################################
14013
14014 echo "$as_me:14014: checking format of man-pages" >&5
14015 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14016
14017 # Check whether --with-manpage-format or --without-manpage-format was given.
14018 if test "${with_manpage_format+set}" = set; then
14019   withval="$with_manpage_format"
14020   MANPAGE_FORMAT=$withval
14021 else
14022   MANPAGE_FORMAT=unknown
14023 fi;
14024
14025 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14026 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14027
14028 cf_unknown=
14029
14030 case $MANPAGE_FORMAT in
14031 (unknown)
14032         if test -z "$MANPATH" ; then
14033                 MANPATH="/usr/man:/usr/share/man"
14034         fi
14035
14036         # look for the 'date' man-page (it's most likely to be installed!)
14037         MANPAGE_FORMAT=
14038         cf_preform=no
14039         cf_catonly=yes
14040         cf_example=date
14041
14042         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14043         for cf_dir in $MANPATH; do
14044                 test -z "$cf_dir" && cf_dir=/usr/man
14045                 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
14046                 do
14047                         cf_test=`echo $cf_name | sed -e 's/*//'`
14048                         if test "x$cf_test" = "x$cf_name" ; then
14049
14050                                 case "$cf_name" in
14051                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14052                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14053                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14054                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14055                                 esac
14056
14057                                 case "$cf_name" in
14058                                 ($cf_dir/man*)
14059                                         cf_catonly=no
14060                                         ;;
14061                                 ($cf_dir/cat*)
14062                                         cf_preform=yes
14063                                         ;;
14064                                 esac
14065                                 break
14066                         fi
14067
14068                         # if we found a match in either man* or cat*, stop looking
14069                         if test -n "$MANPAGE_FORMAT" ; then
14070                                 cf_found=no
14071                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14072                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14073                                 case "$cf_name" in
14074                                 ($cf_dir/cat*)
14075                                         cf_found=yes
14076                                         ;;
14077                                 esac
14078                                 test $cf_found=yes && break
14079                         fi
14080                 done
14081                 # only check the first directory in $MANPATH where we find manpages
14082                 if test -n "$MANPAGE_FORMAT" ; then
14083                         break
14084                 fi
14085         done
14086         # if we did not find the example, just assume it is normal
14087         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14088         IFS="$ac_save_ifs"
14089         ;;
14090 (*)
14091         for cf_option in $MANPAGE_FORMAT; do
14092         case $cf_option in
14093         (gzip|compress|BSDI|normal|formatted|catonly)
14094                 ;;
14095         (*)
14096                 cf_unknown="$cf_unknown $cf_option"
14097                 ;;
14098         esac
14099         done
14100         ;;
14101 esac
14102
14103 echo "$as_me:14103: result: $MANPAGE_FORMAT" >&5
14104 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14105 if test -n "$cf_unknown" ; then
14106         { echo "$as_me:14106: WARNING: Unexpected manpage-format $cf_unknown" >&5
14107 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14108 fi
14109
14110 echo "$as_me:14110: checking for manpage renaming" >&5
14111 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14112
14113 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14114 if test "${with_manpage_renames+set}" = set; then
14115   withval="$with_manpage_renames"
14116   MANPAGE_RENAMES=$withval
14117 else
14118   MANPAGE_RENAMES=yes
14119 fi;
14120
14121 case ".$MANPAGE_RENAMES" in
14122 (.no)
14123         ;;
14124 (.|.yes)
14125         # Debian 'man' program?
14126         if test -f /etc/debian_version ; then
14127                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
14128         else
14129                 MANPAGE_RENAMES=no
14130         fi
14131         ;;
14132 esac
14133
14134 if test "$MANPAGE_RENAMES" != no ; then
14135         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
14136                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
14137         elif test ! -f $MANPAGE_RENAMES ; then
14138                 { { echo "$as_me:14138: error: not a filename: $MANPAGE_RENAMES" >&5
14139 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14140    { (exit 1); exit 1; }; }
14141         fi
14142
14143         test ! -d man && mkdir man
14144
14145         # Construct a sed-script to perform renaming within man-pages
14146         if test -n "$MANPAGE_RENAMES" ; then
14147                 test ! -d man && mkdir man
14148                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
14149         fi
14150 fi
14151
14152 echo "$as_me:14152: result: $MANPAGE_RENAMES" >&5
14153 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14154
14155 echo "$as_me:14155: checking if manpage aliases will be installed" >&5
14156 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14157
14158 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14159 if test "${with_manpage_aliases+set}" = set; then
14160   withval="$with_manpage_aliases"
14161   MANPAGE_ALIASES=$withval
14162 else
14163   MANPAGE_ALIASES=yes
14164 fi;
14165
14166 echo "$as_me:14166: result: $MANPAGE_ALIASES" >&5
14167 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14168
14169 case "x$LN_S" in
14170 (xln*)
14171         cf_use_symlinks=yes
14172         ;;
14173 (*)
14174         cf_use_symlinks=no
14175         ;;
14176 esac
14177
14178 MANPAGE_SYMLINKS=no
14179 if test "$MANPAGE_ALIASES" = yes ; then
14180 echo "$as_me:14180: checking if manpage symlinks should be used" >&5
14181 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14182
14183 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14184 if test "${with_manpage_symlinks+set}" = set; then
14185   withval="$with_manpage_symlinks"
14186   MANPAGE_SYMLINKS=$withval
14187 else
14188   MANPAGE_SYMLINKS=$cf_use_symlinks
14189 fi;
14190
14191 if test "$$cf_use_symlinks" = no; then
14192 if test "$MANPAGE_SYMLINKS" = yes ; then
14193         { echo "$as_me:14193: WARNING: cannot make symlinks" >&5
14194 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14195         MANPAGE_SYMLINKS=no
14196 fi
14197 fi
14198
14199 echo "$as_me:14199: result: $MANPAGE_SYMLINKS" >&5
14200 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14201 fi
14202
14203 echo "$as_me:14203: checking for manpage tbl" >&5
14204 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14205
14206 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14207 if test "${with_manpage_tbl+set}" = set; then
14208   withval="$with_manpage_tbl"
14209   MANPAGE_TBL=$withval
14210 else
14211   MANPAGE_TBL=no
14212 fi;
14213
14214 echo "$as_me:14214: result: $MANPAGE_TBL" >&5
14215 echo "${ECHO_T}$MANPAGE_TBL" >&6
14216
14217 if test "$prefix" = "NONE" ; then
14218         cf_prefix="$ac_default_prefix"
14219 else
14220         cf_prefix="$prefix"
14221 fi
14222
14223 case "$MANPAGE_FORMAT" in
14224 (*catonly*)
14225         cf_format=yes
14226         cf_inboth=no
14227         ;;
14228 (*formatted*)
14229         cf_format=yes
14230         cf_inboth=yes
14231         ;;
14232 (*)
14233         cf_format=no
14234         cf_inboth=no
14235         ;;
14236 esac
14237
14238 test ! -d man && mkdir man
14239
14240 cf_so_strip=
14241 cf_compress=
14242 case "$MANPAGE_FORMAT" in
14243 (*compress*)
14244         cf_so_strip="Z"
14245         cf_compress=compress
14246         ;;
14247 (*gzip*)
14248         cf_so_strip="gz"
14249         cf_compress=gzip
14250         ;;
14251 esac
14252
14253 cf_edit_man=./edit_man.sh
14254 cf_man_alias=`pwd`/man_alias.sed
14255
14256 cat >$cf_edit_man <<CF_EOF
14257 #! $SHELL
14258 # this script is generated by the configure-script CF_MAN_PAGES macro.
14259
14260 prefix="$cf_prefix"
14261 datarootdir="$datarootdir"
14262 datadir="$datadir"
14263
14264 NCURSES_MAJOR="$NCURSES_MAJOR"
14265 NCURSES_MINOR="$NCURSES_MINOR"
14266 NCURSES_PATCH="$NCURSES_PATCH"
14267
14268 NCURSES_OSPEED="$NCURSES_OSPEED"
14269 TERMINFO="$TERMINFO"
14270
14271 INSTALL="$INSTALL"
14272 INSTALL_DATA="$INSTALL_DATA"
14273
14274 transform="$program_transform_name"
14275
14276 TMP=\${TMPDIR:=/tmp}/man\$\$
14277 trap "rm -f \$TMP" 0 1 2 3 15
14278
14279 form=\$1
14280 shift || exit 1
14281
14282 verb=\$1
14283 shift || exit 1
14284
14285 mandir=\$1
14286 shift || exit 1
14287
14288 srcdir=\$1
14289 top_srcdir=\$srcdir/..
14290 shift || exit 1
14291
14292 if test "\$form" = normal ; then
14293         if test "$cf_format" = yes ; then
14294         if test "$cf_inboth" = no ; then
14295                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14296                 exit $?
14297         fi
14298         fi
14299         cf_subdir=\$mandir/man
14300         cf_tables=$MANPAGE_TBL
14301 else
14302         cf_subdir=\$mandir/cat
14303         cf_tables=yes
14304 fi
14305
14306 # process the list of source-files
14307 for i in \$* ; do
14308 case \$i in
14309 (*.orig|*.rej) ;;
14310 (*.[0-9]*)
14311         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14312         if test \$verb = installing ; then
14313         if test ! -d \$cf_subdir\${section} ; then
14314                 mkdir -p \$cf_subdir\$section
14315         fi
14316         fi
14317
14318         # replace variables in man page
14319         if test ! -f $cf_man_alias ; then
14320 cat >>$cf_man_alias <<-CF_EOF2
14321                 s,@DATADIR@,\$datadir,g
14322                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14323                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14324                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14325                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14326                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14327                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14328 CF_EOF
14329
14330         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14331         do
14332                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14333                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14334 cat >>$cf_edit_man <<-CF_EOF
14335                 s,@$cf_NAME@,$cf_name,g
14336 CF_EOF
14337         done
14338
14339 cat >>$cf_edit_man <<CF_EOF
14340 CF_EOF2
14341                 echo "...made $cf_man_alias"
14342         fi
14343
14344         aliases=
14345         cf_source=\`basename \$i\`
14346         inalias=\$cf_source
14347         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14348         if test ! -f \$inalias ; then
14349                 echo .. skipped \$cf_source
14350                 continue
14351         fi
14352 CF_EOF
14353
14354 if test "$MANPAGE_ALIASES" != no ; then
14355 cat >>$cf_edit_man <<CF_EOF
14356         nCurses=ignore.3x
14357         test $with_curses_h = yes && nCurses=ncurses.3x
14358         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14359 CF_EOF
14360 fi
14361
14362 if test "$MANPAGE_RENAMES" = no ; then
14363 cat >>$cf_edit_man <<CF_EOF
14364         # perform program transformations for section 1 man pages
14365         if test \$section = 1 ; then
14366                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14367         else
14368                 cf_target=\$cf_subdir\${section}/\$cf_source
14369         fi
14370 CF_EOF
14371 else
14372 cat >>$cf_edit_man <<CF_EOF
14373         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14374         if test -z "\$cf_target" ; then
14375                 echo '? missing rename for '\$cf_source
14376                 cf_target="\$cf_source"
14377         fi
14378         cf_target="\$cf_subdir\${section}/\${cf_target}"
14379
14380 CF_EOF
14381 fi
14382
14383 cat >>$cf_edit_man <<CF_EOF
14384         sed     -f $cf_man_alias \\
14385 CF_EOF
14386
14387 if test -f $MANPAGE_RENAMES ; then
14388 cat >>$cf_edit_man <<CF_EOF
14389                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14390 CF_EOF
14391 else
14392 cat >>$cf_edit_man <<CF_EOF
14393                 < \$i >\$TMP
14394 CF_EOF
14395 fi
14396
14397 cat >>$cf_edit_man <<CF_EOF
14398 if test \$cf_tables = yes ; then
14399         tbl \$TMP >\$TMP.out
14400         mv \$TMP.out \$TMP
14401 fi
14402 CF_EOF
14403
14404 if test $with_overwrite != yes ; then
14405 cat >>$cf_edit_man <<CF_EOF
14406         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14407         mv \$TMP.out \$TMP
14408 CF_EOF
14409 fi
14410
14411 if test $with_curses_h != yes ; then
14412 cat >>$cf_edit_man <<CF_EOF
14413         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14414         mv \$TMP.out \$TMP
14415 CF_EOF
14416 fi
14417
14418 cat >>$cf_edit_man <<CF_EOF
14419         if test \$form = format ; then
14420                 nroff -man \$TMP >\$TMP.out
14421                 mv \$TMP.out \$TMP
14422         fi
14423 CF_EOF
14424
14425 if test -n "$cf_compress" ; then
14426 cat >>$cf_edit_man <<CF_EOF
14427         if test \$verb = installing ; then
14428         if ( $cf_compress -f \$TMP )
14429         then
14430                 mv \$TMP.$cf_so_strip \$TMP
14431         fi
14432         fi
14433         cf_target="\$cf_target.$cf_so_strip"
14434 CF_EOF
14435 fi
14436
14437 case "$MANPAGE_FORMAT" in
14438 (*BSDI*)
14439 cat >>$cf_edit_man <<CF_EOF
14440         if test \$form = format ; then
14441                 # BSDI installs only .0 suffixes in the cat directories
14442                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14443         fi
14444 CF_EOF
14445   ;;
14446 esac
14447
14448 cat >>$cf_edit_man <<CF_EOF
14449         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14450         if test \$verb = installing ; then
14451                 echo \$verb \$cf_target
14452                 \$INSTALL_DATA \$TMP \$cf_target
14453                 test -d \$cf_subdir\${section} &&
14454                 test -n "\$aliases" && (
14455                         cd \$cf_subdir\${section} && (
14456                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14457                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14458                                 cf_target=\`basename \$cf_target\`
14459                                 for cf_alias in \$aliases
14460                                 do
14461                                         if test \$section = 1 ; then
14462                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14463                                         fi
14464
14465                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14466                                                 if test -f \$cf_alias\${suffix} ; then
14467                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14468                                                         then
14469                                                                 continue
14470                                                         fi
14471                                                 fi
14472                                                 echo .. \$verb alias \$cf_alias\${suffix}
14473 CF_EOF
14474 case "x$LN_S" in
14475 (*-f)
14476 cat >>$cf_edit_man <<CF_EOF
14477                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14478 CF_EOF
14479         ;;
14480 (*)
14481 cat >>$cf_edit_man <<CF_EOF
14482                                                 rm -f \$cf_alias\${suffix}
14483                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14484 CF_EOF
14485         ;;
14486 esac
14487 cat >>$cf_edit_man <<CF_EOF
14488                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14489                                                 echo ".so \$cf_source" >\$TMP
14490 CF_EOF
14491 if test -n "$cf_compress" ; then
14492 cat >>$cf_edit_man <<CF_EOF
14493                                                 if test -n "$cf_so_strip" ; then
14494                                                         $cf_compress -f \$TMP
14495                                                         mv \$TMP.$cf_so_strip \$TMP
14496                                                 fi
14497 CF_EOF
14498 fi
14499 cat >>$cf_edit_man <<CF_EOF
14500                                                 echo .. \$verb alias \$cf_alias\${suffix}
14501                                                 rm -f \$cf_alias\${suffix}
14502                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14503                                         fi
14504                                 done
14505                         )
14506                 )
14507         elif test \$verb = removing ; then
14508                 test -f \$cf_target && (
14509                         echo \$verb \$cf_target
14510                         rm -f \$cf_target
14511                 )
14512                 test -d \$cf_subdir\${section} &&
14513                 test -n "\$aliases" && (
14514                         cd \$cf_subdir\${section} && (
14515                                 for cf_alias in \$aliases
14516                                 do
14517                                         if test \$section = 1 ; then
14518                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14519                                         fi
14520
14521                                         echo .. \$verb alias \$cf_alias\${suffix}
14522                                         rm -f \$cf_alias\${suffix}
14523                                 done
14524                         )
14525                 )
14526         else
14527 #               echo ".hy 0"
14528                 cat \$TMP
14529         fi
14530         ;;
14531 esac
14532 done
14533
14534 if test $cf_inboth = yes ; then
14535 if test \$form != format ; then
14536         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14537 fi
14538 fi
14539
14540 exit 0
14541 CF_EOF
14542 chmod 755 $cf_edit_man
14543
14544 ###############################################################################
14545
14546 ### Note that some functions (such as const) are normally disabled anyway.
14547 echo "$as_me:14547: checking if you want to build with function extensions" >&5
14548 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14549
14550 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14551 if test "${enable_ext_funcs+set}" = set; then
14552   enableval="$enable_ext_funcs"
14553   with_ext_funcs=$enableval
14554 else
14555   with_ext_funcs=yes
14556 fi;
14557 echo "$as_me:14557: result: $with_ext_funcs" >&5
14558 echo "${ECHO_T}$with_ext_funcs" >&6
14559 if test "x$with_ext_funcs" = xyes ; then
14560         NCURSES_EXT_FUNCS=1
14561
14562 cat >>confdefs.h <<\EOF
14563 #define NCURSES_EXT_FUNCS 1
14564 EOF
14565
14566 cat >>confdefs.h <<\EOF
14567 #define HAVE_ASSUME_DEFAULT_COLORS 1
14568 EOF
14569
14570 cat >>confdefs.h <<\EOF
14571 #define HAVE_CURSES_VERSION 1
14572 EOF
14573
14574 cat >>confdefs.h <<\EOF
14575 #define HAVE_HAS_KEY 1
14576 EOF
14577
14578 cat >>confdefs.h <<\EOF
14579 #define HAVE_RESIZETERM 1
14580 EOF
14581
14582 cat >>confdefs.h <<\EOF
14583 #define HAVE_RESIZE_TERM 1
14584 EOF
14585
14586 cat >>confdefs.h <<\EOF
14587 #define HAVE_TERM_ENTRY_H 1
14588 EOF
14589
14590 cat >>confdefs.h <<\EOF
14591 #define HAVE_USE_DEFAULT_COLORS 1
14592 EOF
14593
14594 cat >>confdefs.h <<\EOF
14595 #define HAVE_USE_EXTENDED_NAMES 1
14596 EOF
14597
14598 cat >>confdefs.h <<\EOF
14599 #define HAVE_USE_SCREEN 1
14600 EOF
14601
14602 cat >>confdefs.h <<\EOF
14603 #define HAVE_USE_WINDOW 1
14604 EOF
14605
14606 cat >>confdefs.h <<\EOF
14607 #define HAVE_WRESIZE 1
14608 EOF
14609
14610         GENERATED_EXT_FUNCS=generated
14611         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14612 else
14613         NCURSES_EXT_FUNCS=0
14614         GENERATED_EXT_FUNCS=
14615 fi
14616
14617 echo "$as_me:14617: checking if you want to build with SCREEN extensions" >&5
14618 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14619
14620 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14621 if test "${enable_sp_funcs+set}" = set; then
14622   enableval="$enable_sp_funcs"
14623   with_sp_funcs=$enableval
14624 else
14625   with_sp_funcs=$cf_dft_ext_spfuncs
14626 fi;
14627 echo "$as_me:14627: result: $with_sp_funcs" >&5
14628 echo "${ECHO_T}$with_sp_funcs" >&6
14629 if test "x$with_sp_funcs" = xyes ; then
14630         NCURSES_SP_FUNCS=1
14631
14632 cat >>confdefs.h <<\EOF
14633 #define NCURSES_SP_FUNCS 1
14634 EOF
14635
14636 cat >>confdefs.h <<\EOF
14637 #define HAVE_TPUTS_SP 1
14638 EOF
14639
14640         GENERATED_SP_FUNCS=generated
14641 else
14642         NCURSES_SP_FUNCS=0
14643         GENERATED_SP_FUNCS=
14644 fi
14645
14646 echo "$as_me:14646: checking if you want to build with terminal-driver" >&5
14647 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14648
14649 # Check whether --enable-term-driver or --disable-term-driver was given.
14650 if test "${enable_term_driver+set}" = set; then
14651   enableval="$enable_term_driver"
14652   with_term_driver=$enableval
14653 else
14654   with_term_driver=no
14655 fi;
14656 echo "$as_me:14656: result: $with_term_driver" >&5
14657 echo "${ECHO_T}$with_term_driver" >&6
14658 if test "x$with_term_driver" = xyes ; then
14659
14660 cat >>confdefs.h <<\EOF
14661 #define USE_TERM_DRIVER 1
14662 EOF
14663
14664         if test "x$with_termlib" != xno ; then
14665                 { { echo "$as_me:14665: error: The term-driver option conflicts with the termlib option" >&5
14666 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14667    { (exit 1); exit 1; }; }
14668         fi
14669         if test "x$with_sp_funcs" != xyes ; then
14670                 { { echo "$as_me:14670: error: The term-driver option relies upon sp-funcs" >&5
14671 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14672    { (exit 1); exit 1; }; }
14673         fi
14674 fi
14675
14676 ###   use option --enable-const to turn on use of const beyond that in XSI.
14677 echo "$as_me:14677: checking for extended use of const keyword" >&5
14678 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14679
14680 # Check whether --enable-const or --disable-const was given.
14681 if test "${enable_const+set}" = set; then
14682   enableval="$enable_const"
14683   with_ext_const=$enableval
14684 else
14685   with_ext_const=$cf_dft_ext_const
14686 fi;
14687 echo "$as_me:14687: result: $with_ext_const" >&5
14688 echo "${ECHO_T}$with_ext_const" >&6
14689 NCURSES_CONST='/*nothing*/'
14690 if test "x$with_ext_const" = xyes ; then
14691         NCURSES_CONST=const
14692 fi
14693
14694 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14695 echo "$as_me:14695: checking if you want to use extended colors" >&5
14696 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14697
14698 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14699 if test "${enable_ext_colors+set}" = set; then
14700   enableval="$enable_ext_colors"
14701   with_ext_colors=$enableval
14702 else
14703   with_ext_colors=$cf_dft_ext_colors
14704 fi;
14705 echo "$as_me:14705: result: $with_ext_colors" >&5
14706 echo "${ECHO_T}$with_ext_colors" >&6
14707 NCURSES_EXT_COLORS=0
14708 if test "x$with_ext_colors" = xyes ; then
14709         if test "x$with_widec" != xyes ; then
14710                 { echo "$as_me:14710: WARNING: This option applies only to wide-character library" >&5
14711 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14712         else
14713                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14714
14715 if test "${with_abi_version+set}" != set; then
14716         case $cf_cv_rel_version in
14717         (5.*)
14718                 cf_cv_rel_version=6.0
14719                 cf_cv_abi_version=6
14720                 { echo "$as_me:14720: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14721 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14722                 ;;
14723         esac
14724 fi
14725
14726                 NCURSES_EXT_COLORS=1
14727
14728 cat >>confdefs.h <<\EOF
14729 #define NCURSES_EXT_COLORS 1
14730 EOF
14731
14732 cat >>confdefs.h <<\EOF
14733 #define HAVE_ALLOC_PAIR 1
14734 EOF
14735
14736 cat >>confdefs.h <<\EOF
14737 #define HAVE_INIT_EXTENDED_COLOR 1
14738 EOF
14739
14740 cat >>confdefs.h <<\EOF
14741 #define HAVE_RESET_COLOR_PAIRS 1
14742 EOF
14743
14744         fi
14745 fi
14746
14747 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14748 echo "$as_me:14748: checking if you want to use extended mouse encoding" >&5
14749 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14750
14751 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14752 if test "${enable_ext_mouse+set}" = set; then
14753   enableval="$enable_ext_mouse"
14754   with_ext_mouse=$enableval
14755 else
14756   with_ext_mouse=$cf_dft_ext_mouse
14757 fi;
14758 echo "$as_me:14758: result: $with_ext_mouse" >&5
14759 echo "${ECHO_T}$with_ext_mouse" >&6
14760 NCURSES_MOUSE_VERSION=1
14761 if test "x$with_ext_mouse" = xyes ; then
14762         NCURSES_MOUSE_VERSION=2
14763
14764 if test "${with_abi_version+set}" != set; then
14765         case $cf_cv_rel_version in
14766         (5.*)
14767                 cf_cv_rel_version=6.0
14768                 cf_cv_abi_version=6
14769                 { echo "$as_me:14769: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14770 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14771                 ;;
14772         esac
14773 fi
14774
14775 fi
14776
14777 ###   use option --enable-ext-putwin to turn on extended screendumps
14778 echo "$as_me:14778: checking if you want to use extended putwin/screendump" >&5
14779 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14780
14781 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14782 if test "${enable_ext_putwin+set}" = set; then
14783   enableval="$enable_ext_putwin"
14784   with_ext_putwin=$enableval
14785 else
14786   with_ext_putwin=$cf_dft_ext_putwin
14787 fi;
14788 echo "$as_me:14788: result: $with_ext_putwin" >&5
14789 echo "${ECHO_T}$with_ext_putwin" >&6
14790 if test "x$with_ext_putwin" = xyes ; then
14791
14792 cat >>confdefs.h <<\EOF
14793 #define NCURSES_EXT_PUTWIN 1
14794 EOF
14795
14796 fi
14797
14798 echo "$as_me:14798: checking if you want \$NCURSES_NO_PADDING code" >&5
14799 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14800
14801 # Check whether --enable-no-padding or --disable-no-padding was given.
14802 if test "${enable_no_padding+set}" = set; then
14803   enableval="$enable_no_padding"
14804   with_no_padding=$enableval
14805 else
14806   with_no_padding=$with_ext_funcs
14807 fi;
14808 echo "$as_me:14808: result: $with_no_padding" >&5
14809 echo "${ECHO_T}$with_no_padding" >&6
14810 test "x$with_no_padding" = xyes &&
14811 cat >>confdefs.h <<\EOF
14812 #define NCURSES_NO_PADDING 1
14813 EOF
14814
14815 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14816 echo "$as_me:14816: checking if you want SIGWINCH handler" >&5
14817 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14818
14819 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14820 if test "${enable_sigwinch+set}" = set; then
14821   enableval="$enable_sigwinch"
14822   with_sigwinch=$enableval
14823 else
14824   with_sigwinch=$with_ext_funcs
14825 fi;
14826 echo "$as_me:14826: result: $with_sigwinch" >&5
14827 echo "${ECHO_T}$with_sigwinch" >&6
14828 test "x$with_sigwinch" = xyes &&
14829 cat >>confdefs.h <<\EOF
14830 #define USE_SIGWINCH 1
14831 EOF
14832
14833 ###   use option --enable-tcap-names to allow user to define new capabilities
14834 echo "$as_me:14834: checking if you want user-definable terminal capabilities like termcap" >&5
14835 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14836
14837 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14838 if test "${enable_tcap_names+set}" = set; then
14839   enableval="$enable_tcap_names"
14840   with_tcap_names=$enableval
14841 else
14842   with_tcap_names=$with_ext_funcs
14843 fi;
14844 echo "$as_me:14844: result: $with_tcap_names" >&5
14845 echo "${ECHO_T}$with_tcap_names" >&6
14846 NCURSES_XNAMES=0
14847 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14848
14849 ##############################################################################
14850
14851 echo "$as_me:14851: checking if you want to link with the pthread library" >&5
14852 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14853
14854 # Check whether --with-pthread or --without-pthread was given.
14855 if test "${with_pthread+set}" = set; then
14856   withval="$with_pthread"
14857   with_pthread=$withval
14858 else
14859   with_pthread=no
14860 fi;
14861 echo "$as_me:14861: result: $with_pthread" >&5
14862 echo "${ECHO_T}$with_pthread" >&6
14863
14864 if test "$with_pthread" != no ; then
14865         echo "$as_me:14865: checking for pthread.h" >&5
14866 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14867 if test "${ac_cv_header_pthread_h+set}" = set; then
14868   echo $ECHO_N "(cached) $ECHO_C" >&6
14869 else
14870   cat >conftest.$ac_ext <<_ACEOF
14871 #line 14871 "configure"
14872 #include "confdefs.h"
14873 #include <pthread.h>
14874 _ACEOF
14875 if { (eval echo "$as_me:14875: \"$ac_cpp conftest.$ac_ext\"") >&5
14876   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14877   ac_status=$?
14878   egrep -v '^ *\+' conftest.er1 >conftest.err
14879   rm -f conftest.er1
14880   cat conftest.err >&5
14881   echo "$as_me:14881: \$? = $ac_status" >&5
14882   (exit $ac_status); } >/dev/null; then
14883   if test -s conftest.err; then
14884     ac_cpp_err=$ac_c_preproc_warn_flag
14885   else
14886     ac_cpp_err=
14887   fi
14888 else
14889   ac_cpp_err=yes
14890 fi
14891 if test -z "$ac_cpp_err"; then
14892   ac_cv_header_pthread_h=yes
14893 else
14894   echo "$as_me: failed program was:" >&5
14895   cat conftest.$ac_ext >&5
14896   ac_cv_header_pthread_h=no
14897 fi
14898 rm -f conftest.err conftest.$ac_ext
14899 fi
14900 echo "$as_me:14900: result: $ac_cv_header_pthread_h" >&5
14901 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14902 if test $ac_cv_header_pthread_h = yes; then
14903
14904 cat >>confdefs.h <<\EOF
14905 #define HAVE_PTHREADS_H 1
14906 EOF
14907
14908         for cf_lib_pthread in pthread c_r
14909         do
14910             echo "$as_me:14910: checking if we can link with the $cf_lib_pthread library" >&5
14911 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14912             cf_save_LIBS="$LIBS"
14913
14914 cf_add_libs="$LIBS"
14915 # reverse order
14916 cf_add_0lib=
14917 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14918 # filter duplicates
14919 for cf_add_1lib in $cf_add_0lib; do
14920         for cf_add_2lib in $cf_add_libs; do
14921                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14922                         cf_add_1lib=
14923                         break
14924                 fi
14925         done
14926         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14927 done
14928 LIBS="$cf_add_libs"
14929
14930             cat >conftest.$ac_ext <<_ACEOF
14931 #line 14931 "configure"
14932 #include "confdefs.h"
14933
14934 #include <pthread.h>
14935
14936 int
14937 main (void)
14938 {
14939
14940                 int rc = pthread_create(0,0,0,0);
14941                 int r2 = pthread_mutexattr_settype(0, 0);
14942
14943   ;
14944   return 0;
14945 }
14946 _ACEOF
14947 rm -f conftest.$ac_objext conftest$ac_exeext
14948 if { (eval echo "$as_me:14948: \"$ac_link\"") >&5
14949   (eval $ac_link) 2>&5
14950   ac_status=$?
14951   echo "$as_me:14951: \$? = $ac_status" >&5
14952   (exit $ac_status); } &&
14953          { ac_try='test -s conftest$ac_exeext'
14954   { (eval echo "$as_me:14954: \"$ac_try\"") >&5
14955   (eval $ac_try) 2>&5
14956   ac_status=$?
14957   echo "$as_me:14957: \$? = $ac_status" >&5
14958   (exit $ac_status); }; }; then
14959   with_pthread=yes
14960 else
14961   echo "$as_me: failed program was:" >&5
14962 cat conftest.$ac_ext >&5
14963 with_pthread=no
14964 fi
14965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14966             LIBS="$cf_save_LIBS"
14967             echo "$as_me:14967: result: $with_pthread" >&5
14968 echo "${ECHO_T}$with_pthread" >&6
14969             test "$with_pthread" = yes && break
14970         done
14971
14972         if test "$with_pthread" = yes ; then
14973
14974 cf_add_libs="$LIBS"
14975 # reverse order
14976 cf_add_0lib=
14977 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14978 # filter duplicates
14979 for cf_add_1lib in $cf_add_0lib; do
14980         for cf_add_2lib in $cf_add_libs; do
14981                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14982                         cf_add_1lib=
14983                         break
14984                 fi
14985         done
14986         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14987 done
14988 LIBS="$cf_add_libs"
14989
14990 cat >>confdefs.h <<\EOF
14991 #define HAVE_LIBPTHREADS 1
14992 EOF
14993
14994         else
14995             { { echo "$as_me:14995: error: Cannot link with pthread library" >&5
14996 echo "$as_me: error: Cannot link with pthread library" >&2;}
14997    { (exit 1); exit 1; }; }
14998         fi
14999
15000 fi
15001
15002 fi
15003
15004 if test "x$with_pthread" != xno; then
15005         echo "$as_me:15005: checking for pthread_kill" >&5
15006 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15007 if test "${ac_cv_func_pthread_kill+set}" = set; then
15008   echo $ECHO_N "(cached) $ECHO_C" >&6
15009 else
15010   cat >conftest.$ac_ext <<_ACEOF
15011 #line 15011 "configure"
15012 #include "confdefs.h"
15013 #define pthread_kill autoconf_temporary
15014 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15015 #undef pthread_kill
15016
15017 #ifdef __cplusplus
15018 extern "C"
15019 #endif
15020
15021 /* We use char because int might match the return type of a gcc2
15022    builtin and then its argument prototype would still apply.  */
15023 char pthread_kill (void);
15024
15025 int
15026 main (void)
15027 {
15028
15029 /* The GNU C library defines stubs for functions which it implements
15030     to always fail with ENOSYS.  Some functions are actually named
15031     something starting with __ and the normal name is an alias.  */
15032 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15033 #error found stub for pthread_kill
15034 #endif
15035
15036         return pthread_kill ();
15037   ;
15038   return 0;
15039 }
15040 _ACEOF
15041 rm -f conftest.$ac_objext conftest$ac_exeext
15042 if { (eval echo "$as_me:15042: \"$ac_link\"") >&5
15043   (eval $ac_link) 2>&5
15044   ac_status=$?
15045   echo "$as_me:15045: \$? = $ac_status" >&5
15046   (exit $ac_status); } &&
15047          { ac_try='test -s conftest$ac_exeext'
15048   { (eval echo "$as_me:15048: \"$ac_try\"") >&5
15049   (eval $ac_try) 2>&5
15050   ac_status=$?
15051   echo "$as_me:15051: \$? = $ac_status" >&5
15052   (exit $ac_status); }; }; then
15053   ac_cv_func_pthread_kill=yes
15054 else
15055   echo "$as_me: failed program was:" >&5
15056 cat conftest.$ac_ext >&5
15057 ac_cv_func_pthread_kill=no
15058 fi
15059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15060 fi
15061 echo "$as_me:15061: result: $ac_cv_func_pthread_kill" >&5
15062 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15063 if test $ac_cv_func_pthread_kill = yes; then
15064
15065                 echo "$as_me:15065: checking if you want to allow EINTR in wgetch with pthreads" >&5
15066 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15067
15068 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15069 if test "${enable_pthreads_eintr+set}" = set; then
15070   enableval="$enable_pthreads_eintr"
15071   use_pthreads_eintr=$enableval
15072 else
15073   use_pthreads_eintr=no
15074 fi;
15075                 echo "$as_me:15075: result: $use_pthreads_eintr" >&5
15076 echo "${ECHO_T}$use_pthreads_eintr" >&6
15077                 if test "x$use_pthreads_eintr" = xyes ; then
15078
15079 cat >>confdefs.h <<\EOF
15080 #define USE_PTHREADS_EINTR 1
15081 EOF
15082
15083                 fi
15084 fi
15085
15086         echo "$as_me:15086: checking if you want to use weak-symbols for pthreads" >&5
15087 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15088
15089 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15090 if test "${enable_weak_symbols+set}" = set; then
15091   enableval="$enable_weak_symbols"
15092   use_weak_symbols=$enableval
15093 else
15094   use_weak_symbols=no
15095 fi;
15096         echo "$as_me:15096: result: $use_weak_symbols" >&5
15097 echo "${ECHO_T}$use_weak_symbols" >&6
15098         if test "x$use_weak_symbols" = xyes ; then
15099
15100 echo "$as_me:15100: checking if $CC supports weak symbols" >&5
15101 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15102 if test "${cf_cv_weak_symbols+set}" = set; then
15103   echo $ECHO_N "(cached) $ECHO_C" >&6
15104 else
15105
15106 cat >conftest.$ac_ext <<_ACEOF
15107 #line 15107 "configure"
15108 #include "confdefs.h"
15109
15110 #include <stdio.h>
15111 int
15112 main (void)
15113 {
15114
15115 #if defined(__GNUC__)
15116 #  if defined __USE_ISOC99
15117 #    define _cat_pragma(exp)    _Pragma(#exp)
15118 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15119 #  else
15120 #    define _weak_pragma(exp)
15121 #  endif
15122 #  define _declare(name)        __extension__ extern __typeof__(name) name
15123 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15124 #endif
15125
15126 weak_symbol(fopen);
15127
15128   ;
15129   return 0;
15130 }
15131 _ACEOF
15132 rm -f conftest.$ac_objext
15133 if { (eval echo "$as_me:15133: \"$ac_compile\"") >&5
15134   (eval $ac_compile) 2>&5
15135   ac_status=$?
15136   echo "$as_me:15136: \$? = $ac_status" >&5
15137   (exit $ac_status); } &&
15138          { ac_try='test -s conftest.$ac_objext'
15139   { (eval echo "$as_me:15139: \"$ac_try\"") >&5
15140   (eval $ac_try) 2>&5
15141   ac_status=$?
15142   echo "$as_me:15142: \$? = $ac_status" >&5
15143   (exit $ac_status); }; }; then
15144   cf_cv_weak_symbols=yes
15145 else
15146   echo "$as_me: failed program was:" >&5
15147 cat conftest.$ac_ext >&5
15148 cf_cv_weak_symbols=no
15149 fi
15150 rm -f conftest.$ac_objext conftest.$ac_ext
15151
15152 fi
15153 echo "$as_me:15153: result: $cf_cv_weak_symbols" >&5
15154 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15155
15156         else
15157                 cf_cv_weak_symbols=no
15158         fi
15159
15160         if test "x$cf_cv_weak_symbols" = xyes ; then
15161
15162 cat >>confdefs.h <<\EOF
15163 #define USE_WEAK_SYMBOLS 1
15164 EOF
15165
15166         fi
15167 fi
15168
15169 PTHREAD=
15170 if test "x$with_pthread" = "xyes" ; then
15171
15172 cat >>confdefs.h <<\EOF
15173 #define USE_PTHREADS 1
15174 EOF
15175
15176         enable_reentrant=yes
15177         if test "x$cf_cv_weak_symbols" = xyes ; then
15178                 PTHREAD=-lpthread
15179
15180 cf_add_libs="$PRIVATE_LIBS"
15181 # reverse order
15182 cf_add_0lib=
15183 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15184 # filter duplicates
15185 for cf_add_1lib in $cf_add_0lib; do
15186         for cf_add_2lib in $cf_add_libs; do
15187                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15188                         cf_add_1lib=
15189                         break
15190                 fi
15191         done
15192         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15193 done
15194 PRIVATE_LIBS="$cf_add_libs"
15195
15196         fi
15197 fi
15198
15199 # Reentrant code has to be opaque; there's little advantage to making ncurses
15200 # opaque outside of that, so there is no --enable-opaque option.  We can use
15201 # this option without --with-pthreads, but this will be always set for
15202 # pthreads.
15203 echo "$as_me:15203: checking if you want reentrant code" >&5
15204 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15205
15206 # Check whether --enable-reentrant or --disable-reentrant was given.
15207 if test "${enable_reentrant+set}" = set; then
15208   enableval="$enable_reentrant"
15209   with_reentrant=$enableval
15210 else
15211   with_reentrant=no
15212 fi;
15213 echo "$as_me:15213: result: $with_reentrant" >&5
15214 echo "${ECHO_T}$with_reentrant" >&6
15215 if test "x$with_reentrant" = xyes ; then
15216         cf_cv_enable_reentrant=1
15217         cf_cv_enable_opaque="NCURSES_INTERNALS"
15218         NCURSES_SIZE_T=int
15219         if test "x$cf_cv_weak_symbols" = xyes ; then
15220
15221 # remove pthread library from $LIBS
15222 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15223
15224 cf_add_libs="$TEST_LIBS"
15225 # reverse order
15226 cf_add_0lib=
15227 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15228 # filter duplicates
15229 for cf_add_1lib in $cf_add_0lib; do
15230         for cf_add_2lib in $cf_add_libs; do
15231                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15232                         cf_add_1lib=
15233                         break
15234                 fi
15235         done
15236         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15237 done
15238 TEST_LIBS="$cf_add_libs"
15239
15240 cf_add_libs="$TEST_LIBS2"
15241 # reverse order
15242 cf_add_0lib=
15243 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15244 # filter duplicates
15245 for cf_add_1lib in $cf_add_0lib; do
15246         for cf_add_2lib in $cf_add_libs; do
15247                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15248                         cf_add_1lib=
15249                         break
15250                 fi
15251         done
15252         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15253 done
15254 TEST_LIBS2="$cf_add_libs"
15255
15256 cf_add_libs="$PRIVATE_LIBS"
15257 # reverse order
15258 cf_add_0lib=
15259 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15260 # filter duplicates
15261 for cf_add_1lib in $cf_add_0lib; do
15262         for cf_add_2lib in $cf_add_libs; do
15263                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15264                         cf_add_1lib=
15265                         break
15266                 fi
15267         done
15268         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15269 done
15270 PRIVATE_LIBS="$cf_add_libs"
15271
15272         else
15273                 # when not using weak symbols but with_reentrant,
15274                 # add 't' to the library suffix on all platforms
15275                 # except cygwin, where we only do that if ALSO
15276                 # compiling with full thread support.
15277                 case "$host" in
15278                 (*cygwin* | *msys*)
15279                         if test "$with_pthread" = "yes" ; then
15280                                 if test "x$disable_lib_suffixes" = "xno" ; then
15281                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15282                                 fi
15283                         fi ;;
15284                 (*)
15285                         if test "x$disable_lib_suffixes" = "xno" ; then
15286                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15287                         fi
15288                         ;;
15289                 esac
15290         fi
15291
15292 cat >>confdefs.h <<\EOF
15293 #define USE_REENTRANT 1
15294 EOF
15295
15296 if test "${with_abi_version+set}" != set; then
15297         case $cf_cv_rel_version in
15298         (5.*)
15299                 cf_cv_rel_version=6.0
15300                 cf_cv_abi_version=6
15301                 { echo "$as_me:15301: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15302 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15303                 ;;
15304         esac
15305 fi
15306
15307 else
15308         cf_cv_enable_reentrant=0
15309         cf_cv_enable_opaque="NCURSES_OPAQUE"
15310         NCURSES_SIZE_T=short
15311 fi
15312
15313 echo "$as_me:15313: checking if you want opaque curses-library structures" >&5
15314 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15315
15316 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15317 if test "${enable_opaque_curses+set}" = set; then
15318   enableval="$enable_opaque_curses"
15319   test "$enableval" != yes && enableval=no
15320         if test "$enableval" != "no" ; then
15321     enable_opaque_curses=yes
15322         else
15323
15324          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15325          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15326
15327         fi
15328 else
15329   enableval=no
15330
15331          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15332          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15333
15334 fi;
15335 echo "$as_me:15335: result: $enable_opaque_curses" >&5
15336 echo "${ECHO_T}$enable_opaque_curses" >&6
15337
15338 test "$cf_cv_enable_reentrant" = 1 && \
15339 test "$enable_opaque_curses" = no && \
15340 { { echo "$as_me:15340: error: reentrant configuration requires opaque library" >&5
15341 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15342    { (exit 1); exit 1; }; }
15343
15344 echo "$as_me:15344: checking if you want opaque form-library structures" >&5
15345 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15346
15347 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15348 if test "${enable_opaque_form+set}" = set; then
15349   enableval="$enable_opaque_form"
15350   enable_opaque_form=yes
15351 else
15352   enable_opaque_form=no
15353 fi;
15354 echo "$as_me:15354: result: $enable_opaque_form" >&5
15355 echo "${ECHO_T}$enable_opaque_form" >&6
15356
15357 echo "$as_me:15357: checking if you want opaque menu-library structures" >&5
15358 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15359
15360 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15361 if test "${enable_opaque_menu+set}" = set; then
15362   enableval="$enable_opaque_menu"
15363   enable_opaque_menu=yes
15364 else
15365   enable_opaque_menu=no
15366 fi;
15367 echo "$as_me:15367: result: $enable_opaque_menu" >&5
15368 echo "${ECHO_T}$enable_opaque_menu" >&6
15369
15370 echo "$as_me:15370: checking if you want opaque panel-library structures" >&5
15371 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15372
15373 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15374 if test "${enable_opaque_panel+set}" = set; then
15375   enableval="$enable_opaque_panel"
15376   enable_opaque_panel=yes
15377 else
15378   enable_opaque_panel=no
15379 fi;
15380 echo "$as_me:15380: result: $enable_opaque_panel" >&5
15381 echo "${ECHO_T}$enable_opaque_panel" >&6
15382
15383 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15384 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15385 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15386 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15387
15388 ### Allow using a different wrap-prefix
15389 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15390         echo "$as_me:15390: checking for prefix used to wrap public variables" >&5
15391 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15392
15393 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15394 if test "${with_wrap_prefix+set}" = set; then
15395   withval="$with_wrap_prefix"
15396   NCURSES_WRAP_PREFIX=$withval
15397 else
15398   NCURSES_WRAP_PREFIX=_nc_
15399 fi;
15400         echo "$as_me:15400: result: $NCURSES_WRAP_PREFIX" >&5
15401 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15402 else
15403         NCURSES_WRAP_PREFIX=_nc_
15404 fi
15405
15406 cat >>confdefs.h <<EOF
15407 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15408 EOF
15409
15410 ###############################################################################
15411 # These options are relatively safe to experiment with.
15412
15413 echo "$as_me:15413: checking if you want all development code" >&5
15414 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15415
15416 # Check whether --with-develop or --without-develop was given.
15417 if test "${with_develop+set}" = set; then
15418   withval="$with_develop"
15419   with_develop=$withval
15420 else
15421   with_develop=no
15422 fi;
15423 echo "$as_me:15423: result: $with_develop" >&5
15424 echo "${ECHO_T}$with_develop" >&6
15425
15426 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15427 echo "$as_me:15427: checking if you want hard-tabs code" >&5
15428 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15429
15430 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15431 if test "${enable_hard_tabs+set}" = set; then
15432   enableval="$enable_hard_tabs"
15433
15434 else
15435   enable_hard_tabs=$with_develop
15436 fi;
15437 echo "$as_me:15437: result: $enable_hard_tabs" >&5
15438 echo "${ECHO_T}$enable_hard_tabs" >&6
15439 test "x$enable_hard_tabs" = xyes &&
15440 cat >>confdefs.h <<\EOF
15441 #define USE_HARD_TABS 1
15442 EOF
15443
15444 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15445 echo "$as_me:15445: checking if you want limited support for xmc" >&5
15446 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15447
15448 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15449 if test "${enable_xmc_glitch+set}" = set; then
15450   enableval="$enable_xmc_glitch"
15451
15452 else
15453   enable_xmc_glitch=$with_develop
15454 fi;
15455 echo "$as_me:15455: result: $enable_xmc_glitch" >&5
15456 echo "${ECHO_T}$enable_xmc_glitch" >&6
15457 test "x$enable_xmc_glitch" = xyes &&
15458 cat >>confdefs.h <<\EOF
15459 #define USE_XMC_SUPPORT 1
15460 EOF
15461
15462 ###############################################################################
15463 # These are just experimental, probably should not be in a package:
15464
15465 echo "$as_me:15465: checking if you do not want to assume colors are white-on-black" >&5
15466 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15467
15468 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15469 if test "${enable_assumed_color+set}" = set; then
15470   enableval="$enable_assumed_color"
15471   with_assumed_color=$enableval
15472 else
15473   with_assumed_color=yes
15474 fi;
15475 echo "$as_me:15475: result: $with_assumed_color" >&5
15476 echo "${ECHO_T}$with_assumed_color" >&6
15477 test "x$with_assumed_color" = xyes &&
15478 cat >>confdefs.h <<\EOF
15479 #define USE_ASSUMED_COLOR 1
15480 EOF
15481
15482 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15483 echo "$as_me:15483: checking if you want hashmap scrolling-optimization code" >&5
15484 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15485
15486 # Check whether --enable-hashmap or --disable-hashmap was given.
15487 if test "${enable_hashmap+set}" = set; then
15488   enableval="$enable_hashmap"
15489   with_hashmap=$enableval
15490 else
15491   with_hashmap=yes
15492 fi;
15493 echo "$as_me:15493: result: $with_hashmap" >&5
15494 echo "${ECHO_T}$with_hashmap" >&6
15495 test "x$with_hashmap" = xyes &&
15496 cat >>confdefs.h <<\EOF
15497 #define USE_HASHMAP 1
15498 EOF
15499
15500 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15501 echo "$as_me:15501: checking if you want colorfgbg code" >&5
15502 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15503
15504 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15505 if test "${enable_colorfgbg+set}" = set; then
15506   enableval="$enable_colorfgbg"
15507   with_colorfgbg=$enableval
15508 else
15509   with_colorfgbg=no
15510 fi;
15511 echo "$as_me:15511: result: $with_colorfgbg" >&5
15512 echo "${ECHO_T}$with_colorfgbg" >&6
15513 test "x$with_colorfgbg" = xyes &&
15514 cat >>confdefs.h <<\EOF
15515 #define USE_COLORFGBG 1
15516 EOF
15517
15518 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15519 echo "$as_me:15519: checking if you want to use gcc -fvisibility option" >&5
15520 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15521
15522 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15523 if test "${enable_fvisibility+set}" = set; then
15524   enableval="$enable_fvisibility"
15525   cf_with_fvisibility=$enableval
15526 else
15527   cf_with_fvisibility=no
15528 fi;
15529 echo "$as_me:15529: result: $cf_with_fvisibility" >&5
15530 echo "${ECHO_T}$cf_with_fvisibility" >&6
15531
15532 NCURSES_IMPEXP=
15533 NCURSES_CXX_IMPEXP=
15534 if test "x$cf_with_fvisibility" = xyes; then
15535
15536 echo "$as_me:15536: checking if $CC -fvisibility=hidden option works" >&5
15537 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15538 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15539   echo $ECHO_N "(cached) $ECHO_C" >&6
15540 else
15541
15542     cf_save_cflags="$CFLAGS"
15543     CFLAGS="$CFLAGS -fvisibility=hidden"
15544     cat >conftest.$ac_ext <<_ACEOF
15545 #line 15545 "configure"
15546 #include "confdefs.h"
15547
15548 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15549
15550 int
15551 main (void)
15552 {
15553
15554         if (somefunc()) return 1;
15555
15556   ;
15557   return 0;
15558 }
15559 _ACEOF
15560 rm -f conftest.$ac_objext conftest$ac_exeext
15561 if { (eval echo "$as_me:15561: \"$ac_link\"") >&5
15562   (eval $ac_link) 2>&5
15563   ac_status=$?
15564   echo "$as_me:15564: \$? = $ac_status" >&5
15565   (exit $ac_status); } &&
15566          { ac_try='test -s conftest$ac_exeext'
15567   { (eval echo "$as_me:15567: \"$ac_try\"") >&5
15568   (eval $ac_try) 2>&5
15569   ac_status=$?
15570   echo "$as_me:15570: \$? = $ac_status" >&5
15571   (exit $ac_status); }; }; then
15572   cf_cv_fvisibility_hidden=yes
15573 else
15574   echo "$as_me: failed program was:" >&5
15575 cat conftest.$ac_ext >&5
15576 cf_cv_fvisibility_hidden=no
15577 fi
15578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15579     CFLAGS=$cf_save_cflags
15580
15581 fi
15582 echo "$as_me:15582: result: $cf_cv_fvisibility_hidden" >&5
15583 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15584
15585         if test "x$cf_cv_fvisibility_hidden" = xyes
15586         then
15587
15588 cf_fix_cppflags=no
15589 cf_new_cflags=
15590 cf_new_cppflags=
15591 cf_new_extra_cppflags=
15592
15593 for cf_add_cflags in -fvisibility=hidden
15594 do
15595 case $cf_fix_cppflags in
15596 (no)
15597         case $cf_add_cflags in
15598         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15599                 case $cf_add_cflags in
15600                 (-D*)
15601                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15602
15603                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15604                                 && test -z "${cf_tst_cflags}" \
15605                                 && cf_fix_cppflags=yes
15606
15607                         if test $cf_fix_cppflags = yes ; then
15608
15609         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15610         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15611
15612                                 continue
15613                         elif test "${cf_tst_cflags}" = "\"'" ; then
15614
15615         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15616         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15617
15618                                 continue
15619                         fi
15620                         ;;
15621                 esac
15622                 case "$CPPFLAGS" in
15623                 (*$cf_add_cflags)
15624                         ;;
15625                 (*)
15626                         case $cf_add_cflags in
15627                         (-D*)
15628                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15629
15630 CPPFLAGS=`echo "$CPPFLAGS" | \
15631         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15632                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15633
15634                                 ;;
15635                         esac
15636
15637         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15638         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15639
15640                         ;;
15641                 esac
15642                 ;;
15643         (*)
15644
15645         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15646         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15647
15648                 ;;
15649         esac
15650         ;;
15651 (yes)
15652
15653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15655
15656         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15657
15658         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15659                 && test -z "${cf_tst_cflags}" \
15660                 && cf_fix_cppflags=no
15661         ;;
15662 esac
15663 done
15664
15665 if test -n "$cf_new_cflags" ; then
15666
15667         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15668         CFLAGS="${CFLAGS}$cf_new_cflags"
15669
15670 fi
15671
15672 if test -n "$cf_new_cppflags" ; then
15673
15674         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15675         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15676
15677 fi
15678
15679 if test -n "$cf_new_extra_cppflags" ; then
15680
15681         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15682         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15683
15684 fi
15685
15686                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15687         fi
15688         if test -n "$CXX"
15689         then
15690                 ac_ext=cc
15691 ac_cpp='$CXXCPP $CPPFLAGS'
15692 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15693 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15694 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15695 ac_main_return=return
15696
15697 echo "$as_me:15697: checking if $CXX -fvisibility=hidden option works" >&5
15698 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15699 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15700   echo $ECHO_N "(cached) $ECHO_C" >&6
15701 else
15702
15703     cf_save_cflags="$CXXFLAGS"
15704     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15705     cat >conftest.$ac_ext <<_ACEOF
15706 #line 15706 "configure"
15707 #include "confdefs.h"
15708
15709 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15710
15711 int
15712 main (void)
15713 {
15714
15715         if (somefunc()) return 1;
15716
15717   ;
15718   return 0;
15719 }
15720 _ACEOF
15721 rm -f conftest.$ac_objext conftest$ac_exeext
15722 if { (eval echo "$as_me:15722: \"$ac_link\"") >&5
15723   (eval $ac_link) 2>&5
15724   ac_status=$?
15725   echo "$as_me:15725: \$? = $ac_status" >&5
15726   (exit $ac_status); } &&
15727          { ac_try='test -s conftest$ac_exeext'
15728   { (eval echo "$as_me:15728: \"$ac_try\"") >&5
15729   (eval $ac_try) 2>&5
15730   ac_status=$?
15731   echo "$as_me:15731: \$? = $ac_status" >&5
15732   (exit $ac_status); }; }; then
15733   cf_cv_fvisibility_hidden2=yes
15734 else
15735   echo "$as_me: failed program was:" >&5
15736 cat conftest.$ac_ext >&5
15737 cf_cv_fvisibility_hidden2=no
15738 fi
15739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15740     CXXFLAGS=$cf_save_cflags
15741
15742 fi
15743 echo "$as_me:15743: result: $cf_cv_fvisibility_hidden2" >&5
15744 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15745
15746                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15747                 then
15748
15749 cf_save_CXXFLAGS="$CFLAGS"
15750 CFLAGS="$CXXFLAGS"
15751
15752 cf_fix_cppflags=no
15753 cf_new_cflags=
15754 cf_new_cppflags=
15755 cf_new_extra_cppflags=
15756
15757 for cf_add_cflags in -fvisibility=hidden
15758 do
15759 case $cf_fix_cppflags in
15760 (no)
15761         case $cf_add_cflags in
15762         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15763                 case $cf_add_cflags in
15764                 (-D*)
15765                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15766
15767                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15768                                 && test -z "${cf_tst_cflags}" \
15769                                 && cf_fix_cppflags=yes
15770
15771                         if test $cf_fix_cppflags = yes ; then
15772
15773         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15774         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15775
15776                                 continue
15777                         elif test "${cf_tst_cflags}" = "\"'" ; then
15778
15779         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15780         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15781
15782                                 continue
15783                         fi
15784                         ;;
15785                 esac
15786                 case "$CPPFLAGS" in
15787                 (*$cf_add_cflags)
15788                         ;;
15789                 (*)
15790                         case $cf_add_cflags in
15791                         (-D*)
15792                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15793
15794 CPPFLAGS=`echo "$CPPFLAGS" | \
15795         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15796                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15797
15798                                 ;;
15799                         esac
15800
15801         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15802         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15803
15804                         ;;
15805                 esac
15806                 ;;
15807         (*)
15808
15809         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15810         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15811
15812                 ;;
15813         esac
15814         ;;
15815 (yes)
15816
15817         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15818         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15819
15820         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15821
15822         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15823                 && test -z "${cf_tst_cflags}" \
15824                 && cf_fix_cppflags=no
15825         ;;
15826 esac
15827 done
15828
15829 if test -n "$cf_new_cflags" ; then
15830
15831         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15832         CFLAGS="${CFLAGS}$cf_new_cflags"
15833
15834 fi
15835
15836 if test -n "$cf_new_cppflags" ; then
15837
15838         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15839         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15840
15841 fi
15842
15843 if test -n "$cf_new_extra_cppflags" ; then
15844
15845         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15846         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15847
15848 fi
15849
15850 CXXFLAGS="$CFLAGS"
15851 CFLAGS="$cf_save_CXXFLAGS"
15852
15853                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15854                 fi
15855                 ac_ext=c
15856 ac_cpp='$CPP $CPPFLAGS'
15857 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15858 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15859 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15860 ac_main_return=return
15861
15862         fi
15863 fi
15864
15865 ###   use option --enable-interop to turn on use of bindings used for interop
15866 echo "$as_me:15866: checking if you want interop bindings" >&5
15867 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15868
15869 # Check whether --enable-interop or --disable-interop was given.
15870 if test "${enable_interop+set}" = set; then
15871   enableval="$enable_interop"
15872   with_exp_interop=$enableval
15873 else
15874   with_exp_interop=$cf_dft_interop
15875 fi;
15876 echo "$as_me:15876: result: $with_exp_interop" >&5
15877 echo "${ECHO_T}$with_exp_interop" >&6
15878
15879 NCURSES_INTEROP_FUNCS=0
15880 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15881
15882 echo "$as_me:15882: checking if you want experimental safe-sprintf code" >&5
15883 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15884
15885 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15886 if test "${enable_safe_sprintf+set}" = set; then
15887   enableval="$enable_safe_sprintf"
15888   with_safe_sprintf=$enableval
15889 else
15890   with_safe_sprintf=no
15891 fi;
15892 echo "$as_me:15892: result: $with_safe_sprintf" >&5
15893 echo "${ECHO_T}$with_safe_sprintf" >&6
15894
15895 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15896 # when hashmap is used scroll hints are useless
15897 if test "$with_hashmap" = no ; then
15898 echo "$as_me:15898: checking if you want to experiment without scrolling-hints code" >&5
15899 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15900
15901 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15902 if test "${enable_scroll_hints+set}" = set; then
15903   enableval="$enable_scroll_hints"
15904   with_scroll_hints=$enableval
15905 else
15906   with_scroll_hints=yes
15907 fi;
15908 echo "$as_me:15908: result: $with_scroll_hints" >&5
15909 echo "${ECHO_T}$with_scroll_hints" >&6
15910 test "x$with_scroll_hints" = xyes &&
15911 cat >>confdefs.h <<\EOF
15912 #define USE_SCROLL_HINTS 1
15913 EOF
15914
15915 fi
15916
15917 echo "$as_me:15917: checking if you want wgetch-events code" >&5
15918 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15919
15920 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15921 if test "${enable_wgetch_events+set}" = set; then
15922   enableval="$enable_wgetch_events"
15923   with_wgetch_events=$enableval
15924 else
15925   with_wgetch_events=no
15926 fi;
15927 echo "$as_me:15927: result: $with_wgetch_events" >&5
15928 echo "${ECHO_T}$with_wgetch_events" >&6
15929 test "x$with_wgetch_events" = xyes &&
15930 cat >>confdefs.h <<\EOF
15931 #define NCURSES_WGETCH_EVENTS 1
15932 EOF
15933
15934 ###############################################################################
15935
15936 ###     use option --disable-echo to suppress full display compiling commands
15937
15938 echo "$as_me:15938: checking if you want to see long compiling messages" >&5
15939 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15940
15941 # Check whether --enable-echo or --disable-echo was given.
15942 if test "${enable_echo+set}" = set; then
15943   enableval="$enable_echo"
15944   test "$enableval" != no && enableval=yes
15945         if test "$enableval" != "yes" ; then
15946
15947         ECHO_LT='--silent'
15948         ECHO_LD='@echo linking $@;'
15949         RULE_CC='@echo compiling $<'
15950         SHOW_CC='@echo compiling $@'
15951         ECHO_CC='@'
15952
15953         else
15954
15955         ECHO_LT=''
15956         ECHO_LD=''
15957         RULE_CC=''
15958         SHOW_CC=''
15959         ECHO_CC=''
15960
15961         fi
15962 else
15963   enableval=yes
15964
15965         ECHO_LT=''
15966         ECHO_LD=''
15967         RULE_CC=''
15968         SHOW_CC=''
15969         ECHO_CC=''
15970
15971 fi;
15972 echo "$as_me:15972: result: $enableval" >&5
15973 echo "${ECHO_T}$enableval" >&6
15974
15975 if test "x$enable_echo" = xyes; then
15976         ECHO_LINK=
15977 else
15978         ECHO_LINK='@ echo linking $@ ... ;'
15979         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15980         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15981 fi
15982
15983 # --disable-stripping is used for debugging
15984
15985 echo "$as_me:15985: checking if you want to install stripped executables" >&5
15986 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15987
15988 # Check whether --enable-stripping or --disable-stripping was given.
15989 if test "${enable_stripping+set}" = set; then
15990   enableval="$enable_stripping"
15991   test "$enableval" != no && enableval=yes
15992         if test "$enableval" != "yes" ; then
15993     with_stripping=no
15994         else
15995                 with_stripping=yes
15996         fi
15997 else
15998   enableval=yes
15999         with_stripping=yes
16000
16001 fi;
16002 echo "$as_me:16002: result: $with_stripping" >&5
16003 echo "${ECHO_T}$with_stripping" >&6
16004
16005 if test "$with_stripping" = yes
16006 then
16007         INSTALL_OPT_S="-s"
16008 else
16009         INSTALL_OPT_S=
16010 fi
16011
16012 : ${INSTALL:=install}
16013 echo "$as_me:16013: checking if install accepts -p option" >&5
16014 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16015 if test "${cf_cv_install_p+set}" = set; then
16016   echo $ECHO_N "(cached) $ECHO_C" >&6
16017 else
16018
16019         rm -rf conftest*
16020         date >conftest.in
16021         mkdir conftest.out
16022         sleep 3
16023         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16024         then
16025                 if test -f conftest.out/conftest.in
16026                 then
16027                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16028                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16029                         if test -s conftest.err
16030                         then
16031                                 cf_cv_install_p=no
16032                         else
16033                                 cf_cv_install_p=yes
16034                         fi
16035                 else
16036                         cf_cv_install_p=no
16037                 fi
16038         else
16039                 cf_cv_install_p=no
16040         fi
16041         rm -rf conftest*
16042
16043 fi
16044 echo "$as_me:16044: result: $cf_cv_install_p" >&5
16045 echo "${ECHO_T}$cf_cv_install_p" >&6
16046
16047 echo "$as_me:16047: checking if install needs to be told about ownership" >&5
16048 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16049 case `$ac_config_guess` in
16050 (*minix)
16051         with_install_o=yes
16052         ;;
16053 (*)
16054         with_install_o=no
16055         ;;
16056 esac
16057
16058 echo "$as_me:16058: result: $with_install_o" >&5
16059 echo "${ECHO_T}$with_install_o" >&6
16060 if test "x$with_install_o" = xyes
16061 then
16062         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'`
16063 else
16064         INSTALL_OPT_O=
16065 fi
16066
16067 # If we're avoiding relinking of shared libraries during install, that is to
16068 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16069 # the install program has "-p" (for preserving timestamps).
16070 cf_cv_do_reranlib=yes
16071 if test "x$cf_cv_install_p" = xyes
16072 then
16073         if test "x$cf_cv_do_relink" != xyes
16074         then
16075                 cf_cv_do_reranlib=no
16076                 INSTALL_OPT_P="-p"
16077                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16078         fi
16079 fi
16080
16081 ###     use option --enable-warnings to turn on all gcc warnings
16082 echo "$as_me:16082: checking if you want to see compiler warnings" >&5
16083 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
16084
16085 # Check whether --enable-warnings or --disable-warnings was given.
16086 if test "${enable_warnings+set}" = set; then
16087   enableval="$enable_warnings"
16088   with_warnings=$enableval
16089 fi;
16090 echo "$as_me:16090: result: $with_warnings" >&5
16091 echo "${ECHO_T}$with_warnings" >&6
16092
16093 if test "x$with_warnings" = "xyes"; then
16094
16095         ADAFLAGS="$ADAFLAGS -gnatg"
16096
16097 if test "x$have_x" = xyes; then
16098
16099 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16100 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16101 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16102 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16103 for cf_X_CFLAGS in $X_CFLAGS
16104 do
16105         case "x$cf_X_CFLAGS" in
16106         x-[IUD]*)
16107                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16108                 ;;
16109         *)
16110                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16111                 ;;
16112         esac
16113 done
16114
16115 cat >conftest.$ac_ext <<_ACEOF
16116 #line 16116 "configure"
16117 #include "confdefs.h"
16118
16119 #include <stdlib.h>
16120 #include <X11/Intrinsic.h>
16121
16122 int
16123 main (void)
16124 {
16125 String foo = malloc(1); (void)foo
16126   ;
16127   return 0;
16128 }
16129 _ACEOF
16130 rm -f conftest.$ac_objext
16131 if { (eval echo "$as_me:16131: \"$ac_compile\"") >&5
16132   (eval $ac_compile) 2>&5
16133   ac_status=$?
16134   echo "$as_me:16134: \$? = $ac_status" >&5
16135   (exit $ac_status); } &&
16136          { ac_try='test -s conftest.$ac_objext'
16137   { (eval echo "$as_me:16137: \"$ac_try\"") >&5
16138   (eval $ac_try) 2>&5
16139   ac_status=$?
16140   echo "$as_me:16140: \$? = $ac_status" >&5
16141   (exit $ac_status); }; }; then
16142
16143 echo "$as_me:16143: checking for X11/Xt const-feature" >&5
16144 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16145 if test "${cf_cv_const_x_string+set}" = set; then
16146   echo $ECHO_N "(cached) $ECHO_C" >&6
16147 else
16148
16149         cat >conftest.$ac_ext <<_ACEOF
16150 #line 16150 "configure"
16151 #include "confdefs.h"
16152
16153 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16154 #undef  XTSTRINGDEFINES /* X11R5 and later */
16155 #include <stdlib.h>
16156 #include <X11/Intrinsic.h>
16157
16158 int
16159 main (void)
16160 {
16161 String foo = malloc(1); *foo = 0
16162   ;
16163   return 0;
16164 }
16165 _ACEOF
16166 rm -f conftest.$ac_objext
16167 if { (eval echo "$as_me:16167: \"$ac_compile\"") >&5
16168   (eval $ac_compile) 2>&5
16169   ac_status=$?
16170   echo "$as_me:16170: \$? = $ac_status" >&5
16171   (exit $ac_status); } &&
16172          { ac_try='test -s conftest.$ac_objext'
16173   { (eval echo "$as_me:16173: \"$ac_try\"") >&5
16174   (eval $ac_try) 2>&5
16175   ac_status=$?
16176   echo "$as_me:16176: \$? = $ac_status" >&5
16177   (exit $ac_status); }; }; then
16178
16179                         cf_cv_const_x_string=no
16180
16181 else
16182   echo "$as_me: failed program was:" >&5
16183 cat conftest.$ac_ext >&5
16184
16185                         cf_cv_const_x_string=yes
16186
16187 fi
16188 rm -f conftest.$ac_objext conftest.$ac_ext
16189
16190 fi
16191 echo "$as_me:16191: result: $cf_cv_const_x_string" >&5
16192 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16193
16194 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16195 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16196 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16197
16198 case $cf_cv_const_x_string in
16199 (no)
16200
16201         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16202         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16203
16204         ;;
16205 (*)
16206
16207         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16208         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16209
16210         ;;
16211 esac
16212
16213 else
16214   echo "$as_me: failed program was:" >&5
16215 cat conftest.$ac_ext >&5
16216 fi
16217 rm -f conftest.$ac_objext conftest.$ac_ext
16218  fi
16219 cat > conftest.$ac_ext <<EOF
16220 #line 16220 "${as_me:-configure}"
16221 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16222 EOF
16223 if test "$INTEL_COMPILER" = yes
16224 then
16225 # The "-wdXXX" options suppress warnings:
16226 # remark #1419: external declaration in primary source file
16227 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16228 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16229 # remark #193: zero used for undefined preprocessing identifier
16230 # remark #593: variable "curs_sb_left_arrow" was set but never used
16231 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16232 # remark #869: parameter "tw" was never referenced
16233 # remark #981: operands are evaluated in unspecified order
16234 # warning #279: controlling expression is constant
16235
16236         { echo "$as_me:16236: checking for $CC warning options..." >&5
16237 echo "$as_me: checking for $CC warning options..." >&6;}
16238         cf_save_CFLAGS="$CFLAGS"
16239         EXTRA_CFLAGS="-Wall"
16240         for cf_opt in \
16241                 wd1419 \
16242                 wd1683 \
16243                 wd1684 \
16244                 wd193 \
16245                 wd593 \
16246                 wd279 \
16247                 wd810 \
16248                 wd869 \
16249                 wd981
16250         do
16251                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16252                 if { (eval echo "$as_me:16252: \"$ac_compile\"") >&5
16253   (eval $ac_compile) 2>&5
16254   ac_status=$?
16255   echo "$as_me:16255: \$? = $ac_status" >&5
16256   (exit $ac_status); }; then
16257                         test -n "$verbose" && echo "$as_me:16257: result: ... -$cf_opt" >&5
16258 echo "${ECHO_T}... -$cf_opt" >&6
16259                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16260                 fi
16261         done
16262         CFLAGS="$cf_save_CFLAGS"
16263 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16264 then
16265         { echo "$as_me:16265: checking for $CC warning options..." >&5
16266 echo "$as_me: checking for $CC warning options..." >&6;}
16267         cf_save_CFLAGS="$CFLAGS"
16268         EXTRA_CFLAGS=
16269         cf_warn_CONST=""
16270         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16271         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16272         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16273         for cf_opt in W Wall \
16274                 Wbad-function-cast \
16275                 Wcast-align \
16276                 Wcast-qual \
16277                 Wdeclaration-after-statement \
16278                 Wextra \
16279                 Winline \
16280                 Wmissing-declarations \
16281                 Wmissing-prototypes \
16282                 Wnested-externs \
16283                 Wpointer-arith \
16284                 Wshadow \
16285                 Wstrict-prototypes \
16286                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16287         do
16288                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16289                 if { (eval echo "$as_me:16289: \"$ac_compile\"") >&5
16290   (eval $ac_compile) 2>&5
16291   ac_status=$?
16292   echo "$as_me:16292: \$? = $ac_status" >&5
16293   (exit $ac_status); }; then
16294                         test -n "$verbose" && echo "$as_me:16294: result: ... -$cf_opt" >&5
16295 echo "${ECHO_T}... -$cf_opt" >&6
16296                         case $cf_opt in
16297                         (Winline)
16298                                 case $GCC_VERSION in
16299                                 ([34].*)
16300                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16301
16302 echo "${as_me:-configure}:16302: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16303
16304                                         continue;;
16305                                 esac
16306                                 ;;
16307                         (Wpointer-arith)
16308                                 case $GCC_VERSION in
16309                                 ([12].*)
16310                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16311
16312 echo "${as_me:-configure}:16312: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16313
16314                                         continue;;
16315                                 esac
16316                                 ;;
16317                         esac
16318                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16319                 fi
16320         done
16321         CFLAGS="$cf_save_CFLAGS"
16322 fi
16323 rm -rf conftest*
16324
16325         if test "x$cf_with_cxx" = xyes ; then
16326
16327 INTEL_CPLUSPLUS=no
16328
16329 if test "$GCC" = yes ; then
16330         case $host_os in
16331         (linux*|gnu*)
16332                 echo "$as_me:16332: checking if this is really Intel C++ compiler" >&5
16333 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16334                 cf_save_CFLAGS="$CXXFLAGS"
16335                 CXXFLAGS="$CXXFLAGS -no-gcc"
16336                 cat >conftest.$ac_ext <<_ACEOF
16337 #line 16337 "configure"
16338 #include "confdefs.h"
16339
16340 int
16341 main (void)
16342 {
16343
16344 #ifdef __INTEL_COMPILER
16345 #else
16346 make an error
16347 #endif
16348
16349   ;
16350   return 0;
16351 }
16352 _ACEOF
16353 rm -f conftest.$ac_objext
16354 if { (eval echo "$as_me:16354: \"$ac_compile\"") >&5
16355   (eval $ac_compile) 2>&5
16356   ac_status=$?
16357   echo "$as_me:16357: \$? = $ac_status" >&5
16358   (exit $ac_status); } &&
16359          { ac_try='test -s conftest.$ac_objext'
16360   { (eval echo "$as_me:16360: \"$ac_try\"") >&5
16361   (eval $ac_try) 2>&5
16362   ac_status=$?
16363   echo "$as_me:16363: \$? = $ac_status" >&5
16364   (exit $ac_status); }; }; then
16365   INTEL_CPLUSPLUS=yes
16366 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16367
16368 else
16369   echo "$as_me: failed program was:" >&5
16370 cat conftest.$ac_ext >&5
16371 fi
16372 rm -f conftest.$ac_objext conftest.$ac_ext
16373                 CXXFLAGS="$cf_save_CFLAGS"
16374                 echo "$as_me:16374: result: $INTEL_CPLUSPLUS" >&5
16375 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16376                 ;;
16377         esac
16378 fi
16379
16380 CLANG_CPLUSPLUS=no
16381
16382 if test "$GCC" = yes ; then
16383         echo "$as_me:16383: checking if this is really Clang C++ compiler" >&5
16384 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16385         cf_save_CFLAGS="$CXXFLAGS"
16386         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16387         cat >conftest.$ac_ext <<_ACEOF
16388 #line 16388 "configure"
16389 #include "confdefs.h"
16390
16391 int
16392 main (void)
16393 {
16394
16395 #ifdef __clang__
16396 #else
16397 make an error
16398 #endif
16399
16400   ;
16401   return 0;
16402 }
16403 _ACEOF
16404 rm -f conftest.$ac_objext
16405 if { (eval echo "$as_me:16405: \"$ac_compile\"") >&5
16406   (eval $ac_compile) 2>&5
16407   ac_status=$?
16408   echo "$as_me:16408: \$? = $ac_status" >&5
16409   (exit $ac_status); } &&
16410          { ac_try='test -s conftest.$ac_objext'
16411   { (eval echo "$as_me:16411: \"$ac_try\"") >&5
16412   (eval $ac_try) 2>&5
16413   ac_status=$?
16414   echo "$as_me:16414: \$? = $ac_status" >&5
16415   (exit $ac_status); }; }; then
16416   CLANG_CPLUSPLUS=yes
16417 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16418
16419 else
16420   echo "$as_me: failed program was:" >&5
16421 cat conftest.$ac_ext >&5
16422 fi
16423 rm -f conftest.$ac_objext conftest.$ac_ext
16424         CXXFLAGS="$cf_save_CFLAGS"
16425         echo "$as_me:16425: result: $CLANG_CPLUSPLUS" >&5
16426 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16427 fi
16428
16429 ac_ext=cc
16430 ac_cpp='$CXXCPP $CPPFLAGS'
16431 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16432 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16433 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16434 ac_main_return=return
16435
16436 cat > conftest.$ac_ext <<EOF
16437 #line 16437 "configure"
16438 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16439 EOF
16440
16441 if test "$INTEL_CPLUSPLUS" = yes
16442 then
16443 # The "-wdXXX" options suppress warnings:
16444 # remark #1419: external declaration in primary source file
16445 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16446 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16447 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16448 # remark #193: zero used for undefined preprocessing identifier
16449 # remark #593: variable "curs_sb_left_arrow" was set but never used
16450 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16451 # remark #869: parameter "tw" was never referenced
16452 # remark #981: operands are evaluated in unspecified order
16453 # warning #269: invalid format string conversion
16454
16455         { echo "$as_me:16455: checking for $CC warning options..." >&5
16456 echo "$as_me: checking for $CC warning options..." >&6;}
16457         cf_save_CXXFLAGS="$CXXFLAGS"
16458         EXTRA_CXXFLAGS="-Wall"
16459         for cf_opt in \
16460                 wd1419 \
16461                 wd1682 \
16462                 wd1683 \
16463                 wd1684 \
16464                 wd193 \
16465                 wd279 \
16466                 wd593 \
16467                 wd810 \
16468                 wd869 \
16469                 wd981
16470         do
16471                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16472                 if { (eval echo "$as_me:16472: \"$ac_compile\"") >&5
16473   (eval $ac_compile) 2>&5
16474   ac_status=$?
16475   echo "$as_me:16475: \$? = $ac_status" >&5
16476   (exit $ac_status); }; then
16477                         test -n "$verbose" && echo "$as_me:16477: result: ... -$cf_opt" >&5
16478 echo "${ECHO_T}... -$cf_opt" >&6
16479                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16480                 fi
16481         done
16482         CXXFLAGS="$cf_save_CXXFLAGS"
16483
16484 elif test "$GXX" = yes
16485 then
16486         { echo "$as_me:16486: checking for $CXX warning options..." >&5
16487 echo "$as_me: checking for $CXX warning options..." >&6;}
16488         cf_save_CXXFLAGS="$CXXFLAGS"
16489         EXTRA_CXXFLAGS="-W -Wall"
16490         cf_gxx_extra_warnings=""
16491         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16492         case "$GCC_VERSION" in
16493         ([1-2].*)
16494                 ;;
16495         (*)
16496                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16497                 ;;
16498         esac
16499         for cf_opt in \
16500                 Wabi \
16501                 fabi-version=0 \
16502                 Wextra \
16503                 Wignored-qualifiers \
16504                 Wlogical-op \
16505                 Woverloaded-virtual \
16506                 Wsign-promo \
16507                 Wsynth \
16508                 Wold-style-cast \
16509                 Wcast-align \
16510                 Wcast-qual \
16511                 Wpointer-arith \
16512                 Wshadow \
16513                 Wundef $cf_gxx_extra_warnings Wno-unused
16514         do
16515                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16516                 if { (eval echo "$as_me:16516: \"$ac_compile\"") >&5
16517   (eval $ac_compile) 2>&5
16518   ac_status=$?
16519   echo "$as_me:16519: \$? = $ac_status" >&5
16520   (exit $ac_status); }; then
16521                         test -n "$verbose" && echo "$as_me:16521: result: ... -$cf_opt" >&5
16522 echo "${ECHO_T}... -$cf_opt" >&6
16523                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16524                 else
16525                         test -n "$verbose" && echo "$as_me:16525: result: ... no -$cf_opt" >&5
16526 echo "${ECHO_T}... no -$cf_opt" >&6
16527                 fi
16528         done
16529         CXXFLAGS="$cf_save_CXXFLAGS"
16530 fi
16531
16532 rm -rf conftest*
16533 ac_ext=c
16534 ac_cpp='$CPP $CPPFLAGS'
16535 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16536 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16537 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16538 ac_main_return=return
16539
16540         fi
16541 fi
16542
16543 if test "$GCC" = yes
16544 then
16545 cat > conftest.i <<EOF
16546 #ifndef GCC_PRINTF
16547 #define GCC_PRINTF 0
16548 #endif
16549 #ifndef GCC_SCANF
16550 #define GCC_SCANF 0
16551 #endif
16552 #ifndef GCC_NORETURN
16553 #define GCC_NORETURN /* nothing */
16554 #endif
16555 #ifndef GCC_UNUSED
16556 #define GCC_UNUSED /* nothing */
16557 #endif
16558 EOF
16559 if test "$GCC" = yes
16560 then
16561         { echo "$as_me:16561: checking for $CC __attribute__ directives..." >&5
16562 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16563 cat > conftest.$ac_ext <<EOF
16564 #line 16564 "${as_me:-configure}"
16565 #include "confdefs.h"
16566 #include "conftest.h"
16567 #include "conftest.i"
16568 #if     GCC_PRINTF
16569 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16570 #else
16571 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16572 #endif
16573 #if     GCC_SCANF
16574 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16575 #else
16576 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16577 #endif
16578 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16579 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16580 extern void foo(void) GCC_NORETURN;
16581 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16582 EOF
16583         cf_printf_attribute=no
16584         cf_scanf_attribute=no
16585         for cf_attribute in scanf printf unused noreturn
16586         do
16587
16588 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16589
16590                 cf_directive="__attribute__(($cf_attribute))"
16591                 echo "checking for $CC $cf_directive" 1>&5
16592
16593                 case $cf_attribute in
16594                 (printf)
16595                         cf_printf_attribute=yes
16596                         cat >conftest.h <<EOF
16597 #define GCC_$cf_ATTRIBUTE 1
16598 EOF
16599                         ;;
16600                 (scanf)
16601                         cf_scanf_attribute=yes
16602                         cat >conftest.h <<EOF
16603 #define GCC_$cf_ATTRIBUTE 1
16604 EOF
16605                         ;;
16606                 (*)
16607                         cat >conftest.h <<EOF
16608 #define GCC_$cf_ATTRIBUTE $cf_directive
16609 EOF
16610                         ;;
16611                 esac
16612
16613                 if { (eval echo "$as_me:16613: \"$ac_compile\"") >&5
16614   (eval $ac_compile) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit $ac_status); }; then
16618                         test -n "$verbose" && echo "$as_me:16618: result: ... $cf_attribute" >&5
16619 echo "${ECHO_T}... $cf_attribute" >&6
16620                         cat conftest.h >>confdefs.h
16621                         case $cf_attribute in
16622                         (noreturn)
16623
16624 cat >>confdefs.h <<EOF
16625 #define GCC_NORETURN $cf_directive
16626 EOF
16627
16628                                 ;;
16629                         (printf)
16630                                 cf_value='/* nothing */'
16631                                 if test "$cf_printf_attribute" != no ; then
16632                                         cf_value='__attribute__((format(printf,fmt,var)))'
16633
16634 cat >>confdefs.h <<\EOF
16635 #define GCC_PRINTF 1
16636 EOF
16637
16638                                 fi
16639
16640 cat >>confdefs.h <<EOF
16641 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16642 EOF
16643
16644                                 ;;
16645                         (scanf)
16646                                 cf_value='/* nothing */'
16647                                 if test "$cf_scanf_attribute" != no ; then
16648                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16649
16650 cat >>confdefs.h <<\EOF
16651 #define GCC_SCANF 1
16652 EOF
16653
16654                                 fi
16655
16656 cat >>confdefs.h <<EOF
16657 #define GCC_SCANFLIKE(fmt,var) $cf_value
16658 EOF
16659
16660                                 ;;
16661                         (unused)
16662
16663 cat >>confdefs.h <<EOF
16664 #define GCC_UNUSED $cf_directive
16665 EOF
16666
16667                                 ;;
16668                         esac
16669                 fi
16670         done
16671 else
16672         fgrep define conftest.i >>confdefs.h
16673 fi
16674 rm -rf conftest*
16675 fi
16676
16677 echo "$as_me:16677: checking if you want to work around bogus compiler/loader warnings" >&5
16678 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16679
16680 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16681 if test "${enable_string_hacks+set}" = set; then
16682   enableval="$enable_string_hacks"
16683   with_string_hacks=$enableval
16684 else
16685   with_string_hacks=no
16686 fi;
16687 echo "$as_me:16687: result: $with_string_hacks" >&5
16688 echo "${ECHO_T}$with_string_hacks" >&6
16689
16690 if test "x$with_string_hacks" = "xyes"; then
16691
16692 cat >>confdefs.h <<\EOF
16693 #define USE_STRING_HACKS 1
16694 EOF
16695
16696         { echo "$as_me:16696: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16697 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16698         echo "$as_me:16698: checking for strlcat" >&5
16699 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16700 if test "${ac_cv_func_strlcat+set}" = set; then
16701   echo $ECHO_N "(cached) $ECHO_C" >&6
16702 else
16703   cat >conftest.$ac_ext <<_ACEOF
16704 #line 16704 "configure"
16705 #include "confdefs.h"
16706 #define strlcat autoconf_temporary
16707 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16708 #undef strlcat
16709
16710 #ifdef __cplusplus
16711 extern "C"
16712 #endif
16713
16714 /* We use char because int might match the return type of a gcc2
16715    builtin and then its argument prototype would still apply.  */
16716 char strlcat (void);
16717
16718 int
16719 main (void)
16720 {
16721
16722 /* The GNU C library defines stubs for functions which it implements
16723     to always fail with ENOSYS.  Some functions are actually named
16724     something starting with __ and the normal name is an alias.  */
16725 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16726 #error found stub for strlcat
16727 #endif
16728
16729         return strlcat ();
16730   ;
16731   return 0;
16732 }
16733 _ACEOF
16734 rm -f conftest.$ac_objext conftest$ac_exeext
16735 if { (eval echo "$as_me:16735: \"$ac_link\"") >&5
16736   (eval $ac_link) 2>&5
16737   ac_status=$?
16738   echo "$as_me:16738: \$? = $ac_status" >&5
16739   (exit $ac_status); } &&
16740          { ac_try='test -s conftest$ac_exeext'
16741   { (eval echo "$as_me:16741: \"$ac_try\"") >&5
16742   (eval $ac_try) 2>&5
16743   ac_status=$?
16744   echo "$as_me:16744: \$? = $ac_status" >&5
16745   (exit $ac_status); }; }; then
16746   ac_cv_func_strlcat=yes
16747 else
16748   echo "$as_me: failed program was:" >&5
16749 cat conftest.$ac_ext >&5
16750 ac_cv_func_strlcat=no
16751 fi
16752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16753 fi
16754 echo "$as_me:16754: result: $ac_cv_func_strlcat" >&5
16755 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16756 if test $ac_cv_func_strlcat = yes; then
16757
16758 cat >>confdefs.h <<\EOF
16759 #define HAVE_STRLCAT 1
16760 EOF
16761
16762 else
16763
16764                 echo "$as_me:16764: checking for strlcat in -lbsd" >&5
16765 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16766 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16767   echo $ECHO_N "(cached) $ECHO_C" >&6
16768 else
16769   ac_check_lib_save_LIBS=$LIBS
16770 LIBS="-lbsd  $LIBS"
16771 cat >conftest.$ac_ext <<_ACEOF
16772 #line 16772 "configure"
16773 #include "confdefs.h"
16774
16775 /* Override any gcc2 internal prototype to avoid an error.  */
16776 #ifdef __cplusplus
16777 extern "C"
16778 #endif
16779 /* We use char because int might match the return type of a gcc2
16780    builtin and then its argument prototype would still apply.  */
16781 char strlcat ();
16782 int
16783 main (void)
16784 {
16785 strlcat ();
16786   ;
16787   return 0;
16788 }
16789 _ACEOF
16790 rm -f conftest.$ac_objext conftest$ac_exeext
16791 if { (eval echo "$as_me:16791: \"$ac_link\"") >&5
16792   (eval $ac_link) 2>&5
16793   ac_status=$?
16794   echo "$as_me:16794: \$? = $ac_status" >&5
16795   (exit $ac_status); } &&
16796          { ac_try='test -s conftest$ac_exeext'
16797   { (eval echo "$as_me:16797: \"$ac_try\"") >&5
16798   (eval $ac_try) 2>&5
16799   ac_status=$?
16800   echo "$as_me:16800: \$? = $ac_status" >&5
16801   (exit $ac_status); }; }; then
16802   ac_cv_lib_bsd_strlcat=yes
16803 else
16804   echo "$as_me: failed program was:" >&5
16805 cat conftest.$ac_ext >&5
16806 ac_cv_lib_bsd_strlcat=no
16807 fi
16808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16809 LIBS=$ac_check_lib_save_LIBS
16810 fi
16811 echo "$as_me:16811: result: $ac_cv_lib_bsd_strlcat" >&5
16812 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16813 if test $ac_cv_lib_bsd_strlcat = yes; then
16814
16815 cf_add_libs="$LIBS"
16816 # reverse order
16817 cf_add_0lib=
16818 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16819 # filter duplicates
16820 for cf_add_1lib in $cf_add_0lib; do
16821         for cf_add_2lib in $cf_add_libs; do
16822                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16823                         cf_add_1lib=
16824                         break
16825                 fi
16826         done
16827         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16828 done
16829 LIBS="$cf_add_libs"
16830
16831 for ac_header in bsd/string.h
16832 do
16833 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16834 echo "$as_me:16834: checking for $ac_header" >&5
16835 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16836 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16837   echo $ECHO_N "(cached) $ECHO_C" >&6
16838 else
16839   cat >conftest.$ac_ext <<_ACEOF
16840 #line 16840 "configure"
16841 #include "confdefs.h"
16842 #include <$ac_header>
16843 _ACEOF
16844 if { (eval echo "$as_me:16844: \"$ac_cpp conftest.$ac_ext\"") >&5
16845   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16846   ac_status=$?
16847   egrep -v '^ *\+' conftest.er1 >conftest.err
16848   rm -f conftest.er1
16849   cat conftest.err >&5
16850   echo "$as_me:16850: \$? = $ac_status" >&5
16851   (exit $ac_status); } >/dev/null; then
16852   if test -s conftest.err; then
16853     ac_cpp_err=$ac_c_preproc_warn_flag
16854   else
16855     ac_cpp_err=
16856   fi
16857 else
16858   ac_cpp_err=yes
16859 fi
16860 if test -z "$ac_cpp_err"; then
16861   eval "$as_ac_Header=yes"
16862 else
16863   echo "$as_me: failed program was:" >&5
16864   cat conftest.$ac_ext >&5
16865   eval "$as_ac_Header=no"
16866 fi
16867 rm -f conftest.err conftest.$ac_ext
16868 fi
16869 echo "$as_me:16869: result: `eval echo '${'$as_ac_Header'}'`" >&5
16870 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16872   cat >>confdefs.h <<EOF
16873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16874 EOF
16875
16876 fi
16877 done
16878
16879 cat >>confdefs.h <<\EOF
16880 #define HAVE_STRLCAT 1
16881 EOF
16882
16883 fi
16884
16885 fi
16886
16887 for ac_func in strlcpy snprintf
16888 do
16889 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16890 echo "$as_me:16890: checking for $ac_func" >&5
16891 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16892 if eval "test \"\${$as_ac_var+set}\" = set"; then
16893   echo $ECHO_N "(cached) $ECHO_C" >&6
16894 else
16895   cat >conftest.$ac_ext <<_ACEOF
16896 #line 16896 "configure"
16897 #include "confdefs.h"
16898 #define $ac_func autoconf_temporary
16899 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16900 #undef $ac_func
16901
16902 #ifdef __cplusplus
16903 extern "C"
16904 #endif
16905
16906 /* We use char because int might match the return type of a gcc2
16907    builtin and then its argument prototype would still apply.  */
16908 char $ac_func (void);
16909
16910 int
16911 main (void)
16912 {
16913
16914 /* The GNU C library defines stubs for functions which it implements
16915     to always fail with ENOSYS.  Some functions are actually named
16916     something starting with __ and the normal name is an alias.  */
16917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16918 #error found stub for $ac_func
16919 #endif
16920
16921         return $ac_func ();
16922   ;
16923   return 0;
16924 }
16925 _ACEOF
16926 rm -f conftest.$ac_objext conftest$ac_exeext
16927 if { (eval echo "$as_me:16927: \"$ac_link\"") >&5
16928   (eval $ac_link) 2>&5
16929   ac_status=$?
16930   echo "$as_me:16930: \$? = $ac_status" >&5
16931   (exit $ac_status); } &&
16932          { ac_try='test -s conftest$ac_exeext'
16933   { (eval echo "$as_me:16933: \"$ac_try\"") >&5
16934   (eval $ac_try) 2>&5
16935   ac_status=$?
16936   echo "$as_me:16936: \$? = $ac_status" >&5
16937   (exit $ac_status); }; }; then
16938   eval "$as_ac_var=yes"
16939 else
16940   echo "$as_me: failed program was:" >&5
16941 cat conftest.$ac_ext >&5
16942 eval "$as_ac_var=no"
16943 fi
16944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16945 fi
16946 echo "$as_me:16946: result: `eval echo '${'$as_ac_var'}'`" >&5
16947 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16948 if test `eval echo '${'$as_ac_var'}'` = yes; then
16949   cat >>confdefs.h <<EOF
16950 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16951 EOF
16952
16953 fi
16954 done
16955
16956 fi
16957
16958 ###     use option --enable-assertions to turn on generation of assertion code
16959 echo "$as_me:16959: checking if you want to enable runtime assertions" >&5
16960 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16961
16962 # Check whether --enable-assertions or --disable-assertions was given.
16963 if test "${enable_assertions+set}" = set; then
16964   enableval="$enable_assertions"
16965   with_assertions=$enableval
16966 else
16967   with_assertions=no
16968 fi;
16969 echo "$as_me:16969: result: $with_assertions" >&5
16970 echo "${ECHO_T}$with_assertions" >&6
16971 if test -n "$GCC"
16972 then
16973         if test "$with_assertions" = no
16974         then
16975                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16976         else
16977
16978         ADAFLAGS="$ADAFLAGS -gnata"
16979
16980         fi
16981 fi
16982
16983 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16984
16985 echo "$as_me:16985: checking if you want to use dmalloc for testing" >&5
16986 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16987
16988 # Check whether --with-dmalloc or --without-dmalloc was given.
16989 if test "${with_dmalloc+set}" = set; then
16990   withval="$with_dmalloc"
16991
16992 cat >>confdefs.h <<EOF
16993 #define USE_DMALLOC 1
16994 EOF
16995
16996         : ${with_cflags:=-g}
16997         : ${with_no_leaks:=yes}
16998          with_dmalloc=yes
16999 else
17000   with_dmalloc=
17001 fi;
17002 echo "$as_me:17002: result: ${with_dmalloc:-no}" >&5
17003 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17004
17005 case .$with_cflags in
17006 (.*-g*)
17007         case .$CFLAGS in
17008         (.*-g*)
17009                 ;;
17010         (*)
17011
17012 cf_fix_cppflags=no
17013 cf_new_cflags=
17014 cf_new_cppflags=
17015 cf_new_extra_cppflags=
17016
17017 for cf_add_cflags in -g
17018 do
17019 case $cf_fix_cppflags in
17020 (no)
17021         case $cf_add_cflags in
17022         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17023                 case $cf_add_cflags in
17024                 (-D*)
17025                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17026
17027                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17028                                 && test -z "${cf_tst_cflags}" \
17029                                 && cf_fix_cppflags=yes
17030
17031                         if test $cf_fix_cppflags = yes ; then
17032
17033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17035
17036                                 continue
17037                         elif test "${cf_tst_cflags}" = "\"'" ; then
17038
17039         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17040         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17041
17042                                 continue
17043                         fi
17044                         ;;
17045                 esac
17046                 case "$CPPFLAGS" in
17047                 (*$cf_add_cflags)
17048                         ;;
17049                 (*)
17050                         case $cf_add_cflags in
17051                         (-D*)
17052                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17053
17054 CPPFLAGS=`echo "$CPPFLAGS" | \
17055         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17056                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17057
17058                                 ;;
17059                         esac
17060
17061         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17062         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17063
17064                         ;;
17065                 esac
17066                 ;;
17067         (*)
17068
17069         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17070         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17071
17072                 ;;
17073         esac
17074         ;;
17075 (yes)
17076
17077         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17078         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17079
17080         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17081
17082         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17083                 && test -z "${cf_tst_cflags}" \
17084                 && cf_fix_cppflags=no
17085         ;;
17086 esac
17087 done
17088
17089 if test -n "$cf_new_cflags" ; then
17090
17091         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17092         CFLAGS="${CFLAGS}$cf_new_cflags"
17093
17094 fi
17095
17096 if test -n "$cf_new_cppflags" ; then
17097
17098         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17099         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17100
17101 fi
17102
17103 if test -n "$cf_new_extra_cppflags" ; then
17104
17105         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17106         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17107
17108 fi
17109
17110                 ;;
17111         esac
17112         ;;
17113 esac
17114
17115 if test "$with_dmalloc" = yes ; then
17116         echo "$as_me:17116: checking for dmalloc.h" >&5
17117 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17118 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17119   echo $ECHO_N "(cached) $ECHO_C" >&6
17120 else
17121   cat >conftest.$ac_ext <<_ACEOF
17122 #line 17122 "configure"
17123 #include "confdefs.h"
17124 #include <dmalloc.h>
17125 _ACEOF
17126 if { (eval echo "$as_me:17126: \"$ac_cpp conftest.$ac_ext\"") >&5
17127   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17128   ac_status=$?
17129   egrep -v '^ *\+' conftest.er1 >conftest.err
17130   rm -f conftest.er1
17131   cat conftest.err >&5
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit $ac_status); } >/dev/null; then
17134   if test -s conftest.err; then
17135     ac_cpp_err=$ac_c_preproc_warn_flag
17136   else
17137     ac_cpp_err=
17138   fi
17139 else
17140   ac_cpp_err=yes
17141 fi
17142 if test -z "$ac_cpp_err"; then
17143   ac_cv_header_dmalloc_h=yes
17144 else
17145   echo "$as_me: failed program was:" >&5
17146   cat conftest.$ac_ext >&5
17147   ac_cv_header_dmalloc_h=no
17148 fi
17149 rm -f conftest.err conftest.$ac_ext
17150 fi
17151 echo "$as_me:17151: result: $ac_cv_header_dmalloc_h" >&5
17152 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17153 if test $ac_cv_header_dmalloc_h = yes; then
17154
17155 echo "$as_me:17155: checking for dmalloc_debug in -ldmalloc" >&5
17156 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17157 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17158   echo $ECHO_N "(cached) $ECHO_C" >&6
17159 else
17160   ac_check_lib_save_LIBS=$LIBS
17161 LIBS="-ldmalloc  $LIBS"
17162 cat >conftest.$ac_ext <<_ACEOF
17163 #line 17163 "configure"
17164 #include "confdefs.h"
17165
17166 /* Override any gcc2 internal prototype to avoid an error.  */
17167 #ifdef __cplusplus
17168 extern "C"
17169 #endif
17170 /* We use char because int might match the return type of a gcc2
17171    builtin and then its argument prototype would still apply.  */
17172 char dmalloc_debug ();
17173 int
17174 main (void)
17175 {
17176 dmalloc_debug ();
17177   ;
17178   return 0;
17179 }
17180 _ACEOF
17181 rm -f conftest.$ac_objext conftest$ac_exeext
17182 if { (eval echo "$as_me:17182: \"$ac_link\"") >&5
17183   (eval $ac_link) 2>&5
17184   ac_status=$?
17185   echo "$as_me:17185: \$? = $ac_status" >&5
17186   (exit $ac_status); } &&
17187          { ac_try='test -s conftest$ac_exeext'
17188   { (eval echo "$as_me:17188: \"$ac_try\"") >&5
17189   (eval $ac_try) 2>&5
17190   ac_status=$?
17191   echo "$as_me:17191: \$? = $ac_status" >&5
17192   (exit $ac_status); }; }; then
17193   ac_cv_lib_dmalloc_dmalloc_debug=yes
17194 else
17195   echo "$as_me: failed program was:" >&5
17196 cat conftest.$ac_ext >&5
17197 ac_cv_lib_dmalloc_dmalloc_debug=no
17198 fi
17199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17200 LIBS=$ac_check_lib_save_LIBS
17201 fi
17202 echo "$as_me:17202: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17203 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17204 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17205   cat >>confdefs.h <<EOF
17206 #define HAVE_LIBDMALLOC 1
17207 EOF
17208
17209   LIBS="-ldmalloc $LIBS"
17210
17211 fi
17212
17213 fi
17214
17215 fi
17216
17217 echo "$as_me:17217: checking if you want to use dbmalloc for testing" >&5
17218 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17219
17220 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17221 if test "${with_dbmalloc+set}" = set; then
17222   withval="$with_dbmalloc"
17223
17224 cat >>confdefs.h <<EOF
17225 #define USE_DBMALLOC 1
17226 EOF
17227
17228         : ${with_cflags:=-g}
17229         : ${with_no_leaks:=yes}
17230          with_dbmalloc=yes
17231 else
17232   with_dbmalloc=
17233 fi;
17234 echo "$as_me:17234: result: ${with_dbmalloc:-no}" >&5
17235 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17236
17237 case .$with_cflags in
17238 (.*-g*)
17239         case .$CFLAGS in
17240         (.*-g*)
17241                 ;;
17242         (*)
17243
17244 cf_fix_cppflags=no
17245 cf_new_cflags=
17246 cf_new_cppflags=
17247 cf_new_extra_cppflags=
17248
17249 for cf_add_cflags in -g
17250 do
17251 case $cf_fix_cppflags in
17252 (no)
17253         case $cf_add_cflags in
17254         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17255                 case $cf_add_cflags in
17256                 (-D*)
17257                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17258
17259                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17260                                 && test -z "${cf_tst_cflags}" \
17261                                 && cf_fix_cppflags=yes
17262
17263                         if test $cf_fix_cppflags = yes ; then
17264
17265         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17266         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17267
17268                                 continue
17269                         elif test "${cf_tst_cflags}" = "\"'" ; then
17270
17271         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17272         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17273
17274                                 continue
17275                         fi
17276                         ;;
17277                 esac
17278                 case "$CPPFLAGS" in
17279                 (*$cf_add_cflags)
17280                         ;;
17281                 (*)
17282                         case $cf_add_cflags in
17283                         (-D*)
17284                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17285
17286 CPPFLAGS=`echo "$CPPFLAGS" | \
17287         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17288                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17289
17290                                 ;;
17291                         esac
17292
17293         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17294         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17295
17296                         ;;
17297                 esac
17298                 ;;
17299         (*)
17300
17301         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17302         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17303
17304                 ;;
17305         esac
17306         ;;
17307 (yes)
17308
17309         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17310         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17311
17312         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17313
17314         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17315                 && test -z "${cf_tst_cflags}" \
17316                 && cf_fix_cppflags=no
17317         ;;
17318 esac
17319 done
17320
17321 if test -n "$cf_new_cflags" ; then
17322
17323         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17324         CFLAGS="${CFLAGS}$cf_new_cflags"
17325
17326 fi
17327
17328 if test -n "$cf_new_cppflags" ; then
17329
17330         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17331         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17332
17333 fi
17334
17335 if test -n "$cf_new_extra_cppflags" ; then
17336
17337         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17338         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17339
17340 fi
17341
17342                 ;;
17343         esac
17344         ;;
17345 esac
17346
17347 if test "$with_dbmalloc" = yes ; then
17348         echo "$as_me:17348: checking for dbmalloc.h" >&5
17349 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17350 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17351   echo $ECHO_N "(cached) $ECHO_C" >&6
17352 else
17353   cat >conftest.$ac_ext <<_ACEOF
17354 #line 17354 "configure"
17355 #include "confdefs.h"
17356 #include <dbmalloc.h>
17357 _ACEOF
17358 if { (eval echo "$as_me:17358: \"$ac_cpp conftest.$ac_ext\"") >&5
17359   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17360   ac_status=$?
17361   egrep -v '^ *\+' conftest.er1 >conftest.err
17362   rm -f conftest.er1
17363   cat conftest.err >&5
17364   echo "$as_me:17364: \$? = $ac_status" >&5
17365   (exit $ac_status); } >/dev/null; then
17366   if test -s conftest.err; then
17367     ac_cpp_err=$ac_c_preproc_warn_flag
17368   else
17369     ac_cpp_err=
17370   fi
17371 else
17372   ac_cpp_err=yes
17373 fi
17374 if test -z "$ac_cpp_err"; then
17375   ac_cv_header_dbmalloc_h=yes
17376 else
17377   echo "$as_me: failed program was:" >&5
17378   cat conftest.$ac_ext >&5
17379   ac_cv_header_dbmalloc_h=no
17380 fi
17381 rm -f conftest.err conftest.$ac_ext
17382 fi
17383 echo "$as_me:17383: result: $ac_cv_header_dbmalloc_h" >&5
17384 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17385 if test $ac_cv_header_dbmalloc_h = yes; then
17386
17387 echo "$as_me:17387: checking for debug_malloc in -ldbmalloc" >&5
17388 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17389 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17390   echo $ECHO_N "(cached) $ECHO_C" >&6
17391 else
17392   ac_check_lib_save_LIBS=$LIBS
17393 LIBS="-ldbmalloc  $LIBS"
17394 cat >conftest.$ac_ext <<_ACEOF
17395 #line 17395 "configure"
17396 #include "confdefs.h"
17397
17398 /* Override any gcc2 internal prototype to avoid an error.  */
17399 #ifdef __cplusplus
17400 extern "C"
17401 #endif
17402 /* We use char because int might match the return type of a gcc2
17403    builtin and then its argument prototype would still apply.  */
17404 char debug_malloc ();
17405 int
17406 main (void)
17407 {
17408 debug_malloc ();
17409   ;
17410   return 0;
17411 }
17412 _ACEOF
17413 rm -f conftest.$ac_objext conftest$ac_exeext
17414 if { (eval echo "$as_me:17414: \"$ac_link\"") >&5
17415   (eval $ac_link) 2>&5
17416   ac_status=$?
17417   echo "$as_me:17417: \$? = $ac_status" >&5
17418   (exit $ac_status); } &&
17419          { ac_try='test -s conftest$ac_exeext'
17420   { (eval echo "$as_me:17420: \"$ac_try\"") >&5
17421   (eval $ac_try) 2>&5
17422   ac_status=$?
17423   echo "$as_me:17423: \$? = $ac_status" >&5
17424   (exit $ac_status); }; }; then
17425   ac_cv_lib_dbmalloc_debug_malloc=yes
17426 else
17427   echo "$as_me: failed program was:" >&5
17428 cat conftest.$ac_ext >&5
17429 ac_cv_lib_dbmalloc_debug_malloc=no
17430 fi
17431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17432 LIBS=$ac_check_lib_save_LIBS
17433 fi
17434 echo "$as_me:17434: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17435 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17436 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17437   cat >>confdefs.h <<EOF
17438 #define HAVE_LIBDBMALLOC 1
17439 EOF
17440
17441   LIBS="-ldbmalloc $LIBS"
17442
17443 fi
17444
17445 fi
17446
17447 fi
17448
17449 echo "$as_me:17449: checking if you want to use valgrind for testing" >&5
17450 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17451
17452 # Check whether --with-valgrind or --without-valgrind was given.
17453 if test "${with_valgrind+set}" = set; then
17454   withval="$with_valgrind"
17455
17456 cat >>confdefs.h <<EOF
17457 #define USE_VALGRIND 1
17458 EOF
17459
17460         : ${with_cflags:=-g}
17461         : ${with_no_leaks:=yes}
17462          with_valgrind=yes
17463 else
17464   with_valgrind=
17465 fi;
17466 echo "$as_me:17466: result: ${with_valgrind:-no}" >&5
17467 echo "${ECHO_T}${with_valgrind:-no}" >&6
17468
17469 case .$with_cflags in
17470 (.*-g*)
17471         case .$CFLAGS in
17472         (.*-g*)
17473                 ;;
17474         (*)
17475
17476 cf_fix_cppflags=no
17477 cf_new_cflags=
17478 cf_new_cppflags=
17479 cf_new_extra_cppflags=
17480
17481 for cf_add_cflags in -g
17482 do
17483 case $cf_fix_cppflags in
17484 (no)
17485         case $cf_add_cflags in
17486         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17487                 case $cf_add_cflags in
17488                 (-D*)
17489                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17490
17491                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17492                                 && test -z "${cf_tst_cflags}" \
17493                                 && cf_fix_cppflags=yes
17494
17495                         if test $cf_fix_cppflags = yes ; then
17496
17497         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17498         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17499
17500                                 continue
17501                         elif test "${cf_tst_cflags}" = "\"'" ; then
17502
17503         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17504         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17505
17506                                 continue
17507                         fi
17508                         ;;
17509                 esac
17510                 case "$CPPFLAGS" in
17511                 (*$cf_add_cflags)
17512                         ;;
17513                 (*)
17514                         case $cf_add_cflags in
17515                         (-D*)
17516                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17517
17518 CPPFLAGS=`echo "$CPPFLAGS" | \
17519         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17520                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17521
17522                                 ;;
17523                         esac
17524
17525         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17526         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17527
17528                         ;;
17529                 esac
17530                 ;;
17531         (*)
17532
17533         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17534         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17535
17536                 ;;
17537         esac
17538         ;;
17539 (yes)
17540
17541         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17542         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17543
17544         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17545
17546         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17547                 && test -z "${cf_tst_cflags}" \
17548                 && cf_fix_cppflags=no
17549         ;;
17550 esac
17551 done
17552
17553 if test -n "$cf_new_cflags" ; then
17554
17555         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17556         CFLAGS="${CFLAGS}$cf_new_cflags"
17557
17558 fi
17559
17560 if test -n "$cf_new_cppflags" ; then
17561
17562         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17563         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17564
17565 fi
17566
17567 if test -n "$cf_new_extra_cppflags" ; then
17568
17569         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17570         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17571
17572 fi
17573
17574                 ;;
17575         esac
17576         ;;
17577 esac
17578
17579 echo "$as_me:17579: checking if you want to perform memory-leak testing" >&5
17580 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17581
17582 # Check whether --enable-leaks or --disable-leaks was given.
17583 if test "${enable_leaks+set}" = set; then
17584   enableval="$enable_leaks"
17585   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17586 else
17587   : ${with_no_leaks:=no}
17588 fi;
17589 echo "$as_me:17589: result: $with_no_leaks" >&5
17590 echo "${ECHO_T}$with_no_leaks" >&6
17591
17592 if test "$with_no_leaks" = yes ; then
17593
17594 cat >>confdefs.h <<\EOF
17595 #define NO_LEAKS 1
17596 EOF
17597
17598 cat >>confdefs.h <<\EOF
17599 #define YY_NO_LEAKS 1
17600 EOF
17601
17602 fi
17603
17604 cat >>confdefs.h <<\EOF
17605 #define HAVE_NC_ALLOC_H 1
17606 EOF
17607
17608 ###     use option --enable-expanded to generate certain macros as functions
17609
17610 # Check whether --enable-expanded or --disable-expanded was given.
17611 if test "${enable_expanded+set}" = set; then
17612   enableval="$enable_expanded"
17613   test "x$enableval" = xyes &&
17614 cat >>confdefs.h <<\EOF
17615 #define NCURSES_EXPANDED 1
17616 EOF
17617
17618 fi;
17619
17620 ###     use option --disable-macros to suppress macros in favor of functions
17621
17622 # Check whether --enable-macros or --disable-macros was given.
17623 if test "${enable_macros+set}" = set; then
17624   enableval="$enable_macros"
17625   test "$enableval" = no &&
17626 cat >>confdefs.h <<\EOF
17627 #define NCURSES_NOMACROS 1
17628 EOF
17629
17630 fi;
17631
17632 # Normally we only add trace() to the debug-library.  Allow this to be
17633 # extended to all models of the ncurses library:
17634 cf_all_traces=no
17635 case "$CFLAGS $CPPFLAGS" in
17636 (*-DTRACE*)
17637         cf_all_traces=yes
17638         ;;
17639 esac
17640
17641 echo "$as_me:17641: checking whether to add trace feature to all models" >&5
17642 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17643
17644 # Check whether --with-trace or --without-trace was given.
17645 if test "${with_trace+set}" = set; then
17646   withval="$with_trace"
17647   cf_with_trace=$withval
17648 else
17649   cf_with_trace=$cf_all_traces
17650 fi;
17651 echo "$as_me:17651: result: $cf_with_trace" >&5
17652 echo "${ECHO_T}$cf_with_trace" >&6
17653
17654 if test "x$cf_with_trace" = xyes ; then
17655         LIB_TRACING=all
17656         ADA_TRACE=TRUE
17657
17658 cf_fix_cppflags=no
17659 cf_new_cflags=
17660 cf_new_cppflags=
17661 cf_new_extra_cppflags=
17662
17663 for cf_add_cflags in -DTRACE
17664 do
17665 case $cf_fix_cppflags in
17666 (no)
17667         case $cf_add_cflags in
17668         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17669                 case $cf_add_cflags in
17670                 (-D*)
17671                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17672
17673                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17674                                 && test -z "${cf_tst_cflags}" \
17675                                 && cf_fix_cppflags=yes
17676
17677                         if test $cf_fix_cppflags = yes ; then
17678
17679         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17680         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17681
17682                                 continue
17683                         elif test "${cf_tst_cflags}" = "\"'" ; then
17684
17685         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17686         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17687
17688                                 continue
17689                         fi
17690                         ;;
17691                 esac
17692                 case "$CPPFLAGS" in
17693                 (*$cf_add_cflags)
17694                         ;;
17695                 (*)
17696                         case $cf_add_cflags in
17697                         (-D*)
17698                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17699
17700 CPPFLAGS=`echo "$CPPFLAGS" | \
17701         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17702                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17703
17704                                 ;;
17705                         esac
17706
17707         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17708         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17709
17710                         ;;
17711                 esac
17712                 ;;
17713         (*)
17714
17715         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17716         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17717
17718                 ;;
17719         esac
17720         ;;
17721 (yes)
17722
17723         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17724         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17725
17726         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17727
17728         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17729                 && test -z "${cf_tst_cflags}" \
17730                 && cf_fix_cppflags=no
17731         ;;
17732 esac
17733 done
17734
17735 if test -n "$cf_new_cflags" ; then
17736
17737         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17738         CFLAGS="${CFLAGS}$cf_new_cflags"
17739
17740 fi
17741
17742 if test -n "$cf_new_cppflags" ; then
17743
17744         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17745         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17746
17747 fi
17748
17749 if test -n "$cf_new_extra_cppflags" ; then
17750
17751         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17752         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17753
17754 fi
17755
17756 cat >>confdefs.h <<\EOF
17757 #define HAVE__TRACEF 1
17758 EOF
17759
17760 else
17761         LIB_TRACING=DEBUG
17762         ADA_TRACE=FALSE
17763 fi
17764
17765 echo "$as_me:17765: checking if we want to use GNAT projects" >&5
17766 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17767
17768 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17769 if test "${enable_gnat_projects+set}" = set; then
17770   enableval="$enable_gnat_projects"
17771   test "$enableval" != no && enableval=yes
17772         if test "$enableval" != "yes" ; then
17773     enable_gnat_projects=no
17774         else
17775                 enable_gnat_projects=yes
17776         fi
17777 else
17778   enableval=yes
17779         enable_gnat_projects=yes
17780
17781 fi;
17782 echo "$as_me:17782: result: $enable_gnat_projects" >&5
17783 echo "${ECHO_T}$enable_gnat_projects" >&6
17784
17785 ###     Checks for libraries.
17786 case $cf_cv_system_name in
17787 (*mingw32*|*mingw64*)
17788         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17789         # Note: WINVER may be a problem with Windows 10
17790         ;;
17791 (*)
17792 echo "$as_me:17792: checking for gettimeofday" >&5
17793 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17794 if test "${ac_cv_func_gettimeofday+set}" = set; then
17795   echo $ECHO_N "(cached) $ECHO_C" >&6
17796 else
17797   cat >conftest.$ac_ext <<_ACEOF
17798 #line 17798 "configure"
17799 #include "confdefs.h"
17800 #define gettimeofday autoconf_temporary
17801 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17802 #undef gettimeofday
17803
17804 #ifdef __cplusplus
17805 extern "C"
17806 #endif
17807
17808 /* We use char because int might match the return type of a gcc2
17809    builtin and then its argument prototype would still apply.  */
17810 char gettimeofday (void);
17811
17812 int
17813 main (void)
17814 {
17815
17816 /* The GNU C library defines stubs for functions which it implements
17817     to always fail with ENOSYS.  Some functions are actually named
17818     something starting with __ and the normal name is an alias.  */
17819 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17820 #error found stub for gettimeofday
17821 #endif
17822
17823         return gettimeofday ();
17824   ;
17825   return 0;
17826 }
17827 _ACEOF
17828 rm -f conftest.$ac_objext conftest$ac_exeext
17829 if { (eval echo "$as_me:17829: \"$ac_link\"") >&5
17830   (eval $ac_link) 2>&5
17831   ac_status=$?
17832   echo "$as_me:17832: \$? = $ac_status" >&5
17833   (exit $ac_status); } &&
17834          { ac_try='test -s conftest$ac_exeext'
17835   { (eval echo "$as_me:17835: \"$ac_try\"") >&5
17836   (eval $ac_try) 2>&5
17837   ac_status=$?
17838   echo "$as_me:17838: \$? = $ac_status" >&5
17839   (exit $ac_status); }; }; then
17840   ac_cv_func_gettimeofday=yes
17841 else
17842   echo "$as_me: failed program was:" >&5
17843 cat conftest.$ac_ext >&5
17844 ac_cv_func_gettimeofday=no
17845 fi
17846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17847 fi
17848 echo "$as_me:17848: result: $ac_cv_func_gettimeofday" >&5
17849 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17850 if test $ac_cv_func_gettimeofday = yes; then
17851
17852 cat >>confdefs.h <<\EOF
17853 #define HAVE_GETTIMEOFDAY 1
17854 EOF
17855
17856 else
17857
17858 echo "$as_me:17858: checking for gettimeofday in -lbsd" >&5
17859 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17860 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17861   echo $ECHO_N "(cached) $ECHO_C" >&6
17862 else
17863   ac_check_lib_save_LIBS=$LIBS
17864 LIBS="-lbsd  $LIBS"
17865 cat >conftest.$ac_ext <<_ACEOF
17866 #line 17866 "configure"
17867 #include "confdefs.h"
17868
17869 /* Override any gcc2 internal prototype to avoid an error.  */
17870 #ifdef __cplusplus
17871 extern "C"
17872 #endif
17873 /* We use char because int might match the return type of a gcc2
17874    builtin and then its argument prototype would still apply.  */
17875 char gettimeofday ();
17876 int
17877 main (void)
17878 {
17879 gettimeofday ();
17880   ;
17881   return 0;
17882 }
17883 _ACEOF
17884 rm -f conftest.$ac_objext conftest$ac_exeext
17885 if { (eval echo "$as_me:17885: \"$ac_link\"") >&5
17886   (eval $ac_link) 2>&5
17887   ac_status=$?
17888   echo "$as_me:17888: \$? = $ac_status" >&5
17889   (exit $ac_status); } &&
17890          { ac_try='test -s conftest$ac_exeext'
17891   { (eval echo "$as_me:17891: \"$ac_try\"") >&5
17892   (eval $ac_try) 2>&5
17893   ac_status=$?
17894   echo "$as_me:17894: \$? = $ac_status" >&5
17895   (exit $ac_status); }; }; then
17896   ac_cv_lib_bsd_gettimeofday=yes
17897 else
17898   echo "$as_me: failed program was:" >&5
17899 cat conftest.$ac_ext >&5
17900 ac_cv_lib_bsd_gettimeofday=no
17901 fi
17902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17903 LIBS=$ac_check_lib_save_LIBS
17904 fi
17905 echo "$as_me:17905: result: $ac_cv_lib_bsd_gettimeofday" >&5
17906 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17907 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17908
17909 cat >>confdefs.h <<\EOF
17910 #define HAVE_GETTIMEOFDAY 1
17911 EOF
17912
17913 cf_add_libs="$LIBS"
17914 # reverse order
17915 cf_add_0lib=
17916 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17917 # filter duplicates
17918 for cf_add_1lib in $cf_add_0lib; do
17919         for cf_add_2lib in $cf_add_libs; do
17920                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17921                         cf_add_1lib=
17922                         break
17923                 fi
17924         done
17925         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17926 done
17927 LIBS="$cf_add_libs"
17928
17929 fi
17930
17931 fi
17932         ;;
17933 esac
17934
17935 echo "$as_me:17935: checking if -lm needed for math functions" >&5
17936 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17937 if test "${cf_cv_need_libm+set}" = set; then
17938   echo $ECHO_N "(cached) $ECHO_C" >&6
17939 else
17940
17941         cat >conftest.$ac_ext <<_ACEOF
17942 #line 17942 "configure"
17943 #include "confdefs.h"
17944
17945         #include <stdio.h>
17946         #include <stdlib.h>
17947         #include <math.h>
17948
17949 int
17950 main (void)
17951 {
17952 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17953   ;
17954   return 0;
17955 }
17956 _ACEOF
17957 rm -f conftest.$ac_objext conftest$ac_exeext
17958 if { (eval echo "$as_me:17958: \"$ac_link\"") >&5
17959   (eval $ac_link) 2>&5
17960   ac_status=$?
17961   echo "$as_me:17961: \$? = $ac_status" >&5
17962   (exit $ac_status); } &&
17963          { ac_try='test -s conftest$ac_exeext'
17964   { (eval echo "$as_me:17964: \"$ac_try\"") >&5
17965   (eval $ac_try) 2>&5
17966   ac_status=$?
17967   echo "$as_me:17967: \$? = $ac_status" >&5
17968   (exit $ac_status); }; }; then
17969   cf_cv_need_libm=no
17970 else
17971   echo "$as_me: failed program was:" >&5
17972 cat conftest.$ac_ext >&5
17973 cf_cv_need_libm=yes
17974 fi
17975 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17976 fi
17977 echo "$as_me:17977: result: $cf_cv_need_libm" >&5
17978 echo "${ECHO_T}$cf_cv_need_libm" >&6
17979 if test "$cf_cv_need_libm" = yes
17980 then
17981 MATH_LIB=-lm
17982 fi
17983
17984 ###     Checks for header files.
17985 echo "$as_me:17985: checking for ANSI C header files" >&5
17986 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17987 if test "${ac_cv_header_stdc+set}" = set; then
17988   echo $ECHO_N "(cached) $ECHO_C" >&6
17989 else
17990   cat >conftest.$ac_ext <<_ACEOF
17991 #line 17991 "configure"
17992 #include "confdefs.h"
17993 #include <stdlib.h>
17994 #include <stdarg.h>
17995 #include <string.h>
17996 #include <float.h>
17997
17998 _ACEOF
17999 if { (eval echo "$as_me:17999: \"$ac_cpp conftest.$ac_ext\"") >&5
18000   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18001   ac_status=$?
18002   egrep -v '^ *\+' conftest.er1 >conftest.err
18003   rm -f conftest.er1
18004   cat conftest.err >&5
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); } >/dev/null; then
18007   if test -s conftest.err; then
18008     ac_cpp_err=$ac_c_preproc_warn_flag
18009   else
18010     ac_cpp_err=
18011   fi
18012 else
18013   ac_cpp_err=yes
18014 fi
18015 if test -z "$ac_cpp_err"; then
18016   ac_cv_header_stdc=yes
18017 else
18018   echo "$as_me: failed program was:" >&5
18019   cat conftest.$ac_ext >&5
18020   ac_cv_header_stdc=no
18021 fi
18022 rm -f conftest.err conftest.$ac_ext
18023
18024 if test $ac_cv_header_stdc = yes; then
18025   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18026   cat >conftest.$ac_ext <<_ACEOF
18027 #line 18027 "configure"
18028 #include "confdefs.h"
18029 #include <string.h>
18030
18031 _ACEOF
18032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18033   egrep "memchr" >/dev/null 2>&1; then
18034   :
18035 else
18036   ac_cv_header_stdc=no
18037 fi
18038 rm -rf conftest*
18039
18040 fi
18041
18042 if test $ac_cv_header_stdc = yes; then
18043   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18044   cat >conftest.$ac_ext <<_ACEOF
18045 #line 18045 "configure"
18046 #include "confdefs.h"
18047 #include <stdlib.h>
18048
18049 _ACEOF
18050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18051   egrep "free" >/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   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18062   if test "$cross_compiling" = yes; then
18063   :
18064 else
18065   cat >conftest.$ac_ext <<_ACEOF
18066 #line 18066 "configure"
18067 #include "confdefs.h"
18068 #include <ctype.h>
18069 #if ((' ' & 0x0FF) == 0x020)
18070 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18071 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18072 #else
18073 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18074                      || ('j' <= (c) && (c) <= 'r') \
18075                      || ('s' <= (c) && (c) <= 'z'))
18076 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18077 #endif
18078
18079 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18080 int
18081 main (void)
18082 {
18083   int i;
18084   for (i = 0; i < 256; i++)
18085     if (XOR (islower (i), ISLOWER (i))
18086         || toupper (i) != TOUPPER (i))
18087       $ac_main_return(2);
18088   $ac_main_return (0);
18089 }
18090 _ACEOF
18091 rm -f conftest$ac_exeext
18092 if { (eval echo "$as_me:18092: \"$ac_link\"") >&5
18093   (eval $ac_link) 2>&5
18094   ac_status=$?
18095   echo "$as_me:18095: \$? = $ac_status" >&5
18096   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18097   { (eval echo "$as_me:18097: \"$ac_try\"") >&5
18098   (eval $ac_try) 2>&5
18099   ac_status=$?
18100   echo "$as_me:18100: \$? = $ac_status" >&5
18101   (exit $ac_status); }; }; then
18102   :
18103 else
18104   echo "$as_me: program exited with status $ac_status" >&5
18105 echo "$as_me: failed program was:" >&5
18106 cat conftest.$ac_ext >&5
18107 ac_cv_header_stdc=no
18108 fi
18109 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18110 fi
18111 fi
18112 fi
18113 echo "$as_me:18113: result: $ac_cv_header_stdc" >&5
18114 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18115 if test $ac_cv_header_stdc = yes; then
18116
18117 cat >>confdefs.h <<\EOF
18118 #define STDC_HEADERS 1
18119 EOF
18120
18121 fi
18122
18123 ac_header_dirent=no
18124 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18125   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18126 echo "$as_me:18126: checking for $ac_hdr that defines DIR" >&5
18127 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18128 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18129   echo $ECHO_N "(cached) $ECHO_C" >&6
18130 else
18131   cat >conftest.$ac_ext <<_ACEOF
18132 #line 18132 "configure"
18133 #include "confdefs.h"
18134 #include <sys/types.h>
18135 #include <$ac_hdr>
18136
18137 int
18138 main (void)
18139 {
18140 if ((DIR *) 0)
18141 return 0;
18142   ;
18143   return 0;
18144 }
18145 _ACEOF
18146 rm -f conftest.$ac_objext
18147 if { (eval echo "$as_me:18147: \"$ac_compile\"") >&5
18148   (eval $ac_compile) 2>&5
18149   ac_status=$?
18150   echo "$as_me:18150: \$? = $ac_status" >&5
18151   (exit $ac_status); } &&
18152          { ac_try='test -s conftest.$ac_objext'
18153   { (eval echo "$as_me:18153: \"$ac_try\"") >&5
18154   (eval $ac_try) 2>&5
18155   ac_status=$?
18156   echo "$as_me:18156: \$? = $ac_status" >&5
18157   (exit $ac_status); }; }; then
18158   eval "$as_ac_Header=yes"
18159 else
18160   echo "$as_me: failed program was:" >&5
18161 cat conftest.$ac_ext >&5
18162 eval "$as_ac_Header=no"
18163 fi
18164 rm -f conftest.$ac_objext conftest.$ac_ext
18165 fi
18166 echo "$as_me:18166: result: `eval echo '${'$as_ac_Header'}'`" >&5
18167 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18168 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18169   cat >>confdefs.h <<EOF
18170 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18171 EOF
18172
18173 ac_header_dirent=$ac_hdr; break
18174 fi
18175
18176 done
18177 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18178 if test $ac_header_dirent = dirent.h; then
18179   echo "$as_me:18179: checking for opendir in -ldir" >&5
18180 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18181 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18182   echo $ECHO_N "(cached) $ECHO_C" >&6
18183 else
18184   ac_check_lib_save_LIBS=$LIBS
18185 LIBS="-ldir  $LIBS"
18186 cat >conftest.$ac_ext <<_ACEOF
18187 #line 18187 "configure"
18188 #include "confdefs.h"
18189
18190 /* Override any gcc2 internal prototype to avoid an error.  */
18191 #ifdef __cplusplus
18192 extern "C"
18193 #endif
18194 /* We use char because int might match the return type of a gcc2
18195    builtin and then its argument prototype would still apply.  */
18196 char opendir ();
18197 int
18198 main (void)
18199 {
18200 opendir ();
18201   ;
18202   return 0;
18203 }
18204 _ACEOF
18205 rm -f conftest.$ac_objext conftest$ac_exeext
18206 if { (eval echo "$as_me:18206: \"$ac_link\"") >&5
18207   (eval $ac_link) 2>&5
18208   ac_status=$?
18209   echo "$as_me:18209: \$? = $ac_status" >&5
18210   (exit $ac_status); } &&
18211          { ac_try='test -s conftest$ac_exeext'
18212   { (eval echo "$as_me:18212: \"$ac_try\"") >&5
18213   (eval $ac_try) 2>&5
18214   ac_status=$?
18215   echo "$as_me:18215: \$? = $ac_status" >&5
18216   (exit $ac_status); }; }; then
18217   ac_cv_lib_dir_opendir=yes
18218 else
18219   echo "$as_me: failed program was:" >&5
18220 cat conftest.$ac_ext >&5
18221 ac_cv_lib_dir_opendir=no
18222 fi
18223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18224 LIBS=$ac_check_lib_save_LIBS
18225 fi
18226 echo "$as_me:18226: result: $ac_cv_lib_dir_opendir" >&5
18227 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18228 if test $ac_cv_lib_dir_opendir = yes; then
18229   LIBS="$LIBS -ldir"
18230 fi
18231
18232 else
18233   echo "$as_me:18233: checking for opendir in -lx" >&5
18234 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18235 if test "${ac_cv_lib_x_opendir+set}" = set; then
18236   echo $ECHO_N "(cached) $ECHO_C" >&6
18237 else
18238   ac_check_lib_save_LIBS=$LIBS
18239 LIBS="-lx  $LIBS"
18240 cat >conftest.$ac_ext <<_ACEOF
18241 #line 18241 "configure"
18242 #include "confdefs.h"
18243
18244 /* Override any gcc2 internal prototype to avoid an error.  */
18245 #ifdef __cplusplus
18246 extern "C"
18247 #endif
18248 /* We use char because int might match the return type of a gcc2
18249    builtin and then its argument prototype would still apply.  */
18250 char opendir ();
18251 int
18252 main (void)
18253 {
18254 opendir ();
18255   ;
18256   return 0;
18257 }
18258 _ACEOF
18259 rm -f conftest.$ac_objext conftest$ac_exeext
18260 if { (eval echo "$as_me:18260: \"$ac_link\"") >&5
18261   (eval $ac_link) 2>&5
18262   ac_status=$?
18263   echo "$as_me:18263: \$? = $ac_status" >&5
18264   (exit $ac_status); } &&
18265          { ac_try='test -s conftest$ac_exeext'
18266   { (eval echo "$as_me:18266: \"$ac_try\"") >&5
18267   (eval $ac_try) 2>&5
18268   ac_status=$?
18269   echo "$as_me:18269: \$? = $ac_status" >&5
18270   (exit $ac_status); }; }; then
18271   ac_cv_lib_x_opendir=yes
18272 else
18273   echo "$as_me: failed program was:" >&5
18274 cat conftest.$ac_ext >&5
18275 ac_cv_lib_x_opendir=no
18276 fi
18277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18278 LIBS=$ac_check_lib_save_LIBS
18279 fi
18280 echo "$as_me:18280: result: $ac_cv_lib_x_opendir" >&5
18281 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18282 if test $ac_cv_lib_x_opendir = yes; then
18283   LIBS="$LIBS -lx"
18284 fi
18285
18286 fi
18287
18288 echo "$as_me:18288: checking whether time.h and sys/time.h may both be included" >&5
18289 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18290 if test "${ac_cv_header_time+set}" = set; then
18291   echo $ECHO_N "(cached) $ECHO_C" >&6
18292 else
18293   cat >conftest.$ac_ext <<_ACEOF
18294 #line 18294 "configure"
18295 #include "confdefs.h"
18296 #include <sys/types.h>
18297 #include <sys/time.h>
18298 #include <time.h>
18299
18300 int
18301 main (void)
18302 {
18303 if ((struct tm *) 0)
18304 return 0;
18305   ;
18306   return 0;
18307 }
18308 _ACEOF
18309 rm -f conftest.$ac_objext
18310 if { (eval echo "$as_me:18310: \"$ac_compile\"") >&5
18311   (eval $ac_compile) 2>&5
18312   ac_status=$?
18313   echo "$as_me:18313: \$? = $ac_status" >&5
18314   (exit $ac_status); } &&
18315          { ac_try='test -s conftest.$ac_objext'
18316   { (eval echo "$as_me:18316: \"$ac_try\"") >&5
18317   (eval $ac_try) 2>&5
18318   ac_status=$?
18319   echo "$as_me:18319: \$? = $ac_status" >&5
18320   (exit $ac_status); }; }; then
18321   ac_cv_header_time=yes
18322 else
18323   echo "$as_me: failed program was:" >&5
18324 cat conftest.$ac_ext >&5
18325 ac_cv_header_time=no
18326 fi
18327 rm -f conftest.$ac_objext conftest.$ac_ext
18328 fi
18329 echo "$as_me:18329: result: $ac_cv_header_time" >&5
18330 echo "${ECHO_T}$ac_cv_header_time" >&6
18331 if test $ac_cv_header_time = yes; then
18332
18333 cat >>confdefs.h <<\EOF
18334 #define TIME_WITH_SYS_TIME 1
18335 EOF
18336
18337 fi
18338
18339 cf_regex_func=no
18340
18341 cf_regex_libs="regex re"
18342 case $host_os in
18343 (mingw*)
18344         cf_regex_libs="systre gnurx $cf_regex_libs"
18345         ;;
18346 esac
18347
18348 echo "$as_me:18348: checking for regcomp" >&5
18349 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18350 if test "${ac_cv_func_regcomp+set}" = set; then
18351   echo $ECHO_N "(cached) $ECHO_C" >&6
18352 else
18353   cat >conftest.$ac_ext <<_ACEOF
18354 #line 18354 "configure"
18355 #include "confdefs.h"
18356 #define regcomp autoconf_temporary
18357 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18358 #undef regcomp
18359
18360 #ifdef __cplusplus
18361 extern "C"
18362 #endif
18363
18364 /* We use char because int might match the return type of a gcc2
18365    builtin and then its argument prototype would still apply.  */
18366 char regcomp (void);
18367
18368 int
18369 main (void)
18370 {
18371
18372 /* The GNU C library defines stubs for functions which it implements
18373     to always fail with ENOSYS.  Some functions are actually named
18374     something starting with __ and the normal name is an alias.  */
18375 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18376 #error found stub for regcomp
18377 #endif
18378
18379         return regcomp ();
18380   ;
18381   return 0;
18382 }
18383 _ACEOF
18384 rm -f conftest.$ac_objext conftest$ac_exeext
18385 if { (eval echo "$as_me:18385: \"$ac_link\"") >&5
18386   (eval $ac_link) 2>&5
18387   ac_status=$?
18388   echo "$as_me:18388: \$? = $ac_status" >&5
18389   (exit $ac_status); } &&
18390          { ac_try='test -s conftest$ac_exeext'
18391   { (eval echo "$as_me:18391: \"$ac_try\"") >&5
18392   (eval $ac_try) 2>&5
18393   ac_status=$?
18394   echo "$as_me:18394: \$? = $ac_status" >&5
18395   (exit $ac_status); }; }; then
18396   ac_cv_func_regcomp=yes
18397 else
18398   echo "$as_me: failed program was:" >&5
18399 cat conftest.$ac_ext >&5
18400 ac_cv_func_regcomp=no
18401 fi
18402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18403 fi
18404 echo "$as_me:18404: result: $ac_cv_func_regcomp" >&5
18405 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18406 if test $ac_cv_func_regcomp = yes; then
18407   cf_regex_func=regcomp
18408 else
18409
18410         for cf_regex_lib in $cf_regex_libs
18411         do
18412                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18413 echo "$as_me:18413: checking for regcomp in -l$cf_regex_lib" >&5
18414 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18415 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18416   echo $ECHO_N "(cached) $ECHO_C" >&6
18417 else
18418   ac_check_lib_save_LIBS=$LIBS
18419 LIBS="-l$cf_regex_lib  $LIBS"
18420 cat >conftest.$ac_ext <<_ACEOF
18421 #line 18421 "configure"
18422 #include "confdefs.h"
18423
18424 /* Override any gcc2 internal prototype to avoid an error.  */
18425 #ifdef __cplusplus
18426 extern "C"
18427 #endif
18428 /* We use char because int might match the return type of a gcc2
18429    builtin and then its argument prototype would still apply.  */
18430 char regcomp ();
18431 int
18432 main (void)
18433 {
18434 regcomp ();
18435   ;
18436   return 0;
18437 }
18438 _ACEOF
18439 rm -f conftest.$ac_objext conftest$ac_exeext
18440 if { (eval echo "$as_me:18440: \"$ac_link\"") >&5
18441   (eval $ac_link) 2>&5
18442   ac_status=$?
18443   echo "$as_me:18443: \$? = $ac_status" >&5
18444   (exit $ac_status); } &&
18445          { ac_try='test -s conftest$ac_exeext'
18446   { (eval echo "$as_me:18446: \"$ac_try\"") >&5
18447   (eval $ac_try) 2>&5
18448   ac_status=$?
18449   echo "$as_me:18449: \$? = $ac_status" >&5
18450   (exit $ac_status); }; }; then
18451   eval "$as_ac_Lib=yes"
18452 else
18453   echo "$as_me: failed program was:" >&5
18454 cat conftest.$ac_ext >&5
18455 eval "$as_ac_Lib=no"
18456 fi
18457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18458 LIBS=$ac_check_lib_save_LIBS
18459 fi
18460 echo "$as_me:18460: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18461 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18462 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18463
18464 cf_add_libs="$LIBS"
18465 # reverse order
18466 cf_add_0lib=
18467 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18468 # filter duplicates
18469 for cf_add_1lib in $cf_add_0lib; do
18470         for cf_add_2lib in $cf_add_libs; do
18471                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18472                         cf_add_1lib=
18473                         break
18474                 fi
18475         done
18476         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18477 done
18478 LIBS="$cf_add_libs"
18479
18480                                 cf_regex_func=regcomp
18481                                 break
18482 fi
18483
18484         done
18485
18486 fi
18487
18488 if test "$cf_regex_func" = no ; then
18489         echo "$as_me:18489: checking for compile" >&5
18490 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18491 if test "${ac_cv_func_compile+set}" = set; then
18492   echo $ECHO_N "(cached) $ECHO_C" >&6
18493 else
18494   cat >conftest.$ac_ext <<_ACEOF
18495 #line 18495 "configure"
18496 #include "confdefs.h"
18497 #define compile autoconf_temporary
18498 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18499 #undef compile
18500
18501 #ifdef __cplusplus
18502 extern "C"
18503 #endif
18504
18505 /* We use char because int might match the return type of a gcc2
18506    builtin and then its argument prototype would still apply.  */
18507 char compile (void);
18508
18509 int
18510 main (void)
18511 {
18512
18513 /* The GNU C library defines stubs for functions which it implements
18514     to always fail with ENOSYS.  Some functions are actually named
18515     something starting with __ and the normal name is an alias.  */
18516 #if defined (__stub_compile) || defined (__stub___compile)
18517 #error found stub for compile
18518 #endif
18519
18520         return compile ();
18521   ;
18522   return 0;
18523 }
18524 _ACEOF
18525 rm -f conftest.$ac_objext conftest$ac_exeext
18526 if { (eval echo "$as_me:18526: \"$ac_link\"") >&5
18527   (eval $ac_link) 2>&5
18528   ac_status=$?
18529   echo "$as_me:18529: \$? = $ac_status" >&5
18530   (exit $ac_status); } &&
18531          { ac_try='test -s conftest$ac_exeext'
18532   { (eval echo "$as_me:18532: \"$ac_try\"") >&5
18533   (eval $ac_try) 2>&5
18534   ac_status=$?
18535   echo "$as_me:18535: \$? = $ac_status" >&5
18536   (exit $ac_status); }; }; then
18537   ac_cv_func_compile=yes
18538 else
18539   echo "$as_me: failed program was:" >&5
18540 cat conftest.$ac_ext >&5
18541 ac_cv_func_compile=no
18542 fi
18543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18544 fi
18545 echo "$as_me:18545: result: $ac_cv_func_compile" >&5
18546 echo "${ECHO_T}$ac_cv_func_compile" >&6
18547 if test $ac_cv_func_compile = yes; then
18548   cf_regex_func=compile
18549 else
18550
18551                 echo "$as_me:18551: checking for compile in -lgen" >&5
18552 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18553 if test "${ac_cv_lib_gen_compile+set}" = set; then
18554   echo $ECHO_N "(cached) $ECHO_C" >&6
18555 else
18556   ac_check_lib_save_LIBS=$LIBS
18557 LIBS="-lgen  $LIBS"
18558 cat >conftest.$ac_ext <<_ACEOF
18559 #line 18559 "configure"
18560 #include "confdefs.h"
18561
18562 /* Override any gcc2 internal prototype to avoid an error.  */
18563 #ifdef __cplusplus
18564 extern "C"
18565 #endif
18566 /* We use char because int might match the return type of a gcc2
18567    builtin and then its argument prototype would still apply.  */
18568 char compile ();
18569 int
18570 main (void)
18571 {
18572 compile ();
18573   ;
18574   return 0;
18575 }
18576 _ACEOF
18577 rm -f conftest.$ac_objext conftest$ac_exeext
18578 if { (eval echo "$as_me:18578: \"$ac_link\"") >&5
18579   (eval $ac_link) 2>&5
18580   ac_status=$?
18581   echo "$as_me:18581: \$? = $ac_status" >&5
18582   (exit $ac_status); } &&
18583          { ac_try='test -s conftest$ac_exeext'
18584   { (eval echo "$as_me:18584: \"$ac_try\"") >&5
18585   (eval $ac_try) 2>&5
18586   ac_status=$?
18587   echo "$as_me:18587: \$? = $ac_status" >&5
18588   (exit $ac_status); }; }; then
18589   ac_cv_lib_gen_compile=yes
18590 else
18591   echo "$as_me: failed program was:" >&5
18592 cat conftest.$ac_ext >&5
18593 ac_cv_lib_gen_compile=no
18594 fi
18595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18596 LIBS=$ac_check_lib_save_LIBS
18597 fi
18598 echo "$as_me:18598: result: $ac_cv_lib_gen_compile" >&5
18599 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18600 if test $ac_cv_lib_gen_compile = yes; then
18601
18602 cf_add_libs="$LIBS"
18603 # reverse order
18604 cf_add_0lib=
18605 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18606 # filter duplicates
18607 for cf_add_1lib in $cf_add_0lib; do
18608         for cf_add_2lib in $cf_add_libs; do
18609                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18610                         cf_add_1lib=
18611                         break
18612                 fi
18613         done
18614         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18615 done
18616 LIBS="$cf_add_libs"
18617
18618                                 cf_regex_func=compile
18619 fi
18620
18621 fi
18622
18623 fi
18624
18625 if test "$cf_regex_func" = no ; then
18626         { echo "$as_me:18626: WARNING: cannot find regular expression library" >&5
18627 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18628 fi
18629
18630 echo "$as_me:18630: checking for regular-expression headers" >&5
18631 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18632 if test "${cf_cv_regex_hdrs+set}" = set; then
18633   echo $ECHO_N "(cached) $ECHO_C" >&6
18634 else
18635
18636 cf_cv_regex_hdrs=no
18637 case $cf_regex_func in
18638 (compile)
18639         for cf_regex_hdr in regexp.h regexpr.h
18640         do
18641                 cat >conftest.$ac_ext <<_ACEOF
18642 #line 18642 "configure"
18643 #include "confdefs.h"
18644 #include <$cf_regex_hdr>
18645 int
18646 main (void)
18647 {
18648
18649                         char *p = compile("", "", "", 0);
18650                         int x = step("", "");
18651                         (void)p;
18652                         (void)x;
18653
18654   ;
18655   return 0;
18656 }
18657 _ACEOF
18658 rm -f conftest.$ac_objext conftest$ac_exeext
18659 if { (eval echo "$as_me:18659: \"$ac_link\"") >&5
18660   (eval $ac_link) 2>&5
18661   ac_status=$?
18662   echo "$as_me:18662: \$? = $ac_status" >&5
18663   (exit $ac_status); } &&
18664          { ac_try='test -s conftest$ac_exeext'
18665   { (eval echo "$as_me:18665: \"$ac_try\"") >&5
18666   (eval $ac_try) 2>&5
18667   ac_status=$?
18668   echo "$as_me:18668: \$? = $ac_status" >&5
18669   (exit $ac_status); }; }; then
18670
18671                         cf_cv_regex_hdrs=$cf_regex_hdr
18672                         break
18673
18674 else
18675   echo "$as_me: failed program was:" >&5
18676 cat conftest.$ac_ext >&5
18677 fi
18678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18679         done
18680         ;;
18681 (*)
18682         for cf_regex_hdr in regex.h
18683         do
18684                 cat >conftest.$ac_ext <<_ACEOF
18685 #line 18685 "configure"
18686 #include "confdefs.h"
18687 #include <sys/types.h>
18688 #include <$cf_regex_hdr>
18689 int
18690 main (void)
18691 {
18692
18693                         regex_t *p = 0;
18694                         int x = regcomp(p, "", 0);
18695                         int y = regexec(p, "", 0, 0, 0);
18696                         (void)x;
18697                         (void)y;
18698                         regfree(p);
18699
18700   ;
18701   return 0;
18702 }
18703 _ACEOF
18704 rm -f conftest.$ac_objext conftest$ac_exeext
18705 if { (eval echo "$as_me:18705: \"$ac_link\"") >&5
18706   (eval $ac_link) 2>&5
18707   ac_status=$?
18708   echo "$as_me:18708: \$? = $ac_status" >&5
18709   (exit $ac_status); } &&
18710          { ac_try='test -s conftest$ac_exeext'
18711   { (eval echo "$as_me:18711: \"$ac_try\"") >&5
18712   (eval $ac_try) 2>&5
18713   ac_status=$?
18714   echo "$as_me:18714: \$? = $ac_status" >&5
18715   (exit $ac_status); }; }; then
18716
18717                         cf_cv_regex_hdrs=$cf_regex_hdr
18718                         break
18719
18720 else
18721   echo "$as_me: failed program was:" >&5
18722 cat conftest.$ac_ext >&5
18723 fi
18724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18725         done
18726         ;;
18727 esac
18728
18729 fi
18730 echo "$as_me:18730: result: $cf_cv_regex_hdrs" >&5
18731 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18732
18733 case $cf_cv_regex_hdrs in
18734         (no)            { echo "$as_me:18734: WARNING: no regular expression header found" >&5
18735 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18736         (regex.h)
18737 cat >>confdefs.h <<\EOF
18738 #define HAVE_REGEX_H_FUNCS 1
18739 EOF
18740  ;;
18741         (regexp.h)
18742 cat >>confdefs.h <<\EOF
18743 #define HAVE_REGEXP_H_FUNCS 1
18744 EOF
18745  ;;
18746         (regexpr.h)
18747 cat >>confdefs.h <<\EOF
18748 #define HAVE_REGEXPR_H_FUNCS 1
18749 EOF
18750  ;;
18751 esac
18752
18753 for ac_header in \
18754 fcntl.h \
18755 getopt.h \
18756 limits.h \
18757 locale.h \
18758 math.h \
18759 poll.h \
18760 sys/ioctl.h \
18761 sys/param.h \
18762 sys/poll.h \
18763 sys/select.h \
18764 sys/time.h \
18765 sys/times.h \
18766 ttyent.h \
18767 unistd.h \
18768 wctype.h \
18769
18770 do
18771 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18772 echo "$as_me:18772: checking for $ac_header" >&5
18773 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18774 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18775   echo $ECHO_N "(cached) $ECHO_C" >&6
18776 else
18777   cat >conftest.$ac_ext <<_ACEOF
18778 #line 18778 "configure"
18779 #include "confdefs.h"
18780 #include <$ac_header>
18781 _ACEOF
18782 if { (eval echo "$as_me:18782: \"$ac_cpp conftest.$ac_ext\"") >&5
18783   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18784   ac_status=$?
18785   egrep -v '^ *\+' conftest.er1 >conftest.err
18786   rm -f conftest.er1
18787   cat conftest.err >&5
18788   echo "$as_me:18788: \$? = $ac_status" >&5
18789   (exit $ac_status); } >/dev/null; then
18790   if test -s conftest.err; then
18791     ac_cpp_err=$ac_c_preproc_warn_flag
18792   else
18793     ac_cpp_err=
18794   fi
18795 else
18796   ac_cpp_err=yes
18797 fi
18798 if test -z "$ac_cpp_err"; then
18799   eval "$as_ac_Header=yes"
18800 else
18801   echo "$as_me: failed program was:" >&5
18802   cat conftest.$ac_ext >&5
18803   eval "$as_ac_Header=no"
18804 fi
18805 rm -f conftest.err conftest.$ac_ext
18806 fi
18807 echo "$as_me:18807: result: `eval echo '${'$as_ac_Header'}'`" >&5
18808 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18809 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18810   cat >>confdefs.h <<EOF
18811 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18812 EOF
18813
18814 fi
18815 done
18816
18817 for ac_header in unistd.h getopt.h
18818 do
18819 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18820 echo "$as_me:18820: checking for $ac_header" >&5
18821 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18822 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18823   echo $ECHO_N "(cached) $ECHO_C" >&6
18824 else
18825   cat >conftest.$ac_ext <<_ACEOF
18826 #line 18826 "configure"
18827 #include "confdefs.h"
18828 #include <$ac_header>
18829 _ACEOF
18830 if { (eval echo "$as_me:18830: \"$ac_cpp conftest.$ac_ext\"") >&5
18831   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18832   ac_status=$?
18833   egrep -v '^ *\+' conftest.er1 >conftest.err
18834   rm -f conftest.er1
18835   cat conftest.err >&5
18836   echo "$as_me:18836: \$? = $ac_status" >&5
18837   (exit $ac_status); } >/dev/null; then
18838   if test -s conftest.err; then
18839     ac_cpp_err=$ac_c_preproc_warn_flag
18840   else
18841     ac_cpp_err=
18842   fi
18843 else
18844   ac_cpp_err=yes
18845 fi
18846 if test -z "$ac_cpp_err"; then
18847   eval "$as_ac_Header=yes"
18848 else
18849   echo "$as_me: failed program was:" >&5
18850   cat conftest.$ac_ext >&5
18851   eval "$as_ac_Header=no"
18852 fi
18853 rm -f conftest.err conftest.$ac_ext
18854 fi
18855 echo "$as_me:18855: result: `eval echo '${'$as_ac_Header'}'`" >&5
18856 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18857 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18858   cat >>confdefs.h <<EOF
18859 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18860 EOF
18861
18862 fi
18863 done
18864
18865 echo "$as_me:18865: checking for header declaring getopt variables" >&5
18866 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18867 if test "${cf_cv_getopt_header+set}" = set; then
18868   echo $ECHO_N "(cached) $ECHO_C" >&6
18869 else
18870
18871 cf_cv_getopt_header=none
18872 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18873 do
18874 cat >conftest.$ac_ext <<_ACEOF
18875 #line 18875 "configure"
18876 #include "confdefs.h"
18877
18878 #include <$cf_header>
18879 int
18880 main (void)
18881 {
18882 int x = optind; char *y = optarg
18883   ;
18884   return 0;
18885 }
18886 _ACEOF
18887 rm -f conftest.$ac_objext
18888 if { (eval echo "$as_me:18888: \"$ac_compile\"") >&5
18889   (eval $ac_compile) 2>&5
18890   ac_status=$?
18891   echo "$as_me:18891: \$? = $ac_status" >&5
18892   (exit $ac_status); } &&
18893          { ac_try='test -s conftest.$ac_objext'
18894   { (eval echo "$as_me:18894: \"$ac_try\"") >&5
18895   (eval $ac_try) 2>&5
18896   ac_status=$?
18897   echo "$as_me:18897: \$? = $ac_status" >&5
18898   (exit $ac_status); }; }; then
18899   cf_cv_getopt_header=$cf_header
18900  break
18901 else
18902   echo "$as_me: failed program was:" >&5
18903 cat conftest.$ac_ext >&5
18904 fi
18905 rm -f conftest.$ac_objext conftest.$ac_ext
18906 done
18907
18908 fi
18909 echo "$as_me:18909: result: $cf_cv_getopt_header" >&5
18910 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18911 if test $cf_cv_getopt_header != none ; then
18912
18913 cat >>confdefs.h <<\EOF
18914 #define HAVE_GETOPT_HEADER 1
18915 EOF
18916
18917 fi
18918 if test $cf_cv_getopt_header = getopt.h ; then
18919
18920 cat >>confdefs.h <<\EOF
18921 #define NEED_GETOPT_H 1
18922 EOF
18923
18924 fi
18925
18926 echo "$as_me:18926: checking if external environ is declared" >&5
18927 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18928 if test "${cf_cv_dcl_environ+set}" = set; then
18929   echo $ECHO_N "(cached) $ECHO_C" >&6
18930 else
18931
18932     cat >conftest.$ac_ext <<_ACEOF
18933 #line 18933 "configure"
18934 #include "confdefs.h"
18935
18936 #ifdef HAVE_STDLIB_H
18937 #include <stdlib.h>
18938 #endif
18939 #include <unistd.h>
18940 int
18941 main (void)
18942 {
18943 int x = (int) environ
18944   ;
18945   return 0;
18946 }
18947 _ACEOF
18948 rm -f conftest.$ac_objext
18949 if { (eval echo "$as_me:18949: \"$ac_compile\"") >&5
18950   (eval $ac_compile) 2>&5
18951   ac_status=$?
18952   echo "$as_me:18952: \$? = $ac_status" >&5
18953   (exit $ac_status); } &&
18954          { ac_try='test -s conftest.$ac_objext'
18955   { (eval echo "$as_me:18955: \"$ac_try\"") >&5
18956   (eval $ac_try) 2>&5
18957   ac_status=$?
18958   echo "$as_me:18958: \$? = $ac_status" >&5
18959   (exit $ac_status); }; }; then
18960   cf_cv_dcl_environ=yes
18961 else
18962   echo "$as_me: failed program was:" >&5
18963 cat conftest.$ac_ext >&5
18964 cf_cv_dcl_environ=no
18965 fi
18966 rm -f conftest.$ac_objext conftest.$ac_ext
18967
18968 fi
18969 echo "$as_me:18969: result: $cf_cv_dcl_environ" >&5
18970 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18971
18972 if test "$cf_cv_dcl_environ" = no ; then
18973
18974 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18975
18976     cat >>confdefs.h <<EOF
18977 #define $cf_result 1
18978 EOF
18979
18980 fi
18981
18982 # It's possible (for near-UNIX clones) that the data doesn't exist
18983
18984 echo "$as_me:18984: checking if external environ exists" >&5
18985 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18986 if test "${cf_cv_have_environ+set}" = set; then
18987   echo $ECHO_N "(cached) $ECHO_C" >&6
18988 else
18989
18990         cat >conftest.$ac_ext <<_ACEOF
18991 #line 18991 "configure"
18992 #include "confdefs.h"
18993
18994 #undef environ
18995 extern int environ;
18996
18997 int
18998 main (void)
18999 {
19000 environ = 2
19001   ;
19002   return 0;
19003 }
19004 _ACEOF
19005 rm -f conftest.$ac_objext conftest$ac_exeext
19006 if { (eval echo "$as_me:19006: \"$ac_link\"") >&5
19007   (eval $ac_link) 2>&5
19008   ac_status=$?
19009   echo "$as_me:19009: \$? = $ac_status" >&5
19010   (exit $ac_status); } &&
19011          { ac_try='test -s conftest$ac_exeext'
19012   { (eval echo "$as_me:19012: \"$ac_try\"") >&5
19013   (eval $ac_try) 2>&5
19014   ac_status=$?
19015   echo "$as_me:19015: \$? = $ac_status" >&5
19016   (exit $ac_status); }; }; then
19017   cf_cv_have_environ=yes
19018 else
19019   echo "$as_me: failed program was:" >&5
19020 cat conftest.$ac_ext >&5
19021 cf_cv_have_environ=no
19022 fi
19023 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19024
19025 fi
19026 echo "$as_me:19026: result: $cf_cv_have_environ" >&5
19027 echo "${ECHO_T}$cf_cv_have_environ" >&6
19028
19029 if test "$cf_cv_have_environ" = yes ; then
19030
19031 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19032
19033         cat >>confdefs.h <<EOF
19034 #define $cf_result 1
19035 EOF
19036
19037 fi
19038
19039 echo "$as_me:19039: checking for getenv" >&5
19040 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19041 if test "${ac_cv_func_getenv+set}" = set; then
19042   echo $ECHO_N "(cached) $ECHO_C" >&6
19043 else
19044   cat >conftest.$ac_ext <<_ACEOF
19045 #line 19045 "configure"
19046 #include "confdefs.h"
19047 #define getenv autoconf_temporary
19048 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19049 #undef getenv
19050
19051 #ifdef __cplusplus
19052 extern "C"
19053 #endif
19054
19055 /* We use char because int might match the return type of a gcc2
19056    builtin and then its argument prototype would still apply.  */
19057 char getenv (void);
19058
19059 int
19060 main (void)
19061 {
19062
19063 /* The GNU C library defines stubs for functions which it implements
19064     to always fail with ENOSYS.  Some functions are actually named
19065     something starting with __ and the normal name is an alias.  */
19066 #if defined (__stub_getenv) || defined (__stub___getenv)
19067 #error found stub for getenv
19068 #endif
19069
19070         return getenv ();
19071   ;
19072   return 0;
19073 }
19074 _ACEOF
19075 rm -f conftest.$ac_objext conftest$ac_exeext
19076 if { (eval echo "$as_me:19076: \"$ac_link\"") >&5
19077   (eval $ac_link) 2>&5
19078   ac_status=$?
19079   echo "$as_me:19079: \$? = $ac_status" >&5
19080   (exit $ac_status); } &&
19081          { ac_try='test -s conftest$ac_exeext'
19082   { (eval echo "$as_me:19082: \"$ac_try\"") >&5
19083   (eval $ac_try) 2>&5
19084   ac_status=$?
19085   echo "$as_me:19085: \$? = $ac_status" >&5
19086   (exit $ac_status); }; }; then
19087   ac_cv_func_getenv=yes
19088 else
19089   echo "$as_me: failed program was:" >&5
19090 cat conftest.$ac_ext >&5
19091 ac_cv_func_getenv=no
19092 fi
19093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19094 fi
19095 echo "$as_me:19095: result: $ac_cv_func_getenv" >&5
19096 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19097
19098 for ac_func in putenv setenv strdup
19099 do
19100 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19101 echo "$as_me:19101: checking for $ac_func" >&5
19102 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19103 if eval "test \"\${$as_ac_var+set}\" = set"; then
19104   echo $ECHO_N "(cached) $ECHO_C" >&6
19105 else
19106   cat >conftest.$ac_ext <<_ACEOF
19107 #line 19107 "configure"
19108 #include "confdefs.h"
19109 #define $ac_func autoconf_temporary
19110 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19111 #undef $ac_func
19112
19113 #ifdef __cplusplus
19114 extern "C"
19115 #endif
19116
19117 /* We use char because int might match the return type of a gcc2
19118    builtin and then its argument prototype would still apply.  */
19119 char $ac_func (void);
19120
19121 int
19122 main (void)
19123 {
19124
19125 /* The GNU C library defines stubs for functions which it implements
19126     to always fail with ENOSYS.  Some functions are actually named
19127     something starting with __ and the normal name is an alias.  */
19128 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19129 #error found stub for $ac_func
19130 #endif
19131
19132         return $ac_func ();
19133   ;
19134   return 0;
19135 }
19136 _ACEOF
19137 rm -f conftest.$ac_objext conftest$ac_exeext
19138 if { (eval echo "$as_me:19138: \"$ac_link\"") >&5
19139   (eval $ac_link) 2>&5
19140   ac_status=$?
19141   echo "$as_me:19141: \$? = $ac_status" >&5
19142   (exit $ac_status); } &&
19143          { ac_try='test -s conftest$ac_exeext'
19144   { (eval echo "$as_me:19144: \"$ac_try\"") >&5
19145   (eval $ac_try) 2>&5
19146   ac_status=$?
19147   echo "$as_me:19147: \$? = $ac_status" >&5
19148   (exit $ac_status); }; }; then
19149   eval "$as_ac_var=yes"
19150 else
19151   echo "$as_me: failed program was:" >&5
19152 cat conftest.$ac_ext >&5
19153 eval "$as_ac_var=no"
19154 fi
19155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19156 fi
19157 echo "$as_me:19157: result: `eval echo '${'$as_ac_var'}'`" >&5
19158 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19159 if test `eval echo '${'$as_ac_var'}'` = yes; then
19160   cat >>confdefs.h <<EOF
19161 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19162 EOF
19163
19164 fi
19165 done
19166
19167 echo "$as_me:19167: checking if getenv returns consistent values" >&5
19168 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19169 if test "${cf_cv_consistent_getenv+set}" = set; then
19170   echo $ECHO_N "(cached) $ECHO_C" >&6
19171 else
19172
19173 if test "$cross_compiling" = yes; then
19174   cf_cv_consistent_getenv=unknown
19175 else
19176   cat >conftest.$ac_ext <<_ACEOF
19177 #line 19177 "configure"
19178 #include "confdefs.h"
19179
19180 #include <stdlib.h>
19181 #include <unistd.h>
19182 #include <stdio.h>
19183 #include <string.h>
19184 #include <sys/types.h>
19185
19186 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19187 extern char **environ;  /* POSIX, but some systems are not... */
19188 #endif
19189
19190 #if defined(HAVE_STRDUP)
19191 #define str_alloc(s) strdup(s)
19192 #else
19193 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19194 #endif
19195
19196 static void set_value(const char *name, const char *value)
19197 {
19198 #if defined(HAVE_SETENV)
19199         setenv(name, value, 1);
19200 #elif defined(HAVE_PUTENV)
19201         char buffer[1024];
19202         sprintf(buffer, "%s=%s", name, value);
19203         putenv(str_alloc(buffer));
19204 #else
19205 #error neither putenv/setenv found
19206 #endif
19207 }
19208 int main(void)
19209 {
19210         int pass;
19211         size_t numenv, limit, j;
19212         char **mynames;
19213         char **myvalues;
19214         char **mypointer;
19215         char *equals;
19216         for (numenv = 0; environ[numenv]; ++numenv) ;
19217         limit = numenv + 10;
19218         mynames = (char **) calloc(limit + 1, sizeof(char *));
19219         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19220         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19221 #if defined(HAVE_ENVIRON)
19222         for (j = 0; environ[j]; ++j) {
19223                 mynames[j] = str_alloc(environ[j]);
19224                 equals = strchr(mynames[j], '=');
19225                 if (equals != 0) {
19226                         *equals++ = '\0';
19227                         myvalues[j] = str_alloc(equals);
19228                 } else {
19229                         myvalues[j] = str_alloc("");
19230                 }
19231         }
19232 #endif
19233         for (j = numenv; j < limit; ++j) {
19234                 char name[80];
19235                 char value[80];
19236                 size_t found;
19237                 size_t k = 0;
19238                 do {
19239                         size_t jk;
19240                         found = 0;
19241                         sprintf(name, "TERM%lu", (unsigned long) k);
19242                         for (jk = 0; jk < j; ++jk) {
19243                                 if (!strcmp(name, mynames[jk])) {
19244                                         found = 1;
19245                                         ++k;
19246                                         break;
19247                                 }
19248                         }
19249                 } while (found);
19250                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19251                 set_value(name, value);
19252                 mynames[j] = str_alloc(name);
19253                 myvalues[j] = str_alloc(value);
19254         }
19255         for (pass = 0; pass < 3; ++pass) {
19256                 for (j = 0; j < limit; ++j) {
19257                         char *value = getenv(mynames[j]);
19258                         if (pass) {
19259                                 if (value == 0) {
19260                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19261                                         ${cf_cv_main_return:-return}(1);
19262                                 } else if (value != mypointer[j]) {
19263                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19264                                         ${cf_cv_main_return:-return}(1);
19265                                 } else if (strcmp(value, myvalues[j])) {
19266                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19267                                         ${cf_cv_main_return:-return}(1);
19268                                 }
19269                         } else {
19270                                 size_t k;
19271                                 mypointer[j] = value;
19272                                 for (k = 0; k < j; ++k) {
19273                                         if (mypointer[j] == mypointer[k]) {
19274                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19275                                                 ${cf_cv_main_return:-return}(1);
19276                                         }
19277                                 }
19278                         }
19279                 }
19280         }
19281         ${cf_cv_main_return:-return}(0);
19282 }
19283
19284 _ACEOF
19285 rm -f conftest$ac_exeext
19286 if { (eval echo "$as_me:19286: \"$ac_link\"") >&5
19287   (eval $ac_link) 2>&5
19288   ac_status=$?
19289   echo "$as_me:19289: \$? = $ac_status" >&5
19290   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19291   { (eval echo "$as_me:19291: \"$ac_try\"") >&5
19292   (eval $ac_try) 2>&5
19293   ac_status=$?
19294   echo "$as_me:19294: \$? = $ac_status" >&5
19295   (exit $ac_status); }; }; then
19296   cf_cv_consistent_getenv=yes
19297 else
19298   echo "$as_me: program exited with status $ac_status" >&5
19299 echo "$as_me: failed program was:" >&5
19300 cat conftest.$ac_ext >&5
19301 cf_cv_consistent_getenv=no
19302 fi
19303 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19304 fi
19305
19306 fi
19307 echo "$as_me:19307: result: $cf_cv_consistent_getenv" >&5
19308 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19309
19310 if test "x$cf_cv_consistent_getenv" = xno
19311 then
19312
19313 cat >>confdefs.h <<\EOF
19314 #define HAVE_CONSISTENT_GETENV 1
19315 EOF
19316
19317 fi
19318
19319 if test "x$cf_cv_consistent_getenv" = xno && \
19320         test "x$cf_with_trace" = xyes
19321 then
19322         { echo "$as_me:19322: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19323 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19324 fi
19325
19326 echo "$as_me:19326: checking if sys/time.h works with sys/select.h" >&5
19327 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19328 if test "${cf_cv_sys_time_select+set}" = set; then
19329   echo $ECHO_N "(cached) $ECHO_C" >&6
19330 else
19331
19332 cat >conftest.$ac_ext <<_ACEOF
19333 #line 19333 "configure"
19334 #include "confdefs.h"
19335
19336 #include <sys/types.h>
19337 #ifdef HAVE_SYS_TIME_H
19338 #include <sys/time.h>
19339 #endif
19340 #ifdef HAVE_SYS_SELECT_H
19341 #include <sys/select.h>
19342 #endif
19343
19344 int
19345 main (void)
19346 {
19347
19348   ;
19349   return 0;
19350 }
19351 _ACEOF
19352 rm -f conftest.$ac_objext
19353 if { (eval echo "$as_me:19353: \"$ac_compile\"") >&5
19354   (eval $ac_compile) 2>&5
19355   ac_status=$?
19356   echo "$as_me:19356: \$? = $ac_status" >&5
19357   (exit $ac_status); } &&
19358          { ac_try='test -s conftest.$ac_objext'
19359   { (eval echo "$as_me:19359: \"$ac_try\"") >&5
19360   (eval $ac_try) 2>&5
19361   ac_status=$?
19362   echo "$as_me:19362: \$? = $ac_status" >&5
19363   (exit $ac_status); }; }; then
19364   cf_cv_sys_time_select=yes
19365 else
19366   echo "$as_me: failed program was:" >&5
19367 cat conftest.$ac_ext >&5
19368 cf_cv_sys_time_select=no
19369 fi
19370 rm -f conftest.$ac_objext conftest.$ac_ext
19371
19372 fi
19373
19374 echo "$as_me:19374: result: $cf_cv_sys_time_select" >&5
19375 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19376 test "$cf_cv_sys_time_select" = yes &&
19377 cat >>confdefs.h <<\EOF
19378 #define HAVE_SYS_TIME_SELECT 1
19379 EOF
19380
19381 ###     checks for compiler characteristics
19382 ac_ext=c
19383 ac_cpp='$CPP $CPPFLAGS'
19384 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19385 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19386 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19387 ac_main_return=return
19388
19389 echo "$as_me:19389: checking for an ANSI C-conforming const" >&5
19390 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19391 if test "${ac_cv_c_const+set}" = set; then
19392   echo $ECHO_N "(cached) $ECHO_C" >&6
19393 else
19394   cat >conftest.$ac_ext <<_ACEOF
19395 #line 19395 "configure"
19396 #include "confdefs.h"
19397
19398 int
19399 main (void)
19400 {
19401 /* FIXME: Include the comments suggested by Paul. */
19402 #ifndef __cplusplus
19403   /* Ultrix mips cc rejects this.  */
19404   typedef int charset[2];
19405   const charset x;
19406   /* SunOS 4.1.1 cc rejects this.  */
19407   char const *const *ccp;
19408   char **p;
19409   /* NEC SVR4.0.2 mips cc rejects this.  */
19410   struct point {int x, y;};
19411   static struct point const zero = {0,0};
19412   /* AIX XL C 1.02.0.0 rejects this.
19413      It does not let you subtract one const X* pointer from another in
19414      an arm of an if-expression whose if-part is not a constant
19415      expression */
19416   const char *g = "string";
19417   ccp = &g + (g ? g-g : 0);
19418   /* HPUX 7.0 cc rejects these. */
19419   ++ccp;
19420   p = (char**) ccp;
19421   ccp = (char const *const *) p;
19422   { /* SCO 3.2v4 cc rejects this.  */
19423     char *t;
19424     char const *s = 0 ? (char *) 0 : (char const *) 0;
19425
19426     *t++ = 0;
19427   }
19428   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19429     int x[] = {25, 17};
19430     const int *foo = &x[0];
19431     ++foo;
19432   }
19433   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19434     typedef const int *iptr;
19435     iptr p = 0;
19436     ++p;
19437   }
19438   { /* AIX XL C 1.02.0.0 rejects this saying
19439        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19440     struct s { int j; const int *ap[3]; };
19441     struct s *b; b->j = 5;
19442   }
19443   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19444     const int foo = 10;
19445   }
19446 #endif
19447
19448   ;
19449   return 0;
19450 }
19451 _ACEOF
19452 rm -f conftest.$ac_objext
19453 if { (eval echo "$as_me:19453: \"$ac_compile\"") >&5
19454   (eval $ac_compile) 2>&5
19455   ac_status=$?
19456   echo "$as_me:19456: \$? = $ac_status" >&5
19457   (exit $ac_status); } &&
19458          { ac_try='test -s conftest.$ac_objext'
19459   { (eval echo "$as_me:19459: \"$ac_try\"") >&5
19460   (eval $ac_try) 2>&5
19461   ac_status=$?
19462   echo "$as_me:19462: \$? = $ac_status" >&5
19463   (exit $ac_status); }; }; then
19464   ac_cv_c_const=yes
19465 else
19466   echo "$as_me: failed program was:" >&5
19467 cat conftest.$ac_ext >&5
19468 ac_cv_c_const=no
19469 fi
19470 rm -f conftest.$ac_objext conftest.$ac_ext
19471 fi
19472 echo "$as_me:19472: result: $ac_cv_c_const" >&5
19473 echo "${ECHO_T}$ac_cv_c_const" >&6
19474 if test $ac_cv_c_const = no; then
19475
19476 cat >>confdefs.h <<\EOF
19477 #define const
19478 EOF
19479
19480 fi
19481
19482 echo "$as_me:19482: checking for inline" >&5
19483 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19484 if test "${ac_cv_c_inline+set}" = set; then
19485   echo $ECHO_N "(cached) $ECHO_C" >&6
19486 else
19487   ac_cv_c_inline=no
19488 for ac_kw in inline __inline__ __inline; do
19489   cat >conftest.$ac_ext <<_ACEOF
19490 #line 19490 "configure"
19491 #include "confdefs.h"
19492 #ifndef __cplusplus
19493 static $ac_kw int static_foo () {return 0; }
19494 $ac_kw int foo () {return 0; }
19495 #endif
19496
19497 _ACEOF
19498 rm -f conftest.$ac_objext
19499 if { (eval echo "$as_me:19499: \"$ac_compile\"") >&5
19500   (eval $ac_compile) 2>&5
19501   ac_status=$?
19502   echo "$as_me:19502: \$? = $ac_status" >&5
19503   (exit $ac_status); } &&
19504          { ac_try='test -s conftest.$ac_objext'
19505   { (eval echo "$as_me:19505: \"$ac_try\"") >&5
19506   (eval $ac_try) 2>&5
19507   ac_status=$?
19508   echo "$as_me:19508: \$? = $ac_status" >&5
19509   (exit $ac_status); }; }; then
19510   ac_cv_c_inline=$ac_kw; break
19511 else
19512   echo "$as_me: failed program was:" >&5
19513 cat conftest.$ac_ext >&5
19514 fi
19515 rm -f conftest.$ac_objext conftest.$ac_ext
19516 done
19517
19518 fi
19519 echo "$as_me:19519: result: $ac_cv_c_inline" >&5
19520 echo "${ECHO_T}$ac_cv_c_inline" >&6
19521 case $ac_cv_c_inline in
19522   inline | yes) ;;
19523   no)
19524 cat >>confdefs.h <<\EOF
19525 #define inline
19526 EOF
19527  ;;
19528   *)  cat >>confdefs.h <<EOF
19529 #define inline $ac_cv_c_inline
19530 EOF
19531  ;;
19532 esac
19533
19534 NCURSES_INLINE=
19535 if test "$ac_cv_c_inline" != no ; then
19536         NCURSES_INLINE=inline
19537         if test "$INTEL_COMPILER" = yes
19538         then
19539                 :
19540         elif test "$CLANG_COMPILER" = yes
19541         then
19542                 :
19543         elif test "$GCC" = yes
19544         then
19545                 echo "$as_me:19545: checking if $CC supports options to tune inlining" >&5
19546 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19547 if test "${cf_cv_gcc_inline+set}" = set; then
19548   echo $ECHO_N "(cached) $ECHO_C" >&6
19549 else
19550
19551                 cf_save_CFLAGS=$CFLAGS
19552                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19553                 cat >conftest.$ac_ext <<_ACEOF
19554 #line 19554 "configure"
19555 #include "confdefs.h"
19556 inline int foo(void) { return 1; }
19557 int
19558 main (void)
19559 {
19560 ${cf_cv_main_return:-return} foo()
19561   ;
19562   return 0;
19563 }
19564 _ACEOF
19565 rm -f conftest.$ac_objext
19566 if { (eval echo "$as_me:19566: \"$ac_compile\"") >&5
19567   (eval $ac_compile) 2>&5
19568   ac_status=$?
19569   echo "$as_me:19569: \$? = $ac_status" >&5
19570   (exit $ac_status); } &&
19571          { ac_try='test -s conftest.$ac_objext'
19572   { (eval echo "$as_me:19572: \"$ac_try\"") >&5
19573   (eval $ac_try) 2>&5
19574   ac_status=$?
19575   echo "$as_me:19575: \$? = $ac_status" >&5
19576   (exit $ac_status); }; }; then
19577   cf_cv_gcc_inline=yes
19578 else
19579   echo "$as_me: failed program was:" >&5
19580 cat conftest.$ac_ext >&5
19581 cf_cv_gcc_inline=no
19582 fi
19583 rm -f conftest.$ac_objext conftest.$ac_ext
19584                 CFLAGS=$cf_save_CFLAGS
19585
19586 fi
19587 echo "$as_me:19587: result: $cf_cv_gcc_inline" >&5
19588 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19589                 if test "$cf_cv_gcc_inline" = yes ; then
19590
19591 cf_fix_cppflags=no
19592 cf_new_cflags=
19593 cf_new_cppflags=
19594 cf_new_extra_cppflags=
19595
19596 for cf_add_cflags in --param max-inline-insns-single=1200
19597 do
19598 case $cf_fix_cppflags in
19599 (no)
19600         case $cf_add_cflags in
19601         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19602                 case $cf_add_cflags in
19603                 (-D*)
19604                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19605
19606                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19607                                 && test -z "${cf_tst_cflags}" \
19608                                 && cf_fix_cppflags=yes
19609
19610                         if test $cf_fix_cppflags = yes ; then
19611
19612         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19613         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19614
19615                                 continue
19616                         elif test "${cf_tst_cflags}" = "\"'" ; then
19617
19618         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19619         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19620
19621                                 continue
19622                         fi
19623                         ;;
19624                 esac
19625                 case "$CPPFLAGS" in
19626                 (*$cf_add_cflags)
19627                         ;;
19628                 (*)
19629                         case $cf_add_cflags in
19630                         (-D*)
19631                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19632
19633 CPPFLAGS=`echo "$CPPFLAGS" | \
19634         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19635                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19636
19637                                 ;;
19638                         esac
19639
19640         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19641         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19642
19643                         ;;
19644                 esac
19645                 ;;
19646         (*)
19647
19648         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19649         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19650
19651                 ;;
19652         esac
19653         ;;
19654 (yes)
19655
19656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19658
19659         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19660
19661         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19662                 && test -z "${cf_tst_cflags}" \
19663                 && cf_fix_cppflags=no
19664         ;;
19665 esac
19666 done
19667
19668 if test -n "$cf_new_cflags" ; then
19669
19670         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19671         CFLAGS="${CFLAGS}$cf_new_cflags"
19672
19673 fi
19674
19675 if test -n "$cf_new_cppflags" ; then
19676
19677         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19678         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19679
19680 fi
19681
19682 if test -n "$cf_new_extra_cppflags" ; then
19683
19684         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19685         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19686
19687 fi
19688
19689                 fi
19690         fi
19691 fi
19692
19693 echo "$as_me:19693: checking for signal global datatype" >&5
19694 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19695 if test "${cf_cv_sig_atomic_t+set}" = set; then
19696   echo $ECHO_N "(cached) $ECHO_C" >&6
19697 else
19698
19699         for cf_type in \
19700                 "volatile sig_atomic_t" \
19701                 "sig_atomic_t" \
19702                 "int"
19703         do
19704         cat >conftest.$ac_ext <<_ACEOF
19705 #line 19705 "configure"
19706 #include "confdefs.h"
19707
19708 #include <sys/types.h>
19709 #include <signal.h>
19710 #include <stdio.h>
19711
19712 extern $cf_type x;
19713 $cf_type x;
19714 static void handler(int sig)
19715 {
19716         (void)sig;
19717         x = 5;
19718 }
19719 int
19720 main (void)
19721 {
19722 signal(SIGINT, handler);
19723                  x = 1
19724   ;
19725   return 0;
19726 }
19727 _ACEOF
19728 rm -f conftest.$ac_objext
19729 if { (eval echo "$as_me:19729: \"$ac_compile\"") >&5
19730   (eval $ac_compile) 2>&5
19731   ac_status=$?
19732   echo "$as_me:19732: \$? = $ac_status" >&5
19733   (exit $ac_status); } &&
19734          { ac_try='test -s conftest.$ac_objext'
19735   { (eval echo "$as_me:19735: \"$ac_try\"") >&5
19736   (eval $ac_try) 2>&5
19737   ac_status=$?
19738   echo "$as_me:19738: \$? = $ac_status" >&5
19739   (exit $ac_status); }; }; then
19740   cf_cv_sig_atomic_t=$cf_type
19741 else
19742   echo "$as_me: failed program was:" >&5
19743 cat conftest.$ac_ext >&5
19744 cf_cv_sig_atomic_t=no
19745 fi
19746 rm -f conftest.$ac_objext conftest.$ac_ext
19747                 test "$cf_cv_sig_atomic_t" != no && break
19748         done
19749
19750 fi
19751
19752 echo "$as_me:19752: result: $cf_cv_sig_atomic_t" >&5
19753 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19754 test "$cf_cv_sig_atomic_t" != no &&
19755 cat >>confdefs.h <<EOF
19756 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19757 EOF
19758
19759 if test $NCURSES_CHTYPE = auto ; then
19760
19761 echo "$as_me:19761: checking for type of chtype" >&5
19762 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19763 if test "${cf_cv_typeof_chtype+set}" = set; then
19764   echo $ECHO_N "(cached) $ECHO_C" >&6
19765 else
19766
19767                 if test "$cross_compiling" = yes; then
19768   cf_cv_typeof_chtype=long
19769 else
19770   cat >conftest.$ac_ext <<_ACEOF
19771 #line 19771 "configure"
19772 #include "confdefs.h"
19773
19774 #define WANT_BITS 31
19775 #include <stdio.h>
19776 int main(void)
19777 {
19778         FILE *fp = fopen("cf_test.out", "w");
19779         if (fp != 0) {
19780                 char *result = "long";
19781                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19782                         int n;
19783                         unsigned int x, y;
19784                         for (n = 0; n < WANT_BITS; n++) {
19785                                 x = (1 << n);
19786                                 y = (x >> n);
19787                                 if (y != 1 || x == 0) {
19788                                         x = 0;
19789                                         break;
19790                                 }
19791                         }
19792                         /*
19793                          * If x is nonzero, an int is big enough for the bits
19794                          * that we want.
19795                          */
19796                         result = (x != 0) ? "int" : "long";
19797                 }
19798                 fputs(result, fp);
19799                 fclose(fp);
19800         }
19801         ${cf_cv_main_return:-return}(0);
19802 }
19803
19804 _ACEOF
19805 rm -f conftest$ac_exeext
19806 if { (eval echo "$as_me:19806: \"$ac_link\"") >&5
19807   (eval $ac_link) 2>&5
19808   ac_status=$?
19809   echo "$as_me:19809: \$? = $ac_status" >&5
19810   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19811   { (eval echo "$as_me:19811: \"$ac_try\"") >&5
19812   (eval $ac_try) 2>&5
19813   ac_status=$?
19814   echo "$as_me:19814: \$? = $ac_status" >&5
19815   (exit $ac_status); }; }; then
19816   cf_cv_typeof_chtype=`cat cf_test.out`
19817 else
19818   echo "$as_me: program exited with status $ac_status" >&5
19819 echo "$as_me: failed program was:" >&5
19820 cat conftest.$ac_ext >&5
19821 cf_cv_typeof_chtype=long
19822 fi
19823 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19824 fi
19825                 rm -f cf_test.out
19826
19827 fi
19828
19829 echo "$as_me:19829: result: $cf_cv_typeof_chtype" >&5
19830 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19831
19832 cat >>confdefs.h <<EOF
19833 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19834 EOF
19835
19836 else
19837         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19838 fi
19839 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19840
19841 echo "$as_me:19841: checking if unsigned literals are legal" >&5
19842 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19843 if test "${cf_cv_unsigned_literals+set}" = set; then
19844   echo $ECHO_N "(cached) $ECHO_C" >&6
19845 else
19846
19847         cat >conftest.$ac_ext <<_ACEOF
19848 #line 19848 "configure"
19849 #include "confdefs.h"
19850
19851 int
19852 main (void)
19853 {
19854 long x = 1L + 1UL + 1U + 1
19855   ;
19856   return 0;
19857 }
19858 _ACEOF
19859 rm -f conftest.$ac_objext
19860 if { (eval echo "$as_me:19860: \"$ac_compile\"") >&5
19861   (eval $ac_compile) 2>&5
19862   ac_status=$?
19863   echo "$as_me:19863: \$? = $ac_status" >&5
19864   (exit $ac_status); } &&
19865          { ac_try='test -s conftest.$ac_objext'
19866   { (eval echo "$as_me:19866: \"$ac_try\"") >&5
19867   (eval $ac_try) 2>&5
19868   ac_status=$?
19869   echo "$as_me:19869: \$? = $ac_status" >&5
19870   (exit $ac_status); }; }; then
19871   cf_cv_unsigned_literals=yes
19872 else
19873   echo "$as_me: failed program was:" >&5
19874 cat conftest.$ac_ext >&5
19875 cf_cv_unsigned_literals=no
19876 fi
19877 rm -f conftest.$ac_objext conftest.$ac_ext
19878
19879 fi
19880
19881 echo "$as_me:19881: result: $cf_cv_unsigned_literals" >&5
19882 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19883
19884 cf_cv_1UL="1"
19885 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19886 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19887
19888 if test $NCURSES_MMASK_T = auto ; then
19889         cf_cv_typeof_mmask_t=long
19890 else
19891         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19892 fi
19893 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19894
19895 ###     Checks for external-data
19896
19897 echo "$as_me:19897: checking if external errno is declared" >&5
19898 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19899 if test "${cf_cv_dcl_errno+set}" = set; then
19900   echo $ECHO_N "(cached) $ECHO_C" >&6
19901 else
19902
19903         cat >conftest.$ac_ext <<_ACEOF
19904 #line 19904 "configure"
19905 #include "confdefs.h"
19906
19907 #ifdef HAVE_STDLIB_H
19908 #include <stdlib.h>
19909 #endif
19910 #include <stdio.h>
19911 #include <sys/types.h>
19912 #include <errno.h>
19913 int
19914 main (void)
19915 {
19916 int x = (int) errno; (void)x
19917   ;
19918   return 0;
19919 }
19920 _ACEOF
19921 rm -f conftest.$ac_objext
19922 if { (eval echo "$as_me:19922: \"$ac_compile\"") >&5
19923   (eval $ac_compile) 2>&5
19924   ac_status=$?
19925   echo "$as_me:19925: \$? = $ac_status" >&5
19926   (exit $ac_status); } &&
19927          { ac_try='test -s conftest.$ac_objext'
19928   { (eval echo "$as_me:19928: \"$ac_try\"") >&5
19929   (eval $ac_try) 2>&5
19930   ac_status=$?
19931   echo "$as_me:19931: \$? = $ac_status" >&5
19932   (exit $ac_status); }; }; then
19933   cf_cv_dcl_errno=yes
19934 else
19935   echo "$as_me: failed program was:" >&5
19936 cat conftest.$ac_ext >&5
19937 cf_cv_dcl_errno=no
19938 fi
19939 rm -f conftest.$ac_objext conftest.$ac_ext
19940
19941 fi
19942 echo "$as_me:19942: result: $cf_cv_dcl_errno" >&5
19943 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19944
19945 if test "$cf_cv_dcl_errno" = no ; then
19946
19947 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19948
19949         cat >>confdefs.h <<EOF
19950 #define $cf_result 1
19951 EOF
19952
19953 fi
19954
19955 # It's possible (for near-UNIX clones) that the data doesn't exist
19956
19957 echo "$as_me:19957: checking if external errno exists" >&5
19958 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19959 if test "${cf_cv_have_errno+set}" = set; then
19960   echo $ECHO_N "(cached) $ECHO_C" >&6
19961 else
19962
19963         cat >conftest.$ac_ext <<_ACEOF
19964 #line 19964 "configure"
19965 #include "confdefs.h"
19966
19967 #undef errno
19968 extern int errno;
19969
19970 int
19971 main (void)
19972 {
19973 errno = 2
19974   ;
19975   return 0;
19976 }
19977 _ACEOF
19978 rm -f conftest.$ac_objext conftest$ac_exeext
19979 if { (eval echo "$as_me:19979: \"$ac_link\"") >&5
19980   (eval $ac_link) 2>&5
19981   ac_status=$?
19982   echo "$as_me:19982: \$? = $ac_status" >&5
19983   (exit $ac_status); } &&
19984          { ac_try='test -s conftest$ac_exeext'
19985   { (eval echo "$as_me:19985: \"$ac_try\"") >&5
19986   (eval $ac_try) 2>&5
19987   ac_status=$?
19988   echo "$as_me:19988: \$? = $ac_status" >&5
19989   (exit $ac_status); }; }; then
19990   cf_cv_have_errno=yes
19991 else
19992   echo "$as_me: failed program was:" >&5
19993 cat conftest.$ac_ext >&5
19994 cf_cv_have_errno=no
19995 fi
19996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19997
19998 fi
19999 echo "$as_me:19999: result: $cf_cv_have_errno" >&5
20000 echo "${ECHO_T}$cf_cv_have_errno" >&6
20001
20002 if test "$cf_cv_have_errno" = yes ; then
20003
20004 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20005
20006         cat >>confdefs.h <<EOF
20007 #define $cf_result 1
20008 EOF
20009
20010 fi
20011
20012 echo "$as_me:20012: checking if data-only library module links" >&5
20013 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20014 if test "${cf_cv_link_dataonly+set}" = set; then
20015   echo $ECHO_N "(cached) $ECHO_C" >&6
20016 else
20017
20018         rm -f conftest.a
20019         cat >conftest.$ac_ext <<EOF
20020 #line 20020 "configure"
20021 int     testdata[3] = { 123, 456, 789 };
20022 EOF
20023         if { (eval echo "$as_me:20023: \"$ac_compile\"") >&5
20024   (eval $ac_compile) 2>&5
20025   ac_status=$?
20026   echo "$as_me:20026: \$? = $ac_status" >&5
20027   (exit $ac_status); } ; then
20028                 mv conftest.o data.o && \
20029                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20030         fi
20031         rm -f conftest.$ac_ext data.o
20032         cat >conftest.$ac_ext <<EOF
20033 #line 20033 "configure"
20034 int     testfunc(void)
20035 {
20036 #if defined(NeXT)
20037         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20038 #else
20039         extern int testdata[3];
20040         return testdata[0] == 123
20041            &&  testdata[1] == 456
20042            &&  testdata[2] == 789;
20043 #endif
20044 }
20045 EOF
20046         if { (eval echo "$as_me:20046: \"$ac_compile\"") >&5
20047   (eval $ac_compile) 2>&5
20048   ac_status=$?
20049   echo "$as_me:20049: \$? = $ac_status" >&5
20050   (exit $ac_status); }; then
20051                 mv conftest.o func.o && \
20052                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20053         fi
20054         rm -f conftest.$ac_ext func.o
20055         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20056         cf_saveLIBS="$LIBS"
20057         LIBS="conftest.a $LIBS"
20058         if test "$cross_compiling" = yes; then
20059   cf_cv_link_dataonly=unknown
20060 else
20061   cat >conftest.$ac_ext <<_ACEOF
20062 #line 20062 "configure"
20063 #include "confdefs.h"
20064
20065         int main(void)
20066         {
20067                 extern int testfunc();
20068                 ${cf_cv_main_return:-return} (!testfunc());
20069         }
20070
20071 _ACEOF
20072 rm -f conftest$ac_exeext
20073 if { (eval echo "$as_me:20073: \"$ac_link\"") >&5
20074   (eval $ac_link) 2>&5
20075   ac_status=$?
20076   echo "$as_me:20076: \$? = $ac_status" >&5
20077   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20078   { (eval echo "$as_me:20078: \"$ac_try\"") >&5
20079   (eval $ac_try) 2>&5
20080   ac_status=$?
20081   echo "$as_me:20081: \$? = $ac_status" >&5
20082   (exit $ac_status); }; }; then
20083   cf_cv_link_dataonly=yes
20084 else
20085   echo "$as_me: program exited with status $ac_status" >&5
20086 echo "$as_me: failed program was:" >&5
20087 cat conftest.$ac_ext >&5
20088 cf_cv_link_dataonly=no
20089 fi
20090 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20091 fi
20092         LIBS="$cf_saveLIBS"
20093
20094 fi
20095
20096 echo "$as_me:20096: result: $cf_cv_link_dataonly" >&5
20097 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20098
20099 if test "$cf_cv_link_dataonly" = no ; then
20100
20101 cat >>confdefs.h <<\EOF
20102 #define BROKEN_LINKER 1
20103 EOF
20104
20105         BROKEN_LINKER=1
20106 fi
20107
20108 ###     Checks for library functions.
20109
20110 for ac_func in \
20111 getcwd \
20112 getegid \
20113 geteuid \
20114 getopt \
20115 getttynam \
20116 issetugid \
20117 localeconv \
20118 poll \
20119 putenv \
20120 remove \
20121 select \
20122 setbuf \
20123 setbuffer \
20124 setenv \
20125 setvbuf \
20126 sigaction \
20127 sigvec \
20128 snprintf \
20129 strdup \
20130 strstr \
20131 sysconf \
20132 tcgetpgrp \
20133 times \
20134 tsearch \
20135 vsnprintf \
20136
20137 do
20138 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20139 echo "$as_me:20139: checking for $ac_func" >&5
20140 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20141 if eval "test \"\${$as_ac_var+set}\" = set"; then
20142   echo $ECHO_N "(cached) $ECHO_C" >&6
20143 else
20144   cat >conftest.$ac_ext <<_ACEOF
20145 #line 20145 "configure"
20146 #include "confdefs.h"
20147 #define $ac_func autoconf_temporary
20148 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20149 #undef $ac_func
20150
20151 #ifdef __cplusplus
20152 extern "C"
20153 #endif
20154
20155 /* We use char because int might match the return type of a gcc2
20156    builtin and then its argument prototype would still apply.  */
20157 char $ac_func (void);
20158
20159 int
20160 main (void)
20161 {
20162
20163 /* The GNU C library defines stubs for functions which it implements
20164     to always fail with ENOSYS.  Some functions are actually named
20165     something starting with __ and the normal name is an alias.  */
20166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20167 #error found stub for $ac_func
20168 #endif
20169
20170         return $ac_func ();
20171   ;
20172   return 0;
20173 }
20174 _ACEOF
20175 rm -f conftest.$ac_objext conftest$ac_exeext
20176 if { (eval echo "$as_me:20176: \"$ac_link\"") >&5
20177   (eval $ac_link) 2>&5
20178   ac_status=$?
20179   echo "$as_me:20179: \$? = $ac_status" >&5
20180   (exit $ac_status); } &&
20181          { ac_try='test -s conftest$ac_exeext'
20182   { (eval echo "$as_me:20182: \"$ac_try\"") >&5
20183   (eval $ac_try) 2>&5
20184   ac_status=$?
20185   echo "$as_me:20185: \$? = $ac_status" >&5
20186   (exit $ac_status); }; }; then
20187   eval "$as_ac_var=yes"
20188 else
20189   echo "$as_me: failed program was:" >&5
20190 cat conftest.$ac_ext >&5
20191 eval "$as_ac_var=no"
20192 fi
20193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20194 fi
20195 echo "$as_me:20195: result: `eval echo '${'$as_ac_var'}'`" >&5
20196 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20197 if test `eval echo '${'$as_ac_var'}'` = yes; then
20198   cat >>confdefs.h <<EOF
20199 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20200 EOF
20201
20202 fi
20203 done
20204
20205 if test "x$ac_cv_func_getopt" = xno && \
20206    test "x$cf_with_progs$cf_with_tests" != xnono; then
20207         { { echo "$as_me:20207: error: getopt is required for building programs" >&5
20208 echo "$as_me: error: getopt is required for building programs" >&2;}
20209    { (exit 1); exit 1; }; }
20210 fi
20211
20212 if test "x$with_safe_sprintf" = xyes
20213 then
20214         if test "x$ac_cv_func_vsnprintf" = xyes
20215         then
20216                 { echo "$as_me:20216: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20217 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20218         else
20219
20220 cat >>confdefs.h <<\EOF
20221 #define USE_SAFE_SPRINTF 1
20222 EOF
20223
20224         fi
20225 fi
20226
20227 if test "x$with_getcap" = "xyes" ; then
20228
20229 echo "$as_me:20229: checking for terminal-capability database functions" >&5
20230 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20231 if test "${cf_cv_cgetent+set}" = set; then
20232   echo $ECHO_N "(cached) $ECHO_C" >&6
20233 else
20234
20235 cat >conftest.$ac_ext <<_ACEOF
20236 #line 20236 "configure"
20237 #include "confdefs.h"
20238
20239 #include <stdlib.h>
20240 int
20241 main (void)
20242 {
20243
20244         char temp[128];
20245         char *buf = temp;
20246         char *db_array = temp;
20247         cgetent(&buf, &db_array, "vt100");
20248         cgetcap(buf, "tc", '=');
20249         cgetmatch(buf, "tc");
20250
20251   ;
20252   return 0;
20253 }
20254 _ACEOF
20255 rm -f conftest.$ac_objext conftest$ac_exeext
20256 if { (eval echo "$as_me:20256: \"$ac_link\"") >&5
20257   (eval $ac_link) 2>&5
20258   ac_status=$?
20259   echo "$as_me:20259: \$? = $ac_status" >&5
20260   (exit $ac_status); } &&
20261          { ac_try='test -s conftest$ac_exeext'
20262   { (eval echo "$as_me:20262: \"$ac_try\"") >&5
20263   (eval $ac_try) 2>&5
20264   ac_status=$?
20265   echo "$as_me:20265: \$? = $ac_status" >&5
20266   (exit $ac_status); }; }; then
20267   cf_cv_cgetent=yes
20268 else
20269   echo "$as_me: failed program was:" >&5
20270 cat conftest.$ac_ext >&5
20271 cf_cv_cgetent=no
20272 fi
20273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20274
20275 fi
20276 echo "$as_me:20276: result: $cf_cv_cgetent" >&5
20277 echo "${ECHO_T}$cf_cv_cgetent" >&6
20278
20279 if test "$cf_cv_cgetent" = yes
20280 then
20281
20282 cat >>confdefs.h <<\EOF
20283 #define HAVE_BSD_CGETENT 1
20284 EOF
20285
20286 echo "$as_me:20286: checking if cgetent uses const parameter" >&5
20287 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20288 if test "${cf_cv_cgetent_const+set}" = set; then
20289   echo $ECHO_N "(cached) $ECHO_C" >&6
20290 else
20291
20292 cat >conftest.$ac_ext <<_ACEOF
20293 #line 20293 "configure"
20294 #include "confdefs.h"
20295
20296 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20297 #include <stdlib.h>
20298 int
20299 main (void)
20300 {
20301
20302         char temp[128];
20303         char *buf = temp;
20304 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20305         const char *db_array = temp;
20306         cgetent(&buf, &db_array, "vt100");
20307 #endif
20308         cgetcap(buf, "tc", '=');
20309         cgetmatch(buf, "tc");
20310
20311   ;
20312   return 0;
20313 }
20314 _ACEOF
20315 rm -f conftest.$ac_objext conftest$ac_exeext
20316 if { (eval echo "$as_me:20316: \"$ac_link\"") >&5
20317   (eval $ac_link) 2>&5
20318   ac_status=$?
20319   echo "$as_me:20319: \$? = $ac_status" >&5
20320   (exit $ac_status); } &&
20321          { ac_try='test -s conftest$ac_exeext'
20322   { (eval echo "$as_me:20322: \"$ac_try\"") >&5
20323   (eval $ac_try) 2>&5
20324   ac_status=$?
20325   echo "$as_me:20325: \$? = $ac_status" >&5
20326   (exit $ac_status); }; }; then
20327   cf_cv_cgetent_const=yes
20328 else
20329   echo "$as_me: failed program was:" >&5
20330 cat conftest.$ac_ext >&5
20331 cf_cv_cgetent_const=no
20332 fi
20333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20334
20335 fi
20336 echo "$as_me:20336: result: $cf_cv_cgetent_const" >&5
20337 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20338         if test "$cf_cv_cgetent_const" = yes
20339         then
20340
20341 cat >>confdefs.h <<EOF
20342 #define CGETENT_CONST const
20343 EOF
20344
20345         fi
20346 fi
20347
20348 fi
20349
20350 echo "$as_me:20350: checking for isascii" >&5
20351 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20352 if test "${cf_cv_have_isascii+set}" = set; then
20353   echo $ECHO_N "(cached) $ECHO_C" >&6
20354 else
20355
20356         cat >conftest.$ac_ext <<_ACEOF
20357 #line 20357 "configure"
20358 #include "confdefs.h"
20359 #include <ctype.h>
20360 int
20361 main (void)
20362 {
20363 int x = isascii(' ')
20364   ;
20365   return 0;
20366 }
20367 _ACEOF
20368 rm -f conftest.$ac_objext conftest$ac_exeext
20369 if { (eval echo "$as_me:20369: \"$ac_link\"") >&5
20370   (eval $ac_link) 2>&5
20371   ac_status=$?
20372   echo "$as_me:20372: \$? = $ac_status" >&5
20373   (exit $ac_status); } &&
20374          { ac_try='test -s conftest$ac_exeext'
20375   { (eval echo "$as_me:20375: \"$ac_try\"") >&5
20376   (eval $ac_try) 2>&5
20377   ac_status=$?
20378   echo "$as_me:20378: \$? = $ac_status" >&5
20379   (exit $ac_status); }; }; then
20380   cf_cv_have_isascii=yes
20381 else
20382   echo "$as_me: failed program was:" >&5
20383 cat conftest.$ac_ext >&5
20384 cf_cv_have_isascii=no
20385 fi
20386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20387
20388 fi
20389 echo "$as_me:20389: result: $cf_cv_have_isascii" >&5
20390 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20391 test "$cf_cv_have_isascii" = yes &&
20392 cat >>confdefs.h <<\EOF
20393 #define HAVE_ISASCII 1
20394 EOF
20395
20396 if test "$ac_cv_func_sigaction" = yes; then
20397 echo "$as_me:20397: checking whether sigaction needs _POSIX_SOURCE" >&5
20398 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20399 cat >conftest.$ac_ext <<_ACEOF
20400 #line 20400 "configure"
20401 #include "confdefs.h"
20402
20403 #include <sys/types.h>
20404 #include <signal.h>
20405 int
20406 main (void)
20407 {
20408 struct sigaction act
20409   ;
20410   return 0;
20411 }
20412 _ACEOF
20413 rm -f conftest.$ac_objext
20414 if { (eval echo "$as_me:20414: \"$ac_compile\"") >&5
20415   (eval $ac_compile) 2>&5
20416   ac_status=$?
20417   echo "$as_me:20417: \$? = $ac_status" >&5
20418   (exit $ac_status); } &&
20419          { ac_try='test -s conftest.$ac_objext'
20420   { (eval echo "$as_me:20420: \"$ac_try\"") >&5
20421   (eval $ac_try) 2>&5
20422   ac_status=$?
20423   echo "$as_me:20423: \$? = $ac_status" >&5
20424   (exit $ac_status); }; }; then
20425   sigact_bad=no
20426 else
20427   echo "$as_me: failed program was:" >&5
20428 cat conftest.$ac_ext >&5
20429
20430 cat >conftest.$ac_ext <<_ACEOF
20431 #line 20431 "configure"
20432 #include "confdefs.h"
20433
20434 #define _POSIX_SOURCE
20435 #include <sys/types.h>
20436 #include <signal.h>
20437 int
20438 main (void)
20439 {
20440 struct sigaction act
20441   ;
20442   return 0;
20443 }
20444 _ACEOF
20445 rm -f conftest.$ac_objext
20446 if { (eval echo "$as_me:20446: \"$ac_compile\"") >&5
20447   (eval $ac_compile) 2>&5
20448   ac_status=$?
20449   echo "$as_me:20449: \$? = $ac_status" >&5
20450   (exit $ac_status); } &&
20451          { ac_try='test -s conftest.$ac_objext'
20452   { (eval echo "$as_me:20452: \"$ac_try\"") >&5
20453   (eval $ac_try) 2>&5
20454   ac_status=$?
20455   echo "$as_me:20455: \$? = $ac_status" >&5
20456   (exit $ac_status); }; }; then
20457   sigact_bad=yes
20458
20459 cat >>confdefs.h <<\EOF
20460 #define _POSIX_SOURCE 1
20461 EOF
20462
20463 else
20464   echo "$as_me: failed program was:" >&5
20465 cat conftest.$ac_ext >&5
20466 sigact_bad=unknown
20467 fi
20468 rm -f conftest.$ac_objext conftest.$ac_ext
20469 fi
20470 rm -f conftest.$ac_objext conftest.$ac_ext
20471 echo "$as_me:20471: result: $sigact_bad" >&5
20472 echo "${ECHO_T}$sigact_bad" >&6
20473 fi
20474
20475 echo "$as_me:20475: checking if nanosleep really works" >&5
20476 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20477 if test "${cf_cv_func_nanosleep+set}" = set; then
20478   echo $ECHO_N "(cached) $ECHO_C" >&6
20479 else
20480
20481 if test "$cross_compiling" = yes; then
20482   cf_cv_func_nanosleep=unknown
20483 else
20484   cat >conftest.$ac_ext <<_ACEOF
20485 #line 20485 "configure"
20486 #include "confdefs.h"
20487
20488 #include <stdio.h>
20489 #include <errno.h>
20490 #include <time.h>
20491
20492 #ifdef HAVE_SYS_TIME_H
20493 #include <sys/time.h>
20494 #endif
20495
20496 int main(void) {
20497         struct timespec ts1, ts2;
20498         int code;
20499         ts1.tv_sec  = 0;
20500         ts1.tv_nsec = 750000000;
20501         ts2.tv_sec  = 0;
20502         ts2.tv_nsec = 0;
20503         errno = 0;
20504         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20505         ${cf_cv_main_return:-return}(code != 0);
20506 }
20507
20508 _ACEOF
20509 rm -f conftest$ac_exeext
20510 if { (eval echo "$as_me:20510: \"$ac_link\"") >&5
20511   (eval $ac_link) 2>&5
20512   ac_status=$?
20513   echo "$as_me:20513: \$? = $ac_status" >&5
20514   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20515   { (eval echo "$as_me:20515: \"$ac_try\"") >&5
20516   (eval $ac_try) 2>&5
20517   ac_status=$?
20518   echo "$as_me:20518: \$? = $ac_status" >&5
20519   (exit $ac_status); }; }; then
20520   cf_cv_func_nanosleep=yes
20521 else
20522   echo "$as_me: program exited with status $ac_status" >&5
20523 echo "$as_me: failed program was:" >&5
20524 cat conftest.$ac_ext >&5
20525 cf_cv_func_nanosleep=no
20526 fi
20527 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20528 fi
20529 fi
20530 echo "$as_me:20530: result: $cf_cv_func_nanosleep" >&5
20531 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20532
20533 test "$cf_cv_func_nanosleep" = "yes" &&
20534 cat >>confdefs.h <<\EOF
20535 #define HAVE_NANOSLEEP 1
20536 EOF
20537
20538 for ac_header in \
20539 termio.h \
20540 termios.h \
20541 unistd.h \
20542 sys/ioctl.h \
20543 sys/termio.h \
20544
20545 do
20546 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20547 echo "$as_me:20547: checking for $ac_header" >&5
20548 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20549 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20550   echo $ECHO_N "(cached) $ECHO_C" >&6
20551 else
20552   cat >conftest.$ac_ext <<_ACEOF
20553 #line 20553 "configure"
20554 #include "confdefs.h"
20555 #include <$ac_header>
20556 _ACEOF
20557 if { (eval echo "$as_me:20557: \"$ac_cpp conftest.$ac_ext\"") >&5
20558   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20559   ac_status=$?
20560   egrep -v '^ *\+' conftest.er1 >conftest.err
20561   rm -f conftest.er1
20562   cat conftest.err >&5
20563   echo "$as_me:20563: \$? = $ac_status" >&5
20564   (exit $ac_status); } >/dev/null; then
20565   if test -s conftest.err; then
20566     ac_cpp_err=$ac_c_preproc_warn_flag
20567   else
20568     ac_cpp_err=
20569   fi
20570 else
20571   ac_cpp_err=yes
20572 fi
20573 if test -z "$ac_cpp_err"; then
20574   eval "$as_ac_Header=yes"
20575 else
20576   echo "$as_me: failed program was:" >&5
20577   cat conftest.$ac_ext >&5
20578   eval "$as_ac_Header=no"
20579 fi
20580 rm -f conftest.err conftest.$ac_ext
20581 fi
20582 echo "$as_me:20582: result: `eval echo '${'$as_ac_Header'}'`" >&5
20583 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20584 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20585   cat >>confdefs.h <<EOF
20586 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20587 EOF
20588
20589 fi
20590 done
20591
20592 if test "$ac_cv_header_termios_h" = yes ; then
20593         case "$CFLAGS $CPPFLAGS" in
20594         (*-D_POSIX_SOURCE*)
20595                 termios_bad=dunno ;;
20596         (*)     termios_bad=maybe ;;
20597         esac
20598         if test "$termios_bad" = maybe ; then
20599         echo "$as_me:20599: checking whether termios.h needs _POSIX_SOURCE" >&5
20600 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20601         cat >conftest.$ac_ext <<_ACEOF
20602 #line 20602 "configure"
20603 #include "confdefs.h"
20604 #include <termios.h>
20605 int
20606 main (void)
20607 {
20608 struct termios foo; int x = foo.c_iflag = 1; (void)x
20609   ;
20610   return 0;
20611 }
20612 _ACEOF
20613 rm -f conftest.$ac_objext
20614 if { (eval echo "$as_me:20614: \"$ac_compile\"") >&5
20615   (eval $ac_compile) 2>&5
20616   ac_status=$?
20617   echo "$as_me:20617: \$? = $ac_status" >&5
20618   (exit $ac_status); } &&
20619          { ac_try='test -s conftest.$ac_objext'
20620   { (eval echo "$as_me:20620: \"$ac_try\"") >&5
20621   (eval $ac_try) 2>&5
20622   ac_status=$?
20623   echo "$as_me:20623: \$? = $ac_status" >&5
20624   (exit $ac_status); }; }; then
20625   termios_bad=no
20626 else
20627   echo "$as_me: failed program was:" >&5
20628 cat conftest.$ac_ext >&5
20629
20630                 cat >conftest.$ac_ext <<_ACEOF
20631 #line 20631 "configure"
20632 #include "confdefs.h"
20633
20634 #define _POSIX_SOURCE
20635 #include <termios.h>
20636 int
20637 main (void)
20638 {
20639 struct termios foo; int x = foo.c_iflag = 2; (void)x
20640   ;
20641   return 0;
20642 }
20643 _ACEOF
20644 rm -f conftest.$ac_objext
20645 if { (eval echo "$as_me:20645: \"$ac_compile\"") >&5
20646   (eval $ac_compile) 2>&5
20647   ac_status=$?
20648   echo "$as_me:20648: \$? = $ac_status" >&5
20649   (exit $ac_status); } &&
20650          { ac_try='test -s conftest.$ac_objext'
20651   { (eval echo "$as_me:20651: \"$ac_try\"") >&5
20652   (eval $ac_try) 2>&5
20653   ac_status=$?
20654   echo "$as_me:20654: \$? = $ac_status" >&5
20655   (exit $ac_status); }; }; then
20656   termios_bad=unknown
20657 else
20658   echo "$as_me: failed program was:" >&5
20659 cat conftest.$ac_ext >&5
20660 termios_bad=yes
20661 cat >>confdefs.h <<\EOF
20662 #define _POSIX_SOURCE 1
20663 EOF
20664
20665 fi
20666 rm -f conftest.$ac_objext conftest.$ac_ext
20667
20668 fi
20669 rm -f conftest.$ac_objext conftest.$ac_ext
20670         echo "$as_me:20670: result: $termios_bad" >&5
20671 echo "${ECHO_T}$termios_bad" >&6
20672         fi
20673 fi
20674
20675 echo "$as_me:20675: checking for tcgetattr" >&5
20676 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20677 if test "${cf_cv_have_tcgetattr+set}" = set; then
20678   echo $ECHO_N "(cached) $ECHO_C" >&6
20679 else
20680
20681 cat >conftest.$ac_ext <<_ACEOF
20682 #line 20682 "configure"
20683 #include "confdefs.h"
20684
20685 #include <sys/types.h>
20686 #ifdef HAVE_UNISTD_H
20687 #include <unistd.h>
20688 #endif
20689 #ifdef HAVE_TERMIOS_H
20690 #include <termios.h>
20691 #define TTY struct termios
20692 #else
20693 #ifdef HAVE_TERMIO_H
20694 #include <termio.h>
20695 #define TTY struct termio
20696 #endif
20697 #endif
20698
20699 int
20700 main (void)
20701 {
20702
20703 TTY foo;
20704 tcgetattr(1, &foo);
20705   ;
20706   return 0;
20707 }
20708 _ACEOF
20709 rm -f conftest.$ac_objext conftest$ac_exeext
20710 if { (eval echo "$as_me:20710: \"$ac_link\"") >&5
20711   (eval $ac_link) 2>&5
20712   ac_status=$?
20713   echo "$as_me:20713: \$? = $ac_status" >&5
20714   (exit $ac_status); } &&
20715          { ac_try='test -s conftest$ac_exeext'
20716   { (eval echo "$as_me:20716: \"$ac_try\"") >&5
20717   (eval $ac_try) 2>&5
20718   ac_status=$?
20719   echo "$as_me:20719: \$? = $ac_status" >&5
20720   (exit $ac_status); }; }; then
20721   cf_cv_have_tcgetattr=yes
20722 else
20723   echo "$as_me: failed program was:" >&5
20724 cat conftest.$ac_ext >&5
20725 cf_cv_have_tcgetattr=no
20726 fi
20727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20728 fi
20729 echo "$as_me:20729: result: $cf_cv_have_tcgetattr" >&5
20730 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20731 test "$cf_cv_have_tcgetattr" = yes &&
20732 cat >>confdefs.h <<\EOF
20733 #define HAVE_TCGETATTR 1
20734 EOF
20735
20736 echo "$as_me:20736: checking for vsscanf function or workaround" >&5
20737 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20738 if test "${cf_cv_func_vsscanf+set}" = set; then
20739   echo $ECHO_N "(cached) $ECHO_C" >&6
20740 else
20741
20742 cat >conftest.$ac_ext <<_ACEOF
20743 #line 20743 "configure"
20744 #include "confdefs.h"
20745
20746 #include <stdarg.h>
20747 #include <stdio.h>
20748 int
20749 main (void)
20750 {
20751
20752         va_list ap;
20753         vsscanf("from", "%d", ap)
20754   ;
20755   return 0;
20756 }
20757 _ACEOF
20758 rm -f conftest.$ac_objext conftest$ac_exeext
20759 if { (eval echo "$as_me:20759: \"$ac_link\"") >&5
20760   (eval $ac_link) 2>&5
20761   ac_status=$?
20762   echo "$as_me:20762: \$? = $ac_status" >&5
20763   (exit $ac_status); } &&
20764          { ac_try='test -s conftest$ac_exeext'
20765   { (eval echo "$as_me:20765: \"$ac_try\"") >&5
20766   (eval $ac_try) 2>&5
20767   ac_status=$?
20768   echo "$as_me:20768: \$? = $ac_status" >&5
20769   (exit $ac_status); }; }; then
20770   cf_cv_func_vsscanf=vsscanf
20771 else
20772   echo "$as_me: failed program was:" >&5
20773 cat conftest.$ac_ext >&5
20774
20775 cat >conftest.$ac_ext <<_ACEOF
20776 #line 20776 "configure"
20777 #include "confdefs.h"
20778
20779 #include <stdarg.h>
20780 #include <stdio.h>
20781 int
20782 main (void)
20783 {
20784
20785         FILE strbuf;
20786         char *str = "from";
20787
20788         strbuf._flag = _IOREAD;
20789         strbuf._ptr = strbuf._base = (unsigned char *) str;
20790         strbuf._cnt = strlen(str);
20791         strbuf._file = _NFILE;
20792         return (vfscanf(&strbuf, "%d", ap))
20793   ;
20794   return 0;
20795 }
20796 _ACEOF
20797 rm -f conftest.$ac_objext conftest$ac_exeext
20798 if { (eval echo "$as_me:20798: \"$ac_link\"") >&5
20799   (eval $ac_link) 2>&5
20800   ac_status=$?
20801   echo "$as_me:20801: \$? = $ac_status" >&5
20802   (exit $ac_status); } &&
20803          { ac_try='test -s conftest$ac_exeext'
20804   { (eval echo "$as_me:20804: \"$ac_try\"") >&5
20805   (eval $ac_try) 2>&5
20806   ac_status=$?
20807   echo "$as_me:20807: \$? = $ac_status" >&5
20808   (exit $ac_status); }; }; then
20809   cf_cv_func_vsscanf=vfscanf
20810 else
20811   echo "$as_me: failed program was:" >&5
20812 cat conftest.$ac_ext >&5
20813
20814 cat >conftest.$ac_ext <<_ACEOF
20815 #line 20815 "configure"
20816 #include "confdefs.h"
20817
20818 #include <stdarg.h>
20819 #include <stdio.h>
20820 int
20821 main (void)
20822 {
20823
20824         FILE strbuf;
20825         char *str = "from";
20826
20827         strbuf._flag = _IOREAD;
20828         strbuf._ptr = strbuf._base = (unsigned char *) str;
20829         strbuf._cnt = strlen(str);
20830         strbuf._file = _NFILE;
20831         return (_doscan(&strbuf, "%d", ap))
20832   ;
20833   return 0;
20834 }
20835 _ACEOF
20836 rm -f conftest.$ac_objext conftest$ac_exeext
20837 if { (eval echo "$as_me:20837: \"$ac_link\"") >&5
20838   (eval $ac_link) 2>&5
20839   ac_status=$?
20840   echo "$as_me:20840: \$? = $ac_status" >&5
20841   (exit $ac_status); } &&
20842          { ac_try='test -s conftest$ac_exeext'
20843   { (eval echo "$as_me:20843: \"$ac_try\"") >&5
20844   (eval $ac_try) 2>&5
20845   ac_status=$?
20846   echo "$as_me:20846: \$? = $ac_status" >&5
20847   (exit $ac_status); }; }; then
20848   cf_cv_func_vsscanf=_doscan
20849 else
20850   echo "$as_me: failed program was:" >&5
20851 cat conftest.$ac_ext >&5
20852
20853 cf_cv_func_vsscanf=no
20854 fi
20855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20856 fi
20857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20858 fi
20859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20860 fi
20861 echo "$as_me:20861: result: $cf_cv_func_vsscanf" >&5
20862 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20863
20864 case $cf_cv_func_vsscanf in
20865 (vsscanf)
20866 cat >>confdefs.h <<\EOF
20867 #define HAVE_VSSCANF 1
20868 EOF
20869 ;;
20870 (vfscanf)
20871 cat >>confdefs.h <<\EOF
20872 #define HAVE_VFSCANF 1
20873 EOF
20874 ;;
20875 (_doscan)
20876 cat >>confdefs.h <<\EOF
20877 #define HAVE__DOSCAN 1
20878 EOF
20879 ;;
20880 esac
20881
20882 for ac_header in \
20883 unistd.h \
20884
20885 do
20886 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20887 echo "$as_me:20887: checking for $ac_header" >&5
20888 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20889 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20890   echo $ECHO_N "(cached) $ECHO_C" >&6
20891 else
20892   cat >conftest.$ac_ext <<_ACEOF
20893 #line 20893 "configure"
20894 #include "confdefs.h"
20895 #include <$ac_header>
20896 _ACEOF
20897 if { (eval echo "$as_me:20897: \"$ac_cpp conftest.$ac_ext\"") >&5
20898   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20899   ac_status=$?
20900   egrep -v '^ *\+' conftest.er1 >conftest.err
20901   rm -f conftest.er1
20902   cat conftest.err >&5
20903   echo "$as_me:20903: \$? = $ac_status" >&5
20904   (exit $ac_status); } >/dev/null; then
20905   if test -s conftest.err; then
20906     ac_cpp_err=$ac_c_preproc_warn_flag
20907   else
20908     ac_cpp_err=
20909   fi
20910 else
20911   ac_cpp_err=yes
20912 fi
20913 if test -z "$ac_cpp_err"; then
20914   eval "$as_ac_Header=yes"
20915 else
20916   echo "$as_me: failed program was:" >&5
20917   cat conftest.$ac_ext >&5
20918   eval "$as_ac_Header=no"
20919 fi
20920 rm -f conftest.err conftest.$ac_ext
20921 fi
20922 echo "$as_me:20922: result: `eval echo '${'$as_ac_Header'}'`" >&5
20923 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20924 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20925   cat >>confdefs.h <<EOF
20926 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20927 EOF
20928
20929 fi
20930 done
20931
20932 echo "$as_me:20932: checking for working mkstemp" >&5
20933 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20934 if test "${cf_cv_func_mkstemp+set}" = set; then
20935   echo $ECHO_N "(cached) $ECHO_C" >&6
20936 else
20937
20938 rm -rf conftest*
20939 if test "$cross_compiling" = yes; then
20940   cf_cv_func_mkstemp=maybe
20941 else
20942   cat >conftest.$ac_ext <<_ACEOF
20943 #line 20943 "configure"
20944 #include "confdefs.h"
20945
20946 #include <sys/types.h>
20947 #ifdef HAVE_UNISTD_H
20948 #include <unistd.h>
20949 #endif
20950 #include <stdlib.h>
20951 #include <stdio.h>
20952 #include <string.h>
20953 #include <sys/stat.h>
20954 int main(void)
20955 {
20956         char *tmpl = "conftestXXXXXX";
20957         char name[2][80];
20958         int n;
20959         int result = 0;
20960         int fd;
20961         struct stat sb;
20962
20963         umask(077);
20964         for (n = 0; n < 2; ++n) {
20965                 strcpy(name[n], tmpl);
20966                 if ((fd = mkstemp(name[n])) >= 0) {
20967                         if (!strcmp(name[n], tmpl)
20968                          || stat(name[n], &sb) != 0
20969                          || (sb.st_mode & S_IFMT) != S_IFREG
20970                          || (sb.st_mode & 077) != 0) {
20971                                 result = 1;
20972                         }
20973                         close(fd);
20974                 }
20975         }
20976         if (result == 0
20977          && !strcmp(name[0], name[1]))
20978                 result = 1;
20979         ${cf_cv_main_return:-return}(result);
20980 }
20981
20982 _ACEOF
20983 rm -f conftest$ac_exeext
20984 if { (eval echo "$as_me:20984: \"$ac_link\"") >&5
20985   (eval $ac_link) 2>&5
20986   ac_status=$?
20987   echo "$as_me:20987: \$? = $ac_status" >&5
20988   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20989   { (eval echo "$as_me:20989: \"$ac_try\"") >&5
20990   (eval $ac_try) 2>&5
20991   ac_status=$?
20992   echo "$as_me:20992: \$? = $ac_status" >&5
20993   (exit $ac_status); }; }; then
20994   cf_cv_func_mkstemp=yes
20995
20996 else
20997   echo "$as_me: program exited with status $ac_status" >&5
20998 echo "$as_me: failed program was:" >&5
20999 cat conftest.$ac_ext >&5
21000 cf_cv_func_mkstemp=no
21001
21002 fi
21003 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21004 fi
21005
21006 fi
21007 echo "$as_me:21007: result: $cf_cv_func_mkstemp" >&5
21008 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21009 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21010         echo "$as_me:21010: checking for mkstemp" >&5
21011 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21012 if test "${ac_cv_func_mkstemp+set}" = set; then
21013   echo $ECHO_N "(cached) $ECHO_C" >&6
21014 else
21015   cat >conftest.$ac_ext <<_ACEOF
21016 #line 21016 "configure"
21017 #include "confdefs.h"
21018 #define mkstemp autoconf_temporary
21019 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21020 #undef mkstemp
21021
21022 #ifdef __cplusplus
21023 extern "C"
21024 #endif
21025
21026 /* We use char because int might match the return type of a gcc2
21027    builtin and then its argument prototype would still apply.  */
21028 char mkstemp (void);
21029
21030 int
21031 main (void)
21032 {
21033
21034 /* The GNU C library defines stubs for functions which it implements
21035     to always fail with ENOSYS.  Some functions are actually named
21036     something starting with __ and the normal name is an alias.  */
21037 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21038 #error found stub for mkstemp
21039 #endif
21040
21041         return mkstemp ();
21042   ;
21043   return 0;
21044 }
21045 _ACEOF
21046 rm -f conftest.$ac_objext conftest$ac_exeext
21047 if { (eval echo "$as_me:21047: \"$ac_link\"") >&5
21048   (eval $ac_link) 2>&5
21049   ac_status=$?
21050   echo "$as_me:21050: \$? = $ac_status" >&5
21051   (exit $ac_status); } &&
21052          { ac_try='test -s conftest$ac_exeext'
21053   { (eval echo "$as_me:21053: \"$ac_try\"") >&5
21054   (eval $ac_try) 2>&5
21055   ac_status=$?
21056   echo "$as_me:21056: \$? = $ac_status" >&5
21057   (exit $ac_status); }; }; then
21058   ac_cv_func_mkstemp=yes
21059 else
21060   echo "$as_me: failed program was:" >&5
21061 cat conftest.$ac_ext >&5
21062 ac_cv_func_mkstemp=no
21063 fi
21064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21065 fi
21066 echo "$as_me:21066: result: $ac_cv_func_mkstemp" >&5
21067 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21068
21069 fi
21070 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21071
21072 cat >>confdefs.h <<\EOF
21073 #define HAVE_MKSTEMP 1
21074 EOF
21075
21076 fi
21077
21078 # setup for prototype of fallback for vsscanf()
21079
21080 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21081         HAVE_VSSCANF=1
21082 else
21083         HAVE_VSSCANF=0
21084 fi
21085
21086 if test "x$cross_compiling" = xyes ; then
21087         { echo "$as_me:21087: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21088 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21089 else
21090         echo "$as_me:21090: checking whether setvbuf arguments are reversed" >&5
21091 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21092 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21093   echo $ECHO_N "(cached) $ECHO_C" >&6
21094 else
21095   if test "$cross_compiling" = yes; then
21096   { { echo "$as_me:21096: error: cannot run test program while cross compiling" >&5
21097 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21098    { (exit 1); exit 1; }; }
21099 else
21100   cat >conftest.$ac_ext <<_ACEOF
21101 #line 21101 "configure"
21102 #include "confdefs.h"
21103 #include <stdio.h>
21104 /* If setvbuf has the reversed format, exit 0. */
21105 int
21106 main (void)
21107 {
21108   /* This call has the arguments reversed.
21109      A reversed system may check and see that the address of main
21110      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21111   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21112     $ac_main_return(1);
21113   putc('\r', stdout);
21114   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21115 }
21116 _ACEOF
21117 rm -f conftest$ac_exeext
21118 if { (eval echo "$as_me:21118: \"$ac_link\"") >&5
21119   (eval $ac_link) 2>&5
21120   ac_status=$?
21121   echo "$as_me:21121: \$? = $ac_status" >&5
21122   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21123   { (eval echo "$as_me:21123: \"$ac_try\"") >&5
21124   (eval $ac_try) 2>&5
21125   ac_status=$?
21126   echo "$as_me:21126: \$? = $ac_status" >&5
21127   (exit $ac_status); }; }; then
21128   ac_cv_func_setvbuf_reversed=yes
21129 else
21130   echo "$as_me: program exited with status $ac_status" >&5
21131 echo "$as_me: failed program was:" >&5
21132 cat conftest.$ac_ext >&5
21133 ac_cv_func_setvbuf_reversed=no
21134 fi
21135 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21136 fi
21137 rm -f core core.* *.core
21138 fi
21139 echo "$as_me:21139: result: $ac_cv_func_setvbuf_reversed" >&5
21140 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21141 if test $ac_cv_func_setvbuf_reversed = yes; then
21142
21143 cat >>confdefs.h <<\EOF
21144 #define SETVBUF_REVERSED 1
21145 EOF
21146
21147 fi
21148
21149 fi
21150 echo "$as_me:21150: checking for intptr_t" >&5
21151 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21152 if test "${ac_cv_type_intptr_t+set}" = set; then
21153   echo $ECHO_N "(cached) $ECHO_C" >&6
21154 else
21155   cat >conftest.$ac_ext <<_ACEOF
21156 #line 21156 "configure"
21157 #include "confdefs.h"
21158 $ac_includes_default
21159 int
21160 main (void)
21161 {
21162 if ((intptr_t *) 0)
21163   return 0;
21164 if (sizeof (intptr_t))
21165   return 0;
21166   ;
21167   return 0;
21168 }
21169 _ACEOF
21170 rm -f conftest.$ac_objext
21171 if { (eval echo "$as_me:21171: \"$ac_compile\"") >&5
21172   (eval $ac_compile) 2>&5
21173   ac_status=$?
21174   echo "$as_me:21174: \$? = $ac_status" >&5
21175   (exit $ac_status); } &&
21176          { ac_try='test -s conftest.$ac_objext'
21177   { (eval echo "$as_me:21177: \"$ac_try\"") >&5
21178   (eval $ac_try) 2>&5
21179   ac_status=$?
21180   echo "$as_me:21180: \$? = $ac_status" >&5
21181   (exit $ac_status); }; }; then
21182   ac_cv_type_intptr_t=yes
21183 else
21184   echo "$as_me: failed program was:" >&5
21185 cat conftest.$ac_ext >&5
21186 ac_cv_type_intptr_t=no
21187 fi
21188 rm -f conftest.$ac_objext conftest.$ac_ext
21189 fi
21190 echo "$as_me:21190: result: $ac_cv_type_intptr_t" >&5
21191 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21192 if test $ac_cv_type_intptr_t = yes; then
21193   :
21194 else
21195
21196 cat >>confdefs.h <<EOF
21197 #define intptr_t long
21198 EOF
21199
21200 fi
21201
21202 echo "$as_me:21202: checking for ssize_t" >&5
21203 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21204 if test "${ac_cv_type_ssize_t+set}" = set; then
21205   echo $ECHO_N "(cached) $ECHO_C" >&6
21206 else
21207   cat >conftest.$ac_ext <<_ACEOF
21208 #line 21208 "configure"
21209 #include "confdefs.h"
21210 $ac_includes_default
21211 int
21212 main (void)
21213 {
21214 if ((ssize_t *) 0)
21215   return 0;
21216 if (sizeof (ssize_t))
21217   return 0;
21218   ;
21219   return 0;
21220 }
21221 _ACEOF
21222 rm -f conftest.$ac_objext
21223 if { (eval echo "$as_me:21223: \"$ac_compile\"") >&5
21224   (eval $ac_compile) 2>&5
21225   ac_status=$?
21226   echo "$as_me:21226: \$? = $ac_status" >&5
21227   (exit $ac_status); } &&
21228          { ac_try='test -s conftest.$ac_objext'
21229   { (eval echo "$as_me:21229: \"$ac_try\"") >&5
21230   (eval $ac_try) 2>&5
21231   ac_status=$?
21232   echo "$as_me:21232: \$? = $ac_status" >&5
21233   (exit $ac_status); }; }; then
21234   ac_cv_type_ssize_t=yes
21235 else
21236   echo "$as_me: failed program was:" >&5
21237 cat conftest.$ac_ext >&5
21238 ac_cv_type_ssize_t=no
21239 fi
21240 rm -f conftest.$ac_objext conftest.$ac_ext
21241 fi
21242 echo "$as_me:21242: result: $ac_cv_type_ssize_t" >&5
21243 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21244 if test $ac_cv_type_ssize_t = yes; then
21245   :
21246 else
21247
21248 cat >>confdefs.h <<EOF
21249 #define ssize_t int
21250 EOF
21251
21252 fi
21253
21254 echo "$as_me:21254: checking for type sigaction_t" >&5
21255 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21256 if test "${cf_cv_type_sigaction+set}" = set; then
21257   echo $ECHO_N "(cached) $ECHO_C" >&6
21258 else
21259
21260         cat >conftest.$ac_ext <<_ACEOF
21261 #line 21261 "configure"
21262 #include "confdefs.h"
21263
21264 #include <signal.h>
21265 int
21266 main (void)
21267 {
21268 sigaction_t x
21269   ;
21270   return 0;
21271 }
21272 _ACEOF
21273 rm -f conftest.$ac_objext
21274 if { (eval echo "$as_me:21274: \"$ac_compile\"") >&5
21275   (eval $ac_compile) 2>&5
21276   ac_status=$?
21277   echo "$as_me:21277: \$? = $ac_status" >&5
21278   (exit $ac_status); } &&
21279          { ac_try='test -s conftest.$ac_objext'
21280   { (eval echo "$as_me:21280: \"$ac_try\"") >&5
21281   (eval $ac_try) 2>&5
21282   ac_status=$?
21283   echo "$as_me:21283: \$? = $ac_status" >&5
21284   (exit $ac_status); }; }; then
21285   cf_cv_type_sigaction=yes
21286 else
21287   echo "$as_me: failed program was:" >&5
21288 cat conftest.$ac_ext >&5
21289 cf_cv_type_sigaction=no
21290 fi
21291 rm -f conftest.$ac_objext conftest.$ac_ext
21292 fi
21293
21294 echo "$as_me:21294: result: $cf_cv_type_sigaction" >&5
21295 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21296 test "$cf_cv_type_sigaction" = yes &&
21297 cat >>confdefs.h <<\EOF
21298 #define HAVE_TYPE_SIGACTION 1
21299 EOF
21300
21301 echo "$as_me:21301: checking declaration of size-change" >&5
21302 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21303 if test "${cf_cv_sizechange+set}" = set; then
21304   echo $ECHO_N "(cached) $ECHO_C" >&6
21305 else
21306
21307         cf_cv_sizechange=unknown
21308         cf_save_CPPFLAGS="$CPPFLAGS"
21309
21310 for cf_opts in "" "NEED_PTEM_H"
21311 do
21312
21313         CPPFLAGS="$cf_save_CPPFLAGS"
21314         if test -n "$cf_opts"
21315         then
21316
21317         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21318         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21319
21320         fi
21321         cat >conftest.$ac_ext <<_ACEOF
21322 #line 21322 "configure"
21323 #include "confdefs.h"
21324 #include <sys/types.h>
21325 #ifdef HAVE_TERMIOS_H
21326 #include <termios.h>
21327 #else
21328 #ifdef HAVE_TERMIO_H
21329 #include <termio.h>
21330 #endif
21331 #endif
21332
21333 #ifdef NEED_PTEM_H
21334 /* This is a workaround for SCO:  they neglected to define struct winsize in
21335  * termios.h -- it's only in termio.h and ptem.h
21336  */
21337 #include <sys/stream.h>
21338 #include <sys/ptem.h>
21339 #endif
21340
21341 #ifdef HAVE_SYS_IOCTL_H
21342 #include <sys/ioctl.h>
21343 #endif
21344
21345 int
21346 main (void)
21347 {
21348
21349 #ifdef TIOCGSIZE
21350         struct ttysize win;     /* SunOS 3.0... */
21351         int y = win.ts_lines = 2;
21352         int x = win.ts_cols = 1;
21353         (void)y;
21354         (void)x;
21355 #else
21356 #ifdef TIOCGWINSZ
21357         struct winsize win;     /* everything else */
21358         int y = win.ws_row = 2;
21359         int x = win.ws_col = 1;
21360         (void)y;
21361         (void)x;
21362 #else
21363         no TIOCGSIZE or TIOCGWINSZ
21364 #endif /* TIOCGWINSZ */
21365 #endif /* TIOCGSIZE */
21366
21367   ;
21368   return 0;
21369 }
21370 _ACEOF
21371 rm -f conftest.$ac_objext
21372 if { (eval echo "$as_me:21372: \"$ac_compile\"") >&5
21373   (eval $ac_compile) 2>&5
21374   ac_status=$?
21375   echo "$as_me:21375: \$? = $ac_status" >&5
21376   (exit $ac_status); } &&
21377          { ac_try='test -s conftest.$ac_objext'
21378   { (eval echo "$as_me:21378: \"$ac_try\"") >&5
21379   (eval $ac_try) 2>&5
21380   ac_status=$?
21381   echo "$as_me:21381: \$? = $ac_status" >&5
21382   (exit $ac_status); }; }; then
21383   cf_cv_sizechange=yes
21384 else
21385   echo "$as_me: failed program was:" >&5
21386 cat conftest.$ac_ext >&5
21387 cf_cv_sizechange=no
21388 fi
21389 rm -f conftest.$ac_objext conftest.$ac_ext
21390
21391         CPPFLAGS="$cf_save_CPPFLAGS"
21392         if test "$cf_cv_sizechange" = yes ; then
21393                 echo "size-change succeeded ($cf_opts)" >&5
21394                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21395                 break
21396         fi
21397 done
21398
21399 fi
21400 echo "$as_me:21400: result: $cf_cv_sizechange" >&5
21401 echo "${ECHO_T}$cf_cv_sizechange" >&6
21402 if test "$cf_cv_sizechange" != no ; then
21403
21404 cat >>confdefs.h <<\EOF
21405 #define HAVE_SIZECHANGE 1
21406 EOF
21407
21408         case $cf_cv_sizechange in
21409         (NEED*)
21410                 cat >>confdefs.h <<EOF
21411 #define $cf_cv_sizechange  1
21412 EOF
21413
21414                 ;;
21415         esac
21416 fi
21417
21418 echo "$as_me:21418: checking for memmove" >&5
21419 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21420 if test "${ac_cv_func_memmove+set}" = set; then
21421   echo $ECHO_N "(cached) $ECHO_C" >&6
21422 else
21423   cat >conftest.$ac_ext <<_ACEOF
21424 #line 21424 "configure"
21425 #include "confdefs.h"
21426 #define memmove autoconf_temporary
21427 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21428 #undef memmove
21429
21430 #ifdef __cplusplus
21431 extern "C"
21432 #endif
21433
21434 /* We use char because int might match the return type of a gcc2
21435    builtin and then its argument prototype would still apply.  */
21436 char memmove (void);
21437
21438 int
21439 main (void)
21440 {
21441
21442 /* The GNU C library defines stubs for functions which it implements
21443     to always fail with ENOSYS.  Some functions are actually named
21444     something starting with __ and the normal name is an alias.  */
21445 #if defined (__stub_memmove) || defined (__stub___memmove)
21446 #error found stub for memmove
21447 #endif
21448
21449         return memmove ();
21450   ;
21451   return 0;
21452 }
21453 _ACEOF
21454 rm -f conftest.$ac_objext conftest$ac_exeext
21455 if { (eval echo "$as_me:21455: \"$ac_link\"") >&5
21456   (eval $ac_link) 2>&5
21457   ac_status=$?
21458   echo "$as_me:21458: \$? = $ac_status" >&5
21459   (exit $ac_status); } &&
21460          { ac_try='test -s conftest$ac_exeext'
21461   { (eval echo "$as_me:21461: \"$ac_try\"") >&5
21462   (eval $ac_try) 2>&5
21463   ac_status=$?
21464   echo "$as_me:21464: \$? = $ac_status" >&5
21465   (exit $ac_status); }; }; then
21466   ac_cv_func_memmove=yes
21467 else
21468   echo "$as_me: failed program was:" >&5
21469 cat conftest.$ac_ext >&5
21470 ac_cv_func_memmove=no
21471 fi
21472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21473 fi
21474 echo "$as_me:21474: result: $ac_cv_func_memmove" >&5
21475 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21476 if test $ac_cv_func_memmove = yes; then
21477   :
21478 else
21479
21480 echo "$as_me:21480: checking for bcopy" >&5
21481 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21482 if test "${ac_cv_func_bcopy+set}" = set; then
21483   echo $ECHO_N "(cached) $ECHO_C" >&6
21484 else
21485   cat >conftest.$ac_ext <<_ACEOF
21486 #line 21486 "configure"
21487 #include "confdefs.h"
21488 #define bcopy autoconf_temporary
21489 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21490 #undef bcopy
21491
21492 #ifdef __cplusplus
21493 extern "C"
21494 #endif
21495
21496 /* We use char because int might match the return type of a gcc2
21497    builtin and then its argument prototype would still apply.  */
21498 char bcopy (void);
21499
21500 int
21501 main (void)
21502 {
21503
21504 /* The GNU C library defines stubs for functions which it implements
21505     to always fail with ENOSYS.  Some functions are actually named
21506     something starting with __ and the normal name is an alias.  */
21507 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21508 #error found stub for bcopy
21509 #endif
21510
21511         return bcopy ();
21512   ;
21513   return 0;
21514 }
21515 _ACEOF
21516 rm -f conftest.$ac_objext conftest$ac_exeext
21517 if { (eval echo "$as_me:21517: \"$ac_link\"") >&5
21518   (eval $ac_link) 2>&5
21519   ac_status=$?
21520   echo "$as_me:21520: \$? = $ac_status" >&5
21521   (exit $ac_status); } &&
21522          { ac_try='test -s conftest$ac_exeext'
21523   { (eval echo "$as_me:21523: \"$ac_try\"") >&5
21524   (eval $ac_try) 2>&5
21525   ac_status=$?
21526   echo "$as_me:21526: \$? = $ac_status" >&5
21527   (exit $ac_status); }; }; then
21528   ac_cv_func_bcopy=yes
21529 else
21530   echo "$as_me: failed program was:" >&5
21531 cat conftest.$ac_ext >&5
21532 ac_cv_func_bcopy=no
21533 fi
21534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21535 fi
21536 echo "$as_me:21536: result: $ac_cv_func_bcopy" >&5
21537 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21538 if test $ac_cv_func_bcopy = yes; then
21539
21540         echo "$as_me:21540: checking if bcopy does overlapping moves" >&5
21541 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21542 if test "${cf_cv_good_bcopy+set}" = set; then
21543   echo $ECHO_N "(cached) $ECHO_C" >&6
21544 else
21545
21546                 if test "$cross_compiling" = yes; then
21547   cf_cv_good_bcopy=unknown
21548 else
21549   cat >conftest.$ac_ext <<_ACEOF
21550 #line 21550 "configure"
21551 #include "confdefs.h"
21552
21553 int main(void) {
21554         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21555         char temp[40];
21556         bcopy(data, temp, sizeof(data));
21557         bcopy(temp+10, temp, 15);
21558         bcopy(temp+5, temp+15, 10);
21559         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21560 }
21561
21562 _ACEOF
21563 rm -f conftest$ac_exeext
21564 if { (eval echo "$as_me:21564: \"$ac_link\"") >&5
21565   (eval $ac_link) 2>&5
21566   ac_status=$?
21567   echo "$as_me:21567: \$? = $ac_status" >&5
21568   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21569   { (eval echo "$as_me:21569: \"$ac_try\"") >&5
21570   (eval $ac_try) 2>&5
21571   ac_status=$?
21572   echo "$as_me:21572: \$? = $ac_status" >&5
21573   (exit $ac_status); }; }; then
21574   cf_cv_good_bcopy=yes
21575 else
21576   echo "$as_me: program exited with status $ac_status" >&5
21577 echo "$as_me: failed program was:" >&5
21578 cat conftest.$ac_ext >&5
21579 cf_cv_good_bcopy=no
21580 fi
21581 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21582 fi
21583
21584 fi
21585 echo "$as_me:21585: result: $cf_cv_good_bcopy" >&5
21586 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21587
21588 else
21589   cf_cv_good_bcopy=no
21590 fi
21591
21592         if test "$cf_cv_good_bcopy" = yes ; then
21593
21594 cat >>confdefs.h <<\EOF
21595 #define USE_OK_BCOPY 1
21596 EOF
21597
21598         else
21599
21600 cat >>confdefs.h <<\EOF
21601 #define USE_MY_MEMMOVE 1
21602 EOF
21603
21604         fi
21605
21606 fi
21607
21608 tty 2>&1 >/dev/null || {
21609 for ac_func in posix_openpt
21610 do
21611 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21612 echo "$as_me:21612: checking for $ac_func" >&5
21613 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21614 if eval "test \"\${$as_ac_var+set}\" = set"; then
21615   echo $ECHO_N "(cached) $ECHO_C" >&6
21616 else
21617   cat >conftest.$ac_ext <<_ACEOF
21618 #line 21618 "configure"
21619 #include "confdefs.h"
21620 #define $ac_func autoconf_temporary
21621 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21622 #undef $ac_func
21623
21624 #ifdef __cplusplus
21625 extern "C"
21626 #endif
21627
21628 /* We use char because int might match the return type of a gcc2
21629    builtin and then its argument prototype would still apply.  */
21630 char $ac_func (void);
21631
21632 int
21633 main (void)
21634 {
21635
21636 /* The GNU C library defines stubs for functions which it implements
21637     to always fail with ENOSYS.  Some functions are actually named
21638     something starting with __ and the normal name is an alias.  */
21639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21640 #error found stub for $ac_func
21641 #endif
21642
21643         return $ac_func ();
21644   ;
21645   return 0;
21646 }
21647 _ACEOF
21648 rm -f conftest.$ac_objext conftest$ac_exeext
21649 if { (eval echo "$as_me:21649: \"$ac_link\"") >&5
21650   (eval $ac_link) 2>&5
21651   ac_status=$?
21652   echo "$as_me:21652: \$? = $ac_status" >&5
21653   (exit $ac_status); } &&
21654          { ac_try='test -s conftest$ac_exeext'
21655   { (eval echo "$as_me:21655: \"$ac_try\"") >&5
21656   (eval $ac_try) 2>&5
21657   ac_status=$?
21658   echo "$as_me:21658: \$? = $ac_status" >&5
21659   (exit $ac_status); }; }; then
21660   eval "$as_ac_var=yes"
21661 else
21662   echo "$as_me: failed program was:" >&5
21663 cat conftest.$ac_ext >&5
21664 eval "$as_ac_var=no"
21665 fi
21666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21667 fi
21668 echo "$as_me:21668: result: `eval echo '${'$as_ac_var'}'`" >&5
21669 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21670 if test `eval echo '${'$as_ac_var'}'` = yes; then
21671   cat >>confdefs.h <<EOF
21672 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21673 EOF
21674
21675 fi
21676 done
21677  }
21678 echo "$as_me:21678: checking if poll really works" >&5
21679 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21680 if test "${cf_cv_working_poll+set}" = set; then
21681   echo $ECHO_N "(cached) $ECHO_C" >&6
21682 else
21683
21684 if test "$cross_compiling" = yes; then
21685   cf_cv_working_poll=unknown
21686 else
21687   cat >conftest.$ac_ext <<_ACEOF
21688 #line 21688 "configure"
21689 #include "confdefs.h"
21690
21691 #include <stdlib.h>
21692 #include <stdio.h>
21693 #include <unistd.h>
21694 #include <fcntl.h>
21695 #ifdef HAVE_POLL_H
21696 #include <poll.h>
21697 #else
21698 #include <sys/poll.h>
21699 #endif
21700 int main(void) {
21701         struct pollfd myfds;
21702         int ret;
21703
21704         /* check for Darwin bug with respect to "devices" */
21705         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21706         if (myfds.fd < 0)
21707                 myfds.fd = 0;
21708         myfds.events = POLLIN;
21709         myfds.revents = 0;
21710
21711         ret = poll(&myfds, 1, 100);
21712
21713         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21714                 ret = -1;
21715         } else {
21716                 int fd = 0;
21717                 if (!isatty(fd)) {
21718                         fd = open("/dev/tty", 2);       /* O_RDWR */
21719                 }
21720 #ifdef HAVE_POSIX_OPENPT
21721                 if (fd < 0) {
21722                         fd = posix_openpt(O_RDWR);
21723                 }
21724 #endif
21725
21726                 if (fd >= 0) {
21727                         /* also check with standard input */
21728                         myfds.fd = fd;
21729                         myfds.events = POLLIN;
21730                         myfds.revents = 0;
21731                         ret = poll(&myfds, 1, 100);
21732                 } else {
21733                         ret = -1;
21734                 }
21735         }
21736         ${cf_cv_main_return:-return}(ret < 0);
21737 }
21738 _ACEOF
21739 rm -f conftest$ac_exeext
21740 if { (eval echo "$as_me:21740: \"$ac_link\"") >&5
21741   (eval $ac_link) 2>&5
21742   ac_status=$?
21743   echo "$as_me:21743: \$? = $ac_status" >&5
21744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21745   { (eval echo "$as_me:21745: \"$ac_try\"") >&5
21746   (eval $ac_try) 2>&5
21747   ac_status=$?
21748   echo "$as_me:21748: \$? = $ac_status" >&5
21749   (exit $ac_status); }; }; then
21750   cf_cv_working_poll=yes
21751 else
21752   echo "$as_me: program exited with status $ac_status" >&5
21753 echo "$as_me: failed program was:" >&5
21754 cat conftest.$ac_ext >&5
21755 cf_cv_working_poll=no
21756 fi
21757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21758 fi
21759 fi
21760 echo "$as_me:21760: result: $cf_cv_working_poll" >&5
21761 echo "${ECHO_T}$cf_cv_working_poll" >&6
21762 test "$cf_cv_working_poll" = "yes" &&
21763 cat >>confdefs.h <<\EOF
21764 #define HAVE_WORKING_POLL 1
21765 EOF
21766
21767 echo "$as_me:21767: checking for va_copy" >&5
21768 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21769 if test "${cf_cv_have_va_copy+set}" = set; then
21770   echo $ECHO_N "(cached) $ECHO_C" >&6
21771 else
21772
21773 cat >conftest.$ac_ext <<_ACEOF
21774 #line 21774 "configure"
21775 #include "confdefs.h"
21776
21777 #include <stdarg.h>
21778
21779 int
21780 main (void)
21781 {
21782
21783         static va_list dst;
21784         static va_list src;
21785         va_copy(dst, src)
21786   ;
21787   return 0;
21788 }
21789 _ACEOF
21790 rm -f conftest.$ac_objext conftest$ac_exeext
21791 if { (eval echo "$as_me:21791: \"$ac_link\"") >&5
21792   (eval $ac_link) 2>&5
21793   ac_status=$?
21794   echo "$as_me:21794: \$? = $ac_status" >&5
21795   (exit $ac_status); } &&
21796          { ac_try='test -s conftest$ac_exeext'
21797   { (eval echo "$as_me:21797: \"$ac_try\"") >&5
21798   (eval $ac_try) 2>&5
21799   ac_status=$?
21800   echo "$as_me:21800: \$? = $ac_status" >&5
21801   (exit $ac_status); }; }; then
21802   cf_cv_have_va_copy=yes
21803 else
21804   echo "$as_me: failed program was:" >&5
21805 cat conftest.$ac_ext >&5
21806 cf_cv_have_va_copy=no
21807 fi
21808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21809 fi
21810 echo "$as_me:21810: result: $cf_cv_have_va_copy" >&5
21811 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21812
21813 if test "$cf_cv_have_va_copy" = yes;
21814 then
21815
21816 cat >>confdefs.h <<\EOF
21817 #define HAVE_VA_COPY 1
21818 EOF
21819
21820 else # !cf_cv_have_va_copy
21821
21822 echo "$as_me:21822: checking for __va_copy" >&5
21823 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21824 if test "${cf_cv_have___va_copy+set}" = set; then
21825   echo $ECHO_N "(cached) $ECHO_C" >&6
21826 else
21827
21828 cat >conftest.$ac_ext <<_ACEOF
21829 #line 21829 "configure"
21830 #include "confdefs.h"
21831
21832 #include <stdarg.h>
21833
21834 int
21835 main (void)
21836 {
21837
21838         static va_list dst;
21839         static va_list src;
21840         __va_copy(dst, src)
21841   ;
21842   return 0;
21843 }
21844 _ACEOF
21845 rm -f conftest.$ac_objext conftest$ac_exeext
21846 if { (eval echo "$as_me:21846: \"$ac_link\"") >&5
21847   (eval $ac_link) 2>&5
21848   ac_status=$?
21849   echo "$as_me:21849: \$? = $ac_status" >&5
21850   (exit $ac_status); } &&
21851          { ac_try='test -s conftest$ac_exeext'
21852   { (eval echo "$as_me:21852: \"$ac_try\"") >&5
21853   (eval $ac_try) 2>&5
21854   ac_status=$?
21855   echo "$as_me:21855: \$? = $ac_status" >&5
21856   (exit $ac_status); }; }; then
21857   cf_cv_have___va_copy=yes
21858 else
21859   echo "$as_me: failed program was:" >&5
21860 cat conftest.$ac_ext >&5
21861 cf_cv_have___va_copy=no
21862 fi
21863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21864 fi
21865 echo "$as_me:21865: result: $cf_cv_have___va_copy" >&5
21866 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21867
21868 if test "$cf_cv_have___va_copy" = yes
21869 then
21870
21871 cat >>confdefs.h <<\EOF
21872 #define HAVE___VA_COPY 1
21873 EOF
21874
21875 else # !cf_cv_have___va_copy
21876
21877 echo "$as_me:21877: checking for __builtin_va_copy" >&5
21878 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21879 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21880   echo $ECHO_N "(cached) $ECHO_C" >&6
21881 else
21882
21883 cat >conftest.$ac_ext <<_ACEOF
21884 #line 21884 "configure"
21885 #include "confdefs.h"
21886
21887 #include <stdarg.h>
21888
21889 int
21890 main (void)
21891 {
21892
21893         static va_list dst;
21894         static va_list src;
21895         __builtin_va_copy(dst, src)
21896   ;
21897   return 0;
21898 }
21899 _ACEOF
21900 rm -f conftest.$ac_objext conftest$ac_exeext
21901 if { (eval echo "$as_me:21901: \"$ac_link\"") >&5
21902   (eval $ac_link) 2>&5
21903   ac_status=$?
21904   echo "$as_me:21904: \$? = $ac_status" >&5
21905   (exit $ac_status); } &&
21906          { ac_try='test -s conftest$ac_exeext'
21907   { (eval echo "$as_me:21907: \"$ac_try\"") >&5
21908   (eval $ac_try) 2>&5
21909   ac_status=$?
21910   echo "$as_me:21910: \$? = $ac_status" >&5
21911   (exit $ac_status); }; }; then
21912   cf_cv_have___builtin_va_copy=yes
21913 else
21914   echo "$as_me: failed program was:" >&5
21915 cat conftest.$ac_ext >&5
21916 cf_cv_have___builtin_va_copy=no
21917 fi
21918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21919 fi
21920 echo "$as_me:21920: result: $cf_cv_have___builtin_va_copy" >&5
21921 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21922
21923 test "$cf_cv_have___builtin_va_copy" = yes &&
21924
21925 cat >>confdefs.h <<\EOF
21926 #define HAVE___BUILTIN_VA_COPY 1
21927 EOF
21928
21929 fi # cf_cv_have___va_copy
21930
21931 fi # cf_cv_have_va_copy
21932
21933 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21934 (*yes*)
21935         ;;
21936
21937 (*)
21938         echo "$as_me:21938: checking if we can simply copy va_list" >&5
21939 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21940 if test "${cf_cv_pointer_va_list+set}" = set; then
21941   echo $ECHO_N "(cached) $ECHO_C" >&6
21942 else
21943
21944 cat >conftest.$ac_ext <<_ACEOF
21945 #line 21945 "configure"
21946 #include "confdefs.h"
21947
21948 #include <stdarg.h>
21949
21950 int
21951 main (void)
21952 {
21953
21954         va_list dst;
21955         va_list src;
21956         dst = src
21957   ;
21958   return 0;
21959 }
21960 _ACEOF
21961 rm -f conftest.$ac_objext conftest$ac_exeext
21962 if { (eval echo "$as_me:21962: \"$ac_link\"") >&5
21963   (eval $ac_link) 2>&5
21964   ac_status=$?
21965   echo "$as_me:21965: \$? = $ac_status" >&5
21966   (exit $ac_status); } &&
21967          { ac_try='test -s conftest$ac_exeext'
21968   { (eval echo "$as_me:21968: \"$ac_try\"") >&5
21969   (eval $ac_try) 2>&5
21970   ac_status=$?
21971   echo "$as_me:21971: \$? = $ac_status" >&5
21972   (exit $ac_status); }; }; then
21973   cf_cv_pointer_va_list=yes
21974 else
21975   echo "$as_me: failed program was:" >&5
21976 cat conftest.$ac_ext >&5
21977 cf_cv_pointer_va_list=no
21978 fi
21979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21980 fi
21981 echo "$as_me:21981: result: $cf_cv_pointer_va_list" >&5
21982 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21983
21984         if test "$cf_cv_pointer_va_list" = no
21985         then
21986                 echo "$as_me:21986: checking if we can copy va_list indirectly" >&5
21987 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21988 if test "${cf_cv_array_va_list+set}" = set; then
21989   echo $ECHO_N "(cached) $ECHO_C" >&6
21990 else
21991
21992 cat >conftest.$ac_ext <<_ACEOF
21993 #line 21993 "configure"
21994 #include "confdefs.h"
21995
21996 #include <stdarg.h>
21997
21998 int
21999 main (void)
22000 {
22001
22002         va_list dst;
22003         va_list src;
22004         *dst = *src
22005   ;
22006   return 0;
22007 }
22008 _ACEOF
22009 rm -f conftest.$ac_objext conftest$ac_exeext
22010 if { (eval echo "$as_me:22010: \"$ac_link\"") >&5
22011   (eval $ac_link) 2>&5
22012   ac_status=$?
22013   echo "$as_me:22013: \$? = $ac_status" >&5
22014   (exit $ac_status); } &&
22015          { ac_try='test -s conftest$ac_exeext'
22016   { (eval echo "$as_me:22016: \"$ac_try\"") >&5
22017   (eval $ac_try) 2>&5
22018   ac_status=$?
22019   echo "$as_me:22019: \$? = $ac_status" >&5
22020   (exit $ac_status); }; }; then
22021   cf_cv_array_va_list=yes
22022 else
22023   echo "$as_me: failed program was:" >&5
22024 cat conftest.$ac_ext >&5
22025 cf_cv_array_va_list=no
22026 fi
22027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22028 fi
22029 echo "$as_me:22029: result: $cf_cv_array_va_list" >&5
22030 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22031                 test "$cf_cv_array_va_list" = yes &&
22032 cat >>confdefs.h <<\EOF
22033 #define ARRAY_VA_LIST 1
22034 EOF
22035
22036         fi
22037         ;;
22038 esac
22039
22040 echo "$as_me:22040: checking for pid_t" >&5
22041 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22042 if test "${ac_cv_type_pid_t+set}" = set; then
22043   echo $ECHO_N "(cached) $ECHO_C" >&6
22044 else
22045   cat >conftest.$ac_ext <<_ACEOF
22046 #line 22046 "configure"
22047 #include "confdefs.h"
22048 $ac_includes_default
22049 int
22050 main (void)
22051 {
22052 if ((pid_t *) 0)
22053   return 0;
22054 if (sizeof (pid_t))
22055   return 0;
22056   ;
22057   return 0;
22058 }
22059 _ACEOF
22060 rm -f conftest.$ac_objext
22061 if { (eval echo "$as_me:22061: \"$ac_compile\"") >&5
22062   (eval $ac_compile) 2>&5
22063   ac_status=$?
22064   echo "$as_me:22064: \$? = $ac_status" >&5
22065   (exit $ac_status); } &&
22066          { ac_try='test -s conftest.$ac_objext'
22067   { (eval echo "$as_me:22067: \"$ac_try\"") >&5
22068   (eval $ac_try) 2>&5
22069   ac_status=$?
22070   echo "$as_me:22070: \$? = $ac_status" >&5
22071   (exit $ac_status); }; }; then
22072   ac_cv_type_pid_t=yes
22073 else
22074   echo "$as_me: failed program was:" >&5
22075 cat conftest.$ac_ext >&5
22076 ac_cv_type_pid_t=no
22077 fi
22078 rm -f conftest.$ac_objext conftest.$ac_ext
22079 fi
22080 echo "$as_me:22080: result: $ac_cv_type_pid_t" >&5
22081 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22082 if test $ac_cv_type_pid_t = yes; then
22083   :
22084 else
22085
22086 cat >>confdefs.h <<EOF
22087 #define pid_t int
22088 EOF
22089
22090 fi
22091
22092 for ac_header in unistd.h vfork.h
22093 do
22094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22095 echo "$as_me:22095: checking for $ac_header" >&5
22096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22098   echo $ECHO_N "(cached) $ECHO_C" >&6
22099 else
22100   cat >conftest.$ac_ext <<_ACEOF
22101 #line 22101 "configure"
22102 #include "confdefs.h"
22103 #include <$ac_header>
22104 _ACEOF
22105 if { (eval echo "$as_me:22105: \"$ac_cpp conftest.$ac_ext\"") >&5
22106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22107   ac_status=$?
22108   egrep -v '^ *\+' conftest.er1 >conftest.err
22109   rm -f conftest.er1
22110   cat conftest.err >&5
22111   echo "$as_me:22111: \$? = $ac_status" >&5
22112   (exit $ac_status); } >/dev/null; then
22113   if test -s conftest.err; then
22114     ac_cpp_err=$ac_c_preproc_warn_flag
22115   else
22116     ac_cpp_err=
22117   fi
22118 else
22119   ac_cpp_err=yes
22120 fi
22121 if test -z "$ac_cpp_err"; then
22122   eval "$as_ac_Header=yes"
22123 else
22124   echo "$as_me: failed program was:" >&5
22125   cat conftest.$ac_ext >&5
22126   eval "$as_ac_Header=no"
22127 fi
22128 rm -f conftest.err conftest.$ac_ext
22129 fi
22130 echo "$as_me:22130: result: `eval echo '${'$as_ac_Header'}'`" >&5
22131 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22132 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22133   cat >>confdefs.h <<EOF
22134 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22135 EOF
22136
22137 fi
22138 done
22139
22140 for ac_func in fork vfork
22141 do
22142 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22143 echo "$as_me:22143: checking for $ac_func" >&5
22144 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22145 if eval "test \"\${$as_ac_var+set}\" = set"; then
22146   echo $ECHO_N "(cached) $ECHO_C" >&6
22147 else
22148   cat >conftest.$ac_ext <<_ACEOF
22149 #line 22149 "configure"
22150 #include "confdefs.h"
22151 #define $ac_func autoconf_temporary
22152 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22153 #undef $ac_func
22154
22155 #ifdef __cplusplus
22156 extern "C"
22157 #endif
22158
22159 /* We use char because int might match the return type of a gcc2
22160    builtin and then its argument prototype would still apply.  */
22161 char $ac_func (void);
22162
22163 int
22164 main (void)
22165 {
22166
22167 /* The GNU C library defines stubs for functions which it implements
22168     to always fail with ENOSYS.  Some functions are actually named
22169     something starting with __ and the normal name is an alias.  */
22170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22171 #error found stub for $ac_func
22172 #endif
22173
22174         return $ac_func ();
22175   ;
22176   return 0;
22177 }
22178 _ACEOF
22179 rm -f conftest.$ac_objext conftest$ac_exeext
22180 if { (eval echo "$as_me:22180: \"$ac_link\"") >&5
22181   (eval $ac_link) 2>&5
22182   ac_status=$?
22183   echo "$as_me:22183: \$? = $ac_status" >&5
22184   (exit $ac_status); } &&
22185          { ac_try='test -s conftest$ac_exeext'
22186   { (eval echo "$as_me:22186: \"$ac_try\"") >&5
22187   (eval $ac_try) 2>&5
22188   ac_status=$?
22189   echo "$as_me:22189: \$? = $ac_status" >&5
22190   (exit $ac_status); }; }; then
22191   eval "$as_ac_var=yes"
22192 else
22193   echo "$as_me: failed program was:" >&5
22194 cat conftest.$ac_ext >&5
22195 eval "$as_ac_var=no"
22196 fi
22197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22198 fi
22199 echo "$as_me:22199: result: `eval echo '${'$as_ac_var'}'`" >&5
22200 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22201 if test `eval echo '${'$as_ac_var'}'` = yes; then
22202   cat >>confdefs.h <<EOF
22203 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22204 EOF
22205
22206 fi
22207 done
22208
22209 ac_cv_func_fork_works=$ac_cv_func_fork
22210 if test "x$ac_cv_func_fork" = xyes; then
22211   echo "$as_me:22211: checking for working fork" >&5
22212 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22213 if test "${ac_cv_func_fork_works+set}" = set; then
22214   echo $ECHO_N "(cached) $ECHO_C" >&6
22215 else
22216   if test "$cross_compiling" = yes; then
22217   ac_cv_func_fork_works=cross
22218 else
22219   cat >conftest.$ac_ext <<_ACEOF
22220 /* By Rüdiger Kuhlmann. */
22221       #include <sys/types.h>
22222       #if HAVE_UNISTD_H
22223       # include <unistd.h>
22224       #endif
22225       /* Some systems only have a dummy stub for fork() */
22226       int main (void)
22227       {
22228         if (fork() < 0)
22229           $ac_main_return (1);
22230         $ac_main_return (0);
22231       }
22232 _ACEOF
22233 rm -f conftest$ac_exeext
22234 if { (eval echo "$as_me:22234: \"$ac_link\"") >&5
22235   (eval $ac_link) 2>&5
22236   ac_status=$?
22237   echo "$as_me:22237: \$? = $ac_status" >&5
22238   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22239   { (eval echo "$as_me:22239: \"$ac_try\"") >&5
22240   (eval $ac_try) 2>&5
22241   ac_status=$?
22242   echo "$as_me:22242: \$? = $ac_status" >&5
22243   (exit $ac_status); }; }; then
22244   ac_cv_func_fork_works=yes
22245 else
22246   echo "$as_me: program exited with status $ac_status" >&5
22247 echo "$as_me: failed program was:" >&5
22248 cat conftest.$ac_ext >&5
22249 ac_cv_func_fork_works=no
22250 fi
22251 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22252 fi
22253 fi
22254 echo "$as_me:22254: result: $ac_cv_func_fork_works" >&5
22255 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22256
22257 fi
22258 if test "x$ac_cv_func_fork_works" = xcross; then
22259   case $host in
22260     *-*-amigaos* | *-*-msdosdjgpp*)
22261       # Override, as these systems have only a dummy fork() stub
22262       ac_cv_func_fork_works=no
22263       ;;
22264     *)
22265       ac_cv_func_fork_works=yes
22266       ;;
22267   esac
22268   { echo "$as_me:22268: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22269 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22270 fi
22271 ac_cv_func_vfork_works=$ac_cv_func_vfork
22272 if test "x$ac_cv_func_vfork" = xyes; then
22273   echo "$as_me:22273: checking for working vfork" >&5
22274 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22275 if test "${ac_cv_func_vfork_works+set}" = set; then
22276   echo $ECHO_N "(cached) $ECHO_C" >&6
22277 else
22278   if test "$cross_compiling" = yes; then
22279   ac_cv_func_vfork_works=cross
22280 else
22281   cat >conftest.$ac_ext <<_ACEOF
22282 #line 22282 "configure"
22283 #include "confdefs.h"
22284 /* Thanks to Paul Eggert for this test.  */
22285 #include <stdio.h>
22286 #include <sys/types.h>
22287 #include <sys/stat.h>
22288 #if HAVE_UNISTD_H
22289 # include <unistd.h>
22290 #endif
22291 #if HAVE_VFORK_H
22292 # include <vfork.h>
22293 #endif
22294 /* On some sparc systems, changes by the child to local and incoming
22295    argument registers are propagated back to the parent.  The compiler
22296    is told about this with #include <vfork.h>, but some compilers
22297    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22298    static variable whose address is put into a register that is
22299    clobbered by the vfork.  */
22300 static
22301 #ifdef __cplusplus
22302 sparc_address_test (int arg)
22303 # else
22304 sparc_address_test (arg) int arg;
22305 #endif
22306 {
22307   static pid_t child;
22308   if (!child) {
22309     child = vfork ();
22310     if (child < 0) {
22311       perror ("vfork");
22312       _exit(2);
22313     }
22314     if (!child) {
22315       arg = getpid();
22316       write(-1, "", 0);
22317       _exit (arg);
22318     }
22319   }
22320 }
22321
22322 int
22323 main (void)
22324 {
22325   pid_t parent = getpid ();
22326   pid_t child;
22327
22328   sparc_address_test ();
22329
22330   child = vfork ();
22331
22332   if (child == 0) {
22333     /* Here is another test for sparc vfork register problems.  This
22334        test uses lots of local variables, at least as many local
22335        variables as main has allocated so far including compiler
22336        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22337        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22338        reuse the register of parent for one of the local variables,
22339        since it will think that parent can't possibly be used any more
22340        in this routine.  Assigning to the local variable will thus
22341        munge parent in the parent process.  */
22342     pid_t
22343       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22344       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22345     /* Convince the compiler that p..p7 are live; otherwise, it might
22346        use the same hardware register for all 8 local variables.  */
22347     if (p != p1 || p != p2 || p != p3 || p != p4
22348         || p != p5 || p != p6 || p != p7)
22349       _exit(1);
22350
22351     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22352        from child file descriptors.  If the child closes a descriptor
22353        before it execs or exits, this munges the parent's descriptor
22354        as well.  Test for this by closing stdout in the child.  */
22355     _exit(close(fileno(stdout)) != 0);
22356   } else {
22357     int status;
22358     struct stat st;
22359
22360     while (wait(&status) != child)
22361       ;
22362     $ac_main_return(
22363          /* Was there some problem with vforking?  */
22364          child < 0
22365
22366          /* Did the child fail?  (This shouldn't happen.)  */
22367          || status
22368
22369          /* Did the vfork/compiler bug occur?  */
22370          || parent != getpid()
22371
22372          /* Did the file descriptor bug occur?  */
22373          || fstat(fileno(stdout), &st) != 0
22374          );
22375   }
22376 }
22377 _ACEOF
22378 rm -f conftest$ac_exeext
22379 if { (eval echo "$as_me:22379: \"$ac_link\"") >&5
22380   (eval $ac_link) 2>&5
22381   ac_status=$?
22382   echo "$as_me:22382: \$? = $ac_status" >&5
22383   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22384   { (eval echo "$as_me:22384: \"$ac_try\"") >&5
22385   (eval $ac_try) 2>&5
22386   ac_status=$?
22387   echo "$as_me:22387: \$? = $ac_status" >&5
22388   (exit $ac_status); }; }; then
22389   ac_cv_func_vfork_works=yes
22390 else
22391   echo "$as_me: program exited with status $ac_status" >&5
22392 echo "$as_me: failed program was:" >&5
22393 cat conftest.$ac_ext >&5
22394 ac_cv_func_vfork_works=no
22395 fi
22396 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22397 fi
22398 fi
22399 echo "$as_me:22399: result: $ac_cv_func_vfork_works" >&5
22400 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22401
22402 fi;
22403 if test "x$ac_cv_func_fork_works" = xcross; then
22404   ac_cv_func_vfork_works=ac_cv_func_vfork
22405   { echo "$as_me:22405: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22406 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22407 fi
22408
22409 if test "x$ac_cv_func_vfork_works" = xyes; then
22410
22411 cat >>confdefs.h <<\EOF
22412 #define HAVE_WORKING_VFORK 1
22413 EOF
22414
22415 else
22416
22417 cat >>confdefs.h <<\EOF
22418 #define vfork fork
22419 EOF
22420
22421 fi
22422 if test "x$ac_cv_func_fork_works" = xyes; then
22423
22424 cat >>confdefs.h <<\EOF
22425 #define HAVE_WORKING_FORK 1
22426 EOF
22427
22428 fi
22429
22430 echo "$as_me:22430: checking if fopen accepts explicit binary mode" >&5
22431 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22432 if test "${cf_cv_fopen_bin_r+set}" = set; then
22433   echo $ECHO_N "(cached) $ECHO_C" >&6
22434 else
22435
22436         if test "$cross_compiling" = yes; then
22437   cf_cv_fopen_bin_r=unknown
22438 else
22439   cat >conftest.$ac_ext <<_ACEOF
22440 #line 22440 "configure"
22441 #include "confdefs.h"
22442
22443 #include <stdio.h>
22444 int main(void) {
22445         FILE *fp = fopen("conftest.tmp", "wb");
22446         int rc = 0;
22447         if (fp != 0) {
22448                 int p, q;
22449                 for (p = 0; p < 256; ++p) {
22450                         fputc(p, fp);
22451                 }
22452                 fclose(fp);
22453                 fp = fopen("conftest.tmp", "rb");
22454                 if (fp != 0) {
22455                         for (p = 0; p < 256; ++p) {
22456                                 q = fgetc(fp);
22457                                 if (q != p) {
22458                                         rc = 1;
22459                                         break;
22460                                 }
22461                         }
22462                 } else {
22463                         rc = 1;
22464                 }
22465         } else {
22466                 rc = 1;
22467         }
22468         ${cf_cv_main_return:-return} (rc);
22469 }
22470
22471 _ACEOF
22472 rm -f conftest$ac_exeext
22473 if { (eval echo "$as_me:22473: \"$ac_link\"") >&5
22474   (eval $ac_link) 2>&5
22475   ac_status=$?
22476   echo "$as_me:22476: \$? = $ac_status" >&5
22477   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22478   { (eval echo "$as_me:22478: \"$ac_try\"") >&5
22479   (eval $ac_try) 2>&5
22480   ac_status=$?
22481   echo "$as_me:22481: \$? = $ac_status" >&5
22482   (exit $ac_status); }; }; then
22483   cf_cv_fopen_bin_r=yes
22484 else
22485   echo "$as_me: program exited with status $ac_status" >&5
22486 echo "$as_me: failed program was:" >&5
22487 cat conftest.$ac_ext >&5
22488 cf_cv_fopen_bin_r=no
22489 fi
22490 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22491 fi
22492
22493 fi
22494 echo "$as_me:22494: result: $cf_cv_fopen_bin_r" >&5
22495 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22496 test "x$cf_cv_fopen_bin_r" != xno &&
22497 cat >>confdefs.h <<\EOF
22498 #define USE_FOPEN_BIN_R 1
22499 EOF
22500
22501 # special check for test/ditto.c
22502
22503 echo "$as_me:22503: checking for openpty in -lutil" >&5
22504 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22505 if test "${ac_cv_lib_util_openpty+set}" = set; then
22506   echo $ECHO_N "(cached) $ECHO_C" >&6
22507 else
22508   ac_check_lib_save_LIBS=$LIBS
22509 LIBS="-lutil  $LIBS"
22510 cat >conftest.$ac_ext <<_ACEOF
22511 #line 22511 "configure"
22512 #include "confdefs.h"
22513
22514 /* Override any gcc2 internal prototype to avoid an error.  */
22515 #ifdef __cplusplus
22516 extern "C"
22517 #endif
22518 /* We use char because int might match the return type of a gcc2
22519    builtin and then its argument prototype would still apply.  */
22520 char openpty ();
22521 int
22522 main (void)
22523 {
22524 openpty ();
22525   ;
22526   return 0;
22527 }
22528 _ACEOF
22529 rm -f conftest.$ac_objext conftest$ac_exeext
22530 if { (eval echo "$as_me:22530: \"$ac_link\"") >&5
22531   (eval $ac_link) 2>&5
22532   ac_status=$?
22533   echo "$as_me:22533: \$? = $ac_status" >&5
22534   (exit $ac_status); } &&
22535          { ac_try='test -s conftest$ac_exeext'
22536   { (eval echo "$as_me:22536: \"$ac_try\"") >&5
22537   (eval $ac_try) 2>&5
22538   ac_status=$?
22539   echo "$as_me:22539: \$? = $ac_status" >&5
22540   (exit $ac_status); }; }; then
22541   ac_cv_lib_util_openpty=yes
22542 else
22543   echo "$as_me: failed program was:" >&5
22544 cat conftest.$ac_ext >&5
22545 ac_cv_lib_util_openpty=no
22546 fi
22547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22548 LIBS=$ac_check_lib_save_LIBS
22549 fi
22550 echo "$as_me:22550: result: $ac_cv_lib_util_openpty" >&5
22551 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22552 if test $ac_cv_lib_util_openpty = yes; then
22553   cf_cv_lib_util=yes
22554 else
22555   cf_cv_lib_util=no
22556 fi
22557
22558 echo "$as_me:22558: checking for openpty header" >&5
22559 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22560 if test "${cf_cv_func_openpty+set}" = set; then
22561   echo $ECHO_N "(cached) $ECHO_C" >&6
22562 else
22563
22564         cf_save_LIBS="$LIBS"
22565         test $cf_cv_lib_util = yes && {
22566 cf_add_libs="$LIBS"
22567 # reverse order
22568 cf_add_0lib=
22569 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22570 # filter duplicates
22571 for cf_add_1lib in $cf_add_0lib; do
22572         for cf_add_2lib in $cf_add_libs; do
22573                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22574                         cf_add_1lib=
22575                         break
22576                 fi
22577         done
22578         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22579 done
22580 LIBS="$cf_add_libs"
22581  }
22582         for cf_header in pty.h libutil.h util.h
22583         do
22584         cat >conftest.$ac_ext <<_ACEOF
22585 #line 22585 "configure"
22586 #include "confdefs.h"
22587
22588 #include <$cf_header>
22589
22590 int
22591 main (void)
22592 {
22593
22594         int x = openpty((int *)0, (int *)0, (char *)0,
22595                                    (struct termios *)0, (struct winsize *)0);
22596
22597   ;
22598   return 0;
22599 }
22600 _ACEOF
22601 rm -f conftest.$ac_objext conftest$ac_exeext
22602 if { (eval echo "$as_me:22602: \"$ac_link\"") >&5
22603   (eval $ac_link) 2>&5
22604   ac_status=$?
22605   echo "$as_me:22605: \$? = $ac_status" >&5
22606   (exit $ac_status); } &&
22607          { ac_try='test -s conftest$ac_exeext'
22608   { (eval echo "$as_me:22608: \"$ac_try\"") >&5
22609   (eval $ac_try) 2>&5
22610   ac_status=$?
22611   echo "$as_me:22611: \$? = $ac_status" >&5
22612   (exit $ac_status); }; }; then
22613
22614                 cf_cv_func_openpty=$cf_header
22615                 break
22616
22617 else
22618   echo "$as_me: failed program was:" >&5
22619 cat conftest.$ac_ext >&5
22620
22621                 cf_cv_func_openpty=no
22622
22623 fi
22624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22625         done
22626         LIBS="$cf_save_LIBS"
22627
22628 fi
22629 echo "$as_me:22629: result: $cf_cv_func_openpty" >&5
22630 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22631
22632 if test "$cf_cv_func_openpty" != no ; then
22633
22634 cat >>confdefs.h <<EOF
22635 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22636 EOF
22637
22638 cat >>confdefs.h <<\EOF
22639 #define USE_XTERM_PTY 1
22640 EOF
22641
22642         if test "x$cf_cv_lib_util" = xyes ; then
22643
22644 cf_add_libs="$TEST_LIBS"
22645 # reverse order
22646 cf_add_0lib=
22647 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22648 # filter duplicates
22649 for cf_add_1lib in $cf_add_0lib; do
22650         for cf_add_2lib in $cf_add_libs; do
22651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22652                         cf_add_1lib=
22653                         break
22654                 fi
22655         done
22656         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22657 done
22658 TEST_LIBS="$cf_add_libs"
22659
22660         fi
22661 fi
22662
22663 if test "$with_hashed_db" != no ; then
22664
22665 cat >>confdefs.h <<\EOF
22666 #define USE_HASHED_DB 1
22667 EOF
22668
22669 case $with_hashed_db in
22670 (yes|*able*)
22671         ;;
22672 (*)
22673         if test -d "$with_hashed_db" ; then
22674
22675 if test -n "$with_hashed_db/include" ; then
22676   for cf_add_incdir in $with_hashed_db/include
22677   do
22678         while test $cf_add_incdir != /usr/include
22679         do
22680           if test -d $cf_add_incdir
22681           then
22682                 cf_have_incdir=no
22683                 if test -n "$CFLAGS$CPPFLAGS" ; then
22684                   # a loop is needed to ensure we can add subdirs of existing dirs
22685                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22686                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22687                           cf_have_incdir=yes; break
22688                         fi
22689                   done
22690                 fi
22691
22692                 if test "$cf_have_incdir" = no ; then
22693                   if test "$cf_add_incdir" = /usr/local/include ; then
22694                         if test "$GCC" = yes
22695                         then
22696                           cf_save_CPPFLAGS=$CPPFLAGS
22697
22698         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22699         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22700
22701                           cat >conftest.$ac_ext <<_ACEOF
22702 #line 22702 "configure"
22703 #include "confdefs.h"
22704 #include <stdio.h>
22705 int
22706 main (void)
22707 {
22708 printf("Hello")
22709   ;
22710   return 0;
22711 }
22712 _ACEOF
22713 rm -f conftest.$ac_objext
22714 if { (eval echo "$as_me:22714: \"$ac_compile\"") >&5
22715   (eval $ac_compile) 2>&5
22716   ac_status=$?
22717   echo "$as_me:22717: \$? = $ac_status" >&5
22718   (exit $ac_status); } &&
22719          { ac_try='test -s conftest.$ac_objext'
22720   { (eval echo "$as_me:22720: \"$ac_try\"") >&5
22721   (eval $ac_try) 2>&5
22722   ac_status=$?
22723   echo "$as_me:22723: \$? = $ac_status" >&5
22724   (exit $ac_status); }; }; then
22725   :
22726 else
22727   echo "$as_me: failed program was:" >&5
22728 cat conftest.$ac_ext >&5
22729 cf_have_incdir=yes
22730 fi
22731 rm -f conftest.$ac_objext conftest.$ac_ext
22732                           CPPFLAGS=$cf_save_CPPFLAGS
22733                         fi
22734                   fi
22735                 fi
22736
22737                 if test "$cf_have_incdir" = no ; then
22738                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22739
22740 echo "${as_me:-configure}:22740: testing adding $cf_add_incdir to include-path ..." 1>&5
22741
22742                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22743
22744                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22745                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22746                   cf_add_incdir="$cf_top_incdir"
22747                 else
22748                   break
22749                 fi
22750           else
22751                 break
22752           fi
22753         done
22754   done
22755 fi
22756
22757 if test -n "$with_hashed_db/lib" ; then
22758         for cf_add_libdir in $with_hashed_db/lib
22759         do
22760                 if test $cf_add_libdir = /usr/lib ; then
22761                         :
22762                 elif test -d $cf_add_libdir
22763                 then
22764                         cf_have_libdir=no
22765                         if test -n "$LDFLAGS$LIBS" ; then
22766                                 # a loop is needed to ensure we can add subdirs of existing dirs
22767                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22768                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22769                                                 cf_have_libdir=yes; break
22770                                         fi
22771                                 done
22772                         fi
22773                         if test "$cf_have_libdir" = no ; then
22774                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22775
22776 echo "${as_me:-configure}:22776: testing adding $cf_add_libdir to library-path ..." 1>&5
22777
22778                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22779                         fi
22780                 fi
22781         done
22782 fi
22783
22784         else
22785                 case "$with_hashed_db" in
22786                 (./*|../*|/*)
22787                         { echo "$as_me:22787: WARNING: no such directory $with_hashed_db" >&5
22788 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22789                         ;;
22790                 (*)
22791
22792 cf_search=
22793
22794 test "x$prefix" != "xNONE" && \
22795 test -d "$prefix" && \
22796  {
22797         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22798         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22799         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22800         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22801         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22802         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22803 }
22804
22805 for cf_subdir_prefix in \
22806         /usr \
22807         /usr/local \
22808         /usr/pkg \
22809         /opt \
22810         /opt/local \
22811         $HOME
22812 do
22813
22814 test "x$cf_subdir_prefix" != "x$prefix" && \
22815 test -d "$cf_subdir_prefix" && \
22816 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22817         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22818         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22819         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22820         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22821         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22822         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"
22823 }
22824
22825 done
22826
22827         for cf_item in $cf_search
22828         do
22829                 case $cf_item in
22830                 (*/$with_hashed_db)
22831
22832 if test -n "$cf_item" ; then
22833   for cf_add_incdir in $cf_item
22834   do
22835         while test $cf_add_incdir != /usr/include
22836         do
22837           if test -d $cf_add_incdir
22838           then
22839                 cf_have_incdir=no
22840                 if test -n "$CFLAGS$CPPFLAGS" ; then
22841                   # a loop is needed to ensure we can add subdirs of existing dirs
22842                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22843                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22844                           cf_have_incdir=yes; break
22845                         fi
22846                   done
22847                 fi
22848
22849                 if test "$cf_have_incdir" = no ; then
22850                   if test "$cf_add_incdir" = /usr/local/include ; then
22851                         if test "$GCC" = yes
22852                         then
22853                           cf_save_CPPFLAGS=$CPPFLAGS
22854
22855         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22856         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22857
22858                           cat >conftest.$ac_ext <<_ACEOF
22859 #line 22859 "configure"
22860 #include "confdefs.h"
22861 #include <stdio.h>
22862 int
22863 main (void)
22864 {
22865 printf("Hello")
22866   ;
22867   return 0;
22868 }
22869 _ACEOF
22870 rm -f conftest.$ac_objext
22871 if { (eval echo "$as_me:22871: \"$ac_compile\"") >&5
22872   (eval $ac_compile) 2>&5
22873   ac_status=$?
22874   echo "$as_me:22874: \$? = $ac_status" >&5
22875   (exit $ac_status); } &&
22876          { ac_try='test -s conftest.$ac_objext'
22877   { (eval echo "$as_me:22877: \"$ac_try\"") >&5
22878   (eval $ac_try) 2>&5
22879   ac_status=$?
22880   echo "$as_me:22880: \$? = $ac_status" >&5
22881   (exit $ac_status); }; }; then
22882   :
22883 else
22884   echo "$as_me: failed program was:" >&5
22885 cat conftest.$ac_ext >&5
22886 cf_have_incdir=yes
22887 fi
22888 rm -f conftest.$ac_objext conftest.$ac_ext
22889                           CPPFLAGS=$cf_save_CPPFLAGS
22890                         fi
22891                   fi
22892                 fi
22893
22894                 if test "$cf_have_incdir" = no ; then
22895                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22896
22897 echo "${as_me:-configure}:22897: testing adding $cf_add_incdir to include-path ..." 1>&5
22898
22899                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22900
22901                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22902                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22903                   cf_add_incdir="$cf_top_incdir"
22904                 else
22905                   break
22906                 fi
22907           else
22908                 break
22909           fi
22910         done
22911   done
22912 fi
22913
22914                         ;;
22915                 esac
22916         done
22917
22918 cf_search=
22919
22920 test "x$prefix" != "xNONE" && \
22921 test -d "$prefix" && \
22922  {
22923         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22924         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22925         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22926         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22927         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22928         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22929 }
22930
22931 for cf_subdir_prefix in \
22932         /usr \
22933         /usr/local \
22934         /usr/pkg \
22935         /opt \
22936         /opt/local \
22937         $HOME
22938 do
22939
22940 test "x$cf_subdir_prefix" != "x$prefix" && \
22941 test -d "$cf_subdir_prefix" && \
22942 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22943         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22944         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22945         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22946         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22947         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22948         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"
22949 }
22950
22951 done
22952
22953         for cf_item in $cf_search
22954         do
22955                 case $cf_item in
22956                 (*/$with_hashed_db)
22957
22958 if test -n "$cf_item" ; then
22959         for cf_add_libdir in $cf_item
22960         do
22961                 if test $cf_add_libdir = /usr/lib ; then
22962                         :
22963                 elif test -d $cf_add_libdir
22964                 then
22965                         cf_have_libdir=no
22966                         if test -n "$LDFLAGS$LIBS" ; then
22967                                 # a loop is needed to ensure we can add subdirs of existing dirs
22968                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22969                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22970                                                 cf_have_libdir=yes; break
22971                                         fi
22972                                 done
22973                         fi
22974                         if test "$cf_have_libdir" = no ; then
22975                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22976
22977 echo "${as_me:-configure}:22977: testing adding $cf_add_libdir to library-path ..." 1>&5
22978
22979                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22980                         fi
22981                 fi
22982         done
22983 fi
22984
22985                         ;;
22986                 esac
22987         done
22988
22989                         ;;
22990                 esac
22991         fi
22992 esac
22993
22994 echo "$as_me:22994: checking for db.h" >&5
22995 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22996 if test "${ac_cv_header_db_h+set}" = set; then
22997   echo $ECHO_N "(cached) $ECHO_C" >&6
22998 else
22999   cat >conftest.$ac_ext <<_ACEOF
23000 #line 23000 "configure"
23001 #include "confdefs.h"
23002 #include <db.h>
23003 _ACEOF
23004 if { (eval echo "$as_me:23004: \"$ac_cpp conftest.$ac_ext\"") >&5
23005   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23006   ac_status=$?
23007   egrep -v '^ *\+' conftest.er1 >conftest.err
23008   rm -f conftest.er1
23009   cat conftest.err >&5
23010   echo "$as_me:23010: \$? = $ac_status" >&5
23011   (exit $ac_status); } >/dev/null; then
23012   if test -s conftest.err; then
23013     ac_cpp_err=$ac_c_preproc_warn_flag
23014   else
23015     ac_cpp_err=
23016   fi
23017 else
23018   ac_cpp_err=yes
23019 fi
23020 if test -z "$ac_cpp_err"; then
23021   ac_cv_header_db_h=yes
23022 else
23023   echo "$as_me: failed program was:" >&5
23024   cat conftest.$ac_ext >&5
23025   ac_cv_header_db_h=no
23026 fi
23027 rm -f conftest.err conftest.$ac_ext
23028 fi
23029 echo "$as_me:23029: result: $ac_cv_header_db_h" >&5
23030 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23031 if test $ac_cv_header_db_h = yes; then
23032
23033 echo "$as_me:23033: checking for version of db" >&5
23034 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23035 if test "${cf_cv_hashed_db_version+set}" = set; then
23036   echo $ECHO_N "(cached) $ECHO_C" >&6
23037 else
23038
23039 cf_cv_hashed_db_version=unknown
23040
23041 for cf_db_version in 1 2 3 4 5 6
23042 do
23043
23044 echo "${as_me:-configure}:23044: testing checking for db version $cf_db_version ..." 1>&5
23045
23046         cat >conftest.$ac_ext <<_ACEOF
23047 #line 23047 "configure"
23048 #include "confdefs.h"
23049
23050 $ac_includes_default
23051 #include <db.h>
23052
23053 #ifdef DB_VERSION_MAJOR
23054         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23055 #if $cf_db_version == DB_VERSION_MAJOR
23056         /* ok */
23057 #else
23058         make an error
23059 #endif
23060 #else
23061 #if $cf_db_version == 1
23062         /* ok: assuming this is DB 1.8.5 */
23063 #else
23064         make an error
23065 #endif
23066 #endif
23067
23068 int
23069 main (void)
23070 {
23071 DBT *foo = 0
23072   ;
23073   return 0;
23074 }
23075 _ACEOF
23076 rm -f conftest.$ac_objext
23077 if { (eval echo "$as_me:23077: \"$ac_compile\"") >&5
23078   (eval $ac_compile) 2>&5
23079   ac_status=$?
23080   echo "$as_me:23080: \$? = $ac_status" >&5
23081   (exit $ac_status); } &&
23082          { ac_try='test -s conftest.$ac_objext'
23083   { (eval echo "$as_me:23083: \"$ac_try\"") >&5
23084   (eval $ac_try) 2>&5
23085   ac_status=$?
23086   echo "$as_me:23086: \$? = $ac_status" >&5
23087   (exit $ac_status); }; }; then
23088
23089         cf_cv_hashed_db_version=$cf_db_version
23090         break
23091
23092 else
23093   echo "$as_me: failed program was:" >&5
23094 cat conftest.$ac_ext >&5
23095 fi
23096 rm -f conftest.$ac_objext conftest.$ac_ext
23097 done
23098
23099 fi
23100 echo "$as_me:23100: result: $cf_cv_hashed_db_version" >&5
23101 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23102
23103 if test "$cf_cv_hashed_db_version" = unknown ; then
23104         { { echo "$as_me:23104: error: Cannot determine version of db" >&5
23105 echo "$as_me: error: Cannot determine version of db" >&2;}
23106    { (exit 1); exit 1; }; }
23107 else
23108
23109 echo "$as_me:23109: checking for db libraries" >&5
23110 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23111 if test "${cf_cv_hashed_db_libs+set}" = set; then
23112   echo $ECHO_N "(cached) $ECHO_C" >&6
23113 else
23114
23115 cf_cv_hashed_db_libs=unknown
23116 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23117 do
23118         cf_save_libs="$LIBS"
23119         if test -n "$cf_db_libs"; then
23120
23121 cf_add_libs="$LIBS"
23122 # reverse order
23123 cf_add_0lib=
23124 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23125 # filter duplicates
23126 for cf_add_1lib in $cf_add_0lib; do
23127         for cf_add_2lib in $cf_add_libs; do
23128                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23129                         cf_add_1lib=
23130                         break
23131                 fi
23132         done
23133         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23134 done
23135 LIBS="$cf_add_libs"
23136
23137         fi
23138
23139 echo "${as_me:-configure}:23139: testing checking for library "$cf_db_libs" ..." 1>&5
23140
23141         cat >conftest.$ac_ext <<_ACEOF
23142 #line 23142 "configure"
23143 #include "confdefs.h"
23144
23145 $ac_includes_default
23146 #include <db.h>
23147
23148 int
23149 main (void)
23150 {
23151
23152         char *path = "/tmp/foo";
23153 #ifdef DB_VERSION_MAJOR
23154 #if DB_VERSION_MAJOR >= 4
23155         DB *result = 0;
23156         db_create(&result, NULL, 0);
23157         result->open(result,
23158                 NULL,
23159                 path,
23160                 path,
23161                 DB_HASH,
23162                 DB_CREATE,
23163                 0644);
23164 #elif DB_VERSION_MAJOR >= 3
23165         DB *result = 0;
23166         db_create(&result, NULL, 0);
23167         result->open(result,
23168                 path,
23169                 path,
23170                 DB_HASH,
23171                 DB_CREATE,
23172                 0644);
23173 #elif DB_VERSION_MAJOR >= 2
23174         DB *result = 0;
23175         db_open(path,
23176                 DB_HASH,
23177                 DB_CREATE,
23178                 0644,
23179                 (DB_ENV *) 0,
23180                 (DB_INFO *) 0,
23181                 &result);
23182 #endif /* DB_VERSION_MAJOR */
23183 #else
23184         DB *result = dbopen(path,
23185                      2,
23186                      0644,
23187                      DB_HASH,
23188                      0);
23189 #endif
23190         ${cf_cv_main_return:-return}(result != 0)
23191
23192   ;
23193   return 0;
23194 }
23195 _ACEOF
23196 rm -f conftest.$ac_objext conftest$ac_exeext
23197 if { (eval echo "$as_me:23197: \"$ac_link\"") >&5
23198   (eval $ac_link) 2>&5
23199   ac_status=$?
23200   echo "$as_me:23200: \$? = $ac_status" >&5
23201   (exit $ac_status); } &&
23202          { ac_try='test -s conftest$ac_exeext'
23203   { (eval echo "$as_me:23203: \"$ac_try\"") >&5
23204   (eval $ac_try) 2>&5
23205   ac_status=$?
23206   echo "$as_me:23206: \$? = $ac_status" >&5
23207   (exit $ac_status); }; }; then
23208
23209         if test -n "$cf_db_libs" ; then
23210                 cf_cv_hashed_db_libs=$cf_db_libs
23211         else
23212                 cf_cv_hashed_db_libs=default
23213         fi
23214         LIBS="$cf_save_libs"
23215         break
23216
23217 else
23218   echo "$as_me: failed program was:" >&5
23219 cat conftest.$ac_ext >&5
23220 fi
23221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23222         LIBS="$cf_save_libs"
23223 done
23224
23225 fi
23226 echo "$as_me:23226: result: $cf_cv_hashed_db_libs" >&5
23227 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23228
23229         if test "$cf_cv_hashed_db_libs" = unknown ; then
23230                 { { echo "$as_me:23230: error: Cannot determine library for db" >&5
23231 echo "$as_me: error: Cannot determine library for db" >&2;}
23232    { (exit 1); exit 1; }; }
23233         elif test "$cf_cv_hashed_db_libs" != default ; then
23234
23235 cf_add_libs="$LIBS"
23236 # reverse order
23237 cf_add_0lib=
23238 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23239 # filter duplicates
23240 for cf_add_1lib in $cf_add_0lib; do
23241         for cf_add_2lib in $cf_add_libs; do
23242                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23243                         cf_add_1lib=
23244                         break
23245                 fi
23246         done
23247         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23248 done
23249 LIBS="$cf_add_libs"
23250
23251         fi
23252 fi
23253
23254 else
23255
23256         { { echo "$as_me:23256: error: Cannot find db.h" >&5
23257 echo "$as_me: error: Cannot find db.h" >&2;}
23258    { (exit 1); exit 1; }; }
23259
23260 fi
23261
23262 fi
23263
23264 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23265         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23266         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23267 fi
23268
23269 # Just in case, check if the C compiler has a bool type.
23270
23271 echo "$as_me:23271: checking if we should include stdbool.h" >&5
23272 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23273
23274 if test "${cf_cv_header_stdbool_h+set}" = set; then
23275   echo $ECHO_N "(cached) $ECHO_C" >&6
23276 else
23277
23278         cat >conftest.$ac_ext <<_ACEOF
23279 #line 23279 "configure"
23280 #include "confdefs.h"
23281
23282 int
23283 main (void)
23284 {
23285 bool foo = false
23286   ;
23287   return 0;
23288 }
23289 _ACEOF
23290 rm -f conftest.$ac_objext
23291 if { (eval echo "$as_me:23291: \"$ac_compile\"") >&5
23292   (eval $ac_compile) 2>&5
23293   ac_status=$?
23294   echo "$as_me:23294: \$? = $ac_status" >&5
23295   (exit $ac_status); } &&
23296          { ac_try='test -s conftest.$ac_objext'
23297   { (eval echo "$as_me:23297: \"$ac_try\"") >&5
23298   (eval $ac_try) 2>&5
23299   ac_status=$?
23300   echo "$as_me:23300: \$? = $ac_status" >&5
23301   (exit $ac_status); }; }; then
23302   cf_cv_header_stdbool_h=0
23303 else
23304   echo "$as_me: failed program was:" >&5
23305 cat conftest.$ac_ext >&5
23306 cat >conftest.$ac_ext <<_ACEOF
23307 #line 23307 "configure"
23308 #include "confdefs.h"
23309
23310 #ifndef __BEOS__
23311 #include <stdbool.h>
23312 #endif
23313
23314 int
23315 main (void)
23316 {
23317 bool foo = false
23318   ;
23319   return 0;
23320 }
23321 _ACEOF
23322 rm -f conftest.$ac_objext
23323 if { (eval echo "$as_me:23323: \"$ac_compile\"") >&5
23324   (eval $ac_compile) 2>&5
23325   ac_status=$?
23326   echo "$as_me:23326: \$? = $ac_status" >&5
23327   (exit $ac_status); } &&
23328          { ac_try='test -s conftest.$ac_objext'
23329   { (eval echo "$as_me:23329: \"$ac_try\"") >&5
23330   (eval $ac_try) 2>&5
23331   ac_status=$?
23332   echo "$as_me:23332: \$? = $ac_status" >&5
23333   (exit $ac_status); }; }; then
23334   cf_cv_header_stdbool_h=1
23335 else
23336   echo "$as_me: failed program was:" >&5
23337 cat conftest.$ac_ext >&5
23338 cf_cv_header_stdbool_h=0
23339 fi
23340 rm -f conftest.$ac_objext conftest.$ac_ext
23341 fi
23342 rm -f conftest.$ac_objext conftest.$ac_ext
23343 fi
23344
23345 if test "$cf_cv_header_stdbool_h" = 1
23346 then    echo "$as_me:23346: result: yes" >&5
23347 echo "${ECHO_T}yes" >&6
23348 else    echo "$as_me:23348: result: no" >&5
23349 echo "${ECHO_T}no" >&6
23350 fi
23351
23352 echo "$as_me:23352: checking for builtin bool type" >&5
23353 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23354
23355 if test "${cf_cv_cc_bool_type+set}" = set; then
23356   echo $ECHO_N "(cached) $ECHO_C" >&6
23357 else
23358
23359         cat >conftest.$ac_ext <<_ACEOF
23360 #line 23360 "configure"
23361 #include "confdefs.h"
23362
23363 #include <stdio.h>
23364 #include <sys/types.h>
23365
23366 int
23367 main (void)
23368 {
23369 bool x = false
23370   ;
23371   return 0;
23372 }
23373 _ACEOF
23374 rm -f conftest.$ac_objext
23375 if { (eval echo "$as_me:23375: \"$ac_compile\"") >&5
23376   (eval $ac_compile) 2>&5
23377   ac_status=$?
23378   echo "$as_me:23378: \$? = $ac_status" >&5
23379   (exit $ac_status); } &&
23380          { ac_try='test -s conftest.$ac_objext'
23381   { (eval echo "$as_me:23381: \"$ac_try\"") >&5
23382   (eval $ac_try) 2>&5
23383   ac_status=$?
23384   echo "$as_me:23384: \$? = $ac_status" >&5
23385   (exit $ac_status); }; }; then
23386   cf_cv_cc_bool_type=1
23387 else
23388   echo "$as_me: failed program was:" >&5
23389 cat conftest.$ac_ext >&5
23390 cf_cv_cc_bool_type=0
23391 fi
23392 rm -f conftest.$ac_objext conftest.$ac_ext
23393
23394 fi
23395
23396 if test "$cf_cv_cc_bool_type" = 1
23397 then    echo "$as_me:23397: result: yes" >&5
23398 echo "${ECHO_T}yes" >&6
23399 else    echo "$as_me:23399: result: no" >&5
23400 echo "${ECHO_T}no" >&6
23401 fi
23402
23403 # Check for C++ compiler characteristics (and ensure that it's there!)
23404 if test -n "$CXX" ; then
23405         ac_ext=cc
23406 ac_cpp='$CXXCPP $CPPFLAGS'
23407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23410 ac_main_return=return
23411
23412 if test -n "$GXX" ; then
23413
23414         cf_save="$LIBS"
23415         LIBS="$LIBS $CXXLIBS"
23416         echo "$as_me:23416: checking if we already have C++ library" >&5
23417 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23418         cat >conftest.$ac_ext <<_ACEOF
23419 #line 23419 "configure"
23420 #include "confdefs.h"
23421
23422                         #include <iostream>
23423 int
23424 main (void)
23425 {
23426
23427                         std::cout << "Hello World!" << std::endl;
23428   ;
23429   return 0;
23430 }
23431 _ACEOF
23432 rm -f conftest.$ac_objext conftest$ac_exeext
23433 if { (eval echo "$as_me:23433: \"$ac_link\"") >&5
23434   (eval $ac_link) 2>&5
23435   ac_status=$?
23436   echo "$as_me:23436: \$? = $ac_status" >&5
23437   (exit $ac_status); } &&
23438          { ac_try='test -s conftest$ac_exeext'
23439   { (eval echo "$as_me:23439: \"$ac_try\"") >&5
23440   (eval $ac_try) 2>&5
23441   ac_status=$?
23442   echo "$as_me:23442: \$? = $ac_status" >&5
23443   (exit $ac_status); }; }; then
23444   cf_have_libstdcpp=yes
23445 else
23446   echo "$as_me: failed program was:" >&5
23447 cat conftest.$ac_ext >&5
23448 cf_have_libstdcpp=no
23449 fi
23450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23451         echo "$as_me:23451: result: $cf_have_libstdcpp" >&5
23452 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23453         LIBS="$cf_save"
23454
23455         if test $cf_have_libstdcpp != yes
23456         then
23457                 case $cf_cv_system_name in
23458                 (os2*)
23459                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23460                                 cf_stdcpp_libname=stdcpp
23461                         else
23462                                 cf_stdcpp_libname=stdc++
23463                         fi
23464                         ;;
23465                 (*)
23466                         cf_stdcpp_libname=stdc++
23467                         ;;
23468                 esac
23469
23470                 echo "$as_me:23470: checking for library $cf_stdcpp_libname" >&5
23471 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23472 if test "${cf_cv_libstdcpp+set}" = set; then
23473   echo $ECHO_N "(cached) $ECHO_C" >&6
23474 else
23475
23476                         cf_save="$LIBS"
23477                         LIBS="$LIBS $CXXLIBS"
23478
23479 cf_add_libs="$LIBS"
23480 # reverse order
23481 cf_add_0lib=
23482 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23483 # filter duplicates
23484 for cf_add_1lib in $cf_add_0lib; do
23485         for cf_add_2lib in $cf_add_libs; do
23486                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23487                         cf_add_1lib=
23488                         break
23489                 fi
23490         done
23491         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23492 done
23493 LIBS="$cf_add_libs"
23494
23495                 cat >conftest.$ac_ext <<_ACEOF
23496 #line 23496 "configure"
23497 #include "confdefs.h"
23498
23499                                 #include <iostream>
23500 int
23501 main (void)
23502 {
23503
23504                                 std::cout << "Hello World!" << std::endl;
23505   ;
23506   return 0;
23507 }
23508 _ACEOF
23509 rm -f conftest.$ac_objext conftest$ac_exeext
23510 if { (eval echo "$as_me:23510: \"$ac_link\"") >&5
23511   (eval $ac_link) 2>&5
23512   ac_status=$?
23513   echo "$as_me:23513: \$? = $ac_status" >&5
23514   (exit $ac_status); } &&
23515          { ac_try='test -s conftest$ac_exeext'
23516   { (eval echo "$as_me:23516: \"$ac_try\"") >&5
23517   (eval $ac_try) 2>&5
23518   ac_status=$?
23519   echo "$as_me:23519: \$? = $ac_status" >&5
23520   (exit $ac_status); }; }; then
23521   cf_cv_libstdcpp=yes
23522 else
23523   echo "$as_me: failed program was:" >&5
23524 cat conftest.$ac_ext >&5
23525 cf_cv_libstdcpp=no
23526 fi
23527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23528                         LIBS="$cf_save"
23529
23530 fi
23531 echo "$as_me:23531: result: $cf_cv_libstdcpp" >&5
23532 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23533                 test "$cf_cv_libstdcpp" = yes && {
23534 cf_add_libs="$CXXLIBS"
23535 # reverse order
23536 cf_add_0lib=
23537 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23538 # filter duplicates
23539 for cf_add_1lib in $cf_add_0lib; do
23540         for cf_add_2lib in $cf_add_libs; do
23541                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23542                         cf_add_1lib=
23543                         break
23544                 fi
23545         done
23546         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23547 done
23548 CXXLIBS="$cf_add_libs"
23549  }
23550         fi
23551 fi
23552
23553         echo "$as_me:23553: checking whether $CXX understands -c and -o together" >&5
23554 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23555 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23556   echo $ECHO_N "(cached) $ECHO_C" >&6
23557 else
23558
23559 cat > conftest.$ac_ext <<CF_EOF
23560 int main(void)
23561 {
23562         ${cf_cv_main_return:-return}(0);
23563 }
23564 CF_EOF
23565 # We do the test twice because some compilers refuse to overwrite an
23566 # existing .o file with -o, though they will create one.
23567 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23568 if { (eval echo "$as_me:23568: \"$ac_try\"") >&5
23569   (eval $ac_try) 2>&5
23570   ac_status=$?
23571   echo "$as_me:23571: \$? = $ac_status" >&5
23572   (exit $ac_status); } &&
23573   test -f conftest2.$ac_objext && { (eval echo "$as_me:23573: \"$ac_try\"") >&5
23574   (eval $ac_try) 2>&5
23575   ac_status=$?
23576   echo "$as_me:23576: \$? = $ac_status" >&5
23577   (exit $ac_status); };
23578 then
23579   eval cf_cv_prog_CXX_c_o=yes
23580 else
23581   eval cf_cv_prog_CXX_c_o=no
23582 fi
23583 rm -rf conftest*
23584
23585 fi
23586 if test $cf_cv_prog_CXX_c_o = yes; then
23587   echo "$as_me:23587: result: yes" >&5
23588 echo "${ECHO_T}yes" >&6
23589 else
23590   echo "$as_me:23590: result: no" >&5
23591 echo "${ECHO_T}no" >&6
23592 fi
23593
23594         case $GXX_VERSION in
23595         (1.*|2.[0-6]*|[1-9][0-9].*)
23596                 cf_cxx_library=yes
23597                 ;;
23598         (*-2.7*|2.7*)
23599
23600 cf_cxx_library=unknown
23601 case $cf_cv_system_name in
23602 (os2*)
23603         cf_gpp_libname=gpp
23604         ;;
23605 (*)
23606         cf_gpp_libname=g++
23607         ;;
23608 esac
23609 if test "$GXX" = yes; then
23610         echo "$as_me:23610: checking for lib$cf_gpp_libname" >&5
23611 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23612         cf_save="$LIBS"
23613
23614 cf_add_libs="$LIBS"
23615 # reverse order
23616 cf_add_0lib=
23617 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23618 # filter duplicates
23619 for cf_add_1lib in $cf_add_0lib; do
23620         for cf_add_2lib in $cf_add_libs; do
23621                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23622                         cf_add_1lib=
23623                         break
23624                 fi
23625         done
23626         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23627 done
23628 LIBS="$cf_add_libs"
23629
23630         cat >conftest.$ac_ext <<_ACEOF
23631 #line 23631 "configure"
23632 #include "confdefs.h"
23633
23634 #include <$cf_gpp_libname/builtin.h>
23635
23636 int
23637 main (void)
23638 {
23639 two_arg_error_handler_t foo2 = lib_error_handler
23640   ;
23641   return 0;
23642 }
23643 _ACEOF
23644 rm -f conftest.$ac_objext conftest$ac_exeext
23645 if { (eval echo "$as_me:23645: \"$ac_link\"") >&5
23646   (eval $ac_link) 2>&5
23647   ac_status=$?
23648   echo "$as_me:23648: \$? = $ac_status" >&5
23649   (exit $ac_status); } &&
23650          { ac_try='test -s conftest$ac_exeext'
23651   { (eval echo "$as_me:23651: \"$ac_try\"") >&5
23652   (eval $ac_try) 2>&5
23653   ac_status=$?
23654   echo "$as_me:23654: \$? = $ac_status" >&5
23655   (exit $ac_status); }; }; then
23656   cf_cxx_library=yes
23657
23658 cf_add_libs="$CXXLIBS"
23659 # reverse order
23660 cf_add_0lib=
23661 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23662 # filter duplicates
23663 for cf_add_1lib in $cf_add_0lib; do
23664         for cf_add_2lib in $cf_add_libs; do
23665                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23666                         cf_add_1lib=
23667                         break
23668                 fi
23669         done
23670         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23671 done
23672 CXXLIBS="$cf_add_libs"
23673
23674          if test "$cf_gpp_libname" = cpp ; then
23675
23676 cat >>confdefs.h <<\EOF
23677 #define HAVE_GPP_BUILTIN_H 1
23678 EOF
23679
23680          else
23681
23682 cat >>confdefs.h <<\EOF
23683 #define HAVE_GXX_BUILTIN_H 1
23684 EOF
23685
23686          fi
23687 else
23688   echo "$as_me: failed program was:" >&5
23689 cat conftest.$ac_ext >&5
23690 cat >conftest.$ac_ext <<_ACEOF
23691 #line 23691 "configure"
23692 #include "confdefs.h"
23693
23694 #include <builtin.h>
23695
23696 int
23697 main (void)
23698 {
23699 two_arg_error_handler_t foo2 = lib_error_handler
23700   ;
23701   return 0;
23702 }
23703 _ACEOF
23704 rm -f conftest.$ac_objext conftest$ac_exeext
23705 if { (eval echo "$as_me:23705: \"$ac_link\"") >&5
23706   (eval $ac_link) 2>&5
23707   ac_status=$?
23708   echo "$as_me:23708: \$? = $ac_status" >&5
23709   (exit $ac_status); } &&
23710          { ac_try='test -s conftest$ac_exeext'
23711   { (eval echo "$as_me:23711: \"$ac_try\"") >&5
23712   (eval $ac_try) 2>&5
23713   ac_status=$?
23714   echo "$as_me:23714: \$? = $ac_status" >&5
23715   (exit $ac_status); }; }; then
23716   cf_cxx_library=yes
23717
23718 cf_add_libs="$CXXLIBS"
23719 # reverse order
23720 cf_add_0lib=
23721 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23722 # filter duplicates
23723 for cf_add_1lib in $cf_add_0lib; do
23724         for cf_add_2lib in $cf_add_libs; do
23725                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23726                         cf_add_1lib=
23727                         break
23728                 fi
23729         done
23730         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23731 done
23732 CXXLIBS="$cf_add_libs"
23733
23734 cat >>confdefs.h <<\EOF
23735 #define HAVE_BUILTIN_H 1
23736 EOF
23737
23738 else
23739   echo "$as_me: failed program was:" >&5
23740 cat conftest.$ac_ext >&5
23741 cf_cxx_library=no
23742 fi
23743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23744 fi
23745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23746         LIBS="$cf_save"
23747         echo "$as_me:23747: result: $cf_cxx_library" >&5
23748 echo "${ECHO_T}$cf_cxx_library" >&6
23749 fi
23750
23751                 ;;
23752         (*)
23753                 cf_cxx_library=no
23754                 ;;
23755         esac
23756
23757         ac_ext=cc
23758 ac_cpp='$CXXCPP $CPPFLAGS'
23759 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23760 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23761 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23762 ac_main_return=return
23763 echo "$as_me:23763: checking how to run the C++ preprocessor" >&5
23764 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23765 if test -z "$CXXCPP"; then
23766   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23767   echo $ECHO_N "(cached) $ECHO_C" >&6
23768 else
23769       # Double quotes because CXXCPP needs to be expanded
23770     for CXXCPP in "$CXX -E" "/lib/cpp"
23771     do
23772       ac_preproc_ok=false
23773 for ac_cxx_preproc_warn_flag in '' yes
23774 do
23775   # Use a header file that comes with gcc, so configuring glibc
23776   # with a fresh cross-compiler works.
23777   # On the NeXT, cc -E runs the code through the compiler's parser,
23778   # not just through cpp. "Syntax error" is here to catch this case.
23779   cat >conftest.$ac_ext <<_ACEOF
23780 #line 23780 "configure"
23781 #include "confdefs.h"
23782 #include <assert.h>
23783                      Syntax error
23784 _ACEOF
23785 if { (eval echo "$as_me:23785: \"$ac_cpp conftest.$ac_ext\"") >&5
23786   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23787   ac_status=$?
23788   egrep -v '^ *\+' conftest.er1 >conftest.err
23789   rm -f conftest.er1
23790   cat conftest.err >&5
23791   echo "$as_me:23791: \$? = $ac_status" >&5
23792   (exit $ac_status); } >/dev/null; then
23793   if test -s conftest.err; then
23794     ac_cpp_err=$ac_cxx_preproc_warn_flag
23795   else
23796     ac_cpp_err=
23797   fi
23798 else
23799   ac_cpp_err=yes
23800 fi
23801 if test -z "$ac_cpp_err"; then
23802   :
23803 else
23804   echo "$as_me: failed program was:" >&5
23805   cat conftest.$ac_ext >&5
23806   # Broken: fails on valid input.
23807 continue
23808 fi
23809 rm -f conftest.err conftest.$ac_ext
23810
23811   # OK, works on sane cases.  Now check whether non-existent headers
23812   # can be detected and how.
23813   cat >conftest.$ac_ext <<_ACEOF
23814 #line 23814 "configure"
23815 #include "confdefs.h"
23816 #include <ac_nonexistent.h>
23817 _ACEOF
23818 if { (eval echo "$as_me:23818: \"$ac_cpp conftest.$ac_ext\"") >&5
23819   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23820   ac_status=$?
23821   egrep -v '^ *\+' conftest.er1 >conftest.err
23822   rm -f conftest.er1
23823   cat conftest.err >&5
23824   echo "$as_me:23824: \$? = $ac_status" >&5
23825   (exit $ac_status); } >/dev/null; then
23826   if test -s conftest.err; then
23827     ac_cpp_err=$ac_cxx_preproc_warn_flag
23828   else
23829     ac_cpp_err=
23830   fi
23831 else
23832   ac_cpp_err=yes
23833 fi
23834 if test -z "$ac_cpp_err"; then
23835   # Broken: success on invalid input.
23836 continue
23837 else
23838   echo "$as_me: failed program was:" >&5
23839   cat conftest.$ac_ext >&5
23840   # Passes both tests.
23841 ac_preproc_ok=:
23842 break
23843 fi
23844 rm -f conftest.err conftest.$ac_ext
23845
23846 done
23847 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23848 rm -f conftest.err conftest.$ac_ext
23849 if $ac_preproc_ok; then
23850   break
23851 fi
23852
23853     done
23854     ac_cv_prog_CXXCPP=$CXXCPP
23855
23856 fi
23857   CXXCPP=$ac_cv_prog_CXXCPP
23858 else
23859   ac_cv_prog_CXXCPP=$CXXCPP
23860 fi
23861 echo "$as_me:23861: result: $CXXCPP" >&5
23862 echo "${ECHO_T}$CXXCPP" >&6
23863 ac_preproc_ok=false
23864 for ac_cxx_preproc_warn_flag in '' yes
23865 do
23866   # Use a header file that comes with gcc, so configuring glibc
23867   # with a fresh cross-compiler works.
23868   # On the NeXT, cc -E runs the code through the compiler's parser,
23869   # not just through cpp. "Syntax error" is here to catch this case.
23870   cat >conftest.$ac_ext <<_ACEOF
23871 #line 23871 "configure"
23872 #include "confdefs.h"
23873 #include <assert.h>
23874                      Syntax error
23875 _ACEOF
23876 if { (eval echo "$as_me:23876: \"$ac_cpp conftest.$ac_ext\"") >&5
23877   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23878   ac_status=$?
23879   egrep -v '^ *\+' conftest.er1 >conftest.err
23880   rm -f conftest.er1
23881   cat conftest.err >&5
23882   echo "$as_me:23882: \$? = $ac_status" >&5
23883   (exit $ac_status); } >/dev/null; then
23884   if test -s conftest.err; then
23885     ac_cpp_err=$ac_cxx_preproc_warn_flag
23886   else
23887     ac_cpp_err=
23888   fi
23889 else
23890   ac_cpp_err=yes
23891 fi
23892 if test -z "$ac_cpp_err"; then
23893   :
23894 else
23895   echo "$as_me: failed program was:" >&5
23896   cat conftest.$ac_ext >&5
23897   # Broken: fails on valid input.
23898 continue
23899 fi
23900 rm -f conftest.err conftest.$ac_ext
23901
23902   # OK, works on sane cases.  Now check whether non-existent headers
23903   # can be detected and how.
23904   cat >conftest.$ac_ext <<_ACEOF
23905 #line 23905 "configure"
23906 #include "confdefs.h"
23907 #include <ac_nonexistent.h>
23908 _ACEOF
23909 if { (eval echo "$as_me:23909: \"$ac_cpp conftest.$ac_ext\"") >&5
23910   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23911   ac_status=$?
23912   egrep -v '^ *\+' conftest.er1 >conftest.err
23913   rm -f conftest.er1
23914   cat conftest.err >&5
23915   echo "$as_me:23915: \$? = $ac_status" >&5
23916   (exit $ac_status); } >/dev/null; then
23917   if test -s conftest.err; then
23918     ac_cpp_err=$ac_cxx_preproc_warn_flag
23919   else
23920     ac_cpp_err=
23921   fi
23922 else
23923   ac_cpp_err=yes
23924 fi
23925 if test -z "$ac_cpp_err"; then
23926   # Broken: success on invalid input.
23927 continue
23928 else
23929   echo "$as_me: failed program was:" >&5
23930   cat conftest.$ac_ext >&5
23931   # Passes both tests.
23932 ac_preproc_ok=:
23933 break
23934 fi
23935 rm -f conftest.err conftest.$ac_ext
23936
23937 done
23938 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23939 rm -f conftest.err conftest.$ac_ext
23940 if $ac_preproc_ok; then
23941   :
23942 else
23943   { { echo "$as_me:23943: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23944 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23945    { (exit 1); exit 1; }; }
23946 fi
23947
23948 ac_ext=cc
23949 ac_cpp='$CXXCPP $CPPFLAGS'
23950 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23951 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23952 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23953 ac_main_return=return
23954
23955 for ac_header in typeinfo
23956 do
23957 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23958 echo "$as_me:23958: checking for $ac_header" >&5
23959 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23960 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23961   echo $ECHO_N "(cached) $ECHO_C" >&6
23962 else
23963   cat >conftest.$ac_ext <<_ACEOF
23964 #line 23964 "configure"
23965 #include "confdefs.h"
23966 #include <$ac_header>
23967 _ACEOF
23968 if { (eval echo "$as_me:23968: \"$ac_cpp conftest.$ac_ext\"") >&5
23969   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23970   ac_status=$?
23971   egrep -v '^ *\+' conftest.er1 >conftest.err
23972   rm -f conftest.er1
23973   cat conftest.err >&5
23974   echo "$as_me:23974: \$? = $ac_status" >&5
23975   (exit $ac_status); } >/dev/null; then
23976   if test -s conftest.err; then
23977     ac_cpp_err=$ac_cxx_preproc_warn_flag
23978   else
23979     ac_cpp_err=
23980   fi
23981 else
23982   ac_cpp_err=yes
23983 fi
23984 if test -z "$ac_cpp_err"; then
23985   eval "$as_ac_Header=yes"
23986 else
23987   echo "$as_me: failed program was:" >&5
23988   cat conftest.$ac_ext >&5
23989   eval "$as_ac_Header=no"
23990 fi
23991 rm -f conftest.err conftest.$ac_ext
23992 fi
23993 echo "$as_me:23993: result: `eval echo '${'$as_ac_Header'}'`" >&5
23994 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23995 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23996   cat >>confdefs.h <<EOF
23997 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23998 EOF
23999
24000 fi
24001 done
24002
24003 for ac_header in iostream
24004 do
24005 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24006 echo "$as_me:24006: checking for $ac_header" >&5
24007 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24008 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24009   echo $ECHO_N "(cached) $ECHO_C" >&6
24010 else
24011   cat >conftest.$ac_ext <<_ACEOF
24012 #line 24012 "configure"
24013 #include "confdefs.h"
24014 #include <$ac_header>
24015 _ACEOF
24016 if { (eval echo "$as_me:24016: \"$ac_cpp conftest.$ac_ext\"") >&5
24017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24018   ac_status=$?
24019   egrep -v '^ *\+' conftest.er1 >conftest.err
24020   rm -f conftest.er1
24021   cat conftest.err >&5
24022   echo "$as_me:24022: \$? = $ac_status" >&5
24023   (exit $ac_status); } >/dev/null; then
24024   if test -s conftest.err; then
24025     ac_cpp_err=$ac_cxx_preproc_warn_flag
24026   else
24027     ac_cpp_err=
24028   fi
24029 else
24030   ac_cpp_err=yes
24031 fi
24032 if test -z "$ac_cpp_err"; then
24033   eval "$as_ac_Header=yes"
24034 else
24035   echo "$as_me: failed program was:" >&5
24036   cat conftest.$ac_ext >&5
24037   eval "$as_ac_Header=no"
24038 fi
24039 rm -f conftest.err conftest.$ac_ext
24040 fi
24041 echo "$as_me:24041: result: `eval echo '${'$as_ac_Header'}'`" >&5
24042 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24043 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24044   cat >>confdefs.h <<EOF
24045 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24046 EOF
24047
24048 fi
24049 done
24050
24051 if test x"$ac_cv_header_iostream" = xyes ; then
24052         echo "$as_me:24052: checking if iostream uses std-namespace" >&5
24053 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24054         cat >conftest.$ac_ext <<_ACEOF
24055 #line 24055 "configure"
24056 #include "confdefs.h"
24057
24058 #include <iostream>
24059 using std::endl;
24060 using std::cerr;
24061 int
24062 main (void)
24063 {
24064
24065 cerr << "testing" << endl;
24066
24067   ;
24068   return 0;
24069 }
24070 _ACEOF
24071 rm -f conftest.$ac_objext
24072 if { (eval echo "$as_me:24072: \"$ac_compile\"") >&5
24073   (eval $ac_compile) 2>&5
24074   ac_status=$?
24075   echo "$as_me:24075: \$? = $ac_status" >&5
24076   (exit $ac_status); } &&
24077          { ac_try='test -s conftest.$ac_objext'
24078   { (eval echo "$as_me:24078: \"$ac_try\"") >&5
24079   (eval $ac_try) 2>&5
24080   ac_status=$?
24081   echo "$as_me:24081: \$? = $ac_status" >&5
24082   (exit $ac_status); }; }; then
24083   cf_iostream_namespace=yes
24084 else
24085   echo "$as_me: failed program was:" >&5
24086 cat conftest.$ac_ext >&5
24087 cf_iostream_namespace=no
24088 fi
24089 rm -f conftest.$ac_objext conftest.$ac_ext
24090         echo "$as_me:24090: result: $cf_iostream_namespace" >&5
24091 echo "${ECHO_T}$cf_iostream_namespace" >&6
24092         if test "$cf_iostream_namespace" = yes ; then
24093
24094 cat >>confdefs.h <<\EOF
24095 #define IOSTREAM_NAMESPACE 1
24096 EOF
24097
24098         fi
24099 fi
24100
24101 echo "$as_me:24101: checking if we should include stdbool.h" >&5
24102 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24103
24104 if test "${cf_cv_header_stdbool_h+set}" = set; then
24105   echo $ECHO_N "(cached) $ECHO_C" >&6
24106 else
24107
24108         cat >conftest.$ac_ext <<_ACEOF
24109 #line 24109 "configure"
24110 #include "confdefs.h"
24111
24112 int
24113 main (void)
24114 {
24115 bool foo = false
24116   ;
24117   return 0;
24118 }
24119 _ACEOF
24120 rm -f conftest.$ac_objext
24121 if { (eval echo "$as_me:24121: \"$ac_compile\"") >&5
24122   (eval $ac_compile) 2>&5
24123   ac_status=$?
24124   echo "$as_me:24124: \$? = $ac_status" >&5
24125   (exit $ac_status); } &&
24126          { ac_try='test -s conftest.$ac_objext'
24127   { (eval echo "$as_me:24127: \"$ac_try\"") >&5
24128   (eval $ac_try) 2>&5
24129   ac_status=$?
24130   echo "$as_me:24130: \$? = $ac_status" >&5
24131   (exit $ac_status); }; }; then
24132   cf_cv_header_stdbool_h=0
24133 else
24134   echo "$as_me: failed program was:" >&5
24135 cat conftest.$ac_ext >&5
24136 cat >conftest.$ac_ext <<_ACEOF
24137 #line 24137 "configure"
24138 #include "confdefs.h"
24139
24140 #ifndef __BEOS__
24141 #include <stdbool.h>
24142 #endif
24143
24144 int
24145 main (void)
24146 {
24147 bool foo = false
24148   ;
24149   return 0;
24150 }
24151 _ACEOF
24152 rm -f conftest.$ac_objext
24153 if { (eval echo "$as_me:24153: \"$ac_compile\"") >&5
24154   (eval $ac_compile) 2>&5
24155   ac_status=$?
24156   echo "$as_me:24156: \$? = $ac_status" >&5
24157   (exit $ac_status); } &&
24158          { ac_try='test -s conftest.$ac_objext'
24159   { (eval echo "$as_me:24159: \"$ac_try\"") >&5
24160   (eval $ac_try) 2>&5
24161   ac_status=$?
24162   echo "$as_me:24162: \$? = $ac_status" >&5
24163   (exit $ac_status); }; }; then
24164   cf_cv_header_stdbool_h=1
24165 else
24166   echo "$as_me: failed program was:" >&5
24167 cat conftest.$ac_ext >&5
24168 cf_cv_header_stdbool_h=0
24169 fi
24170 rm -f conftest.$ac_objext conftest.$ac_ext
24171 fi
24172 rm -f conftest.$ac_objext conftest.$ac_ext
24173 fi
24174
24175 if test "$cf_cv_header_stdbool_h" = 1
24176 then    echo "$as_me:24176: result: yes" >&5
24177 echo "${ECHO_T}yes" >&6
24178 else    echo "$as_me:24178: result: no" >&5
24179 echo "${ECHO_T}no" >&6
24180 fi
24181
24182 echo "$as_me:24182: checking for builtin bool type" >&5
24183 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24184
24185 if test "${cf_cv_builtin_bool+set}" = set; then
24186   echo $ECHO_N "(cached) $ECHO_C" >&6
24187 else
24188
24189         cat >conftest.$ac_ext <<_ACEOF
24190 #line 24190 "configure"
24191 #include "confdefs.h"
24192
24193 #include <stdio.h>
24194 #include <sys/types.h>
24195
24196 int
24197 main (void)
24198 {
24199 bool x = false
24200   ;
24201   return 0;
24202 }
24203 _ACEOF
24204 rm -f conftest.$ac_objext
24205 if { (eval echo "$as_me:24205: \"$ac_compile\"") >&5
24206   (eval $ac_compile) 2>&5
24207   ac_status=$?
24208   echo "$as_me:24208: \$? = $ac_status" >&5
24209   (exit $ac_status); } &&
24210          { ac_try='test -s conftest.$ac_objext'
24211   { (eval echo "$as_me:24211: \"$ac_try\"") >&5
24212   (eval $ac_try) 2>&5
24213   ac_status=$?
24214   echo "$as_me:24214: \$? = $ac_status" >&5
24215   (exit $ac_status); }; }; then
24216   cf_cv_builtin_bool=1
24217 else
24218   echo "$as_me: failed program was:" >&5
24219 cat conftest.$ac_ext >&5
24220 cf_cv_builtin_bool=0
24221 fi
24222 rm -f conftest.$ac_objext conftest.$ac_ext
24223
24224 fi
24225
24226 if test "$cf_cv_builtin_bool" = 1
24227 then    echo "$as_me:24227: result: yes" >&5
24228 echo "${ECHO_T}yes" >&6
24229 else    echo "$as_me:24229: result: no" >&5
24230 echo "${ECHO_T}no" >&6
24231 fi
24232
24233 echo "$as_me:24233: checking for size of bool" >&5
24234 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24235 if test "${cf_cv_type_of_bool+set}" = set; then
24236   echo $ECHO_N "(cached) $ECHO_C" >&6
24237 else
24238
24239         rm -f cf_test.out
24240         if test "$cross_compiling" = yes; then
24241   cf_cv_type_of_bool=unknown
24242 else
24243   cat >conftest.$ac_ext <<_ACEOF
24244 #line 24244 "configure"
24245 #include "confdefs.h"
24246
24247 #include <stdlib.h>
24248 #include <stdio.h>
24249
24250 #if defined(__cplusplus)
24251
24252 #ifdef HAVE_GXX_BUILTIN_H
24253 #include <g++/builtin.h>
24254 #elif HAVE_GPP_BUILTIN_H
24255 #include <gpp/builtin.h>
24256 #elif HAVE_BUILTIN_H
24257 #include <builtin.h>
24258 #endif
24259
24260 #else
24261
24262 #if $cf_cv_header_stdbool_h
24263 #include <stdbool.h>
24264 #endif
24265
24266 #endif
24267
24268 int main(void)
24269 {
24270         FILE *fp = fopen("cf_test.out", "w");
24271         if (fp != 0) {
24272                 bool x = true;
24273                 if ((bool)(-x) >= 0)
24274                         fputs("unsigned ", fp);
24275                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24276                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24277                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24278                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24279                 fclose(fp);
24280         }
24281         ${cf_cv_main_return:-return}(0);
24282 }
24283
24284 _ACEOF
24285 rm -f conftest$ac_exeext
24286 if { (eval echo "$as_me:24286: \"$ac_link\"") >&5
24287   (eval $ac_link) 2>&5
24288   ac_status=$?
24289   echo "$as_me:24289: \$? = $ac_status" >&5
24290   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24291   { (eval echo "$as_me:24291: \"$ac_try\"") >&5
24292   (eval $ac_try) 2>&5
24293   ac_status=$?
24294   echo "$as_me:24294: \$? = $ac_status" >&5
24295   (exit $ac_status); }; }; then
24296   cf_cv_type_of_bool=`cat cf_test.out`
24297                  if test -z "$cf_cv_type_of_bool"; then
24298                    cf_cv_type_of_bool=unknown
24299                  fi
24300 else
24301   echo "$as_me: program exited with status $ac_status" >&5
24302 echo "$as_me: failed program was:" >&5
24303 cat conftest.$ac_ext >&5
24304 cf_cv_type_of_bool=unknown
24305 fi
24306 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24307 fi
24308
24309 fi
24310
24311         rm -f cf_test.out
24312 echo "$as_me:24312: result: $cf_cv_type_of_bool" >&5
24313 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24314 if test "$cf_cv_type_of_bool" = unknown ; then
24315         case .$NCURSES_BOOL in
24316         (.auto|.) NCURSES_BOOL=unsigned;;
24317         esac
24318         { echo "$as_me:24318: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24319 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24320         cf_cv_type_of_bool=$NCURSES_BOOL
24321 fi
24322
24323 echo "$as_me:24323: checking for special defines needed for etip.h" >&5
24324 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24325 cf_save_CXXFLAGS="$CXXFLAGS"
24326 cf_result="none"
24327
24328 # etip.h includes ncurses.h which includes ncurses_dll.h
24329 # But ncurses_dll.h is generated - fix here.
24330 test -d include || mkdir include
24331 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
24332
24333 for cf_math in "" MATH_H
24334 do
24335 for cf_excp in "" MATH_EXCEPTION
24336 do
24337         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24338         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24339         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24340 cat >conftest.$ac_ext <<_ACEOF
24341 #line 24341 "configure"
24342 #include "confdefs.h"
24343
24344 #include <etip.h.in>
24345
24346 int
24347 main (void)
24348 {
24349
24350   ;
24351   return 0;
24352 }
24353 _ACEOF
24354 rm -f conftest.$ac_objext
24355 if { (eval echo "$as_me:24355: \"$ac_compile\"") >&5
24356   (eval $ac_compile) 2>&5
24357   ac_status=$?
24358   echo "$as_me:24358: \$? = $ac_status" >&5
24359   (exit $ac_status); } &&
24360          { ac_try='test -s conftest.$ac_objext'
24361   { (eval echo "$as_me:24361: \"$ac_try\"") >&5
24362   (eval $ac_try) 2>&5
24363   ac_status=$?
24364   echo "$as_me:24364: \$? = $ac_status" >&5
24365   (exit $ac_status); }; }; then
24366
24367         test -n "$cf_math" && cat >>confdefs.h <<EOF
24368 #define ETIP_NEEDS_${cf_math} 1
24369 EOF
24370
24371         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24372 #define ETIP_NEEDS_${cf_excp} 1
24373 EOF
24374
24375         cf_result="$cf_math $cf_excp"
24376         break 2
24377
24378 else
24379   echo "$as_me: failed program was:" >&5
24380 cat conftest.$ac_ext >&5
24381 fi
24382 rm -f conftest.$ac_objext conftest.$ac_ext
24383 done
24384 done
24385 echo "$as_me:24385: result: $cf_result" >&5
24386 echo "${ECHO_T}$cf_result" >&6
24387 CXXFLAGS="$cf_save_CXXFLAGS"
24388
24389 if test -n "$CXX"; then
24390 echo "$as_me:24390: checking if $CXX accepts parameter initialization" >&5
24391 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24392 if test "${cf_cv_cpp_param_init+set}" = set; then
24393   echo $ECHO_N "(cached) $ECHO_C" >&6
24394 else
24395
24396         ac_ext=cc
24397 ac_cpp='$CXXCPP $CPPFLAGS'
24398 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24399 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24400 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24401 ac_main_return=return
24402
24403         if test "$cross_compiling" = yes; then
24404   cf_cv_cpp_param_init=unknown
24405 else
24406   cat >conftest.$ac_ext <<_ACEOF
24407 #line 24407 "configure"
24408 #include "confdefs.h"
24409
24410 class TEST {
24411 private:
24412         int value;
24413 public:
24414         TEST(int x = 1);
24415         ~TEST();
24416 };
24417
24418 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24419 {
24420         value = x;
24421 }
24422 int main(void) { }
24423
24424 _ACEOF
24425 rm -f conftest$ac_exeext
24426 if { (eval echo "$as_me:24426: \"$ac_link\"") >&5
24427   (eval $ac_link) 2>&5
24428   ac_status=$?
24429   echo "$as_me:24429: \$? = $ac_status" >&5
24430   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24431   { (eval echo "$as_me:24431: \"$ac_try\"") >&5
24432   (eval $ac_try) 2>&5
24433   ac_status=$?
24434   echo "$as_me:24434: \$? = $ac_status" >&5
24435   (exit $ac_status); }; }; then
24436   cf_cv_cpp_param_init=yes
24437 else
24438   echo "$as_me: program exited with status $ac_status" >&5
24439 echo "$as_me: failed program was:" >&5
24440 cat conftest.$ac_ext >&5
24441 cf_cv_cpp_param_init=no
24442 fi
24443 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24444 fi
24445         ac_ext=cc
24446 ac_cpp='$CXXCPP $CPPFLAGS'
24447 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24448 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24449 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24450 ac_main_return=return
24451
24452 fi
24453 echo "$as_me:24453: result: $cf_cv_cpp_param_init" >&5
24454 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24455 fi
24456 test "$cf_cv_cpp_param_init" = yes &&
24457 cat >>confdefs.h <<\EOF
24458 #define CPP_HAS_PARAM_INIT 1
24459 EOF
24460
24461 if test -n "$CXX"; then
24462
24463 echo "$as_me:24463: checking if $CXX accepts static_cast" >&5
24464 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24465 if test "${cf_cv_cpp_static_cast+set}" = set; then
24466   echo $ECHO_N "(cached) $ECHO_C" >&6
24467 else
24468
24469         ac_ext=cc
24470 ac_cpp='$CXXCPP $CPPFLAGS'
24471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24474 ac_main_return=return
24475
24476         cat >conftest.$ac_ext <<_ACEOF
24477 #line 24477 "configure"
24478 #include "confdefs.h"
24479
24480 class NCursesPanel
24481 {
24482 public:
24483   NCursesPanel(int nlines,
24484                int ncols,
24485                int begin_y = 0,
24486                int begin_x = 0)
24487   {
24488   }
24489   NCursesPanel();
24490   ~NCursesPanel();
24491 };
24492
24493 template<class T> class NCursesUserPanel : public NCursesPanel
24494 {
24495 public:
24496   NCursesUserPanel (int nlines,
24497                     int ncols,
24498                     int begin_y = 0,
24499                     int begin_x = 0,
24500                     const T* p_UserData = static_cast<T*>(0))
24501     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24502   {
24503   };
24504   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24505   {
24506   };
24507
24508   virtual ~NCursesUserPanel() {};
24509 };
24510
24511 int
24512 main (void)
24513 {
24514
24515         const char* p_UserData = static_cast<char*>(0)
24516   ;
24517   return 0;
24518 }
24519 _ACEOF
24520 rm -f conftest.$ac_objext
24521 if { (eval echo "$as_me:24521: \"$ac_compile\"") >&5
24522   (eval $ac_compile) 2>&5
24523   ac_status=$?
24524   echo "$as_me:24524: \$? = $ac_status" >&5
24525   (exit $ac_status); } &&
24526          { ac_try='test -s conftest.$ac_objext'
24527   { (eval echo "$as_me:24527: \"$ac_try\"") >&5
24528   (eval $ac_try) 2>&5
24529   ac_status=$?
24530   echo "$as_me:24530: \$? = $ac_status" >&5
24531   (exit $ac_status); }; }; then
24532   cf_cv_cpp_static_cast=yes
24533 else
24534   echo "$as_me: failed program was:" >&5
24535 cat conftest.$ac_ext >&5
24536 cf_cv_cpp_static_cast=no
24537 fi
24538 rm -f conftest.$ac_objext conftest.$ac_ext
24539
24540         ac_ext=cc
24541 ac_cpp='$CXXCPP $CPPFLAGS'
24542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24545 ac_main_return=return
24546
24547 fi
24548 echo "$as_me:24548: result: $cf_cv_cpp_static_cast" >&5
24549 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24550
24551 fi
24552
24553 test "$cf_cv_cpp_static_cast" = yes &&
24554 cat >>confdefs.h <<\EOF
24555 #define CPP_HAS_STATIC_CAST 1
24556 EOF
24557
24558         CXX_AR='$(AR)'
24559         CXX_ARFLAGS='$(ARFLAGS)'
24560         case $cf_cv_system_name in
24561         (irix*)
24562             if test "$GXX" != yes ; then
24563                 CXX_AR='$(CXX)'
24564                 CXX_ARFLAGS='-ar -o'
24565             fi
24566             ;;
24567         (sco3.2v5*)
24568             CXXLDFLAGS="-u main"
24569             ;;
24570         (solaris2*)
24571             if test "$GXX" != yes ; then
24572                 CXX_AR='$(CXX)'
24573                 CXX_ARFLAGS='-xar -o'
24574             fi
24575             ;;
24576         esac
24577
24578 else
24579         cf_cxx_library=no
24580         cf_cv_builtin_bool=1
24581
24582         # Just because we are not configuring against C++ right now does not
24583         # mean that a user will not want to use C++.  Some distributors disable
24584         # the C++ portion of this configuration as a shortcut (or just to avoid
24585         # compiling the demo in the c++ directory).  So we need a reasonable
24586         # default for the 'bool' type.
24587         #
24588         # Caveat: since the storage of the bool type is not standardized, it
24589         # may change.
24590
24591         if test "$NCURSES_BOOL" != auto ; then
24592                 cf_cv_type_of_bool=$NCURSES_BOOL
24593                 cf_cv_header_stdbool_h=0
24594         else
24595                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24596
24597 echo "$as_me:24597: checking for size of bool" >&5
24598 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24599 if test "${cf_cv_type_of_bool+set}" = set; then
24600   echo $ECHO_N "(cached) $ECHO_C" >&6
24601 else
24602
24603         rm -f cf_test.out
24604         if test "$cross_compiling" = yes; then
24605   cf_cv_type_of_bool=unknown
24606 else
24607   cat >conftest.$ac_ext <<_ACEOF
24608 #line 24608 "configure"
24609 #include "confdefs.h"
24610
24611 #include <stdlib.h>
24612 #include <stdio.h>
24613
24614 #if defined(__cplusplus)
24615
24616 #ifdef HAVE_GXX_BUILTIN_H
24617 #include <g++/builtin.h>
24618 #elif HAVE_GPP_BUILTIN_H
24619 #include <gpp/builtin.h>
24620 #elif HAVE_BUILTIN_H
24621 #include <builtin.h>
24622 #endif
24623
24624 #else
24625
24626 #if $cf_cv_header_stdbool_h
24627 #include <stdbool.h>
24628 #endif
24629
24630 #endif
24631
24632 int main(void)
24633 {
24634         FILE *fp = fopen("cf_test.out", "w");
24635         if (fp != 0) {
24636                 bool x = true;
24637                 if ((bool)(-x) >= 0)
24638                         fputs("unsigned ", fp);
24639                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24640                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24641                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24642                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24643                 fclose(fp);
24644         }
24645         ${cf_cv_main_return:-return}(0);
24646 }
24647
24648 _ACEOF
24649 rm -f conftest$ac_exeext
24650 if { (eval echo "$as_me:24650: \"$ac_link\"") >&5
24651   (eval $ac_link) 2>&5
24652   ac_status=$?
24653   echo "$as_me:24653: \$? = $ac_status" >&5
24654   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24655   { (eval echo "$as_me:24655: \"$ac_try\"") >&5
24656   (eval $ac_try) 2>&5
24657   ac_status=$?
24658   echo "$as_me:24658: \$? = $ac_status" >&5
24659   (exit $ac_status); }; }; then
24660   cf_cv_type_of_bool=`cat cf_test.out`
24661                  if test -z "$cf_cv_type_of_bool"; then
24662                    cf_cv_type_of_bool=unknown
24663                  fi
24664 else
24665   echo "$as_me: program exited with status $ac_status" >&5
24666 echo "$as_me: failed program was:" >&5
24667 cat conftest.$ac_ext >&5
24668 cf_cv_type_of_bool=unknown
24669 fi
24670 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24671 fi
24672
24673 fi
24674
24675         rm -f cf_test.out
24676 echo "$as_me:24676: result: $cf_cv_type_of_bool" >&5
24677 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24678 if test "$cf_cv_type_of_bool" = unknown ; then
24679         case .$NCURSES_BOOL in
24680         (.auto|.) NCURSES_BOOL=unsigned;;
24681         esac
24682         { echo "$as_me:24682: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24683 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24684         cf_cv_type_of_bool=$NCURSES_BOOL
24685 fi
24686
24687                 else
24688                         echo "$as_me:24688: checking for fallback type of bool" >&5
24689 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24690                         case "$host_cpu" in
24691                         (i?86)  cf_cv_type_of_bool=char ;;
24692                         (*)     cf_cv_type_of_bool=int  ;;
24693                         esac
24694                         echo "$as_me:24694: result: $cf_cv_type_of_bool" >&5
24695 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24696                 fi
24697         fi
24698 fi
24699
24700 # If the C compiler did not declare bool, and we did not determine that the C++
24701 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24702 # ncurses library use the same type as C++ bool.  Note that this allows one to
24703 # specify the type of bool in a configure-script option and postpone
24704 # integration with the C++ compiler provided that the types are compatible.
24705 USE_CXX_BOOL=1
24706 if test $cf_cv_cc_bool_type = 1
24707 then
24708         # oops: C has a bool.  Unlikely, but C++ could differ.
24709         USE_CXX_BOOL=0
24710 elif test $cf_cv_builtin_bool = 0
24711 then
24712         # C++ has no bool
24713         USE_CXX_BOOL=0
24714 else
24715         # this is the normal case
24716         USE_CXX_BOOL='defined(__cplusplus)'
24717 fi
24718
24719 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24720
24721         if test "$cf_with_ada" != "no" ; then
24722                 if test "$with_libtool" != "no"; then
24723                         { echo "$as_me:24723: WARNING: libtool does not support Ada - disabling feature" >&5
24724 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24725                         cf_with_ada=no
24726                 fi
24727         fi
24728
24729         if test "$cf_with_ada" != "no" ; then
24730
24731 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24732 do
24733
24734 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24735
24736         unset ac_cv_path_cf_TEMP_gnat
24737         unset cf_TEMP_gnat
24738         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24739 set dummy $cf_prog_gnat; ac_word=$2
24740 echo "$as_me:24740: checking for $ac_word" >&5
24741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24742 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24743   echo $ECHO_N "(cached) $ECHO_C" >&6
24744 else
24745   case $cf_TEMP_gnat in
24746   [\\/]* | ?:[\\/]*)
24747   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24748   ;;
24749   *)
24750   ac_save_IFS=$IFS; IFS=$ac_path_separator
24751 ac_dummy="$PATH"
24752 for ac_dir in $ac_dummy; do
24753   IFS=$ac_save_IFS
24754   test -z "$ac_dir" && ac_dir=.
24755   if $as_executable_p "$ac_dir/$ac_word"; then
24756    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24757    echo "$as_me:24757: found $ac_dir/$ac_word" >&5
24758    break
24759 fi
24760 done
24761
24762   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24763   ;;
24764 esac
24765 fi
24766 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24767
24768 if test -n "$cf_TEMP_gnat"; then
24769   echo "$as_me:24769: result: $cf_TEMP_gnat" >&5
24770 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24771 else
24772   echo "$as_me:24772: result: no" >&5
24773 echo "${ECHO_T}no" >&6
24774 fi
24775
24776         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24777
24778         if test "x$cf_TEMP_gnat" != xno; then
24779                 unset cf_cv_gnat_version
24780                 unset cf_TEMP_gnat
24781
24782 echo "$as_me:24782: checking for $cf_prog_gnat version" >&5
24783 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24784 if test "${cf_cv_gnat_version+set}" = set; then
24785   echo $ECHO_N "(cached) $ECHO_C" >&6
24786 else
24787
24788 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24789         grep '[0-9].[0-9][0-9]*' |\
24790         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24791
24792 fi
24793 echo "$as_me:24793: result: $cf_cv_gnat_version" >&5
24794 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24795 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24796 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24797
24798         fi
24799         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24800
24801         unset cf_TEMP_gnat
24802         unset cf_cv_gnat_version
24803         unset ac_cv_path_cf_TEMP_gnat
24804 done
24805
24806 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24807         cf_ada_make=
24808         cf_cv_prog_gnat_correct=no
24809 else
24810         cf_ada_make=gnatmake
24811         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24812                 # gprconfig is newer than gnatmake; we can continue...
24813                 cf_ada_config="##"
24814         else
24815                 rm -rf conftest* *~conftest*
24816                 if mkdir conftest.src
24817                 then
24818                         cf_ada_config=""
24819                         cd conftest.src
24820                         for cf_gprconfig in Ada C
24821                         do
24822                                 echo "$as_me:24822: checking for gprconfig name for $cf_gprconfig" >&5
24823 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24824                                 if test $cf_gprconfig = C
24825                                 then
24826                                         for cf_gprconfig_param in \
24827                                                 $cf_gprconfig,,,,GNATGCC \
24828                                                 $cf_gprconfig,,,,GCC \
24829                                                 $cf_gprconfig
24830                                         do
24831                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24832                                                 test -n "$cf_gprconfig_value" && break
24833                                         done
24834                                 else
24835                                         cf_gprconfig_param=$cf_gprconfig
24836                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24837                                 fi
24838                                 if test -n "$cf_gprconfig_value"
24839                                 then
24840                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24841                                         echo "$as_me:24841: result: $cf_gprconfig_value" >&5
24842 echo "${ECHO_T}$cf_gprconfig_value" >&6
24843                                 else
24844                                         echo "$as_me:24844: result: missing" >&5
24845 echo "${ECHO_T}missing" >&6
24846                                         cf_ada_config="#"
24847                                         break
24848                                 fi
24849                         done
24850                         cd ..
24851                         rm -rf conftest* *~conftest*
24852                 fi
24853         fi
24854         if test "x$cf_ada_config" != "x#"
24855         then
24856
24857 echo "$as_me:24857: checking for gnat version" >&5
24858 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24859 if test "${cf_cv_gnat_version+set}" = set; then
24860   echo $ECHO_N "(cached) $ECHO_C" >&6
24861 else
24862
24863 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24864         grep '[0-9].[0-9][0-9]*' |\
24865         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24866
24867 fi
24868 echo "$as_me:24868: result: $cf_cv_gnat_version" >&5
24869 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24870 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24871
24872 case $cf_cv_gnat_version in
24873 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24874         cf_cv_prog_gnat_correct=yes
24875         ;;
24876 (*)
24877         { echo "$as_me:24877: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24878 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24879         cf_cv_prog_gnat_correct=no
24880         ;;
24881 esac
24882
24883                 # Extract the first word of "m4", so it can be a program name with args.
24884 set dummy m4; ac_word=$2
24885 echo "$as_me:24885: checking for $ac_word" >&5
24886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24887 if test "${ac_cv_prog_M4_exists+set}" = set; then
24888   echo $ECHO_N "(cached) $ECHO_C" >&6
24889 else
24890   if test -n "$M4_exists"; then
24891   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24892 else
24893   ac_save_IFS=$IFS; IFS=$ac_path_separator
24894 ac_dummy="$PATH"
24895 for ac_dir in $ac_dummy; do
24896   IFS=$ac_save_IFS
24897   test -z "$ac_dir" && ac_dir=.
24898   $as_executable_p "$ac_dir/$ac_word" || continue
24899 ac_cv_prog_M4_exists="yes"
24900 echo "$as_me:24900: found $ac_dir/$ac_word" >&5
24901 break
24902 done
24903
24904   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24905 fi
24906 fi
24907 M4_exists=$ac_cv_prog_M4_exists
24908 if test -n "$M4_exists"; then
24909   echo "$as_me:24909: result: $M4_exists" >&5
24910 echo "${ECHO_T}$M4_exists" >&6
24911 else
24912   echo "$as_me:24912: result: no" >&5
24913 echo "${ECHO_T}no" >&6
24914 fi
24915
24916                 if test "$ac_cv_prog_M4_exists" = no; then
24917                         cf_cv_prog_gnat_correct=no
24918                         { echo "$as_me:24918: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24919 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24920                 fi
24921                 if test "$cf_cv_prog_gnat_correct" = yes; then
24922                         echo "$as_me:24922: checking if GNAT works" >&5
24923 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24924
24925 rm -rf conftest* *~conftest*
24926 cat >>conftest.ads <<CF_EOF
24927 procedure conftest;
24928 CF_EOF
24929 cat >>conftest.adb <<CF_EOF
24930 with Text_IO;
24931 with GNAT.OS_Lib;
24932 procedure conftest is
24933 begin
24934    Text_IO.Put ("Hello World");
24935    Text_IO.New_Line;
24936    GNAT.OS_Lib.OS_Exit (0);
24937 end conftest;
24938 CF_EOF
24939 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24940    if ( ./conftest 1>&5 2>&1 ) ; then
24941       cf_cv_prog_gnat_correct=yes
24942    else
24943       cf_cv_prog_gnat_correct=no
24944    fi
24945 else
24946    cf_cv_prog_gnat_correct=no
24947 fi
24948 rm -rf conftest* *~conftest*
24949
24950                         echo "$as_me:24950: result: $cf_cv_prog_gnat_correct" >&5
24951 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24952                 fi
24953         else
24954                 cf_cv_prog_gnat_correct=no
24955         fi
24956 fi
24957
24958                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24959
24960         ADAFLAGS="$ADAFLAGS -gnatpn"
24961
24962         echo "$as_me:24962: checking optimization options for ADAFLAGS" >&5
24963 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24964         case "$CFLAGS" in
24965         (*-g*)
24966
24967         ADAFLAGS="$ADAFLAGS -g"
24968
24969                 ;;
24970         esac
24971         case "$CFLAGS" in
24972         (*-O*)
24973                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24974
24975         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24976
24977                 ;;
24978         esac
24979         echo "$as_me:24979: result: $ADAFLAGS" >&5
24980 echo "${ECHO_T}$ADAFLAGS" >&6
24981
24982 echo "$as_me:24982: checking if GNATPREP supports -T option" >&5
24983 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24984 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24985   echo $ECHO_N "(cached) $ECHO_C" >&6
24986 else
24987
24988 cf_cv_gnatprep_opt_t=no
24989 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24990
24991 fi
24992 echo "$as_me:24992: result: $cf_cv_gnatprep_opt_t" >&5
24993 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24994 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24995
24996 echo "$as_me:24996: checking if GNAT supports generics" >&5
24997 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24998 case $cf_cv_gnat_version in
24999 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
25000         cf_gnat_generics=yes
25001         ;;
25002 (*)
25003         cf_gnat_generics=no
25004         ;;
25005 esac
25006 echo "$as_me:25006: result: $cf_gnat_generics" >&5
25007 echo "${ECHO_T}$cf_gnat_generics" >&6
25008
25009 if test "$cf_gnat_generics" = yes
25010 then
25011         cf_compile_generics=generics
25012         cf_generic_objects="\${GENOBJS}"
25013 else
25014         cf_compile_generics=
25015         cf_generic_objects=
25016 fi
25017
25018 echo "$as_me:25018: checking if GNAT supports SIGINT" >&5
25019 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
25020 if test "${cf_cv_gnat_sigint+set}" = set; then
25021   echo $ECHO_N "(cached) $ECHO_C" >&6
25022 else
25023
25024 rm -rf conftest* *~conftest*
25025 cat >>conftest.ads <<CF_EOF
25026 with Ada.Interrupts.Names;
25027
25028 package ConfTest is
25029
25030    pragma Warnings (Off);  --  the next pragma exists since 3.11p
25031    pragma Unreserve_All_Interrupts;
25032    pragma Warnings (On);
25033
25034    protected Process is
25035       procedure Stop;
25036       function Continue return Boolean;
25037       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
25038    private
25039       Done : Boolean := False;
25040    end Process;
25041
25042 end ConfTest;
25043 CF_EOF
25044 cat >>conftest.adb <<CF_EOF
25045 package body ConfTest is
25046    protected body Process is
25047       procedure Stop is
25048       begin
25049          Done := True;
25050       end Stop;
25051       function Continue return Boolean is
25052       begin
25053          return not Done;
25054       end Continue;
25055    end Process;
25056 end ConfTest;
25057 CF_EOF
25058 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
25059       cf_cv_gnat_sigint=yes
25060 else
25061    cf_cv_gnat_sigint=no
25062 fi
25063 rm -rf conftest* *~conftest*
25064
25065 fi
25066 echo "$as_me:25066: result: $cf_cv_gnat_sigint" >&5
25067 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
25068
25069 if test $cf_cv_gnat_sigint = yes ; then
25070         USE_GNAT_SIGINT=""
25071 else
25072         USE_GNAT_SIGINT="#"
25073 fi
25074
25075 cf_gnat_libraries=no
25076 cf_gnat_projects=no
25077
25078 if test "$enable_gnat_projects" != no ; then
25079 echo "$as_me:25079: checking if GNAT supports project files" >&5
25080 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
25081 case $cf_cv_gnat_version in
25082 (3.[0-9]*)
25083         ;;
25084 (*)
25085         case $cf_cv_system_name in
25086         (cygwin*|msys*)
25087                 ;;
25088         (*)
25089                 rm -rf conftest* *~conftest*
25090                 if mkdir conftest.src conftest.bin conftest.lib
25091                 then
25092                         cd conftest.src
25093                         rm -rf conftest* *~conftest*
25094                         cat >>library.gpr <<CF_EOF
25095 project Library is
25096   Kind := External ("LIB_KIND");
25097   for Library_Name use "ConfTest";
25098   for Object_Dir use ".";
25099   for Library_ALI_Dir use External("LIBRARY_DIR");
25100   for Library_Version use External ("SONAME");
25101   for Library_Kind use Kind;
25102   for Library_Dir use External("BUILD_DIR");
25103   Source_Dir := External ("SOURCE_DIR");
25104   for Source_Dirs use (Source_Dir);
25105 end Library;
25106 CF_EOF
25107                         cat >>confpackage.ads <<CF_EOF
25108 package ConfPackage is
25109    procedure conftest;
25110 end ConfPackage;
25111 CF_EOF
25112                         cat >>confpackage.adb <<CF_EOF
25113 with Text_IO;
25114 package body ConfPackage is
25115    procedure conftest is
25116    begin
25117       Text_IO.Put ("Hello World");
25118       Text_IO.New_Line;
25119    end conftest;
25120 end ConfPackage;
25121 CF_EOF
25122                         if ( $cf_ada_make $ADAFLAGS \
25123                                         -Plibrary.gpr \
25124                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
25125                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
25126                                         -XSOURCE_DIR=`pwd` \
25127                                         -XSONAME=libConfTest.so.1 \
25128                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
25129                                 cf_gnat_projects=yes
25130                         fi
25131                         cd ..
25132                 fi
25133                 if test -f conftest.lib/confpackage.ali
25134                 then
25135                         cf_gnat_libraries=yes
25136                 fi
25137                 rm -rf conftest* *~conftest*
25138                 ;;
25139         esac
25140         ;;
25141 esac
25142 echo "$as_me:25142: result: $cf_gnat_projects" >&5
25143 echo "${ECHO_T}$cf_gnat_projects" >&6
25144 fi # enable_gnat_projects
25145
25146 if test $cf_gnat_projects = yes
25147 then
25148         echo "$as_me:25148: checking if GNAT supports libraries" >&5
25149 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25150         echo "$as_me:25150: result: $cf_gnat_libraries" >&5
25151 echo "${ECHO_T}$cf_gnat_libraries" >&6
25152 fi
25153
25154 if test "$cf_gnat_projects" = yes
25155 then
25156         USE_OLD_MAKERULES="#"
25157         USE_GNAT_PROJECTS=""
25158 else
25159         USE_OLD_MAKERULES=""
25160         USE_GNAT_PROJECTS="#"
25161 fi
25162
25163 if test "$cf_gnat_libraries" = yes
25164 then
25165         USE_GNAT_LIBRARIES=""
25166 else
25167         USE_GNAT_LIBRARIES="#"
25168 fi
25169
25170 echo "$as_me:25170: checking for ada-compiler" >&5
25171 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25172
25173 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25174 if test "${with_ada_compiler+set}" = set; then
25175   withval="$with_ada_compiler"
25176   cf_ada_compiler=$withval
25177 else
25178   cf_ada_compiler=gnatmake
25179 fi;
25180
25181 echo "$as_me:25181: result: $cf_ada_compiler" >&5
25182 echo "${ECHO_T}$cf_ada_compiler" >&6
25183
25184                         cf_ada_package=terminal_interface
25185
25186 echo "$as_me:25186: checking for ada-include" >&5
25187 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25188
25189 # Check whether --with-ada-include or --without-ada-include was given.
25190 if test "${with_ada_include+set}" = set; then
25191   withval="$with_ada_include"
25192
25193 else
25194   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25195 fi; if test -n "$prefix/share/ada/adainclude" ; then
25196
25197 if test "x$prefix" != xNONE; then
25198         cf_path_syntax="$prefix"
25199 else
25200         cf_path_syntax="$ac_default_prefix"
25201 fi
25202
25203 case ".$withval" in
25204 (.\$\(*\)*|.\'*\'*)
25205         ;;
25206 (..|./*|.\\*)
25207         ;;
25208 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25209         ;;
25210 (.\${*prefix}*|.\${*dir}*)
25211         eval withval="$withval"
25212         case ".$withval" in
25213         (.NONE/*)
25214                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25215                 ;;
25216         esac
25217         ;;
25218 (.no|.NONE/*)
25219         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25220         ;;
25221 (*)
25222         { { echo "$as_me:25222: error: expected a pathname, not \"$withval\"" >&5
25223 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25224    { (exit 1); exit 1; }; }
25225         ;;
25226 esac
25227
25228 fi
25229 eval ADA_INCLUDE="$withval"
25230
25231 echo "$as_me:25231: result: $ADA_INCLUDE" >&5
25232 echo "${ECHO_T}$ADA_INCLUDE" >&6
25233
25234 echo "$as_me:25234: checking for ada-objects" >&5
25235 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25236
25237 # Check whether --with-ada-objects or --without-ada-objects was given.
25238 if test "${with_ada_objects+set}" = set; then
25239   withval="$with_ada_objects"
25240
25241 else
25242   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25243 fi; if test -n "$prefix/lib/ada/adalib" ; then
25244
25245 if test "x$prefix" != xNONE; then
25246         cf_path_syntax="$prefix"
25247 else
25248         cf_path_syntax="$ac_default_prefix"
25249 fi
25250
25251 case ".$withval" in
25252 (.\$\(*\)*|.\'*\'*)
25253         ;;
25254 (..|./*|.\\*)
25255         ;;
25256 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25257         ;;
25258 (.\${*prefix}*|.\${*dir}*)
25259         eval withval="$withval"
25260         case ".$withval" in
25261         (.NONE/*)
25262                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25263                 ;;
25264         esac
25265         ;;
25266 (.no|.NONE/*)
25267         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25268         ;;
25269 (*)
25270         { { echo "$as_me:25270: error: expected a pathname, not \"$withval\"" >&5
25271 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25272    { (exit 1); exit 1; }; }
25273         ;;
25274 esac
25275
25276 fi
25277 eval ADA_OBJECTS="$withval"
25278
25279 echo "$as_me:25279: result: $ADA_OBJECTS" >&5
25280 echo "${ECHO_T}$ADA_OBJECTS" >&6
25281
25282 echo "$as_me:25282: checking if an Ada95 shared-library should be built" >&5
25283 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25284
25285 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25286 if test "${with_ada_sharedlib+set}" = set; then
25287   withval="$with_ada_sharedlib"
25288   with_ada_sharedlib=$withval
25289 else
25290   with_ada_sharedlib=no
25291 fi;
25292 echo "$as_me:25292: result: $with_ada_sharedlib" >&5
25293 echo "${ECHO_T}$with_ada_sharedlib" >&6
25294
25295 if test "x$with_ada_sharedlib" != xno
25296 then
25297         if test "x$cf_gnat_projects" != xyes
25298         then
25299                 { echo "$as_me:25299: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25300 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25301                 with_ada_sharedlib=no
25302         fi
25303 fi
25304
25305 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25306 MAKE_ADA_SHAREDLIB="#"
25307
25308 if test "x$with_ada_sharedlib" != xno
25309 then
25310         MAKE_ADA_SHAREDLIB=
25311         if test "x$with_ada_sharedlib" != xyes
25312         then
25313                 ADA_SHAREDLIB="$with_ada_sharedlib"
25314         fi
25315 fi
25316
25317                         # allow the Ada binding to be renamed
25318
25319 echo "$as_me:25319: checking for ada-libname" >&5
25320 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25321
25322 # Check whether --with-ada-libname or --without-ada-libname was given.
25323 if test "${with_ada_libname+set}" = set; then
25324   withval="$with_ada_libname"
25325   ADA_LIBNAME=$withval
25326 else
25327   ADA_LIBNAME=AdaCurses
25328 fi;
25329 case "x$ADA_LIBNAME" in
25330 (x|xyes|xno)
25331         ADA_LIBNAME=AdaCurses
25332         ;;
25333 esac
25334
25335 echo "$as_me:25335: result: $ADA_LIBNAME" >&5
25336 echo "${ECHO_T}$ADA_LIBNAME" >&6
25337
25338                 fi
25339         fi
25340 else
25341         cf_with_ada=no
25342 fi
25343
25344 # do this "late" to avoid conflict with header-checks
25345 if test "x$with_widec" = xyes ; then
25346         echo "$as_me:25346: checking for wchar_t" >&5
25347 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25348 if test "${ac_cv_type_wchar_t+set}" = set; then
25349   echo $ECHO_N "(cached) $ECHO_C" >&6
25350 else
25351   cat >conftest.$ac_ext <<_ACEOF
25352 #line 25352 "configure"
25353 #include "confdefs.h"
25354 $ac_includes_default
25355 int
25356 main (void)
25357 {
25358 if ((wchar_t *) 0)
25359   return 0;
25360 if (sizeof (wchar_t))
25361   return 0;
25362   ;
25363   return 0;
25364 }
25365 _ACEOF
25366 rm -f conftest.$ac_objext
25367 if { (eval echo "$as_me:25367: \"$ac_compile\"") >&5
25368   (eval $ac_compile) 2>&5
25369   ac_status=$?
25370   echo "$as_me:25370: \$? = $ac_status" >&5
25371   (exit $ac_status); } &&
25372          { ac_try='test -s conftest.$ac_objext'
25373   { (eval echo "$as_me:25373: \"$ac_try\"") >&5
25374   (eval $ac_try) 2>&5
25375   ac_status=$?
25376   echo "$as_me:25376: \$? = $ac_status" >&5
25377   (exit $ac_status); }; }; then
25378   ac_cv_type_wchar_t=yes
25379 else
25380   echo "$as_me: failed program was:" >&5
25381 cat conftest.$ac_ext >&5
25382 ac_cv_type_wchar_t=no
25383 fi
25384 rm -f conftest.$ac_objext conftest.$ac_ext
25385 fi
25386 echo "$as_me:25386: result: $ac_cv_type_wchar_t" >&5
25387 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25388
25389 echo "$as_me:25389: checking size of wchar_t" >&5
25390 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25391 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25392   echo $ECHO_N "(cached) $ECHO_C" >&6
25393 else
25394   if test "$ac_cv_type_wchar_t" = yes; then
25395   if test "$cross_compiling" = yes; then
25396   # Depending upon the size, compute the lo and hi bounds.
25397 cat >conftest.$ac_ext <<_ACEOF
25398 #line 25398 "configure"
25399 #include "confdefs.h"
25400 $ac_includes_default
25401 int
25402 main (void)
25403 {
25404 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25405   ;
25406   return 0;
25407 }
25408 _ACEOF
25409 rm -f conftest.$ac_objext
25410 if { (eval echo "$as_me:25410: \"$ac_compile\"") >&5
25411   (eval $ac_compile) 2>&5
25412   ac_status=$?
25413   echo "$as_me:25413: \$? = $ac_status" >&5
25414   (exit $ac_status); } &&
25415          { ac_try='test -s conftest.$ac_objext'
25416   { (eval echo "$as_me:25416: \"$ac_try\"") >&5
25417   (eval $ac_try) 2>&5
25418   ac_status=$?
25419   echo "$as_me:25419: \$? = $ac_status" >&5
25420   (exit $ac_status); }; }; then
25421   ac_lo=0 ac_mid=0
25422   while :; do
25423     cat >conftest.$ac_ext <<_ACEOF
25424 #line 25424 "configure"
25425 #include "confdefs.h"
25426 $ac_includes_default
25427 int
25428 main (void)
25429 {
25430 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25431   ;
25432   return 0;
25433 }
25434 _ACEOF
25435 rm -f conftest.$ac_objext
25436 if { (eval echo "$as_me:25436: \"$ac_compile\"") >&5
25437   (eval $ac_compile) 2>&5
25438   ac_status=$?
25439   echo "$as_me:25439: \$? = $ac_status" >&5
25440   (exit $ac_status); } &&
25441          { ac_try='test -s conftest.$ac_objext'
25442   { (eval echo "$as_me:25442: \"$ac_try\"") >&5
25443   (eval $ac_try) 2>&5
25444   ac_status=$?
25445   echo "$as_me:25445: \$? = $ac_status" >&5
25446   (exit $ac_status); }; }; then
25447   ac_hi=$ac_mid; break
25448 else
25449   echo "$as_me: failed program was:" >&5
25450 cat conftest.$ac_ext >&5
25451 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25452 fi
25453 rm -f conftest.$ac_objext conftest.$ac_ext
25454   done
25455 else
25456   echo "$as_me: failed program was:" >&5
25457 cat conftest.$ac_ext >&5
25458 ac_hi=-1 ac_mid=-1
25459   while :; do
25460     cat >conftest.$ac_ext <<_ACEOF
25461 #line 25461 "configure"
25462 #include "confdefs.h"
25463 $ac_includes_default
25464 int
25465 main (void)
25466 {
25467 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25468   ;
25469   return 0;
25470 }
25471 _ACEOF
25472 rm -f conftest.$ac_objext
25473 if { (eval echo "$as_me:25473: \"$ac_compile\"") >&5
25474   (eval $ac_compile) 2>&5
25475   ac_status=$?
25476   echo "$as_me:25476: \$? = $ac_status" >&5
25477   (exit $ac_status); } &&
25478          { ac_try='test -s conftest.$ac_objext'
25479   { (eval echo "$as_me:25479: \"$ac_try\"") >&5
25480   (eval $ac_try) 2>&5
25481   ac_status=$?
25482   echo "$as_me:25482: \$? = $ac_status" >&5
25483   (exit $ac_status); }; }; then
25484   ac_lo=$ac_mid; break
25485 else
25486   echo "$as_me: failed program was:" >&5
25487 cat conftest.$ac_ext >&5
25488 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25489 fi
25490 rm -f conftest.$ac_objext conftest.$ac_ext
25491   done
25492 fi
25493 rm -f conftest.$ac_objext conftest.$ac_ext
25494 # Binary search between lo and hi bounds.
25495 while test "x$ac_lo" != "x$ac_hi"; do
25496   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25497   cat >conftest.$ac_ext <<_ACEOF
25498 #line 25498 "configure"
25499 #include "confdefs.h"
25500 $ac_includes_default
25501 int
25502 main (void)
25503 {
25504 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25505   ;
25506   return 0;
25507 }
25508 _ACEOF
25509 rm -f conftest.$ac_objext
25510 if { (eval echo "$as_me:25510: \"$ac_compile\"") >&5
25511   (eval $ac_compile) 2>&5
25512   ac_status=$?
25513   echo "$as_me:25513: \$? = $ac_status" >&5
25514   (exit $ac_status); } &&
25515          { ac_try='test -s conftest.$ac_objext'
25516   { (eval echo "$as_me:25516: \"$ac_try\"") >&5
25517   (eval $ac_try) 2>&5
25518   ac_status=$?
25519   echo "$as_me:25519: \$? = $ac_status" >&5
25520   (exit $ac_status); }; }; then
25521   ac_hi=$ac_mid
25522 else
25523   echo "$as_me: failed program was:" >&5
25524 cat conftest.$ac_ext >&5
25525 ac_lo=`expr $ac_mid + 1`
25526 fi
25527 rm -f conftest.$ac_objext conftest.$ac_ext
25528 done
25529 ac_cv_sizeof_wchar_t=$ac_lo
25530 else
25531   if test "$cross_compiling" = yes; then
25532   { { echo "$as_me:25532: error: cannot run test program while cross compiling" >&5
25533 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25534    { (exit 1); exit 1; }; }
25535 else
25536   cat >conftest.$ac_ext <<_ACEOF
25537 #line 25537 "configure"
25538 #include "confdefs.h"
25539 $ac_includes_default
25540 int
25541 main (void)
25542 {
25543 FILE *f = fopen ("conftest.val", "w");
25544 if (!f)
25545   $ac_main_return (1);
25546 fprintf (f, "%d", (sizeof (wchar_t)));
25547 fclose (f);
25548   ;
25549   return 0;
25550 }
25551 _ACEOF
25552 rm -f conftest$ac_exeext
25553 if { (eval echo "$as_me:25553: \"$ac_link\"") >&5
25554   (eval $ac_link) 2>&5
25555   ac_status=$?
25556   echo "$as_me:25556: \$? = $ac_status" >&5
25557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25558   { (eval echo "$as_me:25558: \"$ac_try\"") >&5
25559   (eval $ac_try) 2>&5
25560   ac_status=$?
25561   echo "$as_me:25561: \$? = $ac_status" >&5
25562   (exit $ac_status); }; }; then
25563   ac_cv_sizeof_wchar_t=`cat conftest.val`
25564 else
25565   echo "$as_me: program exited with status $ac_status" >&5
25566 echo "$as_me: failed program was:" >&5
25567 cat conftest.$ac_ext >&5
25568 fi
25569 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25570 fi
25571 fi
25572 rm -f conftest.val
25573 else
25574   ac_cv_sizeof_wchar_t=0
25575 fi
25576 fi
25577 echo "$as_me:25577: result: $ac_cv_sizeof_wchar_t" >&5
25578 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25579 cat >>confdefs.h <<EOF
25580 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25581 EOF
25582
25583         # cross-compiling to mingw can run into the problem that attempting to
25584         # link with the regex library fails, causing the test to not set this to
25585         # a number.  "recent" autoconf does not address this problem either -TD
25586         if test -z "$ac_cv_sizeof_wchar_t"
25587         then
25588                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25589
25590 echo "${as_me:-configure}:25590: testing test failed (assume 2) ..." 1>&5
25591
25592                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25593                 mv confdefs.tmp confdefs.h
25594                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25595         fi
25596 fi
25597
25598 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25599 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25600 ###
25601 ### ticlib modules may be a separate library, otherwise contained in termlib.
25602 ### termlib modules may be a separate library, otherwise contained in ncurses.
25603 ###
25604 ### The of "+" or " " between the tokens controls the way the script
25605 ### chooses to split module lists into libraries.
25606 ###
25607 ### (see CF_LIB_RULES).
25608 echo "$as_me:25608: checking for library subsets" >&5
25609 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25610 LIB_SUBSETS=
25611
25612 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25613         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25614         if test "$with_ticlib" != no ; then
25615                 LIB_SUBSETS="${LIB_SUBSETS} "
25616         else
25617                 LIB_SUBSETS="${LIB_SUBSETS}+"
25618         fi
25619 fi
25620
25621 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25622 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25623
25624 if test "$with_termlib" != no ; then
25625         LIB_SUBSETS="${LIB_SUBSETS} "
25626 else
25627         LIB_SUBSETS="${LIB_SUBSETS}+"
25628 fi
25629
25630 LIB_SUBSETS="${LIB_SUBSETS}base"
25631
25632 # Most term-driver calls are to tinfo, but some like init_pair are to the
25633 # base library (so it resides in base).
25634 if test "$with_term_driver" != no ; then
25635         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25636         case $cf_cv_system_name in
25637         (*mingw32*|*mingw64*)
25638                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25639                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25640                 ;;
25641         (*)
25642                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25643                 ;;
25644         esac
25645 fi
25646
25647 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25648 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25649
25650 echo "$as_me:25650: result: $LIB_SUBSETS" >&5
25651 echo "${ECHO_T}$LIB_SUBSETS" >&6
25652
25653 ### Construct the list of include-directories to be generated
25654
25655 if test "$srcdir" != "."; then
25656         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25657 fi
25658 CPPFLAGS="-I../include $CPPFLAGS"
25659 if test "$srcdir" != "."; then
25660         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25661 fi
25662 CPPFLAGS="-I. $CPPFLAGS"
25663
25664 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25665 if test "$srcdir" != "."; then
25666         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25667 fi
25668 if test "$GCC" != yes; then
25669         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25670 elif test "$includedir" != "/usr/include"; then
25671         if test "$includedir" = '${prefix}/include' ; then
25672                 if test x$prefix != x/usr ; then
25673                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25674                 fi
25675         else
25676                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25677         fi
25678 fi
25679
25680 ### Build up pieces for makefile rules
25681 echo "$as_me:25681: checking default library suffix" >&5
25682 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25683
25684         case $DFT_LWR_MODEL in
25685         (libtool) DFT_ARG_SUFFIX=''   ;;
25686         (normal)  DFT_ARG_SUFFIX=''   ;;
25687         (debug)   DFT_ARG_SUFFIX='_g' ;;
25688         (profile) DFT_ARG_SUFFIX='_p' ;;
25689         (shared)  DFT_ARG_SUFFIX=''   ;;
25690         esac
25691         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25692 echo "$as_me:25692: result: $DFT_ARG_SUFFIX" >&5
25693 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25694
25695 echo "$as_me:25695: checking default library-dependency suffix" >&5
25696 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25697
25698         case X$DFT_LWR_MODEL in
25699         (Xlibtool)
25700                 DFT_LIB_SUFFIX='.la'
25701                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25702                 ;;
25703         (Xdebug)
25704                 case $cf_cv_system_name in
25705                 (*-msvc*)
25706                         DFT_LIB_SUFFIX='_g.lib'
25707                         ;;
25708                 (*)
25709                         DFT_LIB_SUFFIX='_g.a'
25710                         ;;
25711                 esac
25712                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25713                 ;;
25714         (Xprofile)
25715                 case $cf_cv_system_name in
25716                 (*-msvc*)
25717                         DFT_LIB_SUFFIX='_p.lib'
25718                         ;;
25719                 (*)
25720                         DFT_LIB_SUFFIX='_p.a'
25721                         ;;
25722                 esac
25723                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25724                 ;;
25725         (Xshared)
25726                 case $cf_cv_system_name in
25727                 (aix[5-7]*)
25728                         DFT_LIB_SUFFIX='.so'
25729                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25730                         ;;
25731                 (*-msvc*)
25732                         DFT_LIB_SUFFIX='.dll'
25733                         DFT_DEP_SUFFIX='.dll.lib'
25734                         ;;
25735                 (cygwin*|msys*|mingw*)
25736                         DFT_LIB_SUFFIX='.dll'
25737                         DFT_DEP_SUFFIX='.dll.a'
25738                         ;;
25739                 (darwin*)
25740                         DFT_LIB_SUFFIX='.dylib'
25741                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25742                         ;;
25743                 (hpux*)
25744                         case $target in
25745                         (ia64*)
25746                                 DFT_LIB_SUFFIX='.so'
25747                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25748                                 ;;
25749                         (*)
25750                                 DFT_LIB_SUFFIX='.sl'
25751                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25752                                 ;;
25753                         esac
25754                         ;;
25755                 (*)
25756                         DFT_LIB_SUFFIX='.so'
25757                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25758                         ;;
25759                 esac
25760                 ;;
25761         (*)
25762                 case $target in
25763                 (*-msvc*)
25764                         DFT_LIB_SUFFIX='.lib'
25765                         ;;
25766                 (*)
25767                         DFT_LIB_SUFFIX='.a'
25768                         ;;
25769                 esac
25770                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25771                 ;;
25772         esac
25773         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25774         then
25775                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25776                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25777         fi
25778 echo "$as_me:25778: result: $DFT_DEP_SUFFIX" >&5
25779 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25780
25781 echo "$as_me:25781: checking default object directory" >&5
25782 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25783
25784         case $DFT_LWR_MODEL in
25785         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25786         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25787         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25788         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25789         (shared)
25790                 case $cf_cv_system_name in
25791                 (cygwin|msys)
25792                         DFT_OBJ_SUBDIR='objects' ;;
25793                 (*)
25794                         DFT_OBJ_SUBDIR='obj_s' ;;
25795                 esac
25796         esac
25797 echo "$as_me:25797: result: $DFT_OBJ_SUBDIR" >&5
25798 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25799
25800 if test "x$cf_with_cxx" = xyes ; then
25801 echo "$as_me:25801: checking c++ library-dependency suffix" >&5
25802 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25803 if test "$with_libtool" != "no"; then
25804         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25805         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25806 elif test "$with_shared_cxx" != "no"; then
25807         # also for g++ users...
25808         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25809 else
25810         # we normally make a static library because C/C++ library rules differ
25811
25812         case Xnormal in
25813         (Xlibtool)
25814                 CXX_LIB_SUFFIX='.la'
25815                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25816                 ;;
25817         (Xdebug)
25818                 case $cf_cv_system_name in
25819                 (*-msvc*)
25820                         CXX_LIB_SUFFIX='_g.lib'
25821                         ;;
25822                 (*)
25823                         CXX_LIB_SUFFIX='_g.a'
25824                         ;;
25825                 esac
25826                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25827                 ;;
25828         (Xprofile)
25829                 case $cf_cv_system_name in
25830                 (*-msvc*)
25831                         CXX_LIB_SUFFIX='_p.lib'
25832                         ;;
25833                 (*)
25834                         CXX_LIB_SUFFIX='_p.a'
25835                         ;;
25836                 esac
25837                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25838                 ;;
25839         (Xshared)
25840                 case $cf_cv_system_name in
25841                 (aix[5-7]*)
25842                         CXX_LIB_SUFFIX='.so'
25843                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25844                         ;;
25845                 (*-msvc*)
25846                         CXX_LIB_SUFFIX='.dll'
25847                         CXX_DEP_SUFFIX='.dll.lib'
25848                         ;;
25849                 (cygwin*|msys*|mingw*)
25850                         CXX_LIB_SUFFIX='.dll'
25851                         CXX_DEP_SUFFIX='.dll.a'
25852                         ;;
25853                 (darwin*)
25854                         CXX_LIB_SUFFIX='.dylib'
25855                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25856                         ;;
25857                 (hpux*)
25858                         case $target in
25859                         (ia64*)
25860                                 CXX_LIB_SUFFIX='.so'
25861                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25862                                 ;;
25863                         (*)
25864                                 CXX_LIB_SUFFIX='.sl'
25865                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25866                                 ;;
25867                         esac
25868                         ;;
25869                 (*)
25870                         CXX_LIB_SUFFIX='.so'
25871                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25872                         ;;
25873                 esac
25874                 ;;
25875         (*)
25876                 case $target in
25877                 (*-msvc*)
25878                         CXX_LIB_SUFFIX='.lib'
25879                         ;;
25880                 (*)
25881                         CXX_LIB_SUFFIX='.a'
25882                         ;;
25883                 esac
25884                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25885                 ;;
25886         esac
25887         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25888         then
25889                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25890                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25891         fi
25892
25893 fi
25894 echo "$as_me:25894: result: $CXX_LIB_SUFFIX" >&5
25895 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25896
25897 fi
25898
25899 # do not want -ldl in build except as needed for -lncurses dependency
25900 if test "x$with_dlsym" = xyes ; then
25901 if test $DFT_LWR_MODEL = shared || \
25902    test $DFT_LWR_MODEL = libtool ; then
25903
25904 # remove dl library from $LIBS
25905 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25906
25907 fi
25908 fi
25909 ### Set up low-level terminfo dependencies for makefiles.
25910
25911 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25912 # do not need libdl
25913 TICS_LIST=
25914 if test "x$with_dlsym" = xyes ; then
25915
25916 # remove dl library from $SHLIB_LIST
25917 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25918
25919 fi
25920
25921 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25922 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25923 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25924 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25925 then
25926         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25927 fi
25928
25929 if test "$with_ticlib" != no ; then
25930
25931         if test "x$with_ticlib" != xyes ; then
25932                 TICS_NAME=$with_ticlib
25933                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25934                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25935                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25936                 TICS_LIB_SUFFIX="${with_ticlib}"
25937         else
25938                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25939                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25940                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25941                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25942         fi
25943         TICS_LDFLAGS="-L${LIB_DIR}"
25944         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25945 else
25946         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25947         TICS_LDFLAGS="-L${LIB_DIR}"
25948         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25949 fi
25950
25951 if test "$with_termlib" != no ; then
25952
25953         if test "x$with_termlib" != xyes ; then
25954                 TINFO_NAME=$with_termlib
25955                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25956                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25957                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25958                 TINFO_LIB_SUFFIX="${with_termlib}"
25959         else
25960                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25961                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25962                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25963                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25964         fi
25965
25966         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25967         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25968         if test "$DFT_LWR_MODEL" = "libtool"; then
25969                 TEST_ARGS="${TEST_DEPS}"
25970                 TEST_ARG2="${TEST_DEP2}"
25971                 TINFO_LDFLAGS="-L${LIB_DIR}"
25972                 TINFO_LIBS="$TEST_ARGS"
25973                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25974                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25975         else
25976                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25977                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25978                 if test "x$with_term_driver" != xno ; then
25979                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25980                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25981                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25982                 else
25983                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25984                         TINFO_LIBS="$TEST_ARGS"
25985                 fi
25986                 TINFO_LDFLAGS="-L${LIB_DIR}"
25987                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25988         fi
25989 else
25990         # the next lines are needed for linking libtic over libncurses
25991         TINFO_NAME=${LIB_NAME}
25992         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25993         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25994         if test "x$with_tic_depends" = xyes ; then
25995                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25996         else
25997                 TICS_LIST="$SHLIB_LIST"
25998         fi
25999
26000         TINFO_LDFLAGS="-L${LIB_DIR}"
26001         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
26002 fi
26003
26004 if test "$DFT_LWR_MODEL" = shared ; then
26005         case $cf_cv_system_name in
26006         (cygwin*|msys*)
26007                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
26008                 TINFO_SUFFIX=.dll
26009                 ;;
26010         esac
26011 fi
26012
26013 if test "x$with_dlsym" = xyes ; then
26014
26015 # remove dl library from $TICS_LIST
26016 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
26017
26018 fi
26019
26020 if test "$DFT_LWR_MODEL" = "libtool"; then
26021         OBJEXT=lo
26022 fi
26023
26024 # needed for Ada95
26025 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
26026
26027 case $DFT_LWR_MODEL in
26028 (normal|debug|profile)
26029
26030 if test "$GCC" = yes ; then
26031         case $cf_cv_system_name in
26032         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
26033                 LDFLAGS_STATIC=
26034                 LDFLAGS_SHARED=
26035                 ;;
26036         (*)     # normally, except when broken
26037                 LDFLAGS_STATIC=-static
26038                 LDFLAGS_SHARED=-dynamic
26039                 ;;
26040         esac
26041 else
26042         case $cf_cv_system_name in
26043         (aix[4-7]*)     # from ld manpage
26044                 LDFLAGS_STATIC=-bstatic
26045                 LDFLAGS_SHARED=-bdynamic
26046                 ;;
26047         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
26048                 # We could also use just "archive" and "shared".
26049                 LDFLAGS_STATIC=-Wl,-a,archive_shared
26050                 LDFLAGS_SHARED=-Wl,-a,shared_archive
26051                 ;;
26052         (irix*)         # from ld manpage IRIX64
26053                 LDFLAGS_STATIC=-Bstatic
26054                 LDFLAGS_SHARED=-Bdynamic
26055                 ;;
26056         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
26057                 # alternative "-oldstyle_liblookup" (not in cc manpage)
26058                 LDFLAGS_STATIC=-noso
26059                 LDFLAGS_SHARED=-so_archive
26060                 ;;
26061         (solaris2*)
26062                 LDFLAGS_STATIC=-Bstatic
26063                 LDFLAGS_SHARED=-Bdynamic
26064                 ;;
26065         esac
26066 fi
26067
26068 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
26069 then
26070         echo "$as_me:26070: checking if linker supports switching between static/dynamic" >&5
26071 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
26072
26073         rm -f libconftest.a
26074         cat >conftest.$ac_ext <<EOF
26075 #line 26075 "configure"
26076 #include <stdio.h>
26077 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
26078 EOF
26079         if { (eval echo "$as_me:26079: \"$ac_compile\"") >&5
26080   (eval $ac_compile) 2>&5
26081   ac_status=$?
26082   echo "$as_me:26082: \$? = $ac_status" >&5
26083   (exit $ac_status); } ; then
26084                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
26085                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
26086         fi
26087         rm -f conftest.*
26088
26089         cf_save_LIBS="$LIBS"
26090
26091         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
26092         cat >conftest.$ac_ext <<_ACEOF
26093 #line 26093 "configure"
26094 #include "confdefs.h"
26095
26096 #line 26096 "configure"
26097 #include <stdio.h>
26098 int cf_ldflags_static(FILE *fp);
26099
26100 int
26101 main (void)
26102 {
26103
26104         return cf_ldflags_static(stdin);
26105
26106   ;
26107   return 0;
26108 }
26109 _ACEOF
26110 rm -f conftest.$ac_objext conftest$ac_exeext
26111 if { (eval echo "$as_me:26111: \"$ac_link\"") >&5
26112   (eval $ac_link) 2>&5
26113   ac_status=$?
26114   echo "$as_me:26114: \$? = $ac_status" >&5
26115   (exit $ac_status); } &&
26116          { ac_try='test -s conftest$ac_exeext'
26117   { (eval echo "$as_me:26117: \"$ac_try\"") >&5
26118   (eval $ac_try) 2>&5
26119   ac_status=$?
26120   echo "$as_me:26120: \$? = $ac_status" >&5
26121   (exit $ac_status); }; }; then
26122
26123         # some linkers simply ignore the -dynamic
26124         case x`file conftest$ac_exeext 2>/dev/null` in
26125         (*static*)
26126                 cf_ldflags_static=no
26127                 ;;
26128         (*)
26129                 cf_ldflags_static=yes
26130                 ;;
26131         esac
26132
26133 else
26134   echo "$as_me: failed program was:" >&5
26135 cat conftest.$ac_ext >&5
26136 cf_ldflags_static=no
26137 fi
26138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26139
26140         rm -f libconftest.*
26141         LIBS="$cf_save_LIBS"
26142
26143         echo "$as_me:26143: result: $cf_ldflags_static" >&5
26144 echo "${ECHO_T}$cf_ldflags_static" >&6
26145
26146         if test $cf_ldflags_static != yes
26147         then
26148                 LDFLAGS_STATIC=
26149                 LDFLAGS_SHARED=
26150         fi
26151 else
26152         LDFLAGS_STATIC=
26153         LDFLAGS_SHARED=
26154 fi
26155
26156         ;;
26157 esac
26158
26159 echo "$as_me:26159: checking where we will install curses.h" >&5
26160 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26161
26162 includesubdir=
26163 if test "$with_overwrite" = no && \
26164  ( test "x$includedir" = 'x${prefix}/include' || \
26165    test "x$includedir" = "x${prefix}/include" )
26166 then
26167         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26168 fi
26169 echo "$as_me:26169: result: ${includedir}${includesubdir}" >&5
26170 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26171
26172 ### Resolve a conflict between normal and wide-curses by forcing applications
26173 ### that will need libutf8 to add it to their configure script.
26174 if test "$with_overwrite" != no ; then
26175 if test "$NCURSES_LIBUTF8" = 1 ; then
26176         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26177         { echo "$as_me:26177: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26178 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26179 fi
26180 fi
26181 WITH_OVERWRITE=$with_overwrite
26182
26183 ### At least on MinGW a shared library build without libtool
26184 ### requires adding the additional libs to the link list.
26185 case $cf_cv_system_name in
26186 (*mingw32*|*mingw64*)
26187         if test "$DFT_LWR_MODEL" != "libtool"; then
26188            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
26189         fi
26190         ;;
26191 *)      ;;
26192 esac
26193
26194 # used to separate tack out of the tree
26195 NCURSES_TREE=
26196
26197 ### predefined stuff for the test programs
26198
26199 cat >>confdefs.h <<\EOF
26200 #define HAVE_SLK_COLOR 1
26201 EOF
26202
26203 # pkgsrc uses these
26204
26205 echo "$as_me:26205: checking for desired basename for form library" >&5
26206 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26207
26208 # Check whether --with-form-libname or --without-form-libname was given.
26209 if test "${with_form_libname+set}" = set; then
26210   withval="$with_form_libname"
26211   with_lib_basename=$withval
26212 else
26213   with_lib_basename=form
26214 fi;
26215 FORM_NAME="$with_lib_basename"
26216
26217 case "x$FORM_NAME" in
26218 (x|xno|xnone|xyes)
26219         FORM_NAME=form
26220         ;;
26221 (*)
26222         ;;
26223 esac
26224
26225 echo "$as_me:26225: result: $FORM_NAME" >&5
26226 echo "${ECHO_T}$FORM_NAME" >&6
26227
26228 echo "$as_me:26228: checking for desired basename for menu library" >&5
26229 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26230
26231 # Check whether --with-menu-libname or --without-menu-libname was given.
26232 if test "${with_menu_libname+set}" = set; then
26233   withval="$with_menu_libname"
26234   with_lib_basename=$withval
26235 else
26236   with_lib_basename=menu
26237 fi;
26238 MENU_NAME="$with_lib_basename"
26239
26240 case "x$MENU_NAME" in
26241 (x|xno|xnone|xyes)
26242         MENU_NAME=menu
26243         ;;
26244 (*)
26245         ;;
26246 esac
26247
26248 echo "$as_me:26248: result: $MENU_NAME" >&5
26249 echo "${ECHO_T}$MENU_NAME" >&6
26250
26251 echo "$as_me:26251: checking for desired basename for panel library" >&5
26252 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26253
26254 # Check whether --with-panel-libname or --without-panel-libname was given.
26255 if test "${with_panel_libname+set}" = set; then
26256   withval="$with_panel_libname"
26257   with_lib_basename=$withval
26258 else
26259   with_lib_basename=panel
26260 fi;
26261 PANEL_NAME="$with_lib_basename"
26262
26263 case "x$PANEL_NAME" in
26264 (x|xno|xnone|xyes)
26265         PANEL_NAME=panel
26266         ;;
26267 (*)
26268         ;;
26269 esac
26270
26271 echo "$as_me:26271: result: $PANEL_NAME" >&5
26272 echo "${ECHO_T}$PANEL_NAME" >&6
26273
26274 echo "$as_me:26274: checking for desired basename for cxx library" >&5
26275 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26276
26277 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26278 if test "${with_cxx_libname+set}" = set; then
26279   withval="$with_cxx_libname"
26280   with_lib_basename=$withval
26281 else
26282   with_lib_basename=ncurses++
26283 fi;
26284 CXX_NAME="$with_lib_basename"
26285
26286 case "x$CXX_NAME" in
26287 (x|xno|xnone|xyes)
26288         CXX_NAME=ncurses++
26289         ;;
26290 (*)
26291         ;;
26292 esac
26293
26294 echo "$as_me:26294: result: $CXX_NAME" >&5
26295 echo "${ECHO_T}$CXX_NAME" >&6
26296
26297 ### Construct the list of subdirectories for which we'll customize makefiles
26298 ### with the appropriate compile-rules.
26299
26300 echo "$as_me:26300: checking for src modules" >&5
26301 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26302
26303 # dependencies and linker-arguments for test-programs
26304 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26305 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26306 if test "$DFT_LWR_MODEL" = "libtool"; then
26307         TEST_ARGS="${TEST_DEPS}"
26308         TEST_ARG2="${TEST_DEP2}"
26309 else
26310         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26311         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26312 fi
26313
26314 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26315 cf_cv_src_modules=
26316 for cf_dir in $modules_to_build
26317 do
26318         if test -f $srcdir/$cf_dir/modules; then
26319
26320                 # We may/may not have tack in the distribution, though the
26321                 # makefile is.
26322                 if test $cf_dir = tack ; then
26323                         if test "x$cf_with_tack" != "xyes"; then
26324                                 continue
26325                         fi
26326                 fi
26327
26328                 if test -z "$cf_cv_src_modules"; then
26329                         cf_cv_src_modules=$cf_dir
26330                 else
26331                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26332                 fi
26333
26334                 # Make the ncurses_cfg.h file record the library interface files as
26335                 # well.  These are header files that are the same name as their
26336                 # directory.  Ncurses is the only library that does not follow
26337                 # that pattern.
26338                 if test $cf_dir = tack ; then
26339                         continue
26340                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26341
26342 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26343
26344                         cat >>confdefs.h <<EOF
26345 #define HAVE_${cf_have_include}_H 1
26346 EOF
26347
26348                         cat >>confdefs.h <<EOF
26349 #define HAVE_LIB${cf_have_include} 1
26350 EOF
26351
26352 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26353
26354 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26355
26356                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26357                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26358                         if test "$DFT_LWR_MODEL" = "libtool"; then
26359                                 TEST_ARGS="${TEST_DEPS}"
26360                                 TEST_ARG2="${TEST_DEP2}"
26361                         else
26362                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26363                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26364                         fi
26365                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26366                 fi
26367         fi
26368 done
26369 echo "$as_me:26369: result: $cf_cv_src_modules" >&5
26370 echo "${ECHO_T}$cf_cv_src_modules" >&6
26371
26372 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26373 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26374
26375 SRC_SUBDIRS=
26376 if test "x$cf_with_manpages" != xno ; then
26377         SRC_SUBDIRS="$SRC_SUBDIRS man"
26378 fi
26379 SRC_SUBDIRS="$SRC_SUBDIRS include"
26380 for cf_dir in $cf_cv_src_modules
26381 do
26382         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26383 done
26384 if test "x$cf_with_tests" != "xno" ; then
26385         SRC_SUBDIRS="$SRC_SUBDIRS test"
26386 fi
26387 # always make this, to install the ncurses-config script
26388 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26389 if test "$cf_with_cxx_binding" != no; then
26390         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26391         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26392 fi
26393
26394 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26395 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26396
26397 ADA_SUBDIRS=
26398 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26399         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26400         ADA_SUBDIRS="gen src"
26401         if test "x$cf_with_tests" != "xno" ; then
26402                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26403         fi
26404 fi
26405
26406 SUB_MAKEFILES=
26407 for cf_dir in $SRC_SUBDIRS
26408 do
26409         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26410 done
26411
26412 if test -n "$ADA_SUBDIRS"; then
26413         for cf_dir in $ADA_SUBDIRS
26414         do
26415                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26416         done
26417
26418 fi
26419
26420 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26421    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26422    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26423    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26424 fi
26425
26426 DIRS_TO_MAKE="lib"
26427 for cf_item in $cf_list_models
26428 do
26429
26430         case $cf_item in
26431         (libtool) cf_subdir='obj_lo'  ;;
26432         (normal)  cf_subdir='objects' ;;
26433         (debug)   cf_subdir='obj_g' ;;
26434         (profile) cf_subdir='obj_p' ;;
26435         (shared)
26436                 case $cf_cv_system_name in
26437                 (cygwin|msys)
26438                         cf_subdir='objects' ;;
26439                 (*)
26440                         cf_subdir='obj_s' ;;
26441                 esac
26442         esac
26443
26444         for cf_item2 in $DIRS_TO_MAKE
26445         do
26446                 test $cf_item2 = $cf_subdir && break
26447         done
26448         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26449 done
26450 for cf_dir in $DIRS_TO_MAKE
26451 do
26452         test ! -d $cf_dir && mkdir $cf_dir
26453 done
26454
26455 # symbols that differ when compiling Ada95 by itself.
26456 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26457
26458 # values to use as strings
26459
26460 cat >>confdefs.h <<EOF
26461 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26462 EOF
26463
26464 cat >>confdefs.h <<EOF
26465 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26466 EOF
26467
26468 ### Now that we're done running tests, add the compiler-warnings, if any
26469
26470 cf_fix_cppflags=no
26471 cf_new_cflags=
26472 cf_new_cppflags=
26473 cf_new_extra_cppflags=
26474
26475 for cf_add_cflags in $EXTRA_CFLAGS
26476 do
26477 case $cf_fix_cppflags in
26478 (no)
26479         case $cf_add_cflags in
26480         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
26481                 case $cf_add_cflags in
26482                 (-D*)
26483                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
26484
26485                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26486                                 && test -z "${cf_tst_cflags}" \
26487                                 && cf_fix_cppflags=yes
26488
26489                         if test $cf_fix_cppflags = yes ; then
26490
26491         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26492         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26493
26494                                 continue
26495                         elif test "${cf_tst_cflags}" = "\"'" ; then
26496
26497         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26498         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26499
26500                                 continue
26501                         fi
26502                         ;;
26503                 esac
26504                 case "$CPPFLAGS" in
26505                 (*$cf_add_cflags)
26506                         ;;
26507                 (*)
26508                         case $cf_add_cflags in
26509                         (-D*)
26510                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
26511
26512 CPPFLAGS=`echo "$CPPFLAGS" | \
26513         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
26514                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
26515
26516                                 ;;
26517                         esac
26518
26519         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
26520         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
26521
26522                         ;;
26523                 esac
26524                 ;;
26525         (*)
26526
26527         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26528         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26529
26530                 ;;
26531         esac
26532         ;;
26533 (yes)
26534
26535         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26536         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26537
26538         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
26539
26540         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26541                 && test -z "${cf_tst_cflags}" \
26542                 && cf_fix_cppflags=no
26543         ;;
26544 esac
26545 done
26546
26547 if test -n "$cf_new_cflags" ; then
26548
26549         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26550         CFLAGS="${CFLAGS}$cf_new_cflags"
26551
26552 fi
26553
26554 if test -n "$cf_new_cppflags" ; then
26555
26556         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26557         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26558
26559 fi
26560
26561 if test -n "$cf_new_extra_cppflags" ; then
26562
26563         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26564         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26565
26566 fi
26567
26568 ### Define substitutions for header files to avoid name-pollution
26569
26570 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26571         HAVE_TCGETATTR=1
26572 else
26573         HAVE_TCGETATTR=0
26574 fi
26575
26576 if test "x$ac_cv_header_stdint_h" = xyes ; then
26577         HAVE_STDINT_H=1
26578 else
26579         HAVE_STDINT_H=0
26580 fi
26581
26582 if test "x$ac_cv_header_termio_h" = xyes ; then
26583         HAVE_TERMIO_H=1
26584 else
26585         HAVE_TERMIO_H=0
26586 fi
26587
26588 if test "x$ac_cv_header_termios_h" = xyes ; then
26589         HAVE_TERMIOS_H=1
26590 else
26591         HAVE_TERMIOS_H=0
26592 fi
26593
26594 ################################################################################
26595 test "x$use_database" = xyes && \
26596 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26597
26598 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26599 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26600
26601 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26602 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26603 fi
26604
26605 if test "x$cf_with_tests" != xno ; then
26606         MAKE_TESTS=
26607 else
26608         MAKE_TESTS="#"
26609 fi
26610
26611 ADAHTML_DIR=../../doc/html/ada
26612
26613 # workaround for OS/2 (20151017)
26614 case $cf_cv_system_name in
26615 (os2*)
26616         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26617         ;;
26618 (*)
26619         LIBTOOL_OPTS_CXX=
26620         ;;
26621 esac
26622
26623 # workaround for g++ versus Solaris (20131116)
26624 case $cf_cv_system_name in
26625 (solaris2*)
26626         case "x$CPPFLAGS" in
26627         (*-D_XOPEN_SOURCE_EXTENDED*)
26628                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26629
26630 echo "${as_me:-configure}:26630: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26631
26632                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26633                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26634                 ;;
26635         esac
26636         ;;
26637 esac
26638
26639 # Help to automatically enable the extended curses features when using either
26640 # the *-config or the ".pc" files by adding defines.
26641 echo "$as_me:26641: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26642 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26643 PKG_CFLAGS=
26644 for cf_loop1 in $CPPFLAGS_after_XOPEN
26645 do
26646         cf_found=no
26647         for cf_loop2 in $CPPFLAGS_before_XOPEN
26648         do
26649                 if test "x$cf_loop1" = "x$cf_loop2"
26650                 then
26651                         cf_found=yes
26652                         break
26653                 fi
26654         done
26655         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26656 done
26657 echo "$as_me:26657: result: $PKG_CFLAGS" >&5
26658 echo "${ECHO_T}$PKG_CFLAGS" >&6
26659
26660 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26661 case "x$NCURSES_OSPEED" in
26662 (*short*)
26663         cf_compatible=1
26664         ;;
26665 (*)
26666         cf_compatible=0
26667         ;;
26668 esac
26669
26670 cat >>confdefs.h <<EOF
26671 #define NCURSES_OSPEED_COMPAT $cf_compatible
26672 EOF
26673
26674 case "x$cf_cv_typeof_chtype" in
26675 (xshort|xint|xlong)
26676         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26677         ;;
26678 esac
26679
26680 case "x$cf_cv_typeof_mmask_t" in
26681 (xshort|xint|xlong)
26682         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26683         ;;
26684 esac
26685
26686 # substitute into misc/Makefile to suppress
26687 # (un)install.data from the
26688 # (un)install rules.
26689 if test "x$cf_with_db_install" = "xno"; then
26690         MISC_INSTALL_DATA=
26691         MISC_UNINSTALL_DATA=
26692 else
26693         MISC_INSTALL_DATA=install.data
26694         MISC_UNINSTALL_DATA=uninstall.data
26695 fi
26696
26697 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26698         MAKE_DATABASE="#"
26699 else
26700         MAKE_DATABASE="$MAKE_TERMINFO"
26701 fi
26702
26703 if test -n "$PACKAGE"
26704 then
26705         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26706         export PACKAGE
26707         echo "package: $PACKAGE"
26708 fi
26709
26710 UNALTERED_SYMS=
26711 cf_filter_syms=no
26712
26713 if test -n "$RESULTING_SYMS"
26714 then
26715         cf_filter_syms=$cf_dft_filter_syms
26716         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26717
26718 echo "${as_me:-configure}:26718: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26719
26720 fi
26721
26722 if test "x$WILDCARD_SYMS" = xno
26723 then
26724         cf_filter_syms=yes
26725 fi
26726
26727 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26728
26729 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26730 if test $cf_filter_syms = yes
26731 then
26732         RESULTING_SYMS=resulting.map
26733 fi
26734
26735 if test "x$cross_compiling" = xyes ; then
26736         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26737         CHECK_BUILD="#"
26738 else
26739         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26740         CHECK_BUILD=
26741 fi
26742
26743 # This is used for the *-config script and *.pc data files.
26744
26745 echo "$as_me:26745: checking for linker search path" >&5
26746 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26747 if test "${cf_cv_ld_searchpath+set}" = set; then
26748   echo $ECHO_N "(cached) $ECHO_C" >&6
26749 else
26750
26751 if test "$cross_compiling" != yes ; then
26752
26753 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26754 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26755
26756 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26757 # update the cache, which makes it run faster.
26758 test -z "$cf_pathlist" && \
26759         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26760
26761 test -z "$cf_pathlist" &&
26762         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26763
26764 # This works with OpenBSD 6.5, which lists only filenames
26765 test -z "$cf_pathlist" &&
26766         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26767
26768 if test -z "$cf_pathlist"
26769 then
26770         # dyld default path with MacOS
26771         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26772         then
26773                 # do this to bypass check
26774                 cf_cv_ld_searchpath='$HOME/lib'
26775                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26776         fi
26777 fi
26778
26779 if test -z "$cf_pathlist"
26780 then
26781         # Solaris is hardcoded
26782         if test -d /opt/SUNWspro/lib
26783         then
26784                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26785         elif test -d /usr/ccs/lib
26786         then
26787                 cf_pathlist="/usr/ccs/lib /usr/lib"
26788         fi
26789 fi
26790
26791 fi
26792
26793 # If nothing else, assume it is conventional
26794 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26795
26796 # Finally, check that this is only directories
26797 for cf_path in $0 $cf_pathlist
26798 do
26799         if test -d "$cf_path"; then
26800                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26801                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26802         fi
26803 done
26804
26805 # Ensure that it is nonempty
26806 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26807
26808 fi
26809 echo "$as_me:26809: result: $cf_cv_ld_searchpath" >&5
26810 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26811
26812 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26813
26814 cat >>confdefs.h <<\EOF
26815 #define HAVE_CURSES_DATA_BOOLNAMES 1
26816 EOF
26817
26818 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"
26819 ac_config_commands="$ac_config_commands default"
26820 cat >confcache <<\_ACEOF
26821 # This file is a shell script that caches the results of configure
26822 # tests run on this system so they can be shared between configure
26823 # scripts and configure runs, see configure's option --config-cache.
26824 # It is not useful on other systems.  If it contains results you don't
26825 # want to keep, you may remove or edit it.
26826 #
26827 # config.status only pays attention to the cache file if you give it
26828 # the --recheck option to rerun configure.
26829 #
26830 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26831 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26832 # following values.
26833
26834 _ACEOF
26835
26836 # The following way of writing the cache mishandles newlines in values,
26837 # but we know of no workaround that is simple, portable, and efficient.
26838 # So, don't put newlines in cache variables' values.
26839 # Ultrix sh set writes to stderr and can't be redirected directly,
26840 # and sets the high bit in the cache file unless we assign to the vars.
26841 {
26842   (set) 2>&1 |
26843     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26844     *ac_space=\ *)
26845       # `set' does not quote correctly, so add quotes (double-quote
26846       # substitution turns \\\\ into \\, and sed turns \\ into \).
26847       sed -n \
26848         "s/'/'\\\\''/g;
26849           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26850       ;;
26851     *)
26852       # `set' quotes correctly as required by POSIX, so do not add quotes.
26853       sed -n \
26854         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26855       ;;
26856     esac;
26857 } |
26858   sed '
26859      t clear
26860      : clear
26861      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26862      t end
26863      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26864      : end' >>confcache
26865 if cmp -s $cache_file confcache; then :; else
26866   if test -w $cache_file; then
26867     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26868     cat confcache >$cache_file
26869   else
26870     echo "not updating unwritable cache $cache_file"
26871   fi
26872 fi
26873 rm -f confcache
26874
26875 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26876 # Let make expand exec_prefix.
26877 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26878
26879 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26880 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26881 # trailing colons and then remove the whole line if VPATH becomes empty
26882 # (actually we leave an empty line to preserve line numbers).
26883 if test "x$srcdir" = x.; then
26884   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26885 s/:*\$(srcdir):*/:/;
26886 s/:*\${srcdir}:*/:/;
26887 s/:*@srcdir@:*/:/;
26888 s/^\([^=]*=[    ]*\):*/\1/;
26889 s/:*$//;
26890 s/^[^=]*=[      ]*$//;
26891 }'
26892 fi
26893
26894 DEFS=-DHAVE_CONFIG_H
26895
26896 : ${CONFIG_STATUS=./config.status}
26897 ac_clean_files_save=$ac_clean_files
26898 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26899 { echo "$as_me:26899: creating $CONFIG_STATUS" >&5
26900 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26901 cat >$CONFIG_STATUS <<_ACEOF
26902 #! $SHELL
26903 # Generated automatically by configure.
26904 # Run this file to recreate the current configuration.
26905 # Compiler output produced by configure, useful for debugging
26906 # configure, is in config.log if it exists.
26907
26908 debug=false
26909 SHELL=\${CONFIG_SHELL-$SHELL}
26910 ac_cs_invocation="\$0 \$@"
26911
26912 CLICOLOR_FORCE= GREP_OPTIONS=
26913 unset CLICOLOR_FORCE GREP_OPTIONS
26914 _ACEOF
26915
26916 cat >>$CONFIG_STATUS <<\_ACEOF
26917 # Be Bourne compatible
26918 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26919   emulate sh
26920   NULLCMD=:
26921 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26922   set -o posix
26923 fi
26924
26925 # Name of the executable.
26926 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26927
26928 if expr a : '\(a\)' >/dev/null 2>&1; then
26929   as_expr=expr
26930 else
26931   as_expr=false
26932 fi
26933
26934 rm -f conf$$ conf$$.exe conf$$.file
26935 echo >conf$$.file
26936 if ln -s conf$$.file conf$$ 2>/dev/null; then
26937   # We could just check for DJGPP; but this test a) works b) is more generic
26938   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26939   if test -f conf$$.exe; then
26940     # Don't use ln at all; we don't have any links
26941     as_ln_s='cp -p'
26942   else
26943     as_ln_s='ln -s'
26944   fi
26945 elif ln conf$$.file conf$$ 2>/dev/null; then
26946   as_ln_s=ln
26947 else
26948   as_ln_s='cp -p'
26949 fi
26950 rm -f conf$$ conf$$.exe conf$$.file
26951
26952 as_executable_p="test -f"
26953
26954 # Support unset when possible.
26955 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26956   as_unset=unset
26957 else
26958   as_unset=false
26959 fi
26960
26961 # NLS nuisances.
26962 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26963 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26964 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26965 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26966 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26967 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26968 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26969 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26970
26971 # IFS
26972 # We need space, tab and new line, in precisely that order.
26973 as_nl='
26974 '
26975 IFS="   $as_nl"
26976
26977 # CDPATH.
26978 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26979
26980 exec 6>&1
26981
26982 _ACEOF
26983
26984 # Files that config.status was made for.
26985 if test -n "$ac_config_files"; then
26986   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26987 fi
26988
26989 if test -n "$ac_config_headers"; then
26990   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26991 fi
26992
26993 if test -n "$ac_config_links"; then
26994   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26995 fi
26996
26997 if test -n "$ac_config_commands"; then
26998   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26999 fi
27000
27001 cat >>$CONFIG_STATUS <<\EOF
27002
27003 ac_cs_usage="\
27004 \`$as_me' instantiates files from templates according to the
27005 current configuration.
27006
27007 Usage: $0 [OPTIONS] [FILE]...
27008
27009   -h, --help       print this help, then exit
27010   -V, --version    print version number, then exit
27011   -d, --debug      don't remove temporary files
27012       --recheck    update $as_me by reconfiguring in the same conditions
27013   --file=FILE[:TEMPLATE]
27014                    instantiate the configuration file FILE
27015   --header=FILE[:TEMPLATE]
27016                    instantiate the configuration header FILE
27017
27018 Configuration files:
27019 $config_files
27020
27021 Configuration headers:
27022 $config_headers
27023
27024 Configuration commands:
27025 $config_commands
27026
27027 Report bugs to <dickey@invisible-island.net>."
27028 EOF
27029
27030 cat >>$CONFIG_STATUS <<EOF
27031 ac_cs_version="\\
27032 config.status
27033 configured by $0, generated by GNU Autoconf 2.52.20200802,
27034   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
27035
27036 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
27037 Free Software Foundation, Inc.
27038 This config.status script is free software; the Free Software Foundation
27039 gives unlimited permission to copy, distribute and modify it."
27040 srcdir=$srcdir
27041 INSTALL="$INSTALL"
27042 EOF
27043
27044 cat >>$CONFIG_STATUS <<\EOF
27045 # If no file are specified by the user, then we need to provide default
27046 # value.  By we need to know if files were specified by the user.
27047 ac_need_defaults=:
27048 while test $# != 0
27049 do
27050   case $1 in
27051   --*=*)
27052     ac_option=`expr "x$1" : 'x\([^=]*\)='`
27053     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
27054     shift
27055     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
27056     shift
27057     ;;
27058   -*);;
27059   *) # This is not an option, so the user has probably given explicit
27060      # arguments.
27061      ac_need_defaults=false;;
27062   esac
27063
27064   case $1 in
27065   # Handling of the options.
27066 EOF
27067 cat >>$CONFIG_STATUS <<EOF
27068   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27069     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
27070     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
27071 EOF
27072 cat >>$CONFIG_STATUS <<\EOF
27073   --version | --vers* | -V )
27074     echo "$ac_cs_version"; exit 0 ;;
27075   --he | --h)
27076     # Conflict between --help and --header
27077     { { echo "$as_me:27077: error: ambiguous option: $1
27078 Try \`$0 --help' for more information." >&5
27079 echo "$as_me: error: ambiguous option: $1
27080 Try \`$0 --help' for more information." >&2;}
27081    { (exit 1); exit 1; }; };;
27082   --help | --hel | -h )
27083     echo "$ac_cs_usage"; exit 0 ;;
27084   --debug | --d* | -d )
27085     debug=: ;;
27086   --file | --fil | --fi | --f )
27087     shift
27088     CONFIG_FILES="$CONFIG_FILES $1"
27089     ac_need_defaults=false;;
27090   --header | --heade | --head | --hea )
27091     shift
27092     CONFIG_HEADERS="$CONFIG_HEADERS $1"
27093     ac_need_defaults=false;;
27094
27095   # This is an error.
27096   -*) { { echo "$as_me:27096: error: unrecognized option: $1
27097 Try \`$0 --help' for more information." >&5
27098 echo "$as_me: error: unrecognized option: $1
27099 Try \`$0 --help' for more information." >&2;}
27100    { (exit 1); exit 1; }; } ;;
27101
27102   *) ac_config_targets="$ac_config_targets $1" ;;
27103
27104   esac
27105   shift
27106 done
27107
27108 exec 5>>config.log
27109 cat >&5 << _ACEOF
27110
27111 ## ----------------------- ##
27112 ## Running config.status.  ##
27113 ## ----------------------- ##
27114
27115 This file was extended by $as_me 2.52.20200802, executed with
27116   CONFIG_FILES    = $CONFIG_FILES
27117   CONFIG_HEADERS  = $CONFIG_HEADERS
27118   CONFIG_LINKS    = $CONFIG_LINKS
27119   CONFIG_COMMANDS = $CONFIG_COMMANDS
27120   > $ac_cs_invocation
27121 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27122
27123 _ACEOF
27124 EOF
27125
27126 cat >>$CONFIG_STATUS <<EOF
27127 #
27128 # INIT-COMMANDS section.
27129 #
27130
27131 ### Special initialization commands, used to pass information from the
27132 ### configuration-run into config.status
27133
27134 ALTERNATE_SYMS="$ALTERNATE_SYMS"
27135 AWK="$AWK"
27136 CXX_NAME="$CXX_NAME"
27137 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
27138 DFT_LWR_MODEL="$DFT_LWR_MODEL"
27139 ECHO_LD="$ECHO_LD"
27140 EXTRA_SUFFIX="$EXTRA_SUFFIX"
27141 FORM_NAME="$FORM_NAME"
27142 LDCONFIG="$LDCONFIG"
27143 LIBTOOL_VERSION="$LIBTOOL_VERSION"
27144 LIB_NAME="$LIB_NAME"
27145 LIB_PREFIX="$LIB_PREFIX"
27146 LIB_SUBSETS="$LIB_SUBSETS"
27147 LIB_SUFFIX="$LIB_SUFFIX"
27148 LIB_TRACING="$LIB_TRACING"
27149 LN_S="$LN_S"
27150 MAKE_TERMINFO="$MAKE_TERMINFO"
27151 MENU_NAME="$MENU_NAME"
27152 NCURSES_MAJOR="$NCURSES_MAJOR"
27153 NCURSES_MINOR="$NCURSES_MINOR"
27154 NCURSES_OSPEED="$NCURSES_OSPEED"
27155 NCURSES_PATCH="$NCURSES_PATCH"
27156 PANEL_NAME="$PANEL_NAME"
27157 SRC_SUBDIRS="$SRC_SUBDIRS"
27158 TERMINFO="$TERMINFO"
27159 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27160 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27161 TICS_NAME="$TICS_NAME"
27162 TICS_SUFFIX="$TICS_SUFFIX"
27163 TIC_PATH="$TIC_PATH"
27164 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27165 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27166 TINFO_NAME="$TINFO_NAME"
27167 TINFO_SUFFIX="$TINFO_SUFFIX"
27168 UNALTERED_SYMS="$UNALTERED_SYMS"
27169 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27170 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27171 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27172 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27173 WILDCARD_SYMS="$WILDCARD_SYMS"
27174 WITH_CURSES_H="$with_curses_h"
27175 WITH_ECHO="${enable_echo:=yes}"
27176 WITH_OVERWRITE="$with_overwrite"
27177 cf_LIST_MODELS="$cf_list_models"
27178 cf_cv_abi_version="$cf_cv_abi_version"
27179 cf_cv_do_relink="$cf_cv_do_relink"
27180 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27181 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27182 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27183 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27184 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27185 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27186 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27187 cf_cv_rel_version="$cf_cv_rel_version"
27188 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27189 cf_cv_shared_soname='$cf_cv_shared_soname'
27190 cf_cv_shlib_version="$cf_cv_shlib_version"
27191 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27192 cf_cv_system_name="$cf_cv_system_name"
27193 cf_cv_term_driver="$with_term_driver"
27194 cf_with_ada="$cf_with_ada"
27195 cf_with_cxx_binding="$cf_with_cxx_binding"
27196 cf_with_db_install="$cf_with_db_install"
27197 cf_with_manpages="$cf_with_manpages"
27198 cf_with_tests="$cf_with_tests"
27199 host="$host"
27200 target="$target"
27201 with_shared_cxx="$with_shared_cxx"
27202
27203 EOF
27204
27205 cat >>$CONFIG_STATUS <<\EOF
27206 for ac_config_target in $ac_config_targets
27207 do
27208   case "$ac_config_target" in
27209   # Handling of arguments.
27210   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27211   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27212   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27213   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27214   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27215   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27216   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27217   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27218   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27219   *) { { echo "$as_me:27219: error: invalid argument: $ac_config_target" >&5
27220 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27221    { (exit 1); exit 1; }; };;
27222   esac
27223 done
27224
27225 # If the user did not use the arguments to specify the items to instantiate,
27226 # then the envvar interface is used.  Set only those that are not.
27227 # We use the long form for the default assignment because of an extremely
27228 # bizarre bug on SunOS 4.1.3.
27229 if $ac_need_defaults; then
27230   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27231   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27232   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27233 fi
27234
27235 # Create a temporary directory, and hook for its removal unless debugging.
27236 $debug ||
27237 {
27238   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27239   trap '{ (exit 1); exit 1; }' 1 2 13 15
27240 }
27241
27242 # Create a (secure) tmp directory for tmp files.
27243 : ${TMPDIR=/tmp}
27244 {
27245   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27246   test -n "$tmp" && test -d "$tmp"
27247 }  ||
27248 {
27249   tmp=$TMPDIR/cs$$-$RANDOM
27250   (umask 077 && mkdir $tmp)
27251 } ||
27252 {
27253    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27254    { (exit 1); exit 1; }
27255 }
27256
27257 EOF
27258
27259 cat >>$CONFIG_STATUS <<EOF
27260
27261 #
27262 # CONFIG_FILES section.
27263 #
27264
27265 # No need to generate the scripts if there are no CONFIG_FILES.
27266 # This happens for instance when ./config.status config.h
27267 if test -n "\$CONFIG_FILES"; then
27268   # Protect against being on the right side of a sed subst in config.status.
27269   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27270    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27271 s,@SHELL@,$SHELL,;t t
27272 s,@exec_prefix@,$exec_prefix,;t t
27273 s,@prefix@,$prefix,;t t
27274 s,@program_transform_name@,$program_transform_name,;t t
27275 s,@bindir@,$bindir,;t t
27276 s,@sbindir@,$sbindir,;t t
27277 s,@libexecdir@,$libexecdir,;t t
27278 s,@datarootdir@,$datarootdir,;t t
27279 s,@datadir@,$datadir,;t t
27280 s,@sysconfdir@,$sysconfdir,;t t
27281 s,@sharedstatedir@,$sharedstatedir,;t t
27282 s,@localstatedir@,$localstatedir,;t t
27283 s,@runstatedir@,$runstatedir,;t t
27284 s,@libdir@,$libdir,;t t
27285 s,@includedir@,$includedir,;t t
27286 s,@oldincludedir@,$oldincludedir,;t t
27287 s,@infodir@,$infodir,;t t
27288 s,@mandir@,$mandir,;t t
27289 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27290 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27291 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27292 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27293 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27294 s,@build_alias@,$build_alias,;t t
27295 s,@host_alias@,$host_alias,;t t
27296 s,@target_alias@,$target_alias,;t t
27297 s,@ECHO_C@,$ECHO_C,;t t
27298 s,@ECHO_N@,$ECHO_N,;t t
27299 s,@ECHO_T@,$ECHO_T,;t t
27300 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27301 s,@DEFS@,$DEFS,;t t
27302 s,@LIBS@,$LIBS,;t t
27303 s,@top_builddir@,$top_builddir,;t t
27304 s,@EGREP@,$EGREP,;t t
27305 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27306 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27307 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27308 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27309 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27310 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27311 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27312 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27313 s,@VERSION@,$VERSION,;t t
27314 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27315 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27316 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27317 s,@PACKAGE@,$PACKAGE,;t t
27318 s,@build@,$build,;t t
27319 s,@build_cpu@,$build_cpu,;t t
27320 s,@build_vendor@,$build_vendor,;t t
27321 s,@build_os@,$build_os,;t t
27322 s,@host@,$host,;t t
27323 s,@host_cpu@,$host_cpu,;t t
27324 s,@host_vendor@,$host_vendor,;t t
27325 s,@host_os@,$host_os,;t t
27326 s,@target@,$target,;t t
27327 s,@target_cpu@,$target_cpu,;t t
27328 s,@target_vendor@,$target_vendor,;t t
27329 s,@target_os@,$target_os,;t t
27330 s,@CC@,$CC,;t t
27331 s,@CFLAGS@,$CFLAGS,;t t
27332 s,@LDFLAGS@,$LDFLAGS,;t t
27333 s,@CPPFLAGS@,$CPPFLAGS,;t t
27334 s,@ac_ct_CC@,$ac_ct_CC,;t t
27335 s,@EXEEXT@,$EXEEXT,;t t
27336 s,@OBJEXT@,$OBJEXT,;t t
27337 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27338 s,@CPP@,$CPP,;t t
27339 s,@LDCONFIG@,$LDCONFIG,;t t
27340 s,@CXX@,$CXX,;t t
27341 s,@CXXFLAGS@,$CXXFLAGS,;t t
27342 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27343 s,@AWK@,$AWK,;t t
27344 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27345 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27346 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27347 s,@LINT@,$LINT,;t t
27348 s,@LINT_OPTS@,$LINT_OPTS,;t t
27349 s,@LN_S@,$LN_S,;t t
27350 s,@cf_config_suffix@,$cf_config_suffix,;t t
27351 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27352 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27353 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27354 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27355 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27356 s,@SET_MAKE@,$SET_MAKE,;t t
27357 s,@CTAGS@,$CTAGS,;t t
27358 s,@ETAGS@,$ETAGS,;t t
27359 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27360 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27361 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27362 s,@RANLIB@,$RANLIB,;t t
27363 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27364 s,@LD@,$LD,;t t
27365 s,@ac_ct_LD@,$ac_ct_LD,;t t
27366 s,@AR@,$AR,;t t
27367 s,@ac_ct_AR@,$ac_ct_AR,;t t
27368 s,@NM@,$NM,;t t
27369 s,@ac_ct_NM@,$ac_ct_NM,;t t
27370 s,@ARFLAGS@,$ARFLAGS,;t t
27371 s,@DESTDIR@,$DESTDIR,;t t
27372 s,@BUILD_CC@,$BUILD_CC,;t t
27373 s,@BUILD_CPP@,$BUILD_CPP,;t t
27374 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27375 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27376 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27377 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27378 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27379 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27380 s,@cf_list_models@,$cf_list_models,;t t
27381 s,@ABI_VERSION@,$ABI_VERSION,;t t
27382 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27383 s,@LIBTOOL@,$LIBTOOL,;t t
27384 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27385 s,@LT_UNDEF@,$LT_UNDEF,;t t
27386 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27387 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27388 s,@LIB_CREATE@,$LIB_CREATE,;t t
27389 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27390 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27391 s,@LIB_PREP@,$LIB_PREP,;t t
27392 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27393 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27394 s,@LIB_LINK@,$LIB_LINK,;t t
27395 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27396 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27397 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27398 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27399 s,@TICS_NAME@,$TICS_NAME,;t t
27400 s,@TINFO_NAME@,$TINFO_NAME,;t t
27401 s,@LIB_NAME@,$LIB_NAME,;t t
27402 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27403 s,@CC_G_OPT@,$CC_G_OPT,;t t
27404 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27405 s,@LD_MODEL@,$LD_MODEL,;t t
27406 s,@shlibdir@,$shlibdir,;t t
27407 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27408 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27409 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27410 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27411 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27412 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27413 s,@LINK_PROGS@,$LINK_PROGS,;t t
27414 s,@LINK_TESTS@,$LINK_TESTS,;t t
27415 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27416 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27417 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27418 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27419 s,@RPATH_LIST@,$RPATH_LIST,;t t
27420 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27421 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27422 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27423 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27424 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27425 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
27426 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27427 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27428 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27429 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27430 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27431 s,@TIC@,$TIC,;t t
27432 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
27433 s,@INFOCMP@,$INFOCMP,;t t
27434 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
27435 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27436 s,@XTERM_KBS@,$XTERM_KBS,;t t
27437 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27438 s,@TERMINFO@,$TERMINFO,;t t
27439 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27440 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27441 s,@TERMPATH@,$TERMPATH,;t t
27442 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27443 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27444 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27445 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27446 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27447 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27448 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27449 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27450 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27451 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27452 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27453 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27454 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27455 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27456 s,@RGB_PATH@,$RGB_PATH,;t t
27457 s,@no_x11_rgb@,$no_x11_rgb,;t t
27458 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27459 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27460 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27461 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27462 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27463 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27464 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27465 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27466 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27467 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27468 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27469 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27470 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27471 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27472 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27473 s,@PTHREAD@,$PTHREAD,;t t
27474 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27475 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27476 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27477 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27478 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27479 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27480 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27481 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27482 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27483 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27484 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27485 s,@ECHO_LT@,$ECHO_LT,;t t
27486 s,@ECHO_LD@,$ECHO_LD,;t t
27487 s,@RULE_CC@,$RULE_CC,;t t
27488 s,@SHOW_CC@,$SHOW_CC,;t t
27489 s,@ECHO_CC@,$ECHO_CC,;t t
27490 s,@ECHO_LINK@,$ECHO_LINK,;t t
27491 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27492 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27493 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27494 s,@ADAFLAGS@,$ADAFLAGS,;t t
27495 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27496 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27497 s,@ADA_TRACE@,$ADA_TRACE,;t t
27498 s,@MATH_LIB@,$MATH_LIB,;t t
27499 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27500 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27501 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27502 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27503 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27504 s,@TEST_LIBS@,$TEST_LIBS,;t t
27505 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27506 s,@CXXCPP@,$CXXCPP,;t t
27507 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27508 s,@CXX_AR@,$CXX_AR,;t t
27509 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27510 s,@CXXLIBS@,$CXXLIBS,;t t
27511 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27512 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27513 s,@M4_exists@,$M4_exists,;t t
27514 s,@cf_ada_make@,$cf_ada_make,;t t
27515 s,@cf_ada_config@,$cf_ada_config,;t t
27516 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27517 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27518 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27519 s,@cf_compile_generics@,$cf_compile_generics,;t t
27520 s,@cf_generic_objects@,$cf_generic_objects,;t t
27521 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27522 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27523 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27524 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27525 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27526 s,@cf_ada_package@,$cf_ada_package,;t t
27527 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27528 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27529 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27530 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27531 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27532 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27533 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27534 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27535 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27536 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27537 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27538 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27539 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27540 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27541 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27542 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27543 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27544 s,@TICS_LIBS@,$TICS_LIBS,;t t
27545 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27546 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27547 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27548 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27549 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27550 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27551 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27552 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27553 s,@includesubdir@,$includesubdir,;t t
27554 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27555 s,@TICS_LIST@,$TICS_LIST,;t t
27556 s,@TINFO_LIST@,$TINFO_LIST,;t t
27557 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27558 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27559 s,@FORM_NAME@,$FORM_NAME,;t t
27560 s,@MENU_NAME@,$MENU_NAME,;t t
27561 s,@PANEL_NAME@,$PANEL_NAME,;t t
27562 s,@CXX_NAME@,$CXX_NAME,;t t
27563 s,@TEST_ARGS@,$TEST_ARGS,;t t
27564 s,@TEST_DEPS@,$TEST_DEPS,;t t
27565 s,@TEST_ARG2@,$TEST_ARG2,;t t
27566 s,@TEST_DEP2@,$TEST_DEP2,;t t
27567 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27568 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27569 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27570 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27571 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27572 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27573 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27574 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27575 s,@cross_compiling@,$cross_compiling,;t t
27576 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27577 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27578 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27579 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27580 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27581 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27582 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27583 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27584 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27585 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27586 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27587 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27588 CEOF
27589
27590 EOF
27591
27592   cat >>$CONFIG_STATUS <<\EOF
27593   # Split the substitutions into bite-sized pieces for seds with
27594   # small command number limits, like on Digital OSF/1 and HP-UX.
27595   ac_max_sed_lines=48
27596   ac_sed_frag=1 # Number of current file.
27597   ac_beg=1 # First line for current file.
27598   ac_end=$ac_max_sed_lines # Line after last line for current file.
27599   ac_more_lines=:
27600   ac_sed_cmds=
27601   while $ac_more_lines; do
27602     if test $ac_beg -gt 1; then
27603       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27604     else
27605       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27606     fi
27607     if test ! -s $tmp/subs.frag; then
27608       ac_more_lines=false
27609     else
27610       # The purpose of the label and of the branching condition is to
27611       # speed up the sed processing (if there are no `@' at all, there
27612       # is no need to browse any of the substitutions).
27613       # These are the two extra sed commands mentioned above.
27614       (echo ':t
27615   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27616       # It is possible to make a multiline substitution using escaped newlines.
27617       # Ensure that we do not split the substitution between script fragments.
27618       ac_BEG=$ac_end
27619       ac_END=`expr $ac_end + $ac_max_sed_lines`
27620       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27621       if test -s $tmp/subs.next; then
27622         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27623         if test ! -s $tmp/subs.edit; then
27624           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27625           if test ! -s $tmp/subs.edit; then
27626             if test $ac_beg -gt 1; then
27627               ac_end=`expr $ac_end - 1`
27628               continue
27629             fi
27630           fi
27631         fi
27632       fi
27633
27634       if test -z "$ac_sed_cmds"; then
27635         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27636       else
27637         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27638       fi
27639       ac_sed_frag=`expr $ac_sed_frag + 1`
27640       ac_beg=$ac_end
27641       ac_end=`expr $ac_end + $ac_max_sed_lines`
27642     fi
27643   done
27644   if test -z "$ac_sed_cmds"; then
27645     ac_sed_cmds=cat
27646   fi
27647 fi # test -n "$CONFIG_FILES"
27648
27649 EOF
27650 cat >>$CONFIG_STATUS <<\EOF
27651 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27652   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27653   case $ac_file in
27654   - | *:- | *:-:* ) # input from stdin
27655         cat >$tmp/stdin
27656         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27657         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27658   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27659         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27660   * )   ac_file_in=$ac_file.in ;;
27661   esac
27662
27663   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27664   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27665          X"$ac_file" : 'X\(//\)[^/]' \| \
27666          X"$ac_file" : 'X\(//\)$' \| \
27667          X"$ac_file" : 'X\(/\)' \| \
27668          .     : '\(.\)' 2>/dev/null ||
27669 echo X"$ac_file" |
27670     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27671           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27672           /^X\(\/\/\)$/{ s//\1/; q; }
27673           /^X\(\/\).*/{ s//\1/; q; }
27674           s/.*/./; q'`
27675   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27676     { case "$ac_dir" in
27677   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27678   *)                      as_incr_dir=.;;
27679 esac
27680 as_dummy="$ac_dir"
27681 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27682   case $as_mkdir_dir in
27683     # Skip DOS drivespec
27684     ?:) as_incr_dir=$as_mkdir_dir ;;
27685     *)
27686       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27687       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27688     ;;
27689   esac
27690 done; }
27691
27692     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27693     # A "../" for each directory in $ac_dir_suffix.
27694     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27695   else
27696     ac_dir_suffix= ac_dots=
27697   fi
27698
27699   case $srcdir in
27700   .)  ac_srcdir=.
27701       if test -z "$ac_dots"; then
27702          ac_top_srcdir=.
27703       else
27704          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27705       fi ;;
27706   [\\/]* | ?:[\\/]* )
27707       ac_srcdir=$srcdir$ac_dir_suffix;
27708       ac_top_srcdir=$srcdir ;;
27709   *) # Relative path.
27710     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27711     ac_top_srcdir=$ac_dots$srcdir ;;
27712   esac
27713
27714   case $INSTALL in
27715   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27716   *) ac_INSTALL=$ac_dots$INSTALL ;;
27717   esac
27718
27719   if test x"$ac_file" != x-; then
27720     { echo "$as_me:27720: creating $ac_file" >&5
27721 echo "$as_me: creating $ac_file" >&6;}
27722     rm -f "$ac_file"
27723   fi
27724   # Let's still pretend it is `configure' which instantiates (i.e., don't
27725   # use $as_me), people would be surprised to read:
27726   #    /* config.h.  Generated automatically by config.status.  */
27727   configure_input="Generated automatically from `echo $ac_file_in |
27728                                                  sed 's,.*/,,'` by configure."
27729
27730   # First look for the input files in the build tree, otherwise in the
27731   # src tree.
27732   ac_file_inputs=`IFS=:
27733     for f in $ac_file_in; do
27734       case $f in
27735       -) echo $tmp/stdin ;;
27736       [\\/$]*)
27737          # Absolute (can't be DOS-style, as IFS=:)
27738          test -f "$f" || { { echo "$as_me:27738: error: cannot find input file: $f" >&5
27739 echo "$as_me: error: cannot find input file: $f" >&2;}
27740    { (exit 1); exit 1; }; }
27741          echo $f;;
27742       *) # Relative
27743          if test -f "$f"; then
27744            # Build tree
27745            echo $f
27746          elif test -f "$srcdir/$f"; then
27747            # Source tree
27748            echo $srcdir/$f
27749          else
27750            # /dev/null tree
27751            { { echo "$as_me:27751: error: cannot find input file: $f" >&5
27752 echo "$as_me: error: cannot find input file: $f" >&2;}
27753    { (exit 1); exit 1; }; }
27754          fi;;
27755       esac
27756     done` || { (exit 1); exit 1; }
27757 EOF
27758 cat >>$CONFIG_STATUS <<\EOF
27759   ac_warn_datarootdir=no
27760   if test x"$ac_file" != x-; then
27761     for ac_item in $ac_file_inputs
27762     do
27763       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27764       if test -n "$ac_seen"; then
27765         ac_used=`grep '@datarootdir@' $ac_item`
27766         if test -z "$ac_used"; then
27767           { echo "$as_me:27767: WARNING: datarootdir was used implicitly but not set:
27768 $ac_seen" >&5
27769 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27770 $ac_seen" >&2;}
27771           ac_warn_datarootdir=yes
27772         fi
27773       fi
27774       ac_seen=`grep '${datarootdir}' $ac_item`
27775       if test -n "$ac_seen"; then
27776         { echo "$as_me:27776: WARNING: datarootdir was used explicitly but not set:
27777 $ac_seen" >&5
27778 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27779 $ac_seen" >&2;}
27780         ac_warn_datarootdir=yes
27781       fi
27782     done
27783   fi
27784
27785 if test "x$ac_warn_datarootdir" = xyes; then
27786   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27787 fi
27788
27789 EOF
27790 cat >>$CONFIG_STATUS <<EOF
27791   sed "$ac_vpsub
27792 $extrasub
27793 EOF
27794 cat >>$CONFIG_STATUS <<\EOF
27795 :t
27796 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27797 s,@configure_input@,$configure_input,;t t
27798 s,@srcdir@,$ac_srcdir,;t t
27799 s,@top_srcdir@,$ac_top_srcdir,;t t
27800 s,@INSTALL@,$ac_INSTALL,;t t
27801 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27802   rm -f $tmp/stdin
27803   if test x"$ac_file" != x-; then
27804     cp $tmp/out $ac_file
27805
27806     for ac_name in prefix exec_prefix datarootdir
27807     do
27808         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27809         if test -n "$ac_seen"; then
27810             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27811             if test -z "$ac_init"; then
27812               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27813               { echo "$as_me:27813: WARNING: Variable $ac_name is used but was not set:
27814 $ac_seen" >&5
27815 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27816 $ac_seen" >&2;}
27817             fi
27818         fi
27819     done
27820     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27821     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27822     if test -s $tmp/out; then
27823       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27824       { echo "$as_me:27824: WARNING: Some variables may not be substituted:
27825 $ac_seen" >&5
27826 echo "$as_me: WARNING: Some variables may not be substituted:
27827 $ac_seen" >&2;}
27828     fi
27829   else
27830     cat $tmp/out
27831   fi
27832   rm -f $tmp/out
27833
27834 done
27835 EOF
27836 cat >>$CONFIG_STATUS <<\EOF
27837
27838 #
27839 # CONFIG_HEADER section.
27840 #
27841
27842 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27843 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27844 #
27845 # ac_d sets the value in "#define NAME VALUE" lines.
27846 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27847 ac_dB='[        ].*$,\1#\2'
27848 ac_dC=' '
27849 ac_dD=',;t'
27850 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27851 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27852 ac_iB='\([      ]\),\1#\2define\3'
27853 ac_iC=' '
27854 ac_iD='\4,;t'
27855 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27856 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27857 ac_uB='$,\1#\2define\3'
27858 ac_uC=' '
27859 ac_uD=',;t'
27860
27861 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27862   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27863   case $ac_file in
27864   - | *:- | *:-:* ) # input from stdin
27865         cat >$tmp/stdin
27866         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27867         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27868   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27869         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27870   * )   ac_file_in=$ac_file.in ;;
27871   esac
27872
27873   test x"$ac_file" != x- && { echo "$as_me:27873: creating $ac_file" >&5
27874 echo "$as_me: creating $ac_file" >&6;}
27875
27876   # First look for the input files in the build tree, otherwise in the
27877   # src tree.
27878   ac_file_inputs=`IFS=:
27879     for f in $ac_file_in; do
27880       case $f in
27881       -) echo $tmp/stdin ;;
27882       [\\/$]*)
27883          # Absolute (can't be DOS-style, as IFS=:)
27884          test -f "$f" || { { echo "$as_me:27884: error: cannot find input file: $f" >&5
27885 echo "$as_me: error: cannot find input file: $f" >&2;}
27886    { (exit 1); exit 1; }; }
27887          echo $f;;
27888       *) # Relative
27889          if test -f "$f"; then
27890            # Build tree
27891            echo $f
27892          elif test -f "$srcdir/$f"; then
27893            # Source tree
27894            echo $srcdir/$f
27895          else
27896            # /dev/null tree
27897            { { echo "$as_me:27897: error: cannot find input file: $f" >&5
27898 echo "$as_me: error: cannot find input file: $f" >&2;}
27899    { (exit 1); exit 1; }; }
27900          fi;;
27901       esac
27902     done` || { (exit 1); exit 1; }
27903   # Remove the trailing spaces.
27904   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27905
27906 EOF
27907
27908 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27909 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27910 # be either 'cat' or 'sort'.
27911 cat confdefs.h | uniq >conftest.vals
27912
27913 # Break up conftest.vals because some shells have a limit on
27914 # the size of here documents, and old seds have small limits too.
27915
27916 rm -f conftest.tail
27917 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27918 while grep . conftest.vals >/dev/null
27919 do
27920   # Write chunks of a limited-size here document to conftest.frag.
27921   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27922   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27923   echo 'CEOF' >> $CONFIG_STATUS
27924   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27925   rm -f conftest.vals
27926   mv conftest.tail conftest.vals
27927 done
27928 rm -f conftest.vals
27929
27930 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27931 # marker @DEFS@.
27932 echo '  cat >> conftest.edit <<CEOF
27933 /@DEFS@/r conftest.frag
27934 /@DEFS@/d
27935 CEOF
27936 sed -f conftest.edit $tmp/in > $tmp/out
27937 rm -f $tmp/in
27938 mv $tmp/out $tmp/in
27939 rm -f conftest.edit conftest.frag
27940 ' >> $CONFIG_STATUS
27941
27942 cat >>$CONFIG_STATUS <<\EOF
27943   # Let's still pretend it is `configure' which instantiates (i.e., don't
27944   # use $as_me), people would be surprised to read:
27945   #    /* config.h.  Generated automatically by config.status.  */
27946   if test x"$ac_file" = x-; then
27947     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27948   else
27949     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27950   fi
27951   cat $tmp/in >>$tmp/config.h
27952   rm -f $tmp/in
27953   if test x"$ac_file" != x-; then
27954     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27955       { echo "$as_me:27955: $ac_file is unchanged" >&5
27956 echo "$as_me: $ac_file is unchanged" >&6;}
27957     else
27958       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27959          X"$ac_file" : 'X\(//\)[^/]' \| \
27960          X"$ac_file" : 'X\(//\)$' \| \
27961          X"$ac_file" : 'X\(/\)' \| \
27962          .     : '\(.\)' 2>/dev/null ||
27963 echo X"$ac_file" |
27964     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27965           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27966           /^X\(\/\/\)$/{ s//\1/; q; }
27967           /^X\(\/\).*/{ s//\1/; q; }
27968           s/.*/./; q'`
27969       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27970         { case "$ac_dir" in
27971   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27972   *)                      as_incr_dir=.;;
27973 esac
27974 as_dummy="$ac_dir"
27975 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27976   case $as_mkdir_dir in
27977     # Skip DOS drivespec
27978     ?:) as_incr_dir=$as_mkdir_dir ;;
27979     *)
27980       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27981       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27982     ;;
27983   esac
27984 done; }
27985
27986       fi
27987       rm -f $ac_file
27988       mv $tmp/config.h $ac_file
27989     fi
27990   else
27991     cat $tmp/config.h
27992     rm -f $tmp/config.h
27993   fi
27994 done
27995 EOF
27996 cat >>$CONFIG_STATUS <<\EOF
27997 #
27998 # CONFIG_COMMANDS section.
27999 #
28000 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
28001   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
28002   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
28003
28004   case $ac_dest in
28005     default )
28006 if test "x$cf_with_tests" != xno ; then
28007
28008 for cf_dir in test
28009 do
28010         if test ! -d $srcdir/$cf_dir; then
28011                 continue
28012         elif test -f $srcdir/$cf_dir/programs; then
28013                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
28014         fi
28015 done
28016
28017 fi
28018
28019 cf_prefix=$LIB_PREFIX
28020
28021 case $cf_cv_shlib_version in
28022 (cygdll|msysdll|mingw|msvcdll)
28023         TINFO_NAME=$TINFO_ARG_SUFFIX
28024         TINFO_SUFFIX=.dll
28025         ;;
28026 esac
28027
28028 if test -n "$TINFO_SUFFIX" ; then
28029         case $TINFO_SUFFIX in
28030         (tw*)
28031                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
28032                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
28033                 ;;
28034         (t*)
28035                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
28036                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
28037                 ;;
28038         (w*)
28039                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
28040                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
28041                 ;;
28042         esac
28043 fi
28044
28045 for cf_dir in $SRC_SUBDIRS
28046 do
28047         if test ! -d $srcdir/$cf_dir ; then
28048                 continue
28049         elif test -f $srcdir/$cf_dir/modules; then
28050
28051                 SHARED_LIB=
28052                 Libs_To_Make=
28053                 cf_awk_program=
28054                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
28055                 then
28056                         cf_awk_program="$cf_awk_program\
28057 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
28058 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
28059 "
28060                 fi
28061
28062                 if test "x$WILDCARD_SYMS" = xno
28063                 then
28064                         cf_awk_program="$cf_awk_program\
28065 /[      ]_\\*;/ { skip=1; next; }\
28066 "
28067                 fi
28068
28069                 if test "x$cf_awk_program" != "x"
28070                 then
28071                         cat >>$cf_dir/Makefile <<CF_EOF
28072
28073 # Generated by CF_LIB_RULES
28074 resulting.map: $UNALTERED_SYMS
28075         $AWK 'BEGIN { skip = 1; last=""; } \
28076 $cf_awk_program \
28077 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
28078  skip = 0; last = \$\$0; } \
28079 END { print last; }' < $UNALTERED_SYMS >\$@
28080
28081 distclean::
28082         rm -f resulting.map
28083 CF_EOF
28084                 fi
28085
28086                 for cf_item in $cf_LIST_MODELS
28087                 do
28088
28089         case X$cf_item in
28090         (Xlibtool)
28091                 cf_suffix='.la'
28092                 cf_depsuf=$cf_suffix
28093                 ;;
28094         (Xdebug)
28095                 case $cf_cv_system_name in
28096                 (*-msvc*)
28097                         cf_suffix='_g.lib'
28098                         ;;
28099                 (*)
28100                         cf_suffix='_g.a'
28101                         ;;
28102                 esac
28103                 cf_depsuf=$cf_suffix
28104                 ;;
28105         (Xprofile)
28106                 case $cf_cv_system_name in
28107                 (*-msvc*)
28108                         cf_suffix='_p.lib'
28109                         ;;
28110                 (*)
28111                         cf_suffix='_p.a'
28112                         ;;
28113                 esac
28114                 cf_depsuf=$cf_suffix
28115                 ;;
28116         (Xshared)
28117                 case $cf_cv_system_name in
28118                 (aix[5-7]*)
28119                         cf_suffix='.so'
28120                         cf_depsuf=$cf_suffix
28121                         ;;
28122                 (*-msvc*)
28123                         cf_suffix='.dll'
28124                         cf_depsuf='.dll.lib'
28125                         ;;
28126                 (cygwin*|msys*|mingw*)
28127                         cf_suffix='.dll'
28128                         cf_depsuf='.dll.a'
28129                         ;;
28130                 (darwin*)
28131                         cf_suffix='.dylib'
28132                         cf_depsuf=$cf_suffix
28133                         ;;
28134                 (hpux*)
28135                         case $target in
28136                         (ia64*)
28137                                 cf_suffix='.so'
28138                                 cf_depsuf=$cf_suffix
28139                                 ;;
28140                         (*)
28141                                 cf_suffix='.sl'
28142                                 cf_depsuf=$cf_suffix
28143                                 ;;
28144                         esac
28145                         ;;
28146                 (*)
28147                         cf_suffix='.so'
28148                         cf_depsuf=$cf_suffix
28149                         ;;
28150                 esac
28151                 ;;
28152         (*)
28153                 case $target in
28154                 (*-msvc*)
28155                         cf_suffix='.lib'
28156                         ;;
28157                 (*)
28158                         cf_suffix='.a'
28159                         ;;
28160                 esac
28161                 cf_depsuf=$cf_suffix
28162                 ;;
28163         esac
28164         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28165         then
28166                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28167                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28168         fi
28169
28170                         if test "$cf_dir" = "c++"
28171                         then
28172
28173 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28174
28175 eval cf_libname=\$${cf_map_lib_basename}_NAME
28176
28177                         else
28178
28179 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28180
28181 eval cf_libname=\$${cf_map_lib_basename}_NAME
28182
28183                         fi
28184                         test -z "$cf_libname" && cf_libname="$cf_dir"
28185                         if test $cf_item = shared ; then
28186                                 if test -n "${LIB_SUFFIX}"
28187                                 then
28188                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28189                                 else
28190                                         cf_shared_suffix="$cf_suffix"
28191                                 fi
28192                                 if test "$cf_cv_do_symlinks" = yes ; then
28193                                         cf_version_name=
28194
28195                                         case "$cf_cv_shlib_version" in
28196                                         (rel)
28197                                                 cf_version_name=REL_VERSION
28198                                                 ;;
28199                                         (abi)
28200                                                 cf_version_name=ABI_VERSION
28201                                                 ;;
28202                                         esac
28203
28204                                         if test -n "$cf_version_name"
28205                                         then
28206                                                 case "$cf_cv_system_name" in
28207                                                 (darwin*)
28208                                                         # "w", etc?
28209                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28210                                                         ;;
28211                                                 (*)
28212                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28213                                                         ;;
28214                                                 esac
28215                                         fi
28216                                         if test -n "${USE_LIB_SUFFIX}"
28217                                         then
28218                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28219                                         else
28220                                                 cf_shared_suffix="$cf_suffix"
28221                                         fi
28222                                 fi
28223                                 # cygwin needs import library, and has unique naming convention
28224                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28225                                 # use 'cyg' prefix for shared lib.
28226                                 case $cf_cv_shlib_version in
28227                                 (cygdll)
28228                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28229                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28230                                         ;;
28231                                 (msysdll)
28232                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28233                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28234                                         ;;
28235                                 (mingw)
28236                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28237                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28238                                         ;;
28239                                 (msvcdll)
28240                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28241                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28242                                         ;;
28243                                 (*)
28244                                         cf_add_lib=
28245                                         ;;
28246                                 esac
28247                                 if test -n "$cf_add_lib"
28248                                 then
28249                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28250                                         continue
28251                                 fi
28252                         fi
28253                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28254                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28255                 done
28256
28257                 if test $cf_dir = ncurses ; then
28258                         cf_subsets="$LIB_SUBSETS"
28259                         cf_r_parts="$cf_subsets"
28260                         cf_liblist="$Libs_To_Make"
28261
28262                         while test -n "$cf_r_parts"
28263                         do
28264                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28265                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28266                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28267                                         cf_add_lib=
28268                                         case $cf_l_parts in
28269                                         (*termlib*)
28270                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28271                                                 ;;
28272                                         (*ticlib*)
28273                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28274                                                 ;;
28275                                         (*)
28276                                                 break
28277                                                 ;;
28278                                         esac
28279                                         if test -n "$cf_add_lib"; then
28280                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28281                                         fi
28282                                 else
28283                                         break
28284                                 fi
28285                         done
28286                 else
28287                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28288                 fi
28289
28290                 if test $cf_dir = c++; then
28291                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28292                                 cf_list=
28293                                 for cf_item in $Libs_To_Make
28294                                 do
28295                                         case $cf_item in
28296                                         (*.a)
28297                                                 ;;
28298                                         (*)
28299                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28300                                                 ;;
28301                                         esac
28302                                         for cf_test in $cf_list
28303                                         do
28304                                                 if test "$cf_test" = "$cf_item"
28305                                                 then
28306                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28307                                                         cf_item=
28308                                                         break
28309                                                 fi
28310                                         done
28311                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28312                                 done
28313                                 Libs_To_Make="$cf_list"
28314                         fi
28315                 fi
28316
28317                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28318                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28319                         $cf_dir/Makefile >$cf_dir/Makefile.out
28320                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28321
28322                 $AWK -f $srcdir/mk-0th.awk \
28323                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28324                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28325
28326                 for cf_subset in $cf_subsets
28327                 do
28328                         cf_subdirs=
28329                         for cf_item in $cf_LIST_MODELS
28330                         do
28331
28332                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28333
28334 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28335
28336                         CXX_MODEL=$cf_ITEM
28337                         if test "$CXX_MODEL" = SHARED; then
28338                                 case $cf_cv_shlib_version in
28339                                 (cygdll|msysdll|mingw|msvcdll)
28340                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28341
28342 echo "${as_me:-configure}:28342: testing overriding CXX_MODEL to SHARED ..." 1>&5
28343
28344                                         with_shared_cxx=yes
28345                                         ;;
28346                                 (*)
28347                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28348                                         ;;
28349                                 esac
28350                         fi
28351
28352         case X$cf_item in
28353         (Xlibtool)
28354                 cf_suffix='.la'
28355                 cf_depsuf=$cf_suffix
28356                 ;;
28357         (Xdebug)
28358                 case $cf_cv_system_name in
28359                 (*-msvc*)
28360                         cf_suffix='_g.lib'
28361                         ;;
28362                 (*)
28363                         cf_suffix='_g.a'
28364                         ;;
28365                 esac
28366                 cf_depsuf=$cf_suffix
28367                 ;;
28368         (Xprofile)
28369                 case $cf_cv_system_name in
28370                 (*-msvc*)
28371                         cf_suffix='_p.lib'
28372                         ;;
28373                 (*)
28374                         cf_suffix='_p.a'
28375                         ;;
28376                 esac
28377                 cf_depsuf=$cf_suffix
28378                 ;;
28379         (Xshared)
28380                 case $cf_cv_system_name in
28381                 (aix[5-7]*)
28382                         cf_suffix='.so'
28383                         cf_depsuf=$cf_suffix
28384                         ;;
28385                 (*-msvc*)
28386                         cf_suffix='.dll'
28387                         cf_depsuf='.dll.lib'
28388                         ;;
28389                 (cygwin*|msys*|mingw*)
28390                         cf_suffix='.dll'
28391                         cf_depsuf='.dll.a'
28392                         ;;
28393                 (darwin*)
28394                         cf_suffix='.dylib'
28395                         cf_depsuf=$cf_suffix
28396                         ;;
28397                 (hpux*)
28398                         case $target in
28399                         (ia64*)
28400                                 cf_suffix='.so'
28401                                 cf_depsuf=$cf_suffix
28402                                 ;;
28403                         (*)
28404                                 cf_suffix='.sl'
28405                                 cf_depsuf=$cf_suffix
28406                                 ;;
28407                         esac
28408                         ;;
28409                 (*)
28410                         cf_suffix='.so'
28411                         cf_depsuf=$cf_suffix
28412                         ;;
28413                 esac
28414                 ;;
28415         (*)
28416                 case $target in
28417                 (*-msvc*)
28418                         cf_suffix='.lib'
28419                         ;;
28420                 (*)
28421                         cf_suffix='.a'
28422                         ;;
28423                 esac
28424                 cf_depsuf=$cf_suffix
28425                 ;;
28426         esac
28427         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28428         then
28429                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28430                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28431         fi
28432
28433         case $cf_item in
28434         (libtool) cf_subdir='obj_lo'  ;;
28435         (normal)  cf_subdir='objects' ;;
28436         (debug)   cf_subdir='obj_g' ;;
28437         (profile) cf_subdir='obj_p' ;;
28438         (shared)
28439                 case $cf_cv_system_name in
28440                 (cygwin|msys)
28441                         cf_subdir='objects' ;;
28442                 (*)
28443                         cf_subdir='obj_s' ;;
28444                 esac
28445         esac
28446
28447                         # Test for case where we build libtinfo with a different name.
28448                         cf_libname=$cf_dir
28449                         if test $cf_dir = ncurses ; then
28450                                 case $cf_subset in
28451                                 (*base*)
28452                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28453                                         ;;
28454                                 (*termlib*)
28455                                         cf_libname=$TINFO_LIB_SUFFIX
28456                                         ;;
28457                                 (ticlib*)
28458                                         cf_libname=$TICS_LIB_SUFFIX
28459                                         ;;
28460                                 esac
28461                         elif test $cf_dir = c++ ; then
28462
28463 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28464
28465 eval cf_libname=\$${cf_map_lib_basename}_NAME
28466
28467                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28468                         else
28469
28470 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28471
28472 eval cf_libname=\$${cf_map_lib_basename}_NAME
28473
28474                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28475                         fi
28476                         if test -n "${USE_ARG_SUFFIX}" ; then
28477                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28478                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28479                         fi
28480
28481                         # These dependencies really are for development, not
28482                         # builds, but they are useful in porting, too.
28483                         cf_depend="../include/ncurses_cfg.h"
28484                         if test "$srcdir" = "."; then
28485                                 cf_reldir="."
28486                         else
28487                                 cf_reldir="\${srcdir}"
28488                         fi
28489
28490                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28491                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28492                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28493                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28494                         fi
28495
28496                         cf_dir_suffix=
28497                         old_cf_suffix="$cf_suffix"
28498                         if test "$cf_cv_shlib_version_infix" = yes ; then
28499                         if test -n "$USE_LIB_SUFFIX" ; then
28500                                 case $USE_LIB_SUFFIX in
28501                                 (tw*)
28502                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28503                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28504                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28505                                         ;;
28506                                 (t*)
28507                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28508                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28509                                         cf_dir_suffix=t$EXTRA_SUFFIX
28510                                         ;;
28511                                 (w*)
28512                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28513                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28514                                         cf_dir_suffix=w$EXTRA_SUFFIX
28515                                         ;;
28516                                 (*)
28517                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28518                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28519                                         cf_dir_suffix=$EXTRA_SUFFIX
28520                                         ;;
28521                                 esac
28522                         fi
28523                         fi
28524
28525                         $AWK -f $srcdir/mk-1st.awk \
28526                                 name=${cf_libname}${cf_dir_suffix} \
28527                                 traces=$LIB_TRACING \
28528                                 MODEL=$cf_ITEM \
28529                                 CXX_MODEL=$CXX_MODEL \
28530                                 model=$cf_subdir \
28531                                 prefix=$cf_prefix \
28532                                 suffix=$cf_suffix \
28533                                 subset=$cf_subset \
28534                                 driver=$cf_cv_term_driver \
28535                                 SymLink="$LN_S" \
28536                                 TermlibRoot=$TINFO_NAME \
28537                                 TermlibSuffix=$TINFO_SUFFIX \
28538                                 ShlibVer=$cf_cv_shlib_version \
28539                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28540                                 ReLink=${cf_cv_do_relink:-no} \
28541                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28542                                 DoLinks=$cf_cv_do_symlinks \
28543                                 rmSoLocs=$cf_cv_rm_so_locs \
28544                                 ldconfig="$LDCONFIG" \
28545                                 overwrite=$WITH_OVERWRITE \
28546                                 depend="$cf_depend" \
28547                                 host="$host" \
28548                                 libtool_version="$LIBTOOL_VERSION" \
28549                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28550
28551                         cf_suffix="$old_cf_suffix"
28552
28553                         for cf_subdir2 in $cf_subdirs lib
28554                         do
28555                                 test $cf_subdir = $cf_subdir2 && break
28556                         done
28557                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28558                         $AWK -f $srcdir/mk-2nd.awk \
28559                                 name=$cf_dir \
28560                                 traces=$LIB_TRACING \
28561                                 MODEL=$cf_ITEM \
28562                                 model=$cf_subdir \
28563                                 subset=$cf_subset \
28564                                 srcdir=$srcdir \
28565                                 echo=$WITH_ECHO \
28566                                 crenames=$cf_cv_prog_CC_c_o \
28567                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28568                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28569                         cf_subdirs="$cf_subdirs $cf_subdir"
28570                         done
28571                 done
28572         fi
28573
28574         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28575 done
28576
28577 for cf_dir in $SRC_SUBDIRS
28578 do
28579         if test ! -d $srcdir/$cf_dir ; then
28580                 continue
28581         fi
28582
28583         if test -f $cf_dir/Makefile ; then
28584                 case "$cf_dir" in
28585                 (Ada95)
28586                         echo 'libs \' >> Makefile
28587                         echo 'install.libs \' >> Makefile
28588                         echo 'uninstall.libs ::' >> Makefile
28589                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28590                         ;;
28591                 esac
28592         fi
28593
28594         if test -f $srcdir/$cf_dir/modules; then
28595                 echo >> Makefile
28596                 if test -f $srcdir/$cf_dir/headers; then
28597 cat >> Makefile <<CF_EOF
28598 install.includes \\
28599 uninstall.includes \\
28600 CF_EOF
28601                 fi
28602 if test "$cf_dir" != "c++" ; then
28603 echo 'lint \' >> Makefile
28604 fi
28605 cat >> Makefile <<CF_EOF
28606 libs \\
28607 lintlib \\
28608 install.libs \\
28609 uninstall.libs \\
28610 install.$cf_dir \\
28611 uninstall.$cf_dir ::
28612         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28613 CF_EOF
28614         elif test -f $srcdir/$cf_dir/headers; then
28615 cat >> Makefile <<CF_EOF
28616
28617 libs \\
28618 install.libs \\
28619 uninstall.libs \\
28620 install.includes \\
28621 uninstall.includes ::
28622         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28623 CF_EOF
28624 fi
28625 done
28626
28627 if test "x$cf_with_db_install" = xyes; then
28628 cat >> Makefile <<CF_EOF
28629
28630 install.libs uninstall.libs \\
28631 install.data uninstall.data ::
28632 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28633 CF_EOF
28634 else
28635 cat >> Makefile <<CF_EOF
28636
28637 install.libs uninstall.libs ::
28638         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28639 CF_EOF
28640 fi
28641
28642 if test "x$cf_with_manpages" = xyes; then
28643 cat >> Makefile <<CF_EOF
28644
28645 install.man \\
28646 uninstall.man ::
28647         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28648 CF_EOF
28649 fi
28650
28651 cat >> Makefile <<CF_EOF
28652
28653 distclean ::
28654         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28655         rm -f headers.sh headers.sed mk_shared_lib.sh
28656         rm -f edit_man.* man_alias.*
28657         rm -rf \${DIRS_TO_MAKE}
28658 CF_EOF
28659
28660 # Special case: tack's manpage lives in its own directory.
28661 if test "x$cf_with_manpages" = xyes; then
28662 if test "x$cf_with_tack" = "xyes"; then
28663 cat >> Makefile <<CF_EOF
28664
28665 install.man \\
28666 uninstall.man ::
28667         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28668 CF_EOF
28669 fi
28670 fi
28671
28672 rm -f headers.sed headers.sh
28673
28674 echo creating headers.sh
28675 cat >headers.sh <<CF_EOF
28676 #! $SHELL
28677 # This shell script is generated by the 'configure' script.  It is invoked in a
28678 # subdirectory of the build tree.  It generates a sed-script in the parent
28679 # directory that is used to adjust includes for header files that reside in a
28680 # subdirectory of /usr/include, etc.
28681 PRG=""
28682 while test \$# != 3
28683 do
28684 PRG="\$PRG \$1"; shift
28685 done
28686 DST=\$1
28687 REF=\$2
28688 SRC=\$3
28689 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28690 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28691 echo installing \$SRC in \$DST
28692 CF_EOF
28693
28694 if test $WITH_CURSES_H = yes; then
28695         cat >>headers.sh <<CF_EOF
28696 case \$DST in
28697 (/*/include/*)
28698         END=\`basename \$DST\`
28699         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28700         do
28701                 NAME=\`basename \$i\`
28702                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28703         done
28704         ;;
28705 (*)
28706         echo "" >> \$TMPSED
28707         ;;
28708 esac
28709 CF_EOF
28710
28711 else
28712         cat >>headers.sh <<CF_EOF
28713 case \$DST in
28714 (/*/include/*)
28715         END=\`basename \$DST\`
28716         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28717         do
28718                 NAME=\`basename \$i\`
28719                 if test "\$NAME" = "curses.h"
28720                 then
28721                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28722                         NAME=ncurses.h
28723                 fi
28724                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28725         done
28726         ;;
28727 (*)
28728         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28729         ;;
28730 esac
28731 CF_EOF
28732 fi
28733 cat >>headers.sh <<CF_EOF
28734 rm -f \$TMPSRC
28735 sed -f \$TMPSED \$SRC > \$TMPSRC
28736 NAME=\`basename \$SRC\`
28737 CF_EOF
28738 if test $WITH_CURSES_H != yes; then
28739         cat >>headers.sh <<CF_EOF
28740 test "\$NAME" = "curses.h" && NAME=ncurses.h
28741 CF_EOF
28742 fi
28743 cat >>headers.sh <<CF_EOF
28744 # Just in case someone gzip'd manpages, remove the conflicting copy.
28745 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28746
28747 eval \$PRG \$TMPSRC \$DST/\$NAME
28748 rm -f \$TMPSRC \$TMPSED
28749 CF_EOF
28750
28751 chmod 0755 headers.sh
28752
28753 for cf_dir in $SRC_SUBDIRS
28754 do
28755         if test ! -d $srcdir/$cf_dir ; then
28756                 continue
28757         fi
28758
28759         if test -f $srcdir/$cf_dir/headers; then
28760                 $AWK -f $srcdir/mk-hdr.awk \
28761                         subset="$LIB_SUBSETS" \
28762                         compat="$WITH_CURSES_H" \
28763                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28764         fi
28765
28766         if test -f $srcdir/$cf_dir/modules; then
28767                 if test "$cf_dir" != "c++" ; then
28768                         cat >>$cf_dir/Makefile <<"CF_EOF"
28769 depend : ${AUTO_SRC}
28770         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28771
28772 # DO NOT DELETE THIS LINE -- make depend depends on it.
28773 CF_EOF
28774                 fi
28775         fi
28776 done
28777
28778 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28779 if test -z "$USE_OLD_MAKERULES" ; then
28780         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28781 fi
28782 fi
28783  ;;
28784   esac
28785 done
28786 EOF
28787
28788 cat >>$CONFIG_STATUS <<\EOF
28789
28790 { (exit 0); exit 0; }
28791 EOF
28792 chmod +x $CONFIG_STATUS
28793 ac_clean_files=$ac_clean_files_save
28794
28795 # configure is writing to config.log, and then calls config.status.
28796 # config.status does its own redirection, appending to config.log.
28797 # Unfortunately, on DOS this fails, as config.log is still kept open
28798 # by configure, so config.status won't be able to write to it; its
28799 # output is simply discarded.  So we exec the FD to /dev/null,
28800 # effectively closing config.log, so it can be properly (re)opened and
28801 # appended to by config.status.  When coming back to configure, we
28802 # need to make the FD available again.
28803 if test "$no_create" != yes; then
28804   ac_cs_success=:
28805   exec 5>/dev/null
28806   $SHELL $CONFIG_STATUS || ac_cs_success=false
28807   exec 5>>config.log
28808   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28809   # would make configure fail if this is the last instruction.
28810   $ac_cs_success || { (exit 1); exit 1; }
28811 fi
28812 ${MAKE:-make} preinstall