]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20201205
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.726 .
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   --enable-exp-win32      compile with experimental-Windows driver
846 Testing/development Options:
847   --disable-echo          do not display "compiling" commands
848   --disable-stripping     do not strip (debug info) installed executables
849   --enable-warnings       test: turn on gcc compiler warnings
850   --enable-string-hacks   work around bogus compiler/loader warnings
851   --enable-assertions     test: turn on generation of assertion code
852   --with-dmalloc          test: use Gray Watson's dmalloc library
853   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
854   --with-valgrind         test: use valgrind
855   --disable-leaks         test: free permanent memory, analyze leaks
856   --enable-expanded       test: generate functions for certain macros
857   --disable-macros        test: use functions rather than macros
858   --with-trace            test: add trace() function to all models of ncurses
859   --disable-gnat-projects test: disable GNAT projects even if usable
860 Ada Binding Options:
861   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
862   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
863   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
864   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
865   --with-ada-libname=XXX  override default Ada library-name
866   --with-form-libname=XXX override form basename of library
867   --with-menu-libname=XXX override menu basename of library
868   --with-panel-libname=XXX override panel basename of library
869   --with-cxx-libname=XXX override ncurses++ basename of library
870
871 Some influential environment variables:
872   CC          C compiler command
873   CFLAGS      C compiler flags
874   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
875               nonstandard directory <lib dir>
876   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
877               headers in a nonstandard directory <include dir>
878   CPP         C preprocessor
879   CXX         C++ compiler command
880   CXXFLAGS    C++ compiler flags
881   CXXCPP      C++ preprocessor
882
883 Use these variables to override the choices made by `configure' or to help
884 it to find libraries and programs with nonstandard names/locations.
885
886 EOF
887 fi
888
889 if test "$ac_init_help" = "recursive"; then
890   # If there are subdirs, report their specific --help.
891   ac_popdir=`pwd`
892   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
893     cd $ac_subdir
894     # A "../" for each directory in /$ac_subdir.
895     ac_dots=`echo $ac_subdir |
896              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
897
898     case $srcdir in
899     .) # No --srcdir option.  We are building in place.
900       ac_sub_srcdir=$srcdir ;;
901     [\\/]* | ?:[\\/]* ) # Absolute path.
902       ac_sub_srcdir=$srcdir/$ac_subdir ;;
903     *) # Relative path.
904       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
905     esac
906
907     # Check for guested configure; otherwise get Cygnus style configure.
908     if test -f $ac_sub_srcdir/configure.gnu; then
909       echo
910       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
911     elif test -f $ac_sub_srcdir/configure; then
912       echo
913       $SHELL $ac_sub_srcdir/configure  --help=recursive
914     elif test -f $ac_sub_srcdir/configure.ac ||
915            test -f $ac_sub_srcdir/configure.in; then
916       echo
917       $ac_configure --help
918     else
919       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
920     fi
921     cd $ac_popdir
922   done
923 fi
924
925 test -n "$ac_init_help" && exit 0
926 if $ac_init_version; then
927   cat <<\EOF
928
929 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
930 Free Software Foundation, Inc.
931 This configure script is free software; the Free Software Foundation
932 gives unlimited permission to copy, distribute and modify it.
933 EOF
934   exit 0
935 fi
936 exec 5>config.log
937 cat >&5 <<EOF
938 This file contains any messages produced by compilers while
939 running configure, to aid debugging if configure makes a mistake.
940
941 It was created by $as_me, which was
942 generated by GNU Autoconf 2.52.20200802.  Invocation command line was
943
944   $ $0 $@
945
946 EOF
947 {
948 cat <<_ASUNAME
949 ## ---------- ##
950 ## Platform.  ##
951 ## ---------- ##
952
953 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
954 uname -m = `(uname -m) 2>/dev/null || echo unknown`
955 uname -r = `(uname -r) 2>/dev/null || echo unknown`
956 uname -s = `(uname -s) 2>/dev/null || echo unknown`
957 uname -v = `(uname -v) 2>/dev/null || echo unknown`
958
959 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
960 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
961
962 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
963 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
964 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
965 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
966 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
967 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
968 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
969
970 PATH = $PATH
971
972 _ASUNAME
973 } >&5
974
975 cat >&5 <<EOF
976 ## ------------ ##
977 ## Core tests.  ##
978 ## ------------ ##
979
980 EOF
981
982 # Keep a trace of the command line.
983 # Strip out --no-create and --no-recursion so they do not pile up.
984 # Also quote any args containing shell meta-characters.
985 ac_configure_args=
986 ac_sep=
987 for ac_arg
988 do
989   case $ac_arg in
990   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
991   | --no-cr | --no-c) ;;
992   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
994   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
995     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
996     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
997     ac_sep=" " ;;
998   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
999      ac_sep=" " ;;
1000   esac
1001   # Get rid of the leading space.
1002 done
1003
1004 # When interrupted or exit'd, cleanup temporary files, and complete
1005 # config.log.  We remove comments because anyway the quotes in there
1006 # would cause problems or look ugly.
1007 trap 'exit_status=$?
1008   # Save into config.log some information that might help in debugging.
1009   echo >&5
1010   echo "## ----------------- ##" >&5
1011   echo "## Cache variables.  ##" >&5
1012   echo "## ----------------- ##" >&5
1013   echo >&5
1014   # The following way of writing the cache mishandles newlines in values,
1015 {
1016   (set) 2>&1 |
1017     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1018     *ac_space=\ *)
1019       sed -n \
1020         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1021           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1022       ;;
1023     *)
1024       sed -n \
1025         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1026       ;;
1027     esac;
1028 } >&5
1029   sed "/^$/d" confdefs.h >conftest.log
1030   if test -s conftest.log; then
1031     echo >&5
1032     echo "## ------------ ##" >&5
1033     echo "## confdefs.h.  ##" >&5
1034     echo "## ------------ ##" >&5
1035     echo >&5
1036     cat conftest.log >&5
1037   fi
1038   (echo; echo) >&5
1039   test "$ac_signal" != 0 &&
1040     echo "$as_me: caught signal $ac_signal" >&5
1041   echo "$as_me: exit $exit_status" >&5
1042   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1043     exit $exit_status
1044      ' 0
1045 for ac_signal in 1 2 13 15; do
1046   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1047 done
1048 ac_signal=0
1049
1050 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1051 rm -rf conftest* confdefs.h
1052 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1053 echo >confdefs.h
1054
1055 # Let the site file select an alternate cache file if it wants to.
1056 # Prefer explicitly selected file to automatically selected ones.
1057 if test -z "$CONFIG_SITE"; then
1058   if test "x$prefix" != xNONE; then
1059     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1060   else
1061     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1062   fi
1063 fi
1064 for ac_site_file in $CONFIG_SITE; do
1065   if test -r "$ac_site_file"; then
1066     { echo "$as_me:1066: loading site script $ac_site_file" >&5
1067 echo "$as_me: loading site script $ac_site_file" >&6;}
1068     cat "$ac_site_file" >&5
1069     . "$ac_site_file"
1070   fi
1071 done
1072
1073 if test -r "$cache_file"; then
1074   # Some versions of bash will fail to source /dev/null (special
1075   # files actually), so we avoid doing that.
1076   if test -f "$cache_file"; then
1077     { echo "$as_me:1077: loading cache $cache_file" >&5
1078 echo "$as_me: loading cache $cache_file" >&6;}
1079     case $cache_file in
1080       [\\/]* | ?:[\\/]* ) . $cache_file;;
1081       *)                      . ./$cache_file;;
1082     esac
1083   fi
1084 else
1085   { echo "$as_me:1085: creating cache $cache_file" >&5
1086 echo "$as_me: creating cache $cache_file" >&6;}
1087   >$cache_file
1088 fi
1089
1090 # Check that the precious variables saved in the cache have kept the same
1091 # value.
1092 ac_cache_corrupted=false
1093 for ac_var in `(set) 2>&1 |
1094                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1095   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1096   eval ac_new_set=\$ac_env_${ac_var}_set
1097   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1098   eval ac_new_val="\$ac_env_${ac_var}_value"
1099   case $ac_old_set,$ac_new_set in
1100     set,)
1101       { echo "$as_me:1101: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1102 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1103       ac_cache_corrupted=: ;;
1104     ,set)
1105       { echo "$as_me:1105: error: \`$ac_var' was not set in the previous run" >&5
1106 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1107       ac_cache_corrupted=: ;;
1108     ,);;
1109     *)
1110       if test "x$ac_old_val" != "x$ac_new_val"; then
1111         { echo "$as_me:1111: error: \`$ac_var' has changed since the previous run:" >&5
1112 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1113         { echo "$as_me:1113:   former value:  $ac_old_val" >&5
1114 echo "$as_me:   former value:  $ac_old_val" >&2;}
1115         { echo "$as_me:1115:   current value: $ac_new_val" >&5
1116 echo "$as_me:   current value: $ac_new_val" >&2;}
1117         ac_cache_corrupted=:
1118       fi;;
1119   esac
1120   # Pass precious variables to config.status.  It doesn't matter if
1121   # we pass some twice (in addition to the command line arguments).
1122   if test "$ac_new_set" = set; then
1123     case $ac_new_val in
1124     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1125       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1126       ac_configure_args="$ac_configure_args '$ac_arg'"
1127       ;;
1128     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1129        ;;
1130     esac
1131   fi
1132 done
1133 if $ac_cache_corrupted; then
1134   { echo "$as_me:1134: error: changes in the environment can compromise the build" >&5
1135 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1136   { { echo "$as_me:1136: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1137 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1138    { (exit 1); exit 1; }; }
1139 fi
1140
1141 ac_ext=c
1142 ac_cpp='$CPP $CPPFLAGS'
1143 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1144 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1145 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1146 ac_main_return=return
1147
1148 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1149   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1150                    ECHO_T='     ' ;;
1151   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1152   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1153 esac
1154 echo "#! $SHELL" >conftest.sh
1155 echo  "exit 0"   >>conftest.sh
1156 chmod +x conftest.sh
1157 if { (echo "$as_me:1157: PATH=\".;.\"; conftest.sh") >&5
1158   (PATH=".;."; conftest.sh) 2>&5
1159   ac_status=$?
1160   echo "$as_me:1160: \$? = $ac_status" >&5
1161   (exit $ac_status); }; then
1162   ac_path_separator=';'
1163 else
1164   ac_path_separator=:
1165 fi
1166 PATH_SEPARATOR="$ac_path_separator"
1167 rm -f conftest.sh
1168
1169 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1170
1171 top_builddir=`pwd`
1172
1173 echo "$as_me:1173: checking for egrep" >&5
1174 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1175 if test "${ac_cv_prog_egrep+set}" = set; then
1176   echo $ECHO_N "(cached) $ECHO_C" >&6
1177 else
1178   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1179                 then ac_cv_prog_egrep='grep -E'
1180                 else ac_cv_prog_egrep='egrep'
1181         fi
1182 fi
1183 echo "$as_me:1183: result: $ac_cv_prog_egrep" >&5
1184 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1185         EGREP=$ac_cv_prog_egrep
1186
1187         test -z "$EGREP" && { { echo "$as_me:1187: error: No egrep program found" >&5
1188 echo "$as_me: error: No egrep program found" >&2;}
1189    { (exit 1); exit 1; }; }
1190
1191 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1192 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1193 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1194 cf_cv_abi_version=${NCURSES_MAJOR}
1195 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1196 cf_cv_timestamp=`date`
1197 echo "$as_me:1197: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1198 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1199
1200 if test -f $srcdir/VERSION ; then
1201         echo "$as_me:1201: checking for package version" >&5
1202 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1203
1204         # if there are not enough fields, cut returns the last one...
1205         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1206         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1207         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1208
1209         # this is how CF_BUNDLED_INTL uses $VERSION:
1210         VERSION="$cf_field1"
1211
1212         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1213         test -z "$VERSION_MAJOR" && { { echo "$as_me:1213: error: missing major-version" >&5
1214 echo "$as_me: error: missing major-version" >&2;}
1215    { (exit 1); exit 1; }; }
1216
1217         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1218         test -z "$VERSION_MINOR" && { { echo "$as_me:1218: error: missing minor-version" >&5
1219 echo "$as_me: error: missing minor-version" >&2;}
1220    { (exit 1); exit 1; }; }
1221
1222         echo "$as_me:1222: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1223 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1224
1225         echo "$as_me:1225: checking for package patch date" >&5
1226 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1227         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1228         case .$VERSION_PATCH in
1229         (.)
1230                 { { echo "$as_me:1230: error: missing patch-date $VERSION_PATCH" >&5
1231 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1232    { (exit 1); exit 1; }; }
1233                 ;;
1234         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1235                 ;;
1236         (*)
1237                 { { echo "$as_me:1237: error: illegal patch-date $VERSION_PATCH" >&5
1238 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1239    { (exit 1); exit 1; }; }
1240                 ;;
1241         esac
1242         echo "$as_me:1242: result: $VERSION_PATCH" >&5
1243 echo "${ECHO_T}$VERSION_PATCH" >&6
1244 else
1245         { { echo "$as_me:1245: error: did not find $srcdir/VERSION" >&5
1246 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1247    { (exit 1); exit 1; }; }
1248 fi
1249
1250 # show the actual data that we have for versions:
1251 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1252
1253 echo "${as_me:-configure}:1253: testing ABI VERSION $VERSION ..." 1>&5
1254
1255 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1256
1257 echo "${as_me:-configure}:1257: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1258
1259 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1260
1261 echo "${as_me:-configure}:1261: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1262
1263 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1264
1265 echo "${as_me:-configure}:1265: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1266
1267         cf_PACKAGE=NCURSES
1268         PACKAGE=ncurses
1269
1270 cat >>confdefs.h <<EOF
1271 #define PACKAGE "$PACKAGE"
1272 EOF
1273
1274 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1275
1276         cat >>confdefs.h <<EOF
1277 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1278 EOF
1279
1280         cat >>confdefs.h <<EOF
1281 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1282 EOF
1283
1284 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1285
1286 # Check whether --with-rel-version or --without-rel-version was given.
1287 if test "${with_rel_version+set}" = set; then
1288   withval="$with_rel_version"
1289   { echo "$as_me:1289: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1290 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1291  cf_cv_rel_version=$withval
1292 fi;
1293
1294  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1295  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1296
1297 if test -n "$NCURSES_MAJOR" ; then
1298   case $NCURSES_MAJOR in
1299   ([0-9]*)
1300         ;;
1301   (*)
1302         { { echo "$as_me:1302: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1303 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1304    { (exit 1); exit 1; }; }
1305         ;;
1306   esac
1307 else
1308   { { echo "$as_me:1308: error: Release major-version value is empty" >&5
1309 echo "$as_me: error: Release major-version value is empty" >&2;}
1310    { (exit 1); exit 1; }; }
1311 fi
1312
1313 if test -n "$NCURSES_MINOR" ; then
1314   case $NCURSES_MINOR in
1315   ([0-9]*)
1316         ;;
1317   (*)
1318         { { echo "$as_me:1318: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1319 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1320    { (exit 1); exit 1; }; }
1321         ;;
1322   esac
1323 else
1324   { { echo "$as_me:1324: error: Release minor-version value is empty" >&5
1325 echo "$as_me: error: Release minor-version value is empty" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1330
1331 # Check whether --with-abi-version or --without-abi-version was given.
1332 if test "${with_abi_version+set}" = set; then
1333   withval="$with_abi_version"
1334
1335         if test "x$cf_cv_abi_version" != "x$withval"
1336         then
1337                 { echo "$as_me:1337: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1338 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1339                 case $cf_cv_rel_version in
1340                 (5.*)
1341                         cf_cv_rel_version=$withval.0
1342                         ;;
1343                 (6.*)
1344                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1345                         ;;
1346                 esac
1347         fi
1348         cf_cv_abi_version=$withval
1349 fi;
1350
1351 if test -n "$cf_cv_abi_version" ; then
1352   case $cf_cv_abi_version in
1353   ([0-9]*)
1354         ;;
1355   (*)
1356         { { echo "$as_me:1356: error: ABI version is not a number: $cf_cv_abi_version" >&5
1357 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1358    { (exit 1); exit 1; }; }
1359         ;;
1360   esac
1361 else
1362   { { echo "$as_me:1362: error: ABI version value is empty" >&5
1363 echo "$as_me: error: ABI version value is empty" >&2;}
1364    { (exit 1); exit 1; }; }
1365 fi
1366
1367 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1368 then
1369         case $cf_cv_rel_version in
1370         (5.*)
1371                 cf_cv_rel_version=$with_abi_version.0
1372                 ;;
1373         esac
1374 fi
1375
1376 ac_aux_dir=
1377 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1378   if test -f $ac_dir/install-sh; then
1379     ac_aux_dir=$ac_dir
1380     ac_install_sh="$ac_aux_dir/install-sh -c"
1381     break
1382   elif test -f $ac_dir/install.sh; then
1383     ac_aux_dir=$ac_dir
1384     ac_install_sh="$ac_aux_dir/install.sh -c"
1385     break
1386   elif test -f $ac_dir/shtool; then
1387     ac_aux_dir=$ac_dir
1388     ac_install_sh="$ac_aux_dir/shtool install -c"
1389     break
1390   fi
1391 done
1392 if test -z "$ac_aux_dir"; then
1393   { { echo "$as_me:1393: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1394 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1395    { (exit 1); exit 1; }; }
1396 fi
1397 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1398 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1399 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1400
1401 # Make sure we can run config.sub.
1402 $ac_config_sub sun4 >/dev/null 2>&1 ||
1403   { { echo "$as_me:1403: error: cannot run $ac_config_sub" >&5
1404 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1405    { (exit 1); exit 1; }; }
1406
1407 echo "$as_me:1407: checking build system type" >&5
1408 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1409 if test "${ac_cv_build+set}" = set; then
1410   echo $ECHO_N "(cached) $ECHO_C" >&6
1411 else
1412   ac_cv_build_alias=$build_alias
1413 test -z "$ac_cv_build_alias" &&
1414   ac_cv_build_alias=`$ac_config_guess`
1415 test -z "$ac_cv_build_alias" &&
1416   { { echo "$as_me:1416: error: cannot guess build type; you must specify one" >&5
1417 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1418    { (exit 1); exit 1; }; }
1419 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1420   { { echo "$as_me:1420: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1421 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1422    { (exit 1); exit 1; }; }
1423
1424 fi
1425 echo "$as_me:1425: result: $ac_cv_build" >&5
1426 echo "${ECHO_T}$ac_cv_build" >&6
1427 build=$ac_cv_build
1428 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1429 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1430 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1431
1432 echo "$as_me:1432: checking host system type" >&5
1433 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1434 if test "${ac_cv_host+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_host_alias=$host_alias
1438 test -z "$ac_cv_host_alias" &&
1439   ac_cv_host_alias=$ac_cv_build_alias
1440 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1441   { { echo "$as_me:1441: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:1446: result: $ac_cv_host" >&5
1447 echo "${ECHO_T}$ac_cv_host" >&6
1448 host=$ac_cv_host
1449 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1454         echo "$as_me:1454: checking target system type" >&5
1455 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1456 if test "${ac_cv_target+set}" = set; then
1457   echo $ECHO_N "(cached) $ECHO_C" >&6
1458 else
1459   ac_cv_target_alias=$target_alias
1460 test "x$ac_cv_target_alias" = "x" &&
1461   ac_cv_target_alias=$ac_cv_host_alias
1462 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1463   { { echo "$as_me:1463: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1464 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1465    { (exit 1); exit 1; }; }
1466
1467 fi
1468 echo "$as_me:1468: result: $ac_cv_target" >&5
1469 echo "${ECHO_T}$ac_cv_target" >&6
1470 target=$ac_cv_target
1471 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1472 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1473 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1474
1475 # The aliases save the names the user supplied, while $host etc.
1476 # will get canonicalized.
1477 test -n "$target_alias" &&
1478   test "$program_prefix$program_suffix$program_transform_name" = \
1479     NONENONEs,x,x, &&
1480   program_prefix=${target_alias}-
1481         system_name="$host_os"
1482 else
1483         system_name="`(uname -s -r) 2>/dev/null`"
1484         if test -z "$system_name" ; then
1485                 system_name="`(hostname) 2>/dev/null`"
1486         fi
1487 fi
1488 test -n "$system_name" &&
1489 cat >>confdefs.h <<EOF
1490 #define SYSTEM_NAME "$system_name"
1491 EOF
1492
1493 if test "${cf_cv_system_name+set}" = set; then
1494   echo $ECHO_N "(cached) $ECHO_C" >&6
1495 else
1496   cf_cv_system_name="$system_name"
1497 fi
1498
1499 test -z "$system_name" && system_name="$cf_cv_system_name"
1500 test -n "$cf_cv_system_name" && echo "$as_me:1500: result: Configuring for $cf_cv_system_name" >&5
1501 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1502
1503 if test ".$system_name" != ".$cf_cv_system_name" ; then
1504         echo "$as_me:1504: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1505 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1506         { { echo "$as_me:1506: error: \"Please remove config.cache and try again.\"" >&5
1507 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1508    { (exit 1); exit 1; }; }
1509 fi
1510
1511 # Check whether --with-system-type or --without-system-type was given.
1512 if test "${with_system_type+set}" = set; then
1513   withval="$with_system_type"
1514   { echo "$as_me:1514: WARNING: overriding system type to $withval" >&5
1515 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1516         cf_cv_system_name=$withval
1517         host_os=$withval
1518
1519 fi;
1520
1521 ###     Save the given $CFLAGS to allow user-override.
1522 cf_user_CFLAGS="$CFLAGS"
1523
1524 ###     Default install-location
1525
1526 echo "$as_me:1526: checking for prefix" >&5
1527 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1528 if test "x$prefix" = "xNONE" ; then
1529         case "$cf_cv_system_name" in
1530                 # non-vendor systems don't have a conflict
1531         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1532                 prefix=/usr
1533                 ;;
1534         (*)     prefix=$ac_default_prefix
1535                 ;;
1536         esac
1537 fi
1538 echo "$as_me:1538: result: $prefix" >&5
1539 echo "${ECHO_T}$prefix" >&6
1540
1541 if test "x$prefix" = "xNONE" ; then
1542 echo "$as_me:1542: checking for default include-directory" >&5
1543 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1544 test -n "$verbose" && echo 1>&6
1545 for cf_symbol in \
1546         $includedir \
1547         $includedir/ncurses \
1548         $prefix/include \
1549         $prefix/include/ncurses \
1550         /usr/local/include \
1551         /usr/local/include/ncurses \
1552         /usr/include \
1553         /usr/include/ncurses
1554 do
1555         cf_dir=`eval echo $cf_symbol`
1556         if test -f $cf_dir/curses.h ; then
1557         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1558                 includedir="$cf_symbol"
1559                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1560                 break
1561         fi
1562         fi
1563         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1564 done
1565 echo "$as_me:1565: result: $includedir" >&5
1566 echo "${ECHO_T}$includedir" >&6
1567 fi
1568
1569 ### Defaults for ncurses ABI
1570
1571 case x$cf_cv_abi_version in
1572 (x[6789])
1573         cf_dft_ext_colors=yes
1574         cf_dft_ext_const=yes
1575         cf_dft_ext_mouse=yes
1576         cf_dft_ext_putwin=yes
1577         cf_dft_ext_spfuncs=yes
1578         cf_dft_filter_syms=yes
1579         cf_dft_chtype=uint32_t
1580         cf_dft_mmask_t=uint32_t
1581         cf_dft_interop=yes
1582         cf_dft_tparm_arg=intptr_t
1583         cf_dft_with_lp64=yes
1584         ;;
1585 (*)
1586         cf_dft_ext_colors=no
1587         cf_dft_ext_const=no
1588         cf_dft_ext_mouse=no
1589         cf_dft_ext_putwin=no
1590         cf_dft_ext_spfuncs=no
1591         cf_dft_filter_syms=no
1592         cf_dft_chtype=auto
1593         cf_dft_mmask_t=auto
1594         cf_dft_interop=no
1595         cf_dft_tparm_arg=long
1596         cf_dft_with_lp64=no
1597         ;;
1598 esac
1599
1600 ###     Checks for programs.
1601
1602 # Check whether --with-ada or --without-ada was given.
1603 if test "${with_ada+set}" = set; then
1604   withval="$with_ada"
1605   cf_with_ada=$withval
1606 else
1607   cf_with_ada=yes
1608 fi;
1609
1610 if test "x$cf_with_ada" = xyes
1611 then
1612         cf_prog_cc="gnatgcc gcc cc"
1613 else
1614         cf_prog_cc="gcc cc"
1615 fi
1616
1617 ac_ext=c
1618 ac_cpp='$CPP $CPPFLAGS'
1619 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1620 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1621 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1622 ac_main_return=return
1623 if test -n "$ac_tool_prefix"; then
1624   for ac_prog in $cf_prog_cc
1625   do
1626     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1627 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1628 echo "$as_me:1628: checking for $ac_word" >&5
1629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630 if test "${ac_cv_prog_CC+set}" = set; then
1631   echo $ECHO_N "(cached) $ECHO_C" >&6
1632 else
1633   if test -n "$CC"; then
1634   ac_cv_prog_CC="$CC" # Let the user override the test.
1635 else
1636   ac_save_IFS=$IFS; IFS=$ac_path_separator
1637 ac_dummy="$PATH"
1638 for ac_dir in $ac_dummy; do
1639   IFS=$ac_save_IFS
1640   test -z "$ac_dir" && ac_dir=.
1641   $as_executable_p "$ac_dir/$ac_word" || continue
1642 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1643 echo "$as_me:1643: found $ac_dir/$ac_word" >&5
1644 break
1645 done
1646
1647 fi
1648 fi
1649 CC=$ac_cv_prog_CC
1650 if test -n "$CC"; then
1651   echo "$as_me:1651: result: $CC" >&5
1652 echo "${ECHO_T}$CC" >&6
1653 else
1654   echo "$as_me:1654: result: no" >&5
1655 echo "${ECHO_T}no" >&6
1656 fi
1657
1658     test -n "$CC" && break
1659   done
1660 fi
1661 if test -z "$CC"; then
1662   ac_ct_CC=$CC
1663   for ac_prog in $cf_prog_cc
1664 do
1665   # Extract the first word of "$ac_prog", so it can be a program name with args.
1666 set dummy $ac_prog; ac_word=$2
1667 echo "$as_me:1667: checking for $ac_word" >&5
1668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1669 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1670   echo $ECHO_N "(cached) $ECHO_C" >&6
1671 else
1672   if test -n "$ac_ct_CC"; then
1673   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1674 else
1675   ac_save_IFS=$IFS; IFS=$ac_path_separator
1676 ac_dummy="$PATH"
1677 for ac_dir in $ac_dummy; do
1678   IFS=$ac_save_IFS
1679   test -z "$ac_dir" && ac_dir=.
1680   $as_executable_p "$ac_dir/$ac_word" || continue
1681 ac_cv_prog_ac_ct_CC="$ac_prog"
1682 echo "$as_me:1682: found $ac_dir/$ac_word" >&5
1683 break
1684 done
1685
1686 fi
1687 fi
1688 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1689 if test -n "$ac_ct_CC"; then
1690   echo "$as_me:1690: result: $ac_ct_CC" >&5
1691 echo "${ECHO_T}$ac_ct_CC" >&6
1692 else
1693   echo "$as_me:1693: result: no" >&5
1694 echo "${ECHO_T}no" >&6
1695 fi
1696
1697   test -n "$ac_ct_CC" && break
1698 done
1699
1700   CC=$ac_ct_CC
1701 fi
1702
1703 test -z "$CC" && { { echo "$as_me:1703: error: no acceptable cc found in \$PATH" >&5
1704 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1705    { (exit 1); exit 1; }; }
1706
1707 # Provide some information about the compiler.
1708 echo "$as_me:1708:" \
1709      "checking for C compiler version" >&5
1710 ac_compiler=`set X $ac_compile; echo $2`
1711 { (eval echo "$as_me:1711: \"$ac_compiler --version </dev/null >&5\"") >&5
1712   (eval $ac_compiler --version </dev/null >&5) 2>&5
1713   ac_status=$?
1714   echo "$as_me:1714: \$? = $ac_status" >&5
1715   (exit $ac_status); }
1716 { (eval echo "$as_me:1716: \"$ac_compiler -v </dev/null >&5\"") >&5
1717   (eval $ac_compiler -v </dev/null >&5) 2>&5
1718   ac_status=$?
1719   echo "$as_me:1719: \$? = $ac_status" >&5
1720   (exit $ac_status); }
1721 { (eval echo "$as_me:1721: \"$ac_compiler -V </dev/null >&5\"") >&5
1722   (eval $ac_compiler -V </dev/null >&5) 2>&5
1723   ac_status=$?
1724   echo "$as_me:1724: \$? = $ac_status" >&5
1725   (exit $ac_status); }
1726
1727 cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main (void)
1733 {
1734
1735   ;
1736   return 0;
1737 }
1738 _ACEOF
1739 ac_clean_files_save=$ac_clean_files
1740 ac_clean_files="$ac_clean_files a.out a.exe"
1741 # Try to create an executable without -o first, disregard a.out.
1742 # It will help us diagnose broken compilers, and finding out an intuition
1743 # of exeext.
1744 echo "$as_me:1744: checking for C compiler default output" >&5
1745 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1746 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1747 if { (eval echo "$as_me:1747: \"$ac_link_default\"") >&5
1748   (eval $ac_link_default) 2>&5
1749   ac_status=$?
1750   echo "$as_me:1750: \$? = $ac_status" >&5
1751   (exit $ac_status); }; then
1752   # Find the output, starting from the most likely.  This scheme is
1753 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1754 # resort.
1755 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1756                 ls a.out conftest 2>/dev/null;
1757                 ls a.* conftest.* 2>/dev/null`; do
1758   case $ac_file in
1759     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1760     a.out ) # We found the default executable, but exeext='' is most
1761             # certainly right.
1762             break;;
1763     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1764           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1765           export ac_cv_exeext
1766           break;;
1767     * ) break;;
1768   esac
1769 done
1770 else
1771   echo "$as_me: failed program was:" >&5
1772 cat conftest.$ac_ext >&5
1773 { { echo "$as_me:1773: error: C compiler cannot create executables" >&5
1774 echo "$as_me: error: C compiler cannot create executables" >&2;}
1775    { (exit 77); exit 77; }; }
1776 fi
1777
1778 ac_exeext=$ac_cv_exeext
1779 echo "$as_me:1779: result: $ac_file" >&5
1780 echo "${ECHO_T}$ac_file" >&6
1781
1782 # Check the compiler produces executables we can run.  If not, either
1783 # the compiler is broken, or we cross compile.
1784 echo "$as_me:1784: checking whether the C compiler works" >&5
1785 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1786 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1787 # If not cross compiling, check that we can run a simple program.
1788 if test "$cross_compiling" != yes; then
1789   if { ac_try='./$ac_file'
1790   { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1791   (eval $ac_try) 2>&5
1792   ac_status=$?
1793   echo "$as_me:1793: \$? = $ac_status" >&5
1794   (exit $ac_status); }; }; then
1795     cross_compiling=no
1796   else
1797     if test "$cross_compiling" = maybe; then
1798         cross_compiling=yes
1799     else
1800         { { echo "$as_me:1800: error: cannot run C compiled programs.
1801 If you meant to cross compile, use \`--host'." >&5
1802 echo "$as_me: error: cannot run C compiled programs.
1803 If you meant to cross compile, use \`--host'." >&2;}
1804    { (exit 1); exit 1; }; }
1805     fi
1806   fi
1807 fi
1808 echo "$as_me:1808: result: yes" >&5
1809 echo "${ECHO_T}yes" >&6
1810
1811 rm -f a.out a.exe conftest$ac_cv_exeext
1812 ac_clean_files=$ac_clean_files_save
1813 # Check the compiler produces executables we can run.  If not, either
1814 # the compiler is broken, or we cross compile.
1815 echo "$as_me:1815: checking whether we are cross compiling" >&5
1816 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1817 echo "$as_me:1817: result: $cross_compiling" >&5
1818 echo "${ECHO_T}$cross_compiling" >&6
1819
1820 echo "$as_me:1820: checking for executable suffix" >&5
1821 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1822 if { (eval echo "$as_me:1822: \"$ac_link\"") >&5
1823   (eval $ac_link) 2>&5
1824   ac_status=$?
1825   echo "$as_me:1825: \$? = $ac_status" >&5
1826   (exit $ac_status); }; then
1827   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1828 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1829 # work properly (i.e., refer to `conftest.exe'), while it won't with
1830 # `rm'.
1831 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1832   case $ac_file in
1833     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1834     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1835           export ac_cv_exeext
1836           break;;
1837     * ) break;;
1838   esac
1839 done
1840 else
1841   { { echo "$as_me:1841: error: cannot compute EXEEXT: cannot compile and link" >&5
1842 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1843    { (exit 1); exit 1; }; }
1844 fi
1845
1846 rm -f conftest$ac_cv_exeext
1847 echo "$as_me:1847: result: $ac_cv_exeext" >&5
1848 echo "${ECHO_T}$ac_cv_exeext" >&6
1849
1850 rm -f conftest.$ac_ext
1851 EXEEXT=$ac_cv_exeext
1852 ac_exeext=$EXEEXT
1853 echo "$as_me:1853: checking for object suffix" >&5
1854 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1855 if test "${ac_cv_objext+set}" = set; then
1856   echo $ECHO_N "(cached) $ECHO_C" >&6
1857 else
1858   cat >conftest.$ac_ext <<_ACEOF
1859 #line 1859 "configure"
1860 #include "confdefs.h"
1861
1862 int
1863 main (void)
1864 {
1865
1866   ;
1867   return 0;
1868 }
1869 _ACEOF
1870 rm -f conftest.o conftest.obj
1871 if { (eval echo "$as_me:1871: \"$ac_compile\"") >&5
1872   (eval $ac_compile) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit $ac_status); }; then
1876   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1877   case $ac_file in
1878     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1879     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1880        break;;
1881   esac
1882 done
1883 else
1884   echo "$as_me: failed program was:" >&5
1885 cat conftest.$ac_ext >&5
1886 { { echo "$as_me:1886: error: cannot compute OBJEXT: cannot compile" >&5
1887 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1888    { (exit 1); exit 1; }; }
1889 fi
1890
1891 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1892 fi
1893 echo "$as_me:1893: result: $ac_cv_objext" >&5
1894 echo "${ECHO_T}$ac_cv_objext" >&6
1895 OBJEXT=$ac_cv_objext
1896 ac_objext=$OBJEXT
1897 echo "$as_me:1897: checking whether we are using the GNU C compiler" >&5
1898 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1899 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1900   echo $ECHO_N "(cached) $ECHO_C" >&6
1901 else
1902   cat >conftest.$ac_ext <<_ACEOF
1903 #line 1903 "configure"
1904 #include "confdefs.h"
1905
1906 int
1907 main (void)
1908 {
1909 #ifndef __GNUC__
1910        choke me
1911 #endif
1912
1913   ;
1914   return 0;
1915 }
1916 _ACEOF
1917 rm -f conftest.$ac_objext
1918 if { (eval echo "$as_me:1918: \"$ac_compile\"") >&5
1919   (eval $ac_compile) 2>&5
1920   ac_status=$?
1921   echo "$as_me:1921: \$? = $ac_status" >&5
1922   (exit $ac_status); } &&
1923          { ac_try='test -s conftest.$ac_objext'
1924   { (eval echo "$as_me:1924: \"$ac_try\"") >&5
1925   (eval $ac_try) 2>&5
1926   ac_status=$?
1927   echo "$as_me:1927: \$? = $ac_status" >&5
1928   (exit $ac_status); }; }; then
1929   ac_compiler_gnu=yes
1930 else
1931   echo "$as_me: failed program was:" >&5
1932 cat conftest.$ac_ext >&5
1933 ac_compiler_gnu=no
1934 fi
1935 rm -f conftest.$ac_objext conftest.$ac_ext
1936 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1937
1938 fi
1939 echo "$as_me:1939: result: $ac_cv_c_compiler_gnu" >&5
1940 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1941 GCC=`test $ac_compiler_gnu = yes && echo yes`
1942 ac_test_CFLAGS=${CFLAGS+set}
1943 ac_save_CFLAGS=$CFLAGS
1944 CFLAGS="-g"
1945 echo "$as_me:1945: checking whether $CC accepts -g" >&5
1946 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1947 if test "${ac_cv_prog_cc_g+set}" = set; then
1948   echo $ECHO_N "(cached) $ECHO_C" >&6
1949 else
1950   cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953
1954 int
1955 main (void)
1956 {
1957
1958   ;
1959   return 0;
1960 }
1961 _ACEOF
1962 rm -f conftest.$ac_objext
1963 if { (eval echo "$as_me:1963: \"$ac_compile\"") >&5
1964   (eval $ac_compile) 2>&5
1965   ac_status=$?
1966   echo "$as_me:1966: \$? = $ac_status" >&5
1967   (exit $ac_status); } &&
1968          { ac_try='test -s conftest.$ac_objext'
1969   { (eval echo "$as_me:1969: \"$ac_try\"") >&5
1970   (eval $ac_try) 2>&5
1971   ac_status=$?
1972   echo "$as_me:1972: \$? = $ac_status" >&5
1973   (exit $ac_status); }; }; then
1974   ac_cv_prog_cc_g=yes
1975 else
1976   echo "$as_me: failed program was:" >&5
1977 cat conftest.$ac_ext >&5
1978 ac_cv_prog_cc_g=no
1979 fi
1980 rm -f conftest.$ac_objext conftest.$ac_ext
1981 fi
1982 echo "$as_me:1982: result: $ac_cv_prog_cc_g" >&5
1983 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1984 if test "$ac_test_CFLAGS" = set; then
1985   CFLAGS=$ac_save_CFLAGS
1986 elif test $ac_cv_prog_cc_g = yes; then
1987   if test "$GCC" = yes; then
1988     CFLAGS="-g -O2"
1989   else
1990     CFLAGS="-g"
1991   fi
1992 else
1993   if test "$GCC" = yes; then
1994     CFLAGS="-O2"
1995   else
1996     CFLAGS=
1997   fi
1998 fi
1999 # Some people use a C++ compiler to compile C.  Since we use `exit',
2000 # in C++ we need to declare it.  In case someone uses the same compiler
2001 # for both compiling C and C++ we need to have the C++ compiler decide
2002 # the declaration of exit, since it's the most demanding environment.
2003 cat >conftest.$ac_ext <<_ACEOF
2004 #ifndef __cplusplus
2005   choke me
2006 #endif
2007 _ACEOF
2008 rm -f conftest.$ac_objext
2009 if { (eval echo "$as_me:2009: \"$ac_compile\"") >&5
2010   (eval $ac_compile) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); } &&
2014          { ac_try='test -s conftest.$ac_objext'
2015   { (eval echo "$as_me:2015: \"$ac_try\"") >&5
2016   (eval $ac_try) 2>&5
2017   ac_status=$?
2018   echo "$as_me:2018: \$? = $ac_status" >&5
2019   (exit $ac_status); }; }; then
2020   for ac_declaration in \
2021    ''\
2022    '#include <stdlib.h>' \
2023    'extern "C" void std::exit (int) throw (); using std::exit;' \
2024    'extern "C" void std::exit (int); using std::exit;' \
2025    'extern "C" void exit (int) throw ();' \
2026    'extern "C" void exit (int);' \
2027    'void exit (int);'
2028 do
2029   cat >conftest.$ac_ext <<_ACEOF
2030 #line 2030 "configure"
2031 #include "confdefs.h"
2032 #include <stdlib.h>
2033 $ac_declaration
2034 int
2035 main (void)
2036 {
2037 exit (42);
2038   ;
2039   return 0;
2040 }
2041 _ACEOF
2042 rm -f conftest.$ac_objext
2043 if { (eval echo "$as_me:2043: \"$ac_compile\"") >&5
2044   (eval $ac_compile) 2>&5
2045   ac_status=$?
2046   echo "$as_me:2046: \$? = $ac_status" >&5
2047   (exit $ac_status); } &&
2048          { ac_try='test -s conftest.$ac_objext'
2049   { (eval echo "$as_me:2049: \"$ac_try\"") >&5
2050   (eval $ac_try) 2>&5
2051   ac_status=$?
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); }; }; then
2054   :
2055 else
2056   echo "$as_me: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 continue
2059 fi
2060 rm -f conftest.$ac_objext conftest.$ac_ext
2061   cat >conftest.$ac_ext <<_ACEOF
2062 #line 2062 "configure"
2063 #include "confdefs.h"
2064 $ac_declaration
2065 int
2066 main (void)
2067 {
2068 exit (42);
2069   ;
2070   return 0;
2071 }
2072 _ACEOF
2073 rm -f conftest.$ac_objext
2074 if { (eval echo "$as_me:2074: \"$ac_compile\"") >&5
2075   (eval $ac_compile) 2>&5
2076   ac_status=$?
2077   echo "$as_me:2077: \$? = $ac_status" >&5
2078   (exit $ac_status); } &&
2079          { ac_try='test -s conftest.$ac_objext'
2080   { (eval echo "$as_me:2080: \"$ac_try\"") >&5
2081   (eval $ac_try) 2>&5
2082   ac_status=$?
2083   echo "$as_me:2083: \$? = $ac_status" >&5
2084   (exit $ac_status); }; }; then
2085   break
2086 else
2087   echo "$as_me: failed program was:" >&5
2088 cat conftest.$ac_ext >&5
2089 fi
2090 rm -f conftest.$ac_objext conftest.$ac_ext
2091 done
2092 rm -rf conftest*
2093 if test -n "$ac_declaration"; then
2094   echo '#ifdef __cplusplus' >>confdefs.h
2095   echo $ac_declaration      >>confdefs.h
2096   echo '#endif'             >>confdefs.h
2097 fi
2098
2099 else
2100   echo "$as_me: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 fi
2103 rm -f conftest.$ac_objext conftest.$ac_ext
2104 ac_ext=c
2105 ac_cpp='$CPP $CPPFLAGS'
2106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2109 ac_main_return=return
2110
2111 GCC_VERSION=none
2112 if test "$GCC" = yes ; then
2113         echo "$as_me:2113: checking version of $CC" >&5
2114 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2115         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.].*//'`"
2116         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2117         echo "$as_me:2117: result: $GCC_VERSION" >&5
2118 echo "${ECHO_T}$GCC_VERSION" >&6
2119 fi
2120
2121 INTEL_COMPILER=no
2122
2123 if test "$GCC" = yes ; then
2124         case $host_os in
2125         (linux*|gnu*)
2126                 echo "$as_me:2126: checking if this is really Intel C compiler" >&5
2127 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2128                 cf_save_CFLAGS="$CFLAGS"
2129                 CFLAGS="$CFLAGS -no-gcc"
2130                 cat >conftest.$ac_ext <<_ACEOF
2131 #line 2131 "configure"
2132 #include "confdefs.h"
2133
2134 int
2135 main (void)
2136 {
2137
2138 #ifdef __INTEL_COMPILER
2139 #else
2140 make an error
2141 #endif
2142
2143   ;
2144   return 0;
2145 }
2146 _ACEOF
2147 rm -f conftest.$ac_objext
2148 if { (eval echo "$as_me:2148: \"$ac_compile\"") >&5
2149   (eval $ac_compile) 2>&5
2150   ac_status=$?
2151   echo "$as_me:2151: \$? = $ac_status" >&5
2152   (exit $ac_status); } &&
2153          { ac_try='test -s conftest.$ac_objext'
2154   { (eval echo "$as_me:2154: \"$ac_try\"") >&5
2155   (eval $ac_try) 2>&5
2156   ac_status=$?
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); }; }; then
2159   INTEL_COMPILER=yes
2160 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2161
2162 else
2163   echo "$as_me: failed program was:" >&5
2164 cat conftest.$ac_ext >&5
2165 fi
2166 rm -f conftest.$ac_objext conftest.$ac_ext
2167                 CFLAGS="$cf_save_CFLAGS"
2168                 echo "$as_me:2168: result: $INTEL_COMPILER" >&5
2169 echo "${ECHO_T}$INTEL_COMPILER" >&6
2170                 ;;
2171         esac
2172 fi
2173
2174 CLANG_COMPILER=no
2175
2176 if test "$GCC" = yes ; then
2177         echo "$as_me:2177: checking if this is really Clang C compiler" >&5
2178 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2179         cf_save_CFLAGS="$CFLAGS"
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
2211 else
2212   echo "$as_me: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 fi
2215 rm -f conftest.$ac_objext conftest.$ac_ext
2216         CFLAGS="$cf_save_CFLAGS"
2217         echo "$as_me:2217: result: $CLANG_COMPILER" >&5
2218 echo "${ECHO_T}$CLANG_COMPILER" >&6
2219 fi
2220
2221 CLANG_VERSION=none
2222
2223 if test "x$CLANG_COMPILER" = "xyes" ; then
2224         case "$CC" in
2225         (c[1-9][0-9]|*/c[1-9][0-9])
2226                 { echo "$as_me:2226: WARNING: replacing broken compiler alias $CC" >&5
2227 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2228                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2229                 CC=clang
2230                 ;;
2231         esac
2232
2233         echo "$as_me:2233: checking version of $CC" >&5
2234 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2235         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2236         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2237         echo "$as_me:2237: result: $CLANG_VERSION" >&5
2238 echo "${ECHO_T}$CLANG_VERSION" >&6
2239
2240         for cf_clang_opt in \
2241                 -Qunused-arguments \
2242                 -Wno-error=implicit-function-declaration
2243         do
2244                 echo "$as_me:2244: checking if option $cf_clang_opt works" >&5
2245 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2246                 cf_save_CFLAGS="$CFLAGS"
2247                 CFLAGS="$CFLAGS $cf_clang_opt"
2248                 cat >conftest.$ac_ext <<_ACEOF
2249 #line 2249 "configure"
2250 #include "confdefs.h"
2251
2252                         #include <stdio.h>
2253 int
2254 main (void)
2255 {
2256
2257                         printf("hello!\n");
2258   ;
2259   return 0;
2260 }
2261 _ACEOF
2262 rm -f conftest.$ac_objext conftest$ac_exeext
2263 if { (eval echo "$as_me:2263: \"$ac_link\"") >&5
2264   (eval $ac_link) 2>&5
2265   ac_status=$?
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } &&
2268          { ac_try='test -s conftest$ac_exeext'
2269   { (eval echo "$as_me:2269: \"$ac_try\"") >&5
2270   (eval $ac_try) 2>&5
2271   ac_status=$?
2272   echo "$as_me:2272: \$? = $ac_status" >&5
2273   (exit $ac_status); }; }; then
2274
2275                         cf_clang_optok=yes
2276 else
2277   echo "$as_me: failed program was:" >&5
2278 cat conftest.$ac_ext >&5
2279
2280                         cf_clang_optok=no
2281 fi
2282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2283                 echo "$as_me:2283: result: $cf_clang_optok" >&5
2284 echo "${ECHO_T}$cf_clang_optok" >&6
2285                 CFLAGS="$cf_save_CFLAGS"
2286                 if test $cf_clang_optok = yes; then
2287                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2288
2289 echo "${as_me:-configure}:2289: testing adding option $cf_clang_opt ..." 1>&5
2290
2291         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2292         CFLAGS="${CFLAGS}$cf_clang_opt"
2293
2294                 fi
2295         done
2296 fi
2297
2298 echo "$as_me:2298: checking for $CC option to accept ANSI C" >&5
2299 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2300 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2301   echo $ECHO_N "(cached) $ECHO_C" >&6
2302 else
2303   ac_cv_prog_cc_stdc=no
2304 ac_save_CC=$CC
2305 cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <stdarg.h>
2309 #include <stdio.h>
2310 #include <sys/types.h>
2311 #include <sys/stat.h>
2312 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2313 struct buf { int x; };
2314 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2315 static char *e (p, i)
2316      char **p;
2317      int i;
2318 {
2319   return p[i];
2320 }
2321 static char *f (char * (*g) (char **, int), char **p, ...)
2322 {
2323   char *s;
2324   va_list v;
2325   va_start (v,p);
2326   s = g (p, va_arg (v,int));
2327   va_end (v);
2328   return s;
2329 }
2330 int test (int i, double x);
2331 struct s1 {int (*f) (int a);};
2332 struct s2 {int (*f) (double a);};
2333 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2334 int argc;
2335 char **argv;
2336 int
2337 main (void)
2338 {
2339 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2340   ;
2341   return 0;
2342 }
2343 _ACEOF
2344 # Don't try gcc -ansi; that turns off useful extensions and
2345 # breaks some systems' header files.
2346 # AIX                   -qlanglvl=ansi
2347 # Ultrix and OSF/1      -std1
2348 # HP-UX 10.20 and later -Ae
2349 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2350 # SVR4                  -Xc -D__EXTENSIONS__
2351 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2352 do
2353   CC="$ac_save_CC $ac_arg"
2354   rm -f conftest.$ac_objext
2355 if { (eval echo "$as_me:2355: \"$ac_compile\"") >&5
2356   (eval $ac_compile) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit $ac_status); } &&
2360          { ac_try='test -s conftest.$ac_objext'
2361   { (eval echo "$as_me:2361: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:2364: \$? = $ac_status" >&5
2365   (exit $ac_status); }; }; then
2366   ac_cv_prog_cc_stdc=$ac_arg
2367 break
2368 else
2369   echo "$as_me: failed program was:" >&5
2370 cat conftest.$ac_ext >&5
2371 fi
2372 rm -f conftest.$ac_objext
2373 done
2374 rm -f conftest.$ac_ext conftest.$ac_objext
2375 CC=$ac_save_CC
2376
2377 fi
2378
2379 case "x$ac_cv_prog_cc_stdc" in
2380   x|xno)
2381     echo "$as_me:2381: result: none needed" >&5
2382 echo "${ECHO_T}none needed" >&6 ;;
2383   *)
2384     echo "$as_me:2384: result: $ac_cv_prog_cc_stdc" >&5
2385 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2386     CC="$CC $ac_cv_prog_cc_stdc" ;;
2387 esac
2388
2389 # This should have been defined by AC_PROG_CC
2390 : ${CC:=cc}
2391
2392 echo "$as_me:2392: checking \$CFLAGS variable" >&5
2393 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2394 case "x$CFLAGS" in
2395 (*-[IUD]*)
2396         echo "$as_me:2396: result: broken" >&5
2397 echo "${ECHO_T}broken" >&6
2398         { echo "$as_me:2398: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2399 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2400         cf_flags="$CFLAGS"
2401         CFLAGS=
2402         for cf_arg in $cf_flags
2403         do
2404
2405 cf_fix_cppflags=no
2406 cf_new_cflags=
2407 cf_new_cppflags=
2408 cf_new_extra_cppflags=
2409
2410 for cf_add_cflags in $cf_arg
2411 do
2412 case $cf_fix_cppflags in
2413 (no)
2414         case $cf_add_cflags in
2415         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2416                 case $cf_add_cflags in
2417                 (-D*)
2418                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2419
2420                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2421                                 && test -z "${cf_tst_cflags}" \
2422                                 && cf_fix_cppflags=yes
2423
2424                         if test $cf_fix_cppflags = yes ; then
2425
2426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2428
2429                                 continue
2430                         elif test "${cf_tst_cflags}" = "\"'" ; then
2431
2432         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2433         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2434
2435                                 continue
2436                         fi
2437                         ;;
2438                 esac
2439                 case "$CPPFLAGS" in
2440                 (*$cf_add_cflags)
2441                         ;;
2442                 (*)
2443                         case $cf_add_cflags in
2444                         (-D*)
2445                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2446
2447 CPPFLAGS=`echo "$CPPFLAGS" | \
2448         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2449                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2450
2451                                 ;;
2452                         esac
2453
2454         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2455         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2456
2457                         ;;
2458                 esac
2459                 ;;
2460         (*)
2461
2462         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2463         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2464
2465                 ;;
2466         esac
2467         ;;
2468 (yes)
2469
2470         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2471         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2472
2473         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2474
2475         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2476                 && test -z "${cf_tst_cflags}" \
2477                 && cf_fix_cppflags=no
2478         ;;
2479 esac
2480 done
2481
2482 if test -n "$cf_new_cflags" ; then
2483
2484         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2485         CFLAGS="${CFLAGS}$cf_new_cflags"
2486
2487 fi
2488
2489 if test -n "$cf_new_cppflags" ; then
2490
2491         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2492         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2493
2494 fi
2495
2496 if test -n "$cf_new_extra_cppflags" ; then
2497
2498         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2499         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2500
2501 fi
2502
2503         done
2504         ;;
2505 (*)
2506         echo "$as_me:2506: result: ok" >&5
2507 echo "${ECHO_T}ok" >&6
2508         ;;
2509 esac
2510
2511 echo "$as_me:2511: checking \$CC variable" >&5
2512 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2513 case "$CC" in
2514 (*[\ \  ]-*)
2515         echo "$as_me:2515: result: broken" >&5
2516 echo "${ECHO_T}broken" >&6
2517         { echo "$as_me:2517: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2518 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2519         # humor him...
2520         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2521         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2522         CC="$cf_prog"
2523         for cf_arg in $cf_flags
2524         do
2525                 case "x$cf_arg" in
2526                 (x-[IUDfgOW]*)
2527
2528 cf_fix_cppflags=no
2529 cf_new_cflags=
2530 cf_new_cppflags=
2531 cf_new_extra_cppflags=
2532
2533 for cf_add_cflags in $cf_arg
2534 do
2535 case $cf_fix_cppflags in
2536 (no)
2537         case $cf_add_cflags in
2538         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2539                 case $cf_add_cflags in
2540                 (-D*)
2541                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2542
2543                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2544                                 && test -z "${cf_tst_cflags}" \
2545                                 && cf_fix_cppflags=yes
2546
2547                         if test $cf_fix_cppflags = yes ; then
2548
2549         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2550         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2551
2552                                 continue
2553                         elif test "${cf_tst_cflags}" = "\"'" ; then
2554
2555         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2556         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2557
2558                                 continue
2559                         fi
2560                         ;;
2561                 esac
2562                 case "$CPPFLAGS" in
2563                 (*$cf_add_cflags)
2564                         ;;
2565                 (*)
2566                         case $cf_add_cflags in
2567                         (-D*)
2568                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2569
2570 CPPFLAGS=`echo "$CPPFLAGS" | \
2571         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2572                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2573
2574                                 ;;
2575                         esac
2576
2577         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2578         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2579
2580                         ;;
2581                 esac
2582                 ;;
2583         (*)
2584
2585         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2586         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2587
2588                 ;;
2589         esac
2590         ;;
2591 (yes)
2592
2593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2595
2596         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2597
2598         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2599                 && test -z "${cf_tst_cflags}" \
2600                 && cf_fix_cppflags=no
2601         ;;
2602 esac
2603 done
2604
2605 if test -n "$cf_new_cflags" ; then
2606
2607         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2608         CFLAGS="${CFLAGS}$cf_new_cflags"
2609
2610 fi
2611
2612 if test -n "$cf_new_cppflags" ; then
2613
2614         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2615         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2616
2617 fi
2618
2619 if test -n "$cf_new_extra_cppflags" ; then
2620
2621         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2622         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2623
2624 fi
2625
2626                         ;;
2627                 (*)
2628                         CC="$CC $cf_arg"
2629                         ;;
2630                 esac
2631         done
2632         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2633
2634 echo "${as_me:-configure}:2634: testing resulting CC: '$CC' ..." 1>&5
2635
2636         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2637
2638 echo "${as_me:-configure}:2638: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2639
2640         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2641
2642 echo "${as_me:-configure}:2642: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2643
2644         ;;
2645 (*)
2646         echo "$as_me:2646: result: ok" >&5
2647 echo "${ECHO_T}ok" >&6
2648         ;;
2649 esac
2650
2651 ac_ext=c
2652 ac_cpp='$CPP $CPPFLAGS'
2653 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2654 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2655 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2656 ac_main_return=return
2657 echo "$as_me:2657: checking how to run the C preprocessor" >&5
2658 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2659 # On Suns, sometimes $CPP names a directory.
2660 if test -n "$CPP" && test -d "$CPP"; then
2661   CPP=
2662 fi
2663 if test -z "$CPP"; then
2664   if test "${ac_cv_prog_CPP+set}" = set; then
2665   echo $ECHO_N "(cached) $ECHO_C" >&6
2666 else
2667       # Double quotes because CPP needs to be expanded
2668     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2669     do
2670       ac_preproc_ok=false
2671 for ac_c_preproc_warn_flag in '' yes
2672 do
2673   # Use a header file that comes with gcc, so configuring glibc
2674   # with a fresh cross-compiler works.
2675   # On the NeXT, cc -E runs the code through the compiler's parser,
2676   # not just through cpp. "Syntax error" is here to catch this case.
2677   cat >conftest.$ac_ext <<_ACEOF
2678 #line 2678 "configure"
2679 #include "confdefs.h"
2680 #include <assert.h>
2681                      Syntax error
2682 _ACEOF
2683 if { (eval echo "$as_me:2683: \"$ac_cpp conftest.$ac_ext\"") >&5
2684   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2685   ac_status=$?
2686   egrep -v '^ *\+' conftest.er1 >conftest.err
2687   rm -f conftest.er1
2688   cat conftest.err >&5
2689   echo "$as_me:2689: \$? = $ac_status" >&5
2690   (exit $ac_status); } >/dev/null; then
2691   if test -s conftest.err; then
2692     ac_cpp_err=$ac_c_preproc_warn_flag
2693   else
2694     ac_cpp_err=
2695   fi
2696 else
2697   ac_cpp_err=yes
2698 fi
2699 if test -z "$ac_cpp_err"; then
2700   :
2701 else
2702   echo "$as_me: failed program was:" >&5
2703   cat conftest.$ac_ext >&5
2704   # Broken: fails on valid input.
2705 continue
2706 fi
2707 rm -f conftest.err conftest.$ac_ext
2708
2709   # OK, works on sane cases.  Now check whether non-existent headers
2710   # can be detected and how.
2711   cat >conftest.$ac_ext <<_ACEOF
2712 #line 2712 "configure"
2713 #include "confdefs.h"
2714 #include <ac_nonexistent.h>
2715 _ACEOF
2716 if { (eval echo "$as_me:2716: \"$ac_cpp conftest.$ac_ext\"") >&5
2717   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2718   ac_status=$?
2719   egrep -v '^ *\+' conftest.er1 >conftest.err
2720   rm -f conftest.er1
2721   cat conftest.err >&5
2722   echo "$as_me:2722: \$? = $ac_status" >&5
2723   (exit $ac_status); } >/dev/null; then
2724   if test -s conftest.err; then
2725     ac_cpp_err=$ac_c_preproc_warn_flag
2726   else
2727     ac_cpp_err=
2728   fi
2729 else
2730   ac_cpp_err=yes
2731 fi
2732 if test -z "$ac_cpp_err"; then
2733   # Broken: success on invalid input.
2734 continue
2735 else
2736   echo "$as_me: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738   # Passes both tests.
2739 ac_preproc_ok=:
2740 break
2741 fi
2742 rm -f conftest.err conftest.$ac_ext
2743
2744 done
2745 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2746 rm -f conftest.err conftest.$ac_ext
2747 if $ac_preproc_ok; then
2748   break
2749 fi
2750
2751     done
2752     ac_cv_prog_CPP=$CPP
2753
2754 fi
2755   CPP=$ac_cv_prog_CPP
2756 else
2757   ac_cv_prog_CPP=$CPP
2758 fi
2759 echo "$as_me:2759: result: $CPP" >&5
2760 echo "${ECHO_T}$CPP" >&6
2761 ac_preproc_ok=false
2762 for ac_c_preproc_warn_flag in '' yes
2763 do
2764   # Use a header file that comes with gcc, so configuring glibc
2765   # with a fresh cross-compiler works.
2766   # On the NeXT, cc -E runs the code through the compiler's parser,
2767   # not just through cpp. "Syntax error" is here to catch this case.
2768   cat >conftest.$ac_ext <<_ACEOF
2769 #line 2769 "configure"
2770 #include "confdefs.h"
2771 #include <assert.h>
2772                      Syntax error
2773 _ACEOF
2774 if { (eval echo "$as_me:2774: \"$ac_cpp conftest.$ac_ext\"") >&5
2775   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2776   ac_status=$?
2777   egrep -v '^ *\+' conftest.er1 >conftest.err
2778   rm -f conftest.er1
2779   cat conftest.err >&5
2780   echo "$as_me:2780: \$? = $ac_status" >&5
2781   (exit $ac_status); } >/dev/null; then
2782   if test -s conftest.err; then
2783     ac_cpp_err=$ac_c_preproc_warn_flag
2784   else
2785     ac_cpp_err=
2786   fi
2787 else
2788   ac_cpp_err=yes
2789 fi
2790 if test -z "$ac_cpp_err"; then
2791   :
2792 else
2793   echo "$as_me: failed program was:" >&5
2794   cat conftest.$ac_ext >&5
2795   # Broken: fails on valid input.
2796 continue
2797 fi
2798 rm -f conftest.err conftest.$ac_ext
2799
2800   # OK, works on sane cases.  Now check whether non-existent headers
2801   # can be detected and how.
2802   cat >conftest.$ac_ext <<_ACEOF
2803 #line 2803 "configure"
2804 #include "confdefs.h"
2805 #include <ac_nonexistent.h>
2806 _ACEOF
2807 if { (eval echo "$as_me:2807: \"$ac_cpp conftest.$ac_ext\"") >&5
2808   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2809   ac_status=$?
2810   egrep -v '^ *\+' conftest.er1 >conftest.err
2811   rm -f conftest.er1
2812   cat conftest.err >&5
2813   echo "$as_me:2813: \$? = $ac_status" >&5
2814   (exit $ac_status); } >/dev/null; then
2815   if test -s conftest.err; then
2816     ac_cpp_err=$ac_c_preproc_warn_flag
2817   else
2818     ac_cpp_err=
2819   fi
2820 else
2821   ac_cpp_err=yes
2822 fi
2823 if test -z "$ac_cpp_err"; then
2824   # Broken: success on invalid input.
2825 continue
2826 else
2827   echo "$as_me: failed program was:" >&5
2828   cat conftest.$ac_ext >&5
2829   # Passes both tests.
2830 ac_preproc_ok=:
2831 break
2832 fi
2833 rm -f conftest.err conftest.$ac_ext
2834
2835 done
2836 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2837 rm -f conftest.err conftest.$ac_ext
2838 if $ac_preproc_ok; then
2839   :
2840 else
2841   { { echo "$as_me:2841: error: C preprocessor \"$CPP\" fails sanity check" >&5
2842 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2843    { (exit 1); exit 1; }; }
2844 fi
2845
2846 ac_ext=c
2847 ac_cpp='$CPP $CPPFLAGS'
2848 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2849 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2850 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2851 ac_main_return=return
2852
2853 if test $ac_cv_c_compiler_gnu = yes; then
2854     echo "$as_me:2854: checking whether $CC needs -traditional" >&5
2855 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2856 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2857   echo $ECHO_N "(cached) $ECHO_C" >&6
2858 else
2859     ac_pattern="Autoconf.*'x'"
2860   cat >conftest.$ac_ext <<_ACEOF
2861 #line 2861 "configure"
2862 #include "confdefs.h"
2863 #include <sgtty.h>
2864 int Autoconf = TIOCGETP;
2865 _ACEOF
2866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2867   egrep "$ac_pattern" >/dev/null 2>&1; then
2868   ac_cv_prog_gcc_traditional=yes
2869 else
2870   ac_cv_prog_gcc_traditional=no
2871 fi
2872 rm -rf conftest*
2873
2874   if test $ac_cv_prog_gcc_traditional = no; then
2875     cat >conftest.$ac_ext <<_ACEOF
2876 #line 2876 "configure"
2877 #include "confdefs.h"
2878 #include <termio.h>
2879 int Autoconf = TCGETA;
2880 _ACEOF
2881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2882   egrep "$ac_pattern" >/dev/null 2>&1; then
2883   ac_cv_prog_gcc_traditional=yes
2884 fi
2885 rm -rf conftest*
2886
2887   fi
2888 fi
2889 echo "$as_me:2889: result: $ac_cv_prog_gcc_traditional" >&5
2890 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2891   if test $ac_cv_prog_gcc_traditional = yes; then
2892     CC="$CC -traditional"
2893   fi
2894 fi
2895
2896 echo "$as_me:2896: checking whether $CC understands -c and -o together" >&5
2897 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2898 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2899   echo $ECHO_N "(cached) $ECHO_C" >&6
2900 else
2901
2902 cat > conftest.$ac_ext <<CF_EOF
2903 int main(void)
2904 {
2905         ${cf_cv_main_return:-return}(0);
2906 }
2907 CF_EOF
2908 # We do the test twice because some compilers refuse to overwrite an
2909 # existing .o file with -o, though they will create one.
2910 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2911 if { (eval echo "$as_me:2911: \"$ac_try\"") >&5
2912   (eval $ac_try) 2>&5
2913   ac_status=$?
2914   echo "$as_me:2914: \$? = $ac_status" >&5
2915   (exit $ac_status); } &&
2916   test -f conftest2.$ac_objext && { (eval echo "$as_me:2916: \"$ac_try\"") >&5
2917   (eval $ac_try) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); };
2921 then
2922   eval cf_cv_prog_CC_c_o=yes
2923 else
2924   eval cf_cv_prog_CC_c_o=no
2925 fi
2926 rm -rf conftest*
2927
2928 fi
2929 if test $cf_cv_prog_CC_c_o = yes; then
2930   echo "$as_me:2930: result: yes" >&5
2931 echo "${ECHO_T}yes" >&6
2932 else
2933   echo "$as_me:2933: result: no" >&5
2934 echo "${ECHO_T}no" >&6
2935 fi
2936
2937 if test "$cross_compiling" = yes ; then
2938         LDCONFIG=:
2939 else
2940         case "$cf_cv_system_name" in
2941         (dragonfly*|mirbsd*|freebsd*)
2942                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2943                 ;;
2944         (*) LDPATH=$PATH:/sbin:/usr/sbin
2945                 # Extract the first word of "ldconfig", so it can be a program name with args.
2946 set dummy ldconfig; ac_word=$2
2947 echo "$as_me:2947: checking for $ac_word" >&5
2948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2949 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2950   echo $ECHO_N "(cached) $ECHO_C" >&6
2951 else
2952   case $LDCONFIG in
2953   [\\/]* | ?:[\\/]*)
2954   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2955   ;;
2956   *)
2957   ac_save_IFS=$IFS; IFS=$ac_path_separator
2958 ac_dummy="$LDPATH"
2959 for ac_dir in $ac_dummy; do
2960   IFS=$ac_save_IFS
2961   test -z "$ac_dir" && ac_dir=.
2962   if $as_executable_p "$ac_dir/$ac_word"; then
2963    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2964    echo "$as_me:2964: found $ac_dir/$ac_word" >&5
2965    break
2966 fi
2967 done
2968
2969   ;;
2970 esac
2971 fi
2972 LDCONFIG=$ac_cv_path_LDCONFIG
2973
2974 if test -n "$LDCONFIG"; then
2975   echo "$as_me:2975: result: $LDCONFIG" >&5
2976 echo "${ECHO_T}$LDCONFIG" >&6
2977 else
2978   echo "$as_me:2978: result: no" >&5
2979 echo "${ECHO_T}no" >&6
2980 fi
2981
2982                 ;;
2983         esac
2984 fi
2985
2986 echo "$as_me:2986: checking if you want to ensure bool is consistent with C++" >&5
2987 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2988
2989 # Check whether --with-cxx or --without-cxx was given.
2990 if test "${with_cxx+set}" = set; then
2991   withval="$with_cxx"
2992   cf_with_cxx=$withval
2993 else
2994   cf_with_cxx=yes
2995 fi;
2996 echo "$as_me:2996: result: $cf_with_cxx" >&5
2997 echo "${ECHO_T}$cf_with_cxx" >&6
2998 if test "X$cf_with_cxx" = Xno ; then
2999         CXX=""
3000         GXX=""
3001 else
3002         # with autoconf 2.13, we can change the error to a warning:
3003                 ac_ext=cc
3004 ac_cpp='$CXXCPP $CPPFLAGS'
3005 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3006 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3007 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3008 ac_main_return=return
3009 if test -n "$ac_tool_prefix"; then
3010   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3011   do
3012     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3013 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3014 echo "$as_me:3014: checking for $ac_word" >&5
3015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3016 if test "${ac_cv_prog_CXX+set}" = set; then
3017   echo $ECHO_N "(cached) $ECHO_C" >&6
3018 else
3019   if test -n "$CXX"; then
3020   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3021 else
3022   ac_save_IFS=$IFS; IFS=$ac_path_separator
3023 ac_dummy="$PATH"
3024 for ac_dir in $ac_dummy; do
3025   IFS=$ac_save_IFS
3026   test -z "$ac_dir" && ac_dir=.
3027   $as_executable_p "$ac_dir/$ac_word" || continue
3028 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3029 echo "$as_me:3029: found $ac_dir/$ac_word" >&5
3030 break
3031 done
3032
3033 fi
3034 fi
3035 CXX=$ac_cv_prog_CXX
3036 if test -n "$CXX"; then
3037   echo "$as_me:3037: result: $CXX" >&5
3038 echo "${ECHO_T}$CXX" >&6
3039 else
3040   echo "$as_me:3040: result: no" >&5
3041 echo "${ECHO_T}no" >&6
3042 fi
3043
3044     test -n "$CXX" && break
3045   done
3046 fi
3047 if test -z "$CXX"; then
3048   ac_ct_CXX=$CXX
3049   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3050 do
3051   # Extract the first word of "$ac_prog", so it can be a program name with args.
3052 set dummy $ac_prog; ac_word=$2
3053 echo "$as_me:3053: checking for $ac_word" >&5
3054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3055 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3056   echo $ECHO_N "(cached) $ECHO_C" >&6
3057 else
3058   if test -n "$ac_ct_CXX"; then
3059   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3060 else
3061   ac_save_IFS=$IFS; IFS=$ac_path_separator
3062 ac_dummy="$PATH"
3063 for ac_dir in $ac_dummy; do
3064   IFS=$ac_save_IFS
3065   test -z "$ac_dir" && ac_dir=.
3066   $as_executable_p "$ac_dir/$ac_word" || continue
3067 ac_cv_prog_ac_ct_CXX="$ac_prog"
3068 echo "$as_me:3068: found $ac_dir/$ac_word" >&5
3069 break
3070 done
3071
3072 fi
3073 fi
3074 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3075 if test -n "$ac_ct_CXX"; then
3076   echo "$as_me:3076: result: $ac_ct_CXX" >&5
3077 echo "${ECHO_T}$ac_ct_CXX" >&6
3078 else
3079   echo "$as_me:3079: result: no" >&5
3080 echo "${ECHO_T}no" >&6
3081 fi
3082
3083   test -n "$ac_ct_CXX" && break
3084 done
3085 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3086
3087   CXX=$ac_ct_CXX
3088 fi
3089
3090 # Provide some information about the compiler.
3091 echo "$as_me:3091:" \
3092      "checking for C++ compiler version" >&5
3093 ac_compiler=`set X $ac_compile; echo $2`
3094 { (eval echo "$as_me:3094: \"$ac_compiler --version </dev/null >&5\"") >&5
3095   (eval $ac_compiler --version </dev/null >&5) 2>&5
3096   ac_status=$?
3097   echo "$as_me:3097: \$? = $ac_status" >&5
3098   (exit $ac_status); }
3099 { (eval echo "$as_me:3099: \"$ac_compiler -v </dev/null >&5\"") >&5
3100   (eval $ac_compiler -v </dev/null >&5) 2>&5
3101   ac_status=$?
3102   echo "$as_me:3102: \$? = $ac_status" >&5
3103   (exit $ac_status); }
3104 { (eval echo "$as_me:3104: \"$ac_compiler -V </dev/null >&5\"") >&5
3105   (eval $ac_compiler -V </dev/null >&5) 2>&5
3106   ac_status=$?
3107   echo "$as_me:3107: \$? = $ac_status" >&5
3108   (exit $ac_status); }
3109
3110 echo "$as_me:3110: checking whether we are using the GNU C++ compiler" >&5
3111 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3112 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3113   echo $ECHO_N "(cached) $ECHO_C" >&6
3114 else
3115   cat >conftest.$ac_ext <<_ACEOF
3116 #line 3116 "configure"
3117 #include "confdefs.h"
3118
3119 int
3120 main (void)
3121 {
3122 #ifndef __GNUC__
3123        choke me
3124 #endif
3125
3126   ;
3127   return 0;
3128 }
3129 _ACEOF
3130 rm -f conftest.$ac_objext
3131 if { (eval echo "$as_me:3131: \"$ac_compile\"") >&5
3132   (eval $ac_compile) 2>&5
3133   ac_status=$?
3134   echo "$as_me:3134: \$? = $ac_status" >&5
3135   (exit $ac_status); } &&
3136          { ac_try='test -s conftest.$ac_objext'
3137   { (eval echo "$as_me:3137: \"$ac_try\"") >&5
3138   (eval $ac_try) 2>&5
3139   ac_status=$?
3140   echo "$as_me:3140: \$? = $ac_status" >&5
3141   (exit $ac_status); }; }; then
3142   ac_compiler_gnu=yes
3143 else
3144   echo "$as_me: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3146 ac_compiler_gnu=no
3147 fi
3148 rm -f conftest.$ac_objext conftest.$ac_ext
3149 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3150
3151 fi
3152 echo "$as_me:3152: result: $ac_cv_cxx_compiler_gnu" >&5
3153 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3154 GXX=`test $ac_compiler_gnu = yes && echo yes`
3155 ac_test_CXXFLAGS=${CXXFLAGS+set}
3156 ac_save_CXXFLAGS=$CXXFLAGS
3157 CXXFLAGS="-g"
3158 echo "$as_me:3158: checking whether $CXX accepts -g" >&5
3159 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3160 if test "${ac_cv_prog_cxx_g+set}" = set; then
3161   echo $ECHO_N "(cached) $ECHO_C" >&6
3162 else
3163   cat >conftest.$ac_ext <<_ACEOF
3164 #line 3164 "configure"
3165 #include "confdefs.h"
3166
3167 int
3168 main (void)
3169 {
3170
3171   ;
3172   return 0;
3173 }
3174 _ACEOF
3175 rm -f conftest.$ac_objext
3176 if { (eval echo "$as_me:3176: \"$ac_compile\"") >&5
3177   (eval $ac_compile) 2>&5
3178   ac_status=$?
3179   echo "$as_me:3179: \$? = $ac_status" >&5
3180   (exit $ac_status); } &&
3181          { ac_try='test -s conftest.$ac_objext'
3182   { (eval echo "$as_me:3182: \"$ac_try\"") >&5
3183   (eval $ac_try) 2>&5
3184   ac_status=$?
3185   echo "$as_me:3185: \$? = $ac_status" >&5
3186   (exit $ac_status); }; }; then
3187   ac_cv_prog_cxx_g=yes
3188 else
3189   echo "$as_me: failed program was:" >&5
3190 cat conftest.$ac_ext >&5
3191 ac_cv_prog_cxx_g=no
3192 fi
3193 rm -f conftest.$ac_objext conftest.$ac_ext
3194 fi
3195 echo "$as_me:3195: result: $ac_cv_prog_cxx_g" >&5
3196 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3197 if test "$ac_test_CXXFLAGS" = set; then
3198   CXXFLAGS=$ac_save_CXXFLAGS
3199 elif test $ac_cv_prog_cxx_g = yes; then
3200   if test "$GXX" = yes; then
3201     CXXFLAGS="-g -O2"
3202   else
3203     CXXFLAGS="-g"
3204   fi
3205 else
3206   if test "$GXX" = yes; then
3207     CXXFLAGS="-O2"
3208   else
3209     CXXFLAGS=
3210   fi
3211 fi
3212 for ac_declaration in \
3213    ''\
3214    '#include <stdlib.h>' \
3215    'extern "C" void std::exit (int) throw (); using std::exit;' \
3216    'extern "C" void std::exit (int); using std::exit;' \
3217    'extern "C" void exit (int) throw ();' \
3218    'extern "C" void exit (int);' \
3219    'void exit (int);'
3220 do
3221   cat >conftest.$ac_ext <<_ACEOF
3222 #line 3222 "configure"
3223 #include "confdefs.h"
3224 #include <stdlib.h>
3225 $ac_declaration
3226 int
3227 main (void)
3228 {
3229 exit (42);
3230   ;
3231   return 0;
3232 }
3233 _ACEOF
3234 rm -f conftest.$ac_objext
3235 if { (eval echo "$as_me:3235: \"$ac_compile\"") >&5
3236   (eval $ac_compile) 2>&5
3237   ac_status=$?
3238   echo "$as_me:3238: \$? = $ac_status" >&5
3239   (exit $ac_status); } &&
3240          { ac_try='test -s conftest.$ac_objext'
3241   { (eval echo "$as_me:3241: \"$ac_try\"") >&5
3242   (eval $ac_try) 2>&5
3243   ac_status=$?
3244   echo "$as_me:3244: \$? = $ac_status" >&5
3245   (exit $ac_status); }; }; then
3246   :
3247 else
3248   echo "$as_me: failed program was:" >&5
3249 cat conftest.$ac_ext >&5
3250 continue
3251 fi
3252 rm -f conftest.$ac_objext conftest.$ac_ext
3253   cat >conftest.$ac_ext <<_ACEOF
3254 #line 3254 "configure"
3255 #include "confdefs.h"
3256 $ac_declaration
3257 int
3258 main (void)
3259 {
3260 exit (42);
3261   ;
3262   return 0;
3263 }
3264 _ACEOF
3265 rm -f conftest.$ac_objext
3266 if { (eval echo "$as_me:3266: \"$ac_compile\"") >&5
3267   (eval $ac_compile) 2>&5
3268   ac_status=$?
3269   echo "$as_me:3269: \$? = $ac_status" >&5
3270   (exit $ac_status); } &&
3271          { ac_try='test -s conftest.$ac_objext'
3272   { (eval echo "$as_me:3272: \"$ac_try\"") >&5
3273   (eval $ac_try) 2>&5
3274   ac_status=$?
3275   echo "$as_me:3275: \$? = $ac_status" >&5
3276   (exit $ac_status); }; }; then
3277   break
3278 else
3279   echo "$as_me: failed program was:" >&5
3280 cat conftest.$ac_ext >&5
3281 fi
3282 rm -f conftest.$ac_objext conftest.$ac_ext
3283 done
3284 rm -rf conftest*
3285 if test -n "$ac_declaration"; then
3286   echo '#ifdef __cplusplus' >>confdefs.h
3287   echo $ac_declaration      >>confdefs.h
3288   echo '#endif'             >>confdefs.h
3289 fi
3290
3291 ac_ext=c
3292 ac_cpp='$CPP $CPPFLAGS'
3293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3296 ac_main_return=return
3297
3298         ac_ext=cc
3299 ac_cpp='$CXXCPP $CPPFLAGS'
3300 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3301 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3302 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3303 ac_main_return=return
3304
3305         if test "x$cf_with_cxx" != xno
3306         then
3307                 # Several of the C++ configurations do not work, particularly when
3308                 # cross-compiling (20140913 -TD)
3309                 echo "$as_me:3309: checking if $CXX works" >&5
3310 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3311
3312                 save_CPPFLAGS="$CPPFLAGS"
3313                 eval cf_includedir=${includedir}
3314                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3315
3316 cat >conftest.$ac_ext <<_ACEOF
3317 #line 3317 "configure"
3318 #include "confdefs.h"
3319
3320 #include <stdlib.h>
3321 #include <stdio.h>
3322
3323 int
3324 main (void)
3325 {
3326
3327                 printf("Hello world!\n")
3328
3329   ;
3330   return 0;
3331 }
3332 _ACEOF
3333 rm -f conftest.$ac_objext
3334 if { (eval echo "$as_me:3334: \"$ac_compile\"") >&5
3335   (eval $ac_compile) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit $ac_status); } &&
3339          { ac_try='test -s conftest.$ac_objext'
3340   { (eval echo "$as_me:3340: \"$ac_try\"") >&5
3341   (eval $ac_try) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit $ac_status); }; }; then
3345   cf_cxx_works=yes
3346 else
3347   echo "$as_me: failed program was:" >&5
3348 cat conftest.$ac_ext >&5
3349 cf_cxx_works=no
3350 fi
3351 rm -f conftest.$ac_objext conftest.$ac_ext
3352                 CPPFLAGS="$save_CPPFLAGS"
3353
3354                 echo "$as_me:3354: result: $cf_cxx_works" >&5
3355 echo "${ECHO_T}$cf_cxx_works" >&6
3356                 if test "x$cf_cxx_works" = xno
3357                 then
3358                         { echo "$as_me:3358: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3359 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3360                         cf_with_cxx=no; CXX=""; GXX="";
3361                 fi
3362         fi
3363         ac_ext=c
3364 ac_cpp='$CPP $CPPFLAGS'
3365 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3366 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3367 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3368 ac_main_return=return
3369
3370         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3371         if test "$CXX" = "g++" ; then
3372                 # Extract the first word of "g++", so it can be a program name with args.
3373 set dummy g++; ac_word=$2
3374 echo "$as_me:3374: checking for $ac_word" >&5
3375 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3376 if test "${ac_cv_path_CXX+set}" = set; then
3377   echo $ECHO_N "(cached) $ECHO_C" >&6
3378 else
3379   case $CXX in
3380   [\\/]* | ?:[\\/]*)
3381   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3382   ;;
3383   *)
3384   ac_save_IFS=$IFS; IFS=$ac_path_separator
3385 ac_dummy="$PATH"
3386 for ac_dir in $ac_dummy; do
3387   IFS=$ac_save_IFS
3388   test -z "$ac_dir" && ac_dir=.
3389   if $as_executable_p "$ac_dir/$ac_word"; then
3390    ac_cv_path_CXX="$ac_dir/$ac_word"
3391    echo "$as_me:3391: found $ac_dir/$ac_word" >&5
3392    break
3393 fi
3394 done
3395
3396   ;;
3397 esac
3398 fi
3399 CXX=$ac_cv_path_CXX
3400
3401 if test -n "$CXX"; then
3402   echo "$as_me:3402: result: $CXX" >&5
3403 echo "${ECHO_T}$CXX" >&6
3404 else
3405   echo "$as_me:3405: result: no" >&5
3406 echo "${ECHO_T}no" >&6
3407 fi
3408
3409         fi
3410         case "x$CXX" in
3411         (x|xg++)
3412                 { echo "$as_me:3412: WARNING: You don't have any C++ compiler, too bad" >&5
3413 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3414                 cf_with_cxx=no; CXX=""; GXX="";
3415                 ;;
3416         esac
3417 fi
3418
3419 GXX_VERSION=none
3420 if test "$GXX" = yes; then
3421         echo "$as_me:3421: checking version of ${CXX:-g++}" >&5
3422 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3423         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3424         if test -z "$GXX_VERSION"
3425         then
3426                 GXX_VERSION=unknown
3427                 GXX=no
3428         fi
3429         echo "$as_me:3429: result: $GXX_VERSION" >&5
3430 echo "${ECHO_T}$GXX_VERSION" >&6
3431 fi
3432
3433 case $GXX_VERSION in
3434 ([1-9][0-9].*)
3435         ;;
3436 (1.*|2.[0-6]*)
3437         { echo "$as_me:3437: WARNING: templates do not work" >&5
3438 echo "$as_me: WARNING: templates do not work" >&2;}
3439         ;;
3440 esac
3441
3442 echo "$as_me:3442: checking if you want to build C++ binding and demo" >&5
3443 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3444
3445 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3446 if test "${with_cxx_binding+set}" = set; then
3447   withval="$with_cxx_binding"
3448   cf_with_cxx_binding=$withval
3449 else
3450   cf_with_cxx_binding=$cf_with_cxx
3451 fi;
3452 echo "$as_me:3452: result: $cf_with_cxx_binding" >&5
3453 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3454
3455 echo "$as_me:3455: checking if you want to build with Ada" >&5
3456 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3457 echo "$as_me:3457: result: $cf_with_ada" >&5
3458 echo "${ECHO_T}$cf_with_ada" >&6
3459
3460 echo "$as_me:3460: checking if you want to install terminal database" >&5
3461 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3462
3463 # Check whether --enable-db-install or --disable-db-install was given.
3464 if test "${enable_db_install+set}" = set; then
3465   enableval="$enable_db_install"
3466   cf_with_db_install=$enableval
3467 else
3468   cf_with_db_install=yes
3469 fi;
3470 echo "$as_me:3470: result: $cf_with_db_install" >&5
3471 echo "${ECHO_T}$cf_with_db_install" >&6
3472
3473 echo "$as_me:3473: checking if you want to install manpages" >&5
3474 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3475
3476 # Check whether --with-manpages or --without-manpages was given.
3477 if test "${with_manpages+set}" = set; then
3478   withval="$with_manpages"
3479   cf_with_manpages=$withval
3480 else
3481   cf_with_manpages=yes
3482 fi;
3483 echo "$as_me:3483: result: $cf_with_manpages" >&5
3484 echo "${ECHO_T}$cf_with_manpages" >&6
3485
3486 echo "$as_me:3486: checking if you want to build programs such as tic" >&5
3487 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3488
3489 # Check whether --with-progs or --without-progs was given.
3490 if test "${with_progs+set}" = set; then
3491   withval="$with_progs"
3492   cf_with_progs=$withval
3493 else
3494   cf_with_progs=yes
3495 fi;
3496 echo "$as_me:3496: result: $cf_with_progs" >&5
3497 echo "${ECHO_T}$cf_with_progs" >&6
3498
3499 if test -f $srcdir/tack/tack.h; then
3500         if test "x$cross_compiling" = xyes ; then
3501                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3502
3503 echo "${as_me:-configure}:3503: testing ignoring tack because we are cross-compiling ..." 1>&5
3504
3505                 cf_with_tack=no
3506         else
3507                 echo "$as_me:3507: checking if you want to build the tack program" >&5
3508 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3509
3510 # Check whether --with-tack or --without-tack was given.
3511 if test "${with_tack+set}" = set; then
3512   withval="$with_tack"
3513   cf_with_tack=$withval
3514 else
3515   cf_with_tack=$cf_with_progs
3516 fi;
3517                 echo "$as_me:3517: result: $cf_with_tack" >&5
3518 echo "${ECHO_T}$cf_with_tack" >&6
3519         fi
3520 else
3521         cf_with_tack=no
3522 fi
3523
3524 echo "$as_me:3524: checking if you want to build test-programs" >&5
3525 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3526
3527 # Check whether --with-tests or --without-tests was given.
3528 if test "${with_tests+set}" = set; then
3529   withval="$with_tests"
3530   cf_with_tests=$withval
3531 else
3532   cf_with_tests=yes
3533 fi;
3534 echo "$as_me:3534: result: $cf_with_tests" >&5
3535 echo "${ECHO_T}$cf_with_tests" >&6
3536
3537 echo "$as_me:3537: checking if you wish to install curses.h" >&5
3538 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3539
3540 # Check whether --with-curses-h or --without-curses-h was given.
3541 if test "${with_curses_h+set}" = set; then
3542   withval="$with_curses_h"
3543   with_curses_h=$withval
3544 else
3545   with_curses_h=yes
3546 fi;
3547 echo "$as_me:3547: result: $with_curses_h" >&5
3548 echo "${ECHO_T}$with_curses_h" >&6
3549
3550 modules_to_build="ncurses"
3551 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3552 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3553 modules_to_build="$modules_to_build panel menu form"
3554
3555 test "$program_prefix" != NONE &&
3556   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3557 # Use a double $ so make ignores it.
3558 test "$program_suffix" != NONE &&
3559   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3560 # Double any \ or $.  echo might interpret backslashes.
3561 # By default was `s,x,x', remove it if useless.
3562 cat <<\_ACEOF >conftest.sed
3563 s/[\\$]/&&/g;s/;s,x,x,$//
3564 _ACEOF
3565 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3566 rm conftest.sed
3567
3568 for ac_prog in mawk gawk nawk awk
3569 do
3570   # Extract the first word of "$ac_prog", so it can be a program name with args.
3571 set dummy $ac_prog; ac_word=$2
3572 echo "$as_me:3572: checking for $ac_word" >&5
3573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3574 if test "${ac_cv_prog_AWK+set}" = set; then
3575   echo $ECHO_N "(cached) $ECHO_C" >&6
3576 else
3577   if test -n "$AWK"; then
3578   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3579 else
3580   ac_save_IFS=$IFS; IFS=$ac_path_separator
3581 ac_dummy="$PATH"
3582 for ac_dir in $ac_dummy; do
3583   IFS=$ac_save_IFS
3584   test -z "$ac_dir" && ac_dir=.
3585   $as_executable_p "$ac_dir/$ac_word" || continue
3586 ac_cv_prog_AWK="$ac_prog"
3587 echo "$as_me:3587: found $ac_dir/$ac_word" >&5
3588 break
3589 done
3590
3591 fi
3592 fi
3593 AWK=$ac_cv_prog_AWK
3594 if test -n "$AWK"; then
3595   echo "$as_me:3595: result: $AWK" >&5
3596 echo "${ECHO_T}$AWK" >&6
3597 else
3598   echo "$as_me:3598: result: no" >&5
3599 echo "${ECHO_T}no" >&6
3600 fi
3601
3602   test -n "$AWK" && break
3603 done
3604
3605 test -z "$AWK" && { { echo "$as_me:3605: error: No awk program found" >&5
3606 echo "$as_me: error: No awk program found" >&2;}
3607    { (exit 1); exit 1; }; }
3608
3609 echo "$as_me:3609: checking for egrep" >&5
3610 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3611 if test "${ac_cv_prog_egrep+set}" = set; then
3612   echo $ECHO_N "(cached) $ECHO_C" >&6
3613 else
3614   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3615                 then ac_cv_prog_egrep='grep -E'
3616                 else ac_cv_prog_egrep='egrep'
3617         fi
3618 fi
3619 echo "$as_me:3619: result: $ac_cv_prog_egrep" >&5
3620 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3621         EGREP=$ac_cv_prog_egrep
3622
3623         test -z "$EGREP" && { { echo "$as_me:3623: error: No egrep program found" >&5
3624 echo "$as_me: error: No egrep program found" >&2;}
3625    { (exit 1); exit 1; }; }
3626
3627 # Find a good install program.  We prefer a C program (faster),
3628 # so one script is as good as another.  But avoid the broken or
3629 # incompatible versions:
3630 # SysV /etc/install, /usr/sbin/install
3631 # SunOS /usr/etc/install
3632 # IRIX /sbin/install
3633 # AIX /bin/install
3634 # AmigaOS /C/install, which installs bootblocks on floppy discs
3635 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3636 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3637 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3638 # ./install, which can be erroneously created by make from ./install.sh.
3639 echo "$as_me:3639: checking for a BSD compatible install" >&5
3640 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3641 if test -z "$INSTALL"; then
3642 if test "${ac_cv_path_install+set}" = set; then
3643   echo $ECHO_N "(cached) $ECHO_C" >&6
3644 else
3645     ac_save_IFS=$IFS; IFS=$ac_path_separator
3646   for ac_dir in $PATH; do
3647     IFS=$ac_save_IFS
3648     # Account for people who put trailing slashes in PATH elements.
3649     case $ac_dir/ in
3650     / | ./ | .// | /cC/* \
3651     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3652     | /usr/ucb/* ) ;;
3653     *)
3654       # OSF1 and SCO ODT 3.0 have their own names for install.
3655       # Don't use installbsd from OSF since it installs stuff as root
3656       # by default.
3657       for ac_prog in ginstall scoinst install; do
3658         if $as_executable_p "$ac_dir/$ac_prog"; then
3659           if test $ac_prog = install &&
3660             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3661             # AIX install.  It has an incompatible calling convention.
3662             :
3663           elif test $ac_prog = install &&
3664             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3665             # program-specific install script used by HP pwplus--don't use.
3666             :
3667           else
3668             ac_cv_path_install="$ac_dir/$ac_prog -c"
3669             break 2
3670           fi
3671         fi
3672       done
3673       ;;
3674     esac
3675   done
3676
3677 fi
3678   if test "${ac_cv_path_install+set}" = set; then
3679     INSTALL=$ac_cv_path_install
3680   else
3681     # As a last resort, use the slow shell script.  We don't cache a
3682     # path for INSTALL within a source directory, because that will
3683     # break other packages using the cache if that directory is
3684     # removed, or if the path is relative.
3685     INSTALL=$ac_install_sh
3686   fi
3687 fi
3688 echo "$as_me:3688: result: $INSTALL" >&5
3689 echo "${ECHO_T}$INSTALL" >&6
3690
3691 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3692 # It thinks the first close brace ends the variable substitution.
3693 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3694
3695 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3696
3697 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3698
3699 case $INSTALL in
3700 (/*)
3701         ;;
3702 (*)
3703         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3704         test -z "$cf_dir" && cf_dir=.
3705         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3706         ;;
3707 esac
3708
3709 for ac_prog in lint cppcheck splint
3710 do
3711   # Extract the first word of "$ac_prog", so it can be a program name with args.
3712 set dummy $ac_prog; ac_word=$2
3713 echo "$as_me:3713: checking for $ac_word" >&5
3714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3715 if test "${ac_cv_prog_LINT+set}" = set; then
3716   echo $ECHO_N "(cached) $ECHO_C" >&6
3717 else
3718   if test -n "$LINT"; then
3719   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3720 else
3721   ac_save_IFS=$IFS; IFS=$ac_path_separator
3722 ac_dummy="$PATH"
3723 for ac_dir in $ac_dummy; do
3724   IFS=$ac_save_IFS
3725   test -z "$ac_dir" && ac_dir=.
3726   $as_executable_p "$ac_dir/$ac_word" || continue
3727 ac_cv_prog_LINT="$ac_prog"
3728 echo "$as_me:3728: found $ac_dir/$ac_word" >&5
3729 break
3730 done
3731
3732 fi
3733 fi
3734 LINT=$ac_cv_prog_LINT
3735 if test -n "$LINT"; then
3736   echo "$as_me:3736: result: $LINT" >&5
3737 echo "${ECHO_T}$LINT" >&6
3738 else
3739   echo "$as_me:3739: result: no" >&5
3740 echo "${ECHO_T}no" >&6
3741 fi
3742
3743   test -n "$LINT" && break
3744 done
3745
3746 case "x$LINT" in
3747 (xcppcheck|x*/cppcheck)
3748         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3749         ;;
3750 esac
3751
3752 echo "$as_me:3752: checking whether ln -s works" >&5
3753 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3754 LN_S=$as_ln_s
3755 if test "$LN_S" = "ln -s"; then
3756   echo "$as_me:3756: result: yes" >&5
3757 echo "${ECHO_T}yes" >&6
3758 else
3759   echo "$as_me:3759: result: no, using $LN_S" >&5
3760 echo "${ECHO_T}no, using $LN_S" >&6
3761 fi
3762
3763 echo "$as_me:3763: checking if $LN_S -f options work" >&5
3764 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3765
3766 rm -f conf$$.src conf$$dst
3767 echo >conf$$.dst
3768 echo first >conf$$.src
3769 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3770         cf_prog_ln_sf=yes
3771 else
3772         cf_prog_ln_sf=no
3773 fi
3774 rm -f conf$$.dst conf$$src
3775 echo "$as_me:3775: result: $cf_prog_ln_sf" >&5
3776 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3777
3778 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3779
3780 echo "$as_me:3780: checking for long file names" >&5
3781 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3782 if test "${ac_cv_sys_long_file_names+set}" = set; then
3783   echo $ECHO_N "(cached) $ECHO_C" >&6
3784 else
3785   ac_cv_sys_long_file_names=yes
3786 # Test for long file names in all the places we know might matter:
3787 #      .                the current directory, where building will happen
3788 #      $prefix/lib      where we will be installing things
3789 #      $exec_prefix/lib likewise
3790 # eval it to expand exec_prefix.
3791 #      $TMPDIR          if set, where it might want to write temporary files
3792 # if $TMPDIR is not set:
3793 #      /tmp             where it might want to write temporary files
3794 #      /var/tmp         likewise
3795 #      /usr/tmp         likewise
3796 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3797   ac_tmpdirs=$TMPDIR
3798 else
3799   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3800 fi
3801 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3802   test -d $ac_dir || continue
3803   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3804   ac_xdir=$ac_dir/cf$$
3805   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3806   ac_tf1=$ac_xdir/conftest9012345
3807   ac_tf2=$ac_xdir/conftest9012346
3808   (echo 1 >$ac_tf1) 2>/dev/null
3809   (echo 2 >$ac_tf2) 2>/dev/null
3810   ac_val=`cat $ac_tf1 2>/dev/null`
3811   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3812     ac_cv_sys_long_file_names=no
3813     rm -rf $ac_xdir 2>/dev/null
3814     break
3815   fi
3816   rm -rf $ac_xdir 2>/dev/null
3817 done
3818 fi
3819 echo "$as_me:3819: result: $ac_cv_sys_long_file_names" >&5
3820 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3821 if test $ac_cv_sys_long_file_names = yes; then
3822
3823 cat >>confdefs.h <<\EOF
3824 #define HAVE_LONG_FILE_NAMES 1
3825 EOF
3826
3827 fi
3828
3829 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3830 # of package conflict.
3831 cf_config_suffix=
3832
3833 # Check whether --with-config-suffix or --without-config-suffix was given.
3834 if test "${with_config_suffix+set}" = set; then
3835   withval="$with_config_suffix"
3836   case "x$withval" in
3837         (xyes|xno)
3838                 { echo "$as_me:3838: WARNING: expected a value for config-suffix option" >&5
3839 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3840                 ;;
3841         (*)     cf_config_suffix="$withval"
3842                 ;;
3843         esac
3844 fi;
3845
3846 # If we find pkg-config, check if we should install the ".pc" files.
3847
3848 echo "$as_me:3848: checking if you want to use pkg-config" >&5
3849 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3850
3851 # Check whether --with-pkg-config or --without-pkg-config was given.
3852 if test "${with_pkg_config+set}" = set; then
3853   withval="$with_pkg_config"
3854   cf_pkg_config=$withval
3855 else
3856   cf_pkg_config=yes
3857 fi;
3858 echo "$as_me:3858: result: $cf_pkg_config" >&5
3859 echo "${ECHO_T}$cf_pkg_config" >&6
3860
3861 case $cf_pkg_config in
3862 (no)
3863         PKG_CONFIG=none
3864         ;;
3865 (yes)
3866
3867 if test -n "$ac_tool_prefix"; then
3868   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3869 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3870 echo "$as_me:3870: checking for $ac_word" >&5
3871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3872 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3873   echo $ECHO_N "(cached) $ECHO_C" >&6
3874 else
3875   case $PKG_CONFIG in
3876   [\\/]* | ?:[\\/]*)
3877   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3878   ;;
3879   *)
3880   ac_save_IFS=$IFS; IFS=$ac_path_separator
3881 ac_dummy="$PATH"
3882 for ac_dir in $ac_dummy; do
3883   IFS=$ac_save_IFS
3884   test -z "$ac_dir" && ac_dir=.
3885   if $as_executable_p "$ac_dir/$ac_word"; then
3886    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3887    echo "$as_me:3887: found $ac_dir/$ac_word" >&5
3888    break
3889 fi
3890 done
3891
3892   ;;
3893 esac
3894 fi
3895 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3896
3897 if test -n "$PKG_CONFIG"; then
3898   echo "$as_me:3898: result: $PKG_CONFIG" >&5
3899 echo "${ECHO_T}$PKG_CONFIG" >&6
3900 else
3901   echo "$as_me:3901: result: no" >&5
3902 echo "${ECHO_T}no" >&6
3903 fi
3904
3905 fi
3906 if test -z "$ac_cv_path_PKG_CONFIG"; then
3907   ac_pt_PKG_CONFIG=$PKG_CONFIG
3908   # Extract the first word of "pkg-config", so it can be a program name with args.
3909 set dummy pkg-config; ac_word=$2
3910 echo "$as_me:3910: checking for $ac_word" >&5
3911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3912 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3913   echo $ECHO_N "(cached) $ECHO_C" >&6
3914 else
3915   case $ac_pt_PKG_CONFIG in
3916   [\\/]* | ?:[\\/]*)
3917   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3918   ;;
3919   *)
3920   ac_save_IFS=$IFS; IFS=$ac_path_separator
3921 ac_dummy="$PATH"
3922 for ac_dir in $ac_dummy; do
3923   IFS=$ac_save_IFS
3924   test -z "$ac_dir" && ac_dir=.
3925   if $as_executable_p "$ac_dir/$ac_word"; then
3926    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3927    echo "$as_me:3927: found $ac_dir/$ac_word" >&5
3928    break
3929 fi
3930 done
3931
3932   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3933   ;;
3934 esac
3935 fi
3936 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3937
3938 if test -n "$ac_pt_PKG_CONFIG"; then
3939   echo "$as_me:3939: result: $ac_pt_PKG_CONFIG" >&5
3940 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3941 else
3942   echo "$as_me:3942: result: no" >&5
3943 echo "${ECHO_T}no" >&6
3944 fi
3945
3946   PKG_CONFIG=$ac_pt_PKG_CONFIG
3947 else
3948   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3949 fi
3950
3951         ;;
3952 (*)
3953         PKG_CONFIG=$withval
3954         ;;
3955 esac
3956
3957 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3958 if test "$PKG_CONFIG" != none ; then
3959
3960 if test "x$prefix" != xNONE; then
3961         cf_path_syntax="$prefix"
3962 else
3963         cf_path_syntax="$ac_default_prefix"
3964 fi
3965
3966 case ".$PKG_CONFIG" in
3967 (.\$\(*\)*|.\'*\'*)
3968         ;;
3969 (..|./*|.\\*)
3970         ;;
3971 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3972         ;;
3973 (.\${*prefix}*|.\${*dir}*)
3974         eval PKG_CONFIG="$PKG_CONFIG"
3975         case ".$PKG_CONFIG" in
3976         (.NONE/*)
3977                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3978                 ;;
3979         esac
3980         ;;
3981 (.no|.NONE/*)
3982         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3983         ;;
3984 (*)
3985         { { echo "$as_me:3985: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3986 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3987    { (exit 1); exit 1; }; }
3988         ;;
3989 esac
3990
3991 elif test "x$cf_pkg_config" != xno ; then
3992         { echo "$as_me:3992: WARNING: pkg-config is not installed" >&5
3993 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3994 fi
3995
3996 case $PKG_CONFIG in
3997 (no|none|yes)
3998         echo "$as_me:3998: checking for pkg-config library directory" >&5
3999 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4000         ;;
4001 (*)
4002         echo "$as_me:4002: checking for $PKG_CONFIG library directory" >&5
4003 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4004         ;;
4005 esac
4006
4007 PKG_CONFIG_LIBDIR=no
4008
4009 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4010 if test "${with_pkg_config_libdir+set}" = set; then
4011   withval="$with_pkg_config_libdir"
4012   PKG_CONFIG_LIBDIR=$withval
4013 else
4014   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4015 fi;
4016
4017 case x$PKG_CONFIG_LIBDIR in
4018 (x/*)
4019         ;;
4020 (xyes)
4021         # Look for the library directory using the same prefix as the executable
4022         if test "x$PKG_CONFIG" = xnone
4023         then
4024                 cf_path=$prefix
4025         else
4026                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4027         fi
4028
4029         # If you don't like using the default architecture, you have to specify the
4030         # intended library directory and corresponding compiler/linker options.
4031         #
4032         # This case allows for Debian's 2014-flavor of multiarch, along with the
4033         # most common variations before that point.  Some other variants spell the
4034         # directory differently, e.g., "pkg-config", and put it in unusual places.
4035         # pkg-config has always been poorly standardized, which is ironic...
4036         case x`(arch) 2>/dev/null` in
4037         (*64)
4038                 cf_search_path="\
4039                         $cf_path/lib/*64-linux-gnu \
4040                         $cf_path/share \
4041                         $cf_path/lib64 \
4042                         $cf_path/lib32 \
4043                         $cf_path/lib"
4044                 ;;
4045         (*)
4046                 cf_search_path="\
4047                         $cf_path/lib/*-linux-gnu \
4048                         $cf_path/share \
4049                         $cf_path/lib32 \
4050                         $cf_path/lib \
4051                         $cf_path/libdata"
4052                 ;;
4053         esac
4054
4055         test -n "$verbose" && echo "    list..." 1>&6
4056
4057 echo "${as_me:-configure}:4057: testing list... ..." 1>&5
4058
4059         for cf_config in $cf_search_path
4060         do
4061                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4062
4063 echo "${as_me:-configure}:4063: testing checking $cf_config/pkgconfig ..." 1>&5
4064
4065                 if test -d $cf_config/pkgconfig
4066                 then
4067                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4068                         echo "$as_me:4068: checking done" >&5
4069 echo $ECHO_N "checking done... $ECHO_C" >&6
4070                         break
4071                 fi
4072         done
4073         ;;
4074 (*)
4075         ;;
4076 esac
4077
4078 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4079         echo "$as_me:4079: result: $PKG_CONFIG_LIBDIR" >&5
4080 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4081 fi
4082
4083 if test "x$PKG_CONFIG" != xnone
4084 then
4085         echo "$as_me:4085: checking if we should install .pc files for $PKG_CONFIG" >&5
4086 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4087 else
4088         echo "$as_me:4088: checking if we should install .pc files" >&5
4089 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4090 fi
4091
4092 # Check whether --enable-pc-files or --disable-pc-files was given.
4093 if test "${enable_pc_files+set}" = set; then
4094   enableval="$enable_pc_files"
4095   enable_pc_files=$enableval
4096 else
4097   enable_pc_files=no
4098 fi;
4099 echo "$as_me:4099: result: $enable_pc_files" >&5
4100 echo "${ECHO_T}$enable_pc_files" >&6
4101
4102 if test "x$enable_pc_files" != xno
4103 then
4104         MAKE_PC_FILES=
4105         case "x$PKG_CONFIG_LIBDIR" in
4106         (xno|xyes)
4107                 { echo "$as_me:4107: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4108 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4109                 ;;
4110         (*)
4111
4112 if test "x$prefix" != xNONE; then
4113         cf_path_syntax="$prefix"
4114 else
4115         cf_path_syntax="$ac_default_prefix"
4116 fi
4117
4118 case ".$PKG_CONFIG_LIBDIR" in
4119 (.\$\(*\)*|.\'*\'*)
4120         ;;
4121 (..|./*|.\\*)
4122         ;;
4123 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4124         ;;
4125 (.\${*prefix}*|.\${*dir}*)
4126         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4127         case ".$PKG_CONFIG_LIBDIR" in
4128         (.NONE/*)
4129                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4130                 ;;
4131         esac
4132         ;;
4133 (.no|.NONE/*)
4134         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4135         ;;
4136 (*)
4137         { { echo "$as_me:4137: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4138 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4139    { (exit 1); exit 1; }; }
4140         ;;
4141 esac
4142
4143                 ;;
4144         esac
4145 else
4146         MAKE_PC_FILES="#"
4147 fi
4148
4149 if test -z "$MAKE_PC_FILES"
4150 then
4151         echo "$as_me:4151: checking for suffix to add to pc-files" >&5
4152 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4153
4154 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4155 if test "${with_pc_suffix+set}" = set; then
4156   withval="$with_pc_suffix"
4157   case "x$withval" in
4158         (xyes|xno)
4159                 PC_MODULE_SUFFIX=
4160                 ;;
4161         (*)     PC_MODULE_SUFFIX="$withval"
4162                 ;;
4163         esac
4164 fi;
4165         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4166         echo "$as_me:4166: result: $PC_MODULE_SUFFIX" >&5
4167 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4168         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4169
4170 fi
4171
4172 echo "$as_me:4172: checking if we should assume mixed-case filenames" >&5
4173 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4174
4175 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4176 if test "${enable_mixed_case+set}" = set; then
4177   enableval="$enable_mixed_case"
4178   enable_mixedcase=$enableval
4179 else
4180   enable_mixedcase=auto
4181 fi;
4182 echo "$as_me:4182: result: $enable_mixedcase" >&5
4183 echo "${ECHO_T}$enable_mixedcase" >&6
4184 if test "$enable_mixedcase" = "auto" ; then
4185
4186 echo "$as_me:4186: checking if filesystem supports mixed-case filenames" >&5
4187 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4188 if test "${cf_cv_mixedcase+set}" = set; then
4189   echo $ECHO_N "(cached) $ECHO_C" >&6
4190 else
4191
4192 if test "$cross_compiling" = yes ; then
4193         case $target_alias in
4194         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4195                 cf_cv_mixedcase=no
4196                 ;;
4197         (*)
4198                 cf_cv_mixedcase=yes
4199                 ;;
4200         esac
4201 else
4202         rm -f conftest CONFTEST
4203         echo test >conftest
4204         if test -f CONFTEST ; then
4205                 cf_cv_mixedcase=no
4206         else
4207                 cf_cv_mixedcase=yes
4208         fi
4209         rm -f conftest CONFTEST
4210 fi
4211
4212 fi
4213 echo "$as_me:4213: result: $cf_cv_mixedcase" >&5
4214 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4215 test "$cf_cv_mixedcase" = yes &&
4216 cat >>confdefs.h <<\EOF
4217 #define MIXEDCASE_FILENAMES 1
4218 EOF
4219
4220 else
4221         cf_cv_mixedcase=$enable_mixedcase
4222         if test "x$enable_mixedcase" = "xyes" ; then
4223
4224 cat >>confdefs.h <<\EOF
4225 #define MIXEDCASE_FILENAMES 1
4226 EOF
4227
4228         fi
4229 fi
4230
4231 # do this after mixed-case option (tags/TAGS is not as important as tic).
4232 echo "$as_me:4232: checking whether ${MAKE-make} sets \${MAKE}" >&5
4233 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4234 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4235 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4236   echo $ECHO_N "(cached) $ECHO_C" >&6
4237 else
4238   cat >conftest.make <<\EOF
4239 all:
4240         @echo 'ac_maketemp="${MAKE}"'
4241 EOF
4242 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4243 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4244 if test -n "$ac_maketemp"; then
4245   eval ac_cv_prog_make_${ac_make}_set=yes
4246 else
4247   eval ac_cv_prog_make_${ac_make}_set=no
4248 fi
4249 rm -f conftest.make
4250 fi
4251 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4252   echo "$as_me:4252: result: yes" >&5
4253 echo "${ECHO_T}yes" >&6
4254   SET_MAKE=
4255 else
4256   echo "$as_me:4256: result: no" >&5
4257 echo "${ECHO_T}no" >&6
4258   SET_MAKE="MAKE=${MAKE-make}"
4259 fi
4260
4261 for ac_prog in exctags ctags
4262 do
4263   # Extract the first word of "$ac_prog", so it can be a program name with args.
4264 set dummy $ac_prog; ac_word=$2
4265 echo "$as_me:4265: checking for $ac_word" >&5
4266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4267 if test "${ac_cv_prog_CTAGS+set}" = set; then
4268   echo $ECHO_N "(cached) $ECHO_C" >&6
4269 else
4270   if test -n "$CTAGS"; then
4271   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4272 else
4273   ac_save_IFS=$IFS; IFS=$ac_path_separator
4274 ac_dummy="$PATH"
4275 for ac_dir in $ac_dummy; do
4276   IFS=$ac_save_IFS
4277   test -z "$ac_dir" && ac_dir=.
4278   $as_executable_p "$ac_dir/$ac_word" || continue
4279 ac_cv_prog_CTAGS="$ac_prog"
4280 echo "$as_me:4280: found $ac_dir/$ac_word" >&5
4281 break
4282 done
4283
4284 fi
4285 fi
4286 CTAGS=$ac_cv_prog_CTAGS
4287 if test -n "$CTAGS"; then
4288   echo "$as_me:4288: result: $CTAGS" >&5
4289 echo "${ECHO_T}$CTAGS" >&6
4290 else
4291   echo "$as_me:4291: result: no" >&5
4292 echo "${ECHO_T}no" >&6
4293 fi
4294
4295   test -n "$CTAGS" && break
4296 done
4297
4298 for ac_prog in exetags etags
4299 do
4300   # Extract the first word of "$ac_prog", so it can be a program name with args.
4301 set dummy $ac_prog; ac_word=$2
4302 echo "$as_me:4302: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_ETAGS+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$ETAGS"; then
4308   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4309 else
4310   ac_save_IFS=$IFS; IFS=$ac_path_separator
4311 ac_dummy="$PATH"
4312 for ac_dir in $ac_dummy; do
4313   IFS=$ac_save_IFS
4314   test -z "$ac_dir" && ac_dir=.
4315   $as_executable_p "$ac_dir/$ac_word" || continue
4316 ac_cv_prog_ETAGS="$ac_prog"
4317 echo "$as_me:4317: found $ac_dir/$ac_word" >&5
4318 break
4319 done
4320
4321 fi
4322 fi
4323 ETAGS=$ac_cv_prog_ETAGS
4324 if test -n "$ETAGS"; then
4325   echo "$as_me:4325: result: $ETAGS" >&5
4326 echo "${ECHO_T}$ETAGS" >&6
4327 else
4328   echo "$as_me:4328: result: no" >&5
4329 echo "${ECHO_T}no" >&6
4330 fi
4331
4332   test -n "$ETAGS" && break
4333 done
4334
4335 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4336 set dummy ${CTAGS:-ctags}; ac_word=$2
4337 echo "$as_me:4337: checking for $ac_word" >&5
4338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4339 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4340   echo $ECHO_N "(cached) $ECHO_C" >&6
4341 else
4342   if test -n "$MAKE_LOWER_TAGS"; then
4343   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4344 else
4345   ac_save_IFS=$IFS; IFS=$ac_path_separator
4346 ac_dummy="$PATH"
4347 for ac_dir in $ac_dummy; do
4348   IFS=$ac_save_IFS
4349   test -z "$ac_dir" && ac_dir=.
4350   $as_executable_p "$ac_dir/$ac_word" || continue
4351 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4352 echo "$as_me:4352: found $ac_dir/$ac_word" >&5
4353 break
4354 done
4355
4356   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4357 fi
4358 fi
4359 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4360 if test -n "$MAKE_LOWER_TAGS"; then
4361   echo "$as_me:4361: result: $MAKE_LOWER_TAGS" >&5
4362 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4363 else
4364   echo "$as_me:4364: result: no" >&5
4365 echo "${ECHO_T}no" >&6
4366 fi
4367
4368 if test "$cf_cv_mixedcase" = yes ; then
4369         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4370 set dummy ${ETAGS:-etags}; ac_word=$2
4371 echo "$as_me:4371: checking for $ac_word" >&5
4372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4373 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4374   echo $ECHO_N "(cached) $ECHO_C" >&6
4375 else
4376   if test -n "$MAKE_UPPER_TAGS"; then
4377   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4378 else
4379   ac_save_IFS=$IFS; IFS=$ac_path_separator
4380 ac_dummy="$PATH"
4381 for ac_dir in $ac_dummy; do
4382   IFS=$ac_save_IFS
4383   test -z "$ac_dir" && ac_dir=.
4384   $as_executable_p "$ac_dir/$ac_word" || continue
4385 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4386 echo "$as_me:4386: found $ac_dir/$ac_word" >&5
4387 break
4388 done
4389
4390   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4391 fi
4392 fi
4393 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4394 if test -n "$MAKE_UPPER_TAGS"; then
4395   echo "$as_me:4395: result: $MAKE_UPPER_TAGS" >&5
4396 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4397 else
4398   echo "$as_me:4398: result: no" >&5
4399 echo "${ECHO_T}no" >&6
4400 fi
4401
4402 else
4403         MAKE_UPPER_TAGS=no
4404 fi
4405
4406 if test "$MAKE_UPPER_TAGS" = yes ; then
4407         MAKE_UPPER_TAGS=
4408 else
4409         MAKE_UPPER_TAGS="#"
4410 fi
4411
4412 if test "$MAKE_LOWER_TAGS" = yes ; then
4413         MAKE_LOWER_TAGS=
4414 else
4415         MAKE_LOWER_TAGS="#"
4416 fi
4417
4418 echo "$as_me:4418: checking for makeflags variable" >&5
4419 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4420 if test "${cf_cv_makeflags+set}" = set; then
4421   echo $ECHO_N "(cached) $ECHO_C" >&6
4422 else
4423
4424         cf_cv_makeflags=''
4425         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4426         do
4427                 cat >cf_makeflags.tmp <<CF_EOF
4428 SHELL = $SHELL
4429 all :
4430         @ echo '.$cf_option'
4431 CF_EOF
4432                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4433                 case "$cf_result" in
4434                 (.*k|.*kw)
4435                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4436                         case "$cf_result" in
4437                         (.*CC=*)        cf_cv_makeflags=
4438                                 ;;
4439                         (*)     cf_cv_makeflags=$cf_option
4440                                 ;;
4441                         esac
4442                         break
4443                         ;;
4444                 (.-)
4445                         ;;
4446                 (*)
4447
4448 echo "${as_me:-configure}:4448: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4449
4450                         ;;
4451                 esac
4452         done
4453         rm -f cf_makeflags.tmp
4454
4455 fi
4456 echo "$as_me:4456: result: $cf_cv_makeflags" >&5
4457 echo "${ECHO_T}$cf_cv_makeflags" >&6
4458
4459 if test -n "$ac_tool_prefix"; then
4460   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4461 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4462 echo "$as_me:4462: checking for $ac_word" >&5
4463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4464 if test "${ac_cv_prog_RANLIB+set}" = set; then
4465   echo $ECHO_N "(cached) $ECHO_C" >&6
4466 else
4467   if test -n "$RANLIB"; then
4468   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4469 else
4470   ac_save_IFS=$IFS; IFS=$ac_path_separator
4471 ac_dummy="$PATH"
4472 for ac_dir in $ac_dummy; do
4473   IFS=$ac_save_IFS
4474   test -z "$ac_dir" && ac_dir=.
4475   $as_executable_p "$ac_dir/$ac_word" || continue
4476 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4477 echo "$as_me:4477: found $ac_dir/$ac_word" >&5
4478 break
4479 done
4480
4481 fi
4482 fi
4483 RANLIB=$ac_cv_prog_RANLIB
4484 if test -n "$RANLIB"; then
4485   echo "$as_me:4485: result: $RANLIB" >&5
4486 echo "${ECHO_T}$RANLIB" >&6
4487 else
4488   echo "$as_me:4488: result: no" >&5
4489 echo "${ECHO_T}no" >&6
4490 fi
4491
4492 fi
4493 if test -z "$ac_cv_prog_RANLIB"; then
4494   ac_ct_RANLIB=$RANLIB
4495   # Extract the first word of "ranlib", so it can be a program name with args.
4496 set dummy ranlib; ac_word=$2
4497 echo "$as_me:4497: checking for $ac_word" >&5
4498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4499 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4500   echo $ECHO_N "(cached) $ECHO_C" >&6
4501 else
4502   if test -n "$ac_ct_RANLIB"; then
4503   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4504 else
4505   ac_save_IFS=$IFS; IFS=$ac_path_separator
4506 ac_dummy="$PATH"
4507 for ac_dir in $ac_dummy; do
4508   IFS=$ac_save_IFS
4509   test -z "$ac_dir" && ac_dir=.
4510   $as_executable_p "$ac_dir/$ac_word" || continue
4511 ac_cv_prog_ac_ct_RANLIB="ranlib"
4512 echo "$as_me:4512: found $ac_dir/$ac_word" >&5
4513 break
4514 done
4515
4516   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4517 fi
4518 fi
4519 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4520 if test -n "$ac_ct_RANLIB"; then
4521   echo "$as_me:4521: result: $ac_ct_RANLIB" >&5
4522 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4523 else
4524   echo "$as_me:4524: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4526 fi
4527
4528   RANLIB=$ac_ct_RANLIB
4529 else
4530   RANLIB="$ac_cv_prog_RANLIB"
4531 fi
4532
4533 if test -n "$ac_tool_prefix"; then
4534   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4535 set dummy ${ac_tool_prefix}ld; ac_word=$2
4536 echo "$as_me:4536: checking for $ac_word" >&5
4537 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4538 if test "${ac_cv_prog_LD+set}" = set; then
4539   echo $ECHO_N "(cached) $ECHO_C" >&6
4540 else
4541   if test -n "$LD"; then
4542   ac_cv_prog_LD="$LD" # Let the user override the test.
4543 else
4544   ac_save_IFS=$IFS; IFS=$ac_path_separator
4545 ac_dummy="$PATH"
4546 for ac_dir in $ac_dummy; do
4547   IFS=$ac_save_IFS
4548   test -z "$ac_dir" && ac_dir=.
4549   $as_executable_p "$ac_dir/$ac_word" || continue
4550 ac_cv_prog_LD="${ac_tool_prefix}ld"
4551 echo "$as_me:4551: found $ac_dir/$ac_word" >&5
4552 break
4553 done
4554
4555 fi
4556 fi
4557 LD=$ac_cv_prog_LD
4558 if test -n "$LD"; then
4559   echo "$as_me:4559: result: $LD" >&5
4560 echo "${ECHO_T}$LD" >&6
4561 else
4562   echo "$as_me:4562: result: no" >&5
4563 echo "${ECHO_T}no" >&6
4564 fi
4565
4566 fi
4567 if test -z "$ac_cv_prog_LD"; then
4568   ac_ct_LD=$LD
4569   # Extract the first word of "ld", so it can be a program name with args.
4570 set dummy ld; ac_word=$2
4571 echo "$as_me:4571: checking for $ac_word" >&5
4572 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4573 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4574   echo $ECHO_N "(cached) $ECHO_C" >&6
4575 else
4576   if test -n "$ac_ct_LD"; then
4577   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4578 else
4579   ac_save_IFS=$IFS; IFS=$ac_path_separator
4580 ac_dummy="$PATH"
4581 for ac_dir in $ac_dummy; do
4582   IFS=$ac_save_IFS
4583   test -z "$ac_dir" && ac_dir=.
4584   $as_executable_p "$ac_dir/$ac_word" || continue
4585 ac_cv_prog_ac_ct_LD="ld"
4586 echo "$as_me:4586: found $ac_dir/$ac_word" >&5
4587 break
4588 done
4589
4590   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4591 fi
4592 fi
4593 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4594 if test -n "$ac_ct_LD"; then
4595   echo "$as_me:4595: result: $ac_ct_LD" >&5
4596 echo "${ECHO_T}$ac_ct_LD" >&6
4597 else
4598   echo "$as_me:4598: result: no" >&5
4599 echo "${ECHO_T}no" >&6
4600 fi
4601
4602   LD=$ac_ct_LD
4603 else
4604   LD="$ac_cv_prog_LD"
4605 fi
4606
4607 if test -n "$ac_tool_prefix"; then
4608   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4609 set dummy ${ac_tool_prefix}ar; ac_word=$2
4610 echo "$as_me:4610: checking for $ac_word" >&5
4611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4612 if test "${ac_cv_prog_AR+set}" = set; then
4613   echo $ECHO_N "(cached) $ECHO_C" >&6
4614 else
4615   if test -n "$AR"; then
4616   ac_cv_prog_AR="$AR" # Let the user override the test.
4617 else
4618   ac_save_IFS=$IFS; IFS=$ac_path_separator
4619 ac_dummy="$PATH"
4620 for ac_dir in $ac_dummy; do
4621   IFS=$ac_save_IFS
4622   test -z "$ac_dir" && ac_dir=.
4623   $as_executable_p "$ac_dir/$ac_word" || continue
4624 ac_cv_prog_AR="${ac_tool_prefix}ar"
4625 echo "$as_me:4625: found $ac_dir/$ac_word" >&5
4626 break
4627 done
4628
4629 fi
4630 fi
4631 AR=$ac_cv_prog_AR
4632 if test -n "$AR"; then
4633   echo "$as_me:4633: result: $AR" >&5
4634 echo "${ECHO_T}$AR" >&6
4635 else
4636   echo "$as_me:4636: result: no" >&5
4637 echo "${ECHO_T}no" >&6
4638 fi
4639
4640 fi
4641 if test -z "$ac_cv_prog_AR"; then
4642   ac_ct_AR=$AR
4643   # Extract the first word of "ar", so it can be a program name with args.
4644 set dummy ar; ac_word=$2
4645 echo "$as_me:4645: checking for $ac_word" >&5
4646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4647 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4648   echo $ECHO_N "(cached) $ECHO_C" >&6
4649 else
4650   if test -n "$ac_ct_AR"; then
4651   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4652 else
4653   ac_save_IFS=$IFS; IFS=$ac_path_separator
4654 ac_dummy="$PATH"
4655 for ac_dir in $ac_dummy; do
4656   IFS=$ac_save_IFS
4657   test -z "$ac_dir" && ac_dir=.
4658   $as_executable_p "$ac_dir/$ac_word" || continue
4659 ac_cv_prog_ac_ct_AR="ar"
4660 echo "$as_me:4660: found $ac_dir/$ac_word" >&5
4661 break
4662 done
4663
4664   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4665 fi
4666 fi
4667 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4668 if test -n "$ac_ct_AR"; then
4669   echo "$as_me:4669: result: $ac_ct_AR" >&5
4670 echo "${ECHO_T}$ac_ct_AR" >&6
4671 else
4672   echo "$as_me:4672: result: no" >&5
4673 echo "${ECHO_T}no" >&6
4674 fi
4675
4676   AR=$ac_ct_AR
4677 else
4678   AR="$ac_cv_prog_AR"
4679 fi
4680
4681 if test -n "$ac_tool_prefix"; then
4682   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4683 set dummy ${ac_tool_prefix}nm; ac_word=$2
4684 echo "$as_me:4684: checking for $ac_word" >&5
4685 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4686 if test "${ac_cv_prog_NM+set}" = set; then
4687   echo $ECHO_N "(cached) $ECHO_C" >&6
4688 else
4689   if test -n "$NM"; then
4690   ac_cv_prog_NM="$NM" # Let the user override the test.
4691 else
4692   ac_save_IFS=$IFS; IFS=$ac_path_separator
4693 ac_dummy="$PATH"
4694 for ac_dir in $ac_dummy; do
4695   IFS=$ac_save_IFS
4696   test -z "$ac_dir" && ac_dir=.
4697   $as_executable_p "$ac_dir/$ac_word" || continue
4698 ac_cv_prog_NM="${ac_tool_prefix}nm"
4699 echo "$as_me:4699: found $ac_dir/$ac_word" >&5
4700 break
4701 done
4702
4703 fi
4704 fi
4705 NM=$ac_cv_prog_NM
4706 if test -n "$NM"; then
4707   echo "$as_me:4707: result: $NM" >&5
4708 echo "${ECHO_T}$NM" >&6
4709 else
4710   echo "$as_me:4710: result: no" >&5
4711 echo "${ECHO_T}no" >&6
4712 fi
4713
4714 fi
4715 if test -z "$ac_cv_prog_NM"; then
4716   ac_ct_NM=$NM
4717   # Extract the first word of "nm", so it can be a program name with args.
4718 set dummy nm; ac_word=$2
4719 echo "$as_me:4719: checking for $ac_word" >&5
4720 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4721 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4722   echo $ECHO_N "(cached) $ECHO_C" >&6
4723 else
4724   if test -n "$ac_ct_NM"; then
4725   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4726 else
4727   ac_save_IFS=$IFS; IFS=$ac_path_separator
4728 ac_dummy="$PATH"
4729 for ac_dir in $ac_dummy; do
4730   IFS=$ac_save_IFS
4731   test -z "$ac_dir" && ac_dir=.
4732   $as_executable_p "$ac_dir/$ac_word" || continue
4733 ac_cv_prog_ac_ct_NM="nm"
4734 echo "$as_me:4734: found $ac_dir/$ac_word" >&5
4735 break
4736 done
4737
4738   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4739 fi
4740 fi
4741 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4742 if test -n "$ac_ct_NM"; then
4743   echo "$as_me:4743: result: $ac_ct_NM" >&5
4744 echo "${ECHO_T}$ac_ct_NM" >&6
4745 else
4746   echo "$as_me:4746: result: no" >&5
4747 echo "${ECHO_T}no" >&6
4748 fi
4749
4750   NM=$ac_ct_NM
4751 else
4752   NM="$ac_cv_prog_NM"
4753 fi
4754
4755 if test -n "$ac_tool_prefix"; then
4756   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4757 set dummy ${ac_tool_prefix}ar; ac_word=$2
4758 echo "$as_me:4758: checking for $ac_word" >&5
4759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4760 if test "${ac_cv_prog_AR+set}" = set; then
4761   echo $ECHO_N "(cached) $ECHO_C" >&6
4762 else
4763   if test -n "$AR"; then
4764   ac_cv_prog_AR="$AR" # Let the user override the test.
4765 else
4766   ac_save_IFS=$IFS; IFS=$ac_path_separator
4767 ac_dummy="$PATH"
4768 for ac_dir in $ac_dummy; do
4769   IFS=$ac_save_IFS
4770   test -z "$ac_dir" && ac_dir=.
4771   $as_executable_p "$ac_dir/$ac_word" || continue
4772 ac_cv_prog_AR="${ac_tool_prefix}ar"
4773 echo "$as_me:4773: found $ac_dir/$ac_word" >&5
4774 break
4775 done
4776
4777 fi
4778 fi
4779 AR=$ac_cv_prog_AR
4780 if test -n "$AR"; then
4781   echo "$as_me:4781: result: $AR" >&5
4782 echo "${ECHO_T}$AR" >&6
4783 else
4784   echo "$as_me:4784: result: no" >&5
4785 echo "${ECHO_T}no" >&6
4786 fi
4787
4788 fi
4789 if test -z "$ac_cv_prog_AR"; then
4790   ac_ct_AR=$AR
4791   # Extract the first word of "ar", so it can be a program name with args.
4792 set dummy ar; ac_word=$2
4793 echo "$as_me:4793: checking for $ac_word" >&5
4794 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4795 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4796   echo $ECHO_N "(cached) $ECHO_C" >&6
4797 else
4798   if test -n "$ac_ct_AR"; then
4799   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4800 else
4801   ac_save_IFS=$IFS; IFS=$ac_path_separator
4802 ac_dummy="$PATH"
4803 for ac_dir in $ac_dummy; do
4804   IFS=$ac_save_IFS
4805   test -z "$ac_dir" && ac_dir=.
4806   $as_executable_p "$ac_dir/$ac_word" || continue
4807 ac_cv_prog_ac_ct_AR="ar"
4808 echo "$as_me:4808: found $ac_dir/$ac_word" >&5
4809 break
4810 done
4811
4812   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4813 fi
4814 fi
4815 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4816 if test -n "$ac_ct_AR"; then
4817   echo "$as_me:4817: result: $ac_ct_AR" >&5
4818 echo "${ECHO_T}$ac_ct_AR" >&6
4819 else
4820   echo "$as_me:4820: result: no" >&5
4821 echo "${ECHO_T}no" >&6
4822 fi
4823
4824   AR=$ac_ct_AR
4825 else
4826   AR="$ac_cv_prog_AR"
4827 fi
4828
4829 echo "$as_me:4829: checking for options to update archives" >&5
4830 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4831 if test "${cf_cv_ar_flags+set}" = set; then
4832   echo $ECHO_N "(cached) $ECHO_C" >&6
4833 else
4834
4835         case $cf_cv_system_name in
4836         (*-msvc*)
4837                 cf_cv_ar_flags=''
4838                 cat >mk_static_lib.sh <<-EOF
4839                 #!$SHELL
4840                 MSVC_BIN="$AR"
4841                 out="\$1"
4842                 shift
4843                 exec \$MSVC_BIN -out:"\$out" \$@
4844                 EOF
4845                 chmod +x mk_static_lib.sh
4846                 AR=`pwd`/mk_static_lib.sh
4847                 ;;
4848         (*)
4849                 cf_cv_ar_flags=unknown
4850                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4851                 do
4852
4853                         # check if $ARFLAGS already contains this choice
4854                         if test "x$ARFLAGS" != "x" ; then
4855                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4856                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4857                                         cf_cv_ar_flags=
4858                                         break
4859                                 fi
4860                         fi
4861
4862                         rm -f conftest.$ac_cv_objext
4863                         rm -f conftest.a
4864
4865                         cat >conftest.$ac_ext <<EOF
4866 #line 4866 "configure"
4867 int     testdata[3] = { 123, 456, 789 };
4868 EOF
4869                         if { (eval echo "$as_me:4869: \"$ac_compile\"") >&5
4870   (eval $ac_compile) 2>&5
4871   ac_status=$?
4872   echo "$as_me:4872: \$? = $ac_status" >&5
4873   (exit $ac_status); } ; then
4874                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4875                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4876                                 if test -f conftest.a ; then
4877                                         cf_cv_ar_flags=$cf_ar_flags
4878                                         break
4879                                 fi
4880                         else
4881                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4882
4883 echo "${as_me:-configure}:4883: testing cannot compile test-program ..." 1>&5
4884
4885                                 break
4886                         fi
4887                 done
4888                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4889                 ;;
4890         esac
4891
4892 fi
4893 echo "$as_me:4893: result: $cf_cv_ar_flags" >&5
4894 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4895
4896 if test -n "$ARFLAGS" ; then
4897         if test -n "$cf_cv_ar_flags" ; then
4898                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4899         fi
4900 else
4901         ARFLAGS=$cf_cv_ar_flags
4902 fi
4903
4904 echo "$as_me:4904: checking if you have specified an install-prefix" >&5
4905 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4906
4907 # Check whether --with-install-prefix or --without-install-prefix was given.
4908 if test "${with_install_prefix+set}" = set; then
4909   withval="$with_install_prefix"
4910   case "x$withval" in
4911         (xyes|xno)
4912                 ;;
4913         (*)     DESTDIR="$withval"
4914                 ;;
4915         esac
4916 fi;
4917 echo "$as_me:4917: result: $DESTDIR" >&5
4918 echo "${ECHO_T}$DESTDIR" >&6
4919
4920 ###############################################################################
4921
4922 # If we're cross-compiling, allow the user to override the tools and their
4923 # options.  The configure script is oriented toward identifying the host
4924 # compiler, etc., but we need a build compiler to generate parts of the source.
4925
4926 case $cf_cv_system_name in
4927 (*-msvc*)
4928         LDFLAGS="$LDFLAGS user32.lib"
4929         export LDFLAGS
4930         ;;
4931 esac
4932
4933 if test "$cross_compiling" = yes ; then
4934
4935         # defaults that we might want to override
4936         : ${BUILD_CFLAGS:=''}
4937         : ${BUILD_CPPFLAGS:=''}
4938         : ${BUILD_LDFLAGS:=''}
4939         : ${BUILD_LIBS:=''}
4940         : ${BUILD_EXEEXT:='$x'}
4941         : ${BUILD_OBJEXT:='o'}
4942
4943 # Check whether --with-build-cc or --without-build-cc was given.
4944 if test "${with_build_cc+set}" = set; then
4945   withval="$with_build_cc"
4946   BUILD_CC="$withval"
4947 else
4948   for ac_prog in gcc clang c99 c89 cc cl
4949 do
4950   # Extract the first word of "$ac_prog", so it can be a program name with args.
4951 set dummy $ac_prog; ac_word=$2
4952 echo "$as_me:4952: checking for $ac_word" >&5
4953 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4954 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4955   echo $ECHO_N "(cached) $ECHO_C" >&6
4956 else
4957   if test -n "$BUILD_CC"; then
4958   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4959 else
4960   ac_save_IFS=$IFS; IFS=$ac_path_separator
4961 ac_dummy="$PATH"
4962 for ac_dir in $ac_dummy; do
4963   IFS=$ac_save_IFS
4964   test -z "$ac_dir" && ac_dir=.
4965   $as_executable_p "$ac_dir/$ac_word" || continue
4966 ac_cv_prog_BUILD_CC="$ac_prog"
4967 echo "$as_me:4967: found $ac_dir/$ac_word" >&5
4968 break
4969 done
4970
4971 fi
4972 fi
4973 BUILD_CC=$ac_cv_prog_BUILD_CC
4974 if test -n "$BUILD_CC"; then
4975   echo "$as_me:4975: result: $BUILD_CC" >&5
4976 echo "${ECHO_T}$BUILD_CC" >&6
4977 else
4978   echo "$as_me:4978: result: no" >&5
4979 echo "${ECHO_T}no" >&6
4980 fi
4981
4982   test -n "$BUILD_CC" && break
4983 done
4984 test -n "$BUILD_CC" || BUILD_CC="none"
4985
4986 fi;
4987         echo "$as_me:4987: checking for native build C compiler" >&5
4988 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4989         echo "$as_me:4989: result: $BUILD_CC" >&5
4990 echo "${ECHO_T}$BUILD_CC" >&6
4991
4992         echo "$as_me:4992: checking for native build C preprocessor" >&5
4993 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4994
4995 # Check whether --with-build-cpp or --without-build-cpp was given.
4996 if test "${with_build_cpp+set}" = set; then
4997   withval="$with_build_cpp"
4998   BUILD_CPP="$withval"
4999 else
5000   BUILD_CPP='${BUILD_CC} -E'
5001 fi;
5002         echo "$as_me:5002: result: $BUILD_CPP" >&5
5003 echo "${ECHO_T}$BUILD_CPP" >&6
5004
5005         echo "$as_me:5005: checking for native build C flags" >&5
5006 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5007
5008 # Check whether --with-build-cflags or --without-build-cflags was given.
5009 if test "${with_build_cflags+set}" = set; then
5010   withval="$with_build_cflags"
5011   BUILD_CFLAGS="$withval"
5012 fi;
5013         echo "$as_me:5013: result: $BUILD_CFLAGS" >&5
5014 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5015
5016         echo "$as_me:5016: checking for native build C preprocessor-flags" >&5
5017 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5018
5019 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5020 if test "${with_build_cppflags+set}" = set; then
5021   withval="$with_build_cppflags"
5022   BUILD_CPPFLAGS="$withval"
5023 fi;
5024         echo "$as_me:5024: result: $BUILD_CPPFLAGS" >&5
5025 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5026
5027         echo "$as_me:5027: checking for native build linker-flags" >&5
5028 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5029
5030 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5031 if test "${with_build_ldflags+set}" = set; then
5032   withval="$with_build_ldflags"
5033   BUILD_LDFLAGS="$withval"
5034 fi;
5035         echo "$as_me:5035: result: $BUILD_LDFLAGS" >&5
5036 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5037
5038         echo "$as_me:5038: checking for native build linker-libraries" >&5
5039 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5040
5041 # Check whether --with-build-libs or --without-build-libs was given.
5042 if test "${with_build_libs+set}" = set; then
5043   withval="$with_build_libs"
5044   BUILD_LIBS="$withval"
5045 fi;
5046         echo "$as_me:5046: result: $BUILD_LIBS" >&5
5047 echo "${ECHO_T}$BUILD_LIBS" >&6
5048
5049         # this assumes we're on Unix.
5050         BUILD_EXEEXT=
5051         BUILD_OBJEXT=o
5052
5053         : ${BUILD_CC:='${CC}'}
5054
5055         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
5056                 { { echo "$as_me:5056: error: Cross-build requires two compilers.
5057 Use --with-build-cc to specify the native compiler." >&5
5058 echo "$as_me: error: Cross-build requires two compilers.
5059 Use --with-build-cc to specify the native compiler." >&2;}
5060    { (exit 1); exit 1; }; }
5061         fi
5062
5063 else
5064         : ${BUILD_CC:='${CC}'}
5065         : ${BUILD_CPP:='${CPP}'}
5066         : ${BUILD_CFLAGS:='${CFLAGS}'}
5067         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5068         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5069         : ${BUILD_LIBS:='${LIBS}'}
5070         : ${BUILD_EXEEXT:='$x'}
5071         : ${BUILD_OBJEXT:='o'}
5072 fi
5073
5074 ###############################################################################
5075
5076 ### Options to allow the user to specify the set of libraries which are used.
5077 ### Use "--without-normal --with-shared" to allow the default model to be
5078 ### shared, for example.
5079 cf_list_models=""
5080
5081 echo "$as_me:5081: checking if libtool -version-number should be used" >&5
5082 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5083
5084 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5085 if test "${enable_libtool_version+set}" = set; then
5086   enableval="$enable_libtool_version"
5087   test "$enableval" != no && enableval=yes
5088         if test "$enableval" != "yes" ; then
5089     cf_libtool_version=no
5090         else
5091                 cf_libtool_version=yes
5092         fi
5093 else
5094   enableval=yes
5095         cf_libtool_version=yes
5096
5097 fi;
5098 echo "$as_me:5098: result: $cf_libtool_version" >&5
5099 echo "${ECHO_T}$cf_libtool_version" >&6
5100
5101 if test "$cf_libtool_version" = yes ; then
5102         LIBTOOL_VERSION="-version-number"
5103 else
5104         LIBTOOL_VERSION="-version-info"
5105         case "x$VERSION" in
5106         (x)
5107                 { echo "$as_me:5107: WARNING: VERSION was not set" >&5
5108 echo "$as_me: WARNING: VERSION was not set" >&2;}
5109                 ;;
5110         (x*.*.*)
5111                 ABI_VERSION="$VERSION"
5112                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5113
5114 echo "${as_me:-configure}:5114: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5115
5116                 ;;
5117         (x*:*:*)
5118                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5119                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5120
5121 echo "${as_me:-configure}:5121: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5122
5123                 ;;
5124         (*)
5125                 { echo "$as_me:5125: WARNING: unexpected VERSION value: $VERSION" >&5
5126 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5127                 ;;
5128         esac
5129 fi
5130
5131 LIBTOOL=
5132
5133 # common library maintenance symbols that are convenient for libtool scripts:
5134 LIB_CREATE='${AR} -cr'
5135 LIB_OBJECT='${OBJECTS}'
5136 LIB_SUFFIX=.a
5137 LIB_PREP="$RANLIB"
5138
5139 # symbols used to prop libtool up to enable it to determine what it should be
5140 # doing:
5141 LIB_CLEAN=
5142 LIB_COMPILE=
5143 LIB_LINK='${CC}'
5144 LIB_INSTALL=
5145 LIB_UNINSTALL=
5146
5147 echo "$as_me:5147: checking if you want to build libraries with libtool" >&5
5148 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5149
5150 # Check whether --with-libtool or --without-libtool was given.
5151 if test "${with_libtool+set}" = set; then
5152   withval="$with_libtool"
5153   with_libtool=$withval
5154 else
5155   with_libtool=no
5156 fi;
5157 echo "$as_me:5157: result: $with_libtool" >&5
5158 echo "${ECHO_T}$with_libtool" >&6
5159 if test "$with_libtool" != "no"; then
5160
5161         if test "$with_libtool" != "yes" ; then
5162
5163 if test "x$prefix" != xNONE; then
5164         cf_path_syntax="$prefix"
5165 else
5166         cf_path_syntax="$ac_default_prefix"
5167 fi
5168
5169 case ".$with_libtool" in
5170 (.\$\(*\)*|.\'*\'*)
5171         ;;
5172 (..|./*|.\\*)
5173         ;;
5174 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5175         ;;
5176 (.\${*prefix}*|.\${*dir}*)
5177         eval with_libtool="$with_libtool"
5178         case ".$with_libtool" in
5179         (.NONE/*)
5180                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5181                 ;;
5182         esac
5183         ;;
5184 (.no|.NONE/*)
5185         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5186         ;;
5187 (*)
5188         { { echo "$as_me:5188: error: expected a pathname, not \"$with_libtool\"" >&5
5189 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5190    { (exit 1); exit 1; }; }
5191         ;;
5192 esac
5193
5194                 LIBTOOL=$with_libtool
5195         else
5196                 if test -n "$ac_tool_prefix"; then
5197   for ac_prog in libtool glibtool
5198   do
5199     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5200 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5201 echo "$as_me:5201: checking for $ac_word" >&5
5202 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5203 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5204   echo $ECHO_N "(cached) $ECHO_C" >&6
5205 else
5206   if test -n "$LIBTOOL"; then
5207   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5208 else
5209   ac_save_IFS=$IFS; IFS=$ac_path_separator
5210 ac_dummy="$PATH"
5211 for ac_dir in $ac_dummy; do
5212   IFS=$ac_save_IFS
5213   test -z "$ac_dir" && ac_dir=.
5214   $as_executable_p "$ac_dir/$ac_word" || continue
5215 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5216 echo "$as_me:5216: found $ac_dir/$ac_word" >&5
5217 break
5218 done
5219
5220 fi
5221 fi
5222 LIBTOOL=$ac_cv_prog_LIBTOOL
5223 if test -n "$LIBTOOL"; then
5224   echo "$as_me:5224: result: $LIBTOOL" >&5
5225 echo "${ECHO_T}$LIBTOOL" >&6
5226 else
5227   echo "$as_me:5227: result: no" >&5
5228 echo "${ECHO_T}no" >&6
5229 fi
5230
5231     test -n "$LIBTOOL" && break
5232   done
5233 fi
5234 if test -z "$LIBTOOL"; then
5235   ac_ct_LIBTOOL=$LIBTOOL
5236   for ac_prog in libtool glibtool
5237 do
5238   # Extract the first word of "$ac_prog", so it can be a program name with args.
5239 set dummy $ac_prog; ac_word=$2
5240 echo "$as_me:5240: checking for $ac_word" >&5
5241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5242 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5243   echo $ECHO_N "(cached) $ECHO_C" >&6
5244 else
5245   if test -n "$ac_ct_LIBTOOL"; then
5246   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5247 else
5248   ac_save_IFS=$IFS; IFS=$ac_path_separator
5249 ac_dummy="$PATH"
5250 for ac_dir in $ac_dummy; do
5251   IFS=$ac_save_IFS
5252   test -z "$ac_dir" && ac_dir=.
5253   $as_executable_p "$ac_dir/$ac_word" || continue
5254 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5255 echo "$as_me:5255: found $ac_dir/$ac_word" >&5
5256 break
5257 done
5258
5259 fi
5260 fi
5261 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5262 if test -n "$ac_ct_LIBTOOL"; then
5263   echo "$as_me:5263: result: $ac_ct_LIBTOOL" >&5
5264 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5265 else
5266   echo "$as_me:5266: result: no" >&5
5267 echo "${ECHO_T}no" >&6
5268 fi
5269
5270   test -n "$ac_ct_LIBTOOL" && break
5271 done
5272 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5273
5274   LIBTOOL=$ac_ct_LIBTOOL
5275 fi
5276
5277 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5278 then
5279         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.].*//'`
5280 else
5281         cf_cv_libtool_version=
5282 fi
5283 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5284
5285                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5286                 then
5287
5288 unset ac_cv_prog_ac_ct_LIBTOOL
5289 unset ac_ct_LIBTOOL
5290 unset LIBTOOL
5291
5292                         if test -n "$ac_tool_prefix"; then
5293   for ac_prog in glibtool
5294   do
5295     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5296 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5297 echo "$as_me:5297: checking for $ac_word" >&5
5298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5299 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5300   echo $ECHO_N "(cached) $ECHO_C" >&6
5301 else
5302   if test -n "$LIBTOOL"; then
5303   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5304 else
5305   ac_save_IFS=$IFS; IFS=$ac_path_separator
5306 ac_dummy="$PATH"
5307 for ac_dir in $ac_dummy; do
5308   IFS=$ac_save_IFS
5309   test -z "$ac_dir" && ac_dir=.
5310   $as_executable_p "$ac_dir/$ac_word" || continue
5311 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5312 echo "$as_me:5312: found $ac_dir/$ac_word" >&5
5313 break
5314 done
5315
5316 fi
5317 fi
5318 LIBTOOL=$ac_cv_prog_LIBTOOL
5319 if test -n "$LIBTOOL"; then
5320   echo "$as_me:5320: result: $LIBTOOL" >&5
5321 echo "${ECHO_T}$LIBTOOL" >&6
5322 else
5323   echo "$as_me:5323: result: no" >&5
5324 echo "${ECHO_T}no" >&6
5325 fi
5326
5327     test -n "$LIBTOOL" && break
5328   done
5329 fi
5330 if test -z "$LIBTOOL"; then
5331   ac_ct_LIBTOOL=$LIBTOOL
5332   for ac_prog in glibtool
5333 do
5334   # Extract the first word of "$ac_prog", so it can be a program name with args.
5335 set dummy $ac_prog; ac_word=$2
5336 echo "$as_me:5336: checking for $ac_word" >&5
5337 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5338 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5339   echo $ECHO_N "(cached) $ECHO_C" >&6
5340 else
5341   if test -n "$ac_ct_LIBTOOL"; then
5342   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5343 else
5344   ac_save_IFS=$IFS; IFS=$ac_path_separator
5345 ac_dummy="$PATH"
5346 for ac_dir in $ac_dummy; do
5347   IFS=$ac_save_IFS
5348   test -z "$ac_dir" && ac_dir=.
5349   $as_executable_p "$ac_dir/$ac_word" || continue
5350 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5351 echo "$as_me:5351: found $ac_dir/$ac_word" >&5
5352 break
5353 done
5354
5355 fi
5356 fi
5357 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5358 if test -n "$ac_ct_LIBTOOL"; then
5359   echo "$as_me:5359: result: $ac_ct_LIBTOOL" >&5
5360 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5361 else
5362   echo "$as_me:5362: result: no" >&5
5363 echo "${ECHO_T}no" >&6
5364 fi
5365
5366   test -n "$ac_ct_LIBTOOL" && break
5367 done
5368 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5369
5370   LIBTOOL=$ac_ct_LIBTOOL
5371 fi
5372
5373 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5374 then
5375         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.].*//'`
5376 else
5377         cf_cv_libtool_version=
5378 fi
5379 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5380
5381                 fi
5382         fi
5383         if test -z "$LIBTOOL" ; then
5384                 { { echo "$as_me:5384: error: Cannot find libtool" >&5
5385 echo "$as_me: error: Cannot find libtool" >&2;}
5386    { (exit 1); exit 1; }; }
5387         fi
5388         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5389         LIB_OBJECT='${OBJECTS:.o=.lo}'
5390         LIB_SUFFIX=.la
5391         LIB_CLEAN='${LIBTOOL} --mode=clean'
5392         LIB_COMPILE='${LIBTOOL} --mode=compile'
5393         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5394         LIB_INSTALL='${LIBTOOL} --mode=install'
5395         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5396         LIB_PREP=:
5397
5398 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5399 then
5400         echo "$as_me:5400: checking version of $LIBTOOL" >&5
5401 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5402
5403 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5404 then
5405         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.].*//'`
5406 else
5407         cf_cv_libtool_version=
5408 fi
5409 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5410
5411         echo "$as_me:5411: result: $cf_cv_libtool_version" >&5
5412 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5413         if test -z "$cf_cv_libtool_version" ; then
5414                 { { echo "$as_me:5414: error: This is not GNU libtool" >&5
5415 echo "$as_me: error: This is not GNU libtool" >&2;}
5416    { (exit 1); exit 1; }; }
5417         fi
5418 else
5419         { { echo "$as_me:5419: error: GNU libtool has not been found" >&5
5420 echo "$as_me: error: GNU libtool has not been found" >&2;}
5421    { (exit 1); exit 1; }; }
5422 fi
5423
5424         # special hack to add -no-undefined (which libtool should do for itself)
5425         LT_UNDEF=
5426         case "$cf_cv_system_name" in
5427         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5428                 LT_UNDEF=-no-undefined
5429                 ;;
5430         esac
5431
5432         # special hack to add --tag option for C++ compiler
5433         case $cf_cv_libtool_version in
5434         (1.[5-9]*|[2-9].[0-9.a-z]*)
5435                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5436                 LIBTOOL="$LIBTOOL --tag=CC"
5437                 ;;
5438         (*)
5439                 LIBTOOL_CXX="$LIBTOOL"
5440                 ;;
5441         esac
5442 else
5443         LIBTOOL=""
5444         LIBTOOL_CXX=""
5445 fi
5446
5447 test -z "$LIBTOOL" && ECHO_LT=
5448
5449 if test "$with_libtool" != "no" ; then
5450
5451 cf_list_models="$cf_list_models libtool"
5452
5453 else
5454
5455 echo "$as_me:5455: checking if you want to build shared libraries" >&5
5456 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5457
5458 # Check whether --with-shared or --without-shared was given.
5459 if test "${with_shared+set}" = set; then
5460   withval="$with_shared"
5461   with_shared=$withval
5462 else
5463   with_shared=no
5464 fi;
5465 echo "$as_me:5465: result: $with_shared" >&5
5466 echo "${ECHO_T}$with_shared" >&6
5467 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5468
5469 echo "$as_me:5469: checking if you want to build static libraries" >&5
5470 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5471
5472 # Check whether --with-normal or --without-normal was given.
5473 if test "${with_normal+set}" = set; then
5474   withval="$with_normal"
5475   with_normal=$withval
5476 else
5477   with_normal=yes
5478 fi;
5479 echo "$as_me:5479: result: $with_normal" >&5
5480 echo "${ECHO_T}$with_normal" >&6
5481 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5482
5483 echo "$as_me:5483: checking if you want to build debug libraries" >&5
5484 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5485
5486 # Check whether --with-debug or --without-debug was given.
5487 if test "${with_debug+set}" = set; then
5488   withval="$with_debug"
5489   with_debug=$withval
5490 else
5491   with_debug=yes
5492 fi;
5493 echo "$as_me:5493: result: $with_debug" >&5
5494 echo "${ECHO_T}$with_debug" >&6
5495 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5496
5497 echo "$as_me:5497: checking if you want to build profiling libraries" >&5
5498 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5499
5500 # Check whether --with-profile or --without-profile was given.
5501 if test "${with_profile+set}" = set; then
5502   withval="$with_profile"
5503   with_profile=$withval
5504 else
5505   with_profile=no
5506 fi;
5507 echo "$as_me:5507: result: $with_profile" >&5
5508 echo "${ECHO_T}$with_profile" >&6
5509 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5510
5511 fi
5512
5513 if test "X$cf_with_cxx_binding" != Xno; then
5514 if test "x$with_shared" = "xyes"; then
5515 echo "$as_me:5515: checking if you want to build C++ shared libraries" >&5
5516 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5517
5518 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5519 if test "${with_cxx_shared+set}" = set; then
5520   withval="$with_cxx_shared"
5521   with_shared_cxx=$withval
5522 else
5523   with_shared_cxx=no
5524 fi;
5525 echo "$as_me:5525: result: $with_shared_cxx" >&5
5526 echo "${ECHO_T}$with_shared_cxx" >&6
5527 fi
5528 fi
5529
5530 ###############################################################################
5531
5532 echo "$as_me:5532: checking for specified models" >&5
5533 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5534 test -z "$cf_list_models" && cf_list_models=normal
5535 test "$with_libtool" != "no" && cf_list_models=libtool
5536 echo "$as_me:5536: result: $cf_list_models" >&5
5537 echo "${ECHO_T}$cf_list_models" >&6
5538
5539 ### Use the first model as the default, and save its suffix for use in building
5540 ### up test-applications.
5541 echo "$as_me:5541: checking for default model" >&5
5542 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5543 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5544 echo "$as_me:5544: result: $DFT_LWR_MODEL" >&5
5545 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5546
5547 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5548
5549 TICS_NAME=tic
5550
5551 TINFO_NAME=tinfo
5552
5553 LIB_NAME=ncurses
5554
5555 LIB_DIR=../lib
5556 LIB_2ND=../../lib
5557
5558 echo "$as_me:5558: checking if you want to have a library-prefix" >&5
5559 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5560
5561 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5562 if test "${with_lib_prefix+set}" = set; then
5563   withval="$with_lib_prefix"
5564   with_lib_prefix=$withval
5565 else
5566   with_lib_prefix=auto
5567 fi;
5568 echo "$as_me:5568: result: $with_lib_prefix" >&5
5569 echo "${ECHO_T}$with_lib_prefix" >&6
5570
5571 if test $with_lib_prefix = auto
5572 then
5573
5574         case $cf_cv_system_name in
5575         (OS/2*|os2*)
5576                 if test "$DFT_LWR_MODEL" = libtool; then
5577                         LIB_PREFIX='lib'
5578                 else
5579                         LIB_PREFIX=''
5580                 fi
5581                 ;;
5582         (*-msvc*)
5583                 LIB_PREFIX=''
5584                 ;;
5585         (*)     LIB_PREFIX='lib'
5586                 ;;
5587         esac
5588 cf_prefix=$LIB_PREFIX
5589
5590 elif test $with_lib_prefix = no
5591 then
5592         LIB_PREFIX=
5593 else
5594         LIB_PREFIX=$with_lib_prefix
5595 fi
5596
5597 LIB_SUFFIX=
5598
5599         echo "$as_me:5599: checking for PATH separator" >&5
5600 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5601         case $cf_cv_system_name in
5602         (os2*)  PATH_SEPARATOR=';'  ;;
5603         (*)     ${PATH_SEPARATOR:=':'}  ;;
5604         esac
5605
5606         echo "$as_me:5606: result: $PATH_SEPARATOR" >&5
5607 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5608
5609 ###############################################################################
5610
5611 echo "$as_me:5611: checking if you want to build a separate terminfo library" >&5
5612 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5613
5614 # Check whether --with-termlib or --without-termlib was given.
5615 if test "${with_termlib+set}" = set; then
5616   withval="$with_termlib"
5617   with_termlib=$withval
5618 else
5619   with_termlib=no
5620 fi;
5621 echo "$as_me:5621: result: $with_termlib" >&5
5622 echo "${ECHO_T}$with_termlib" >&6
5623
5624 echo "$as_me:5624: checking if you want to build a separate tic library" >&5
5625 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5626
5627 # Check whether --with-ticlib or --without-ticlib was given.
5628 if test "${with_ticlib+set}" = set; then
5629   withval="$with_ticlib"
5630   with_ticlib=$withval
5631 else
5632   with_ticlib=no
5633 fi;
5634 echo "$as_me:5634: result: $with_ticlib" >&5
5635 echo "${ECHO_T}$with_ticlib" >&6
5636
5637 if test X"$CC_G_OPT" = X"" ; then
5638         CC_G_OPT='-g'
5639         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5640 fi
5641
5642 if test X"$CXX_G_OPT" = X"" ; then
5643         CXX_G_OPT='-g'
5644         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5645 fi
5646
5647 echo "$as_me:5647: checking for default loader flags" >&5
5648 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5649 case $DFT_LWR_MODEL in
5650 (libtool) LD_MODEL=''   ;;
5651 (normal)  LD_MODEL=''   ;;
5652 (debug)   LD_MODEL=$CC_G_OPT ;;
5653 (profile) LD_MODEL='-pg';;
5654 (shared)  LD_MODEL=''   ;;
5655 esac
5656 echo "$as_me:5656: result: $LD_MODEL" >&5
5657 echo "${ECHO_T}$LD_MODEL" >&6
5658
5659 case $DFT_LWR_MODEL in
5660 (shared)
5661
5662 echo "$as_me:5662: checking if rpath option should be used" >&5
5663 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5664
5665 # Check whether --enable-rpath or --disable-rpath was given.
5666 if test "${enable_rpath+set}" = set; then
5667   enableval="$enable_rpath"
5668   cf_cv_enable_rpath=$enableval
5669 else
5670   cf_cv_enable_rpath=no
5671 fi;
5672 echo "$as_me:5672: result: $cf_cv_enable_rpath" >&5
5673 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5674
5675 echo "$as_me:5675: checking if shared libraries should be relinked during install" >&5
5676 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5677
5678 # Check whether --enable-relink or --disable-relink was given.
5679 if test "${enable_relink+set}" = set; then
5680   enableval="$enable_relink"
5681   cf_cv_do_relink=$enableval
5682 else
5683   cf_cv_do_relink=yes
5684 fi;
5685 echo "$as_me:5685: result: $cf_cv_do_relink" >&5
5686 echo "${ECHO_T}$cf_cv_do_relink" >&6
5687         ;;
5688 esac
5689
5690 # we will build libraries one-level down.
5691 rel_builddir=..
5692
5693 LD_RPATH_OPT=
5694 if test "x$cf_cv_enable_rpath" != xno
5695 then
5696         echo "$as_me:5696: checking for an rpath option" >&5
5697 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5698         case $cf_cv_system_name in
5699         (irix*)
5700                 if test "$GCC" = yes; then
5701                         LD_RPATH_OPT="-Wl,-rpath,"
5702                 else
5703                         LD_RPATH_OPT="-rpath "
5704                 fi
5705                 ;;
5706         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5707                 LD_RPATH_OPT="-Wl,-rpath,"
5708                 ;;
5709         (openbsd[2-9].*|mirbsd*)
5710                 LD_RPATH_OPT="-Wl,-rpath,"
5711                 ;;
5712         (dragonfly*)
5713                 LD_RPATH_OPT="-rpath "
5714                 ;;
5715         (netbsd*)
5716                 LD_RPATH_OPT="-Wl,-rpath,"
5717                 ;;
5718         (osf*|mls+*)
5719                 LD_RPATH_OPT="-rpath "
5720                 ;;
5721         (solaris2*)
5722                 LD_RPATH_OPT="-R"
5723                 ;;
5724         (*)
5725                 ;;
5726         esac
5727         echo "$as_me:5727: result: $LD_RPATH_OPT" >&5
5728 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5729
5730         case "x$LD_RPATH_OPT" in
5731         (x-R*)
5732                 echo "$as_me:5732: checking if we need a space after rpath option" >&5
5733 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5734                 cf_save_LIBS="$LIBS"
5735
5736 cf_add_libs="$LIBS"
5737 # reverse order
5738 cf_add_0lib=
5739 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5740 # filter duplicates
5741 for cf_add_1lib in $cf_add_0lib; do
5742         for cf_add_2lib in $cf_add_libs; do
5743                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5744                         cf_add_1lib=
5745                         break
5746                 fi
5747         done
5748         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5749 done
5750 LIBS="$cf_add_libs"
5751
5752                 cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755
5756 int
5757 main (void)
5758 {
5759
5760   ;
5761   return 0;
5762 }
5763 _ACEOF
5764 rm -f conftest.$ac_objext conftest$ac_exeext
5765 if { (eval echo "$as_me:5765: \"$ac_link\"") >&5
5766   (eval $ac_link) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); } &&
5770          { ac_try='test -s conftest$ac_exeext'
5771   { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); }; }; then
5776   cf_rpath_space=no
5777 else
5778   echo "$as_me: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 cf_rpath_space=yes
5781 fi
5782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5783                 LIBS="$cf_save_LIBS"
5784                 echo "$as_me:5784: result: $cf_rpath_space" >&5
5785 echo "${ECHO_T}$cf_rpath_space" >&6
5786                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5787                 ;;
5788         esac
5789 fi
5790
5791         RM_SHARED_OPTS=
5792         LOCAL_LDFLAGS=
5793         LOCAL_LDFLAGS2=
5794         LD_SHARED_OPTS=
5795         INSTALL_LIB="-m 644"
5796         : ${rel_builddir:=.}
5797
5798         shlibdir=$libdir
5799
5800         MAKE_DLLS="#"
5801
5802         cf_cv_do_symlinks=no
5803         cf_ld_rpath_opt=
5804         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5805
5806         echo "$as_me:5806: checking if release/abi version should be used for shared libs" >&5
5807 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5808
5809 # Check whether --with-shlib-version or --without-shlib-version was given.
5810 if test "${with_shlib_version+set}" = set; then
5811   withval="$with_shlib_version"
5812   test -z "$withval" && withval=auto
5813         case $withval in
5814         (yes)
5815                 cf_cv_shlib_version=auto
5816                 ;;
5817         (rel|abi|auto)
5818                 cf_cv_shlib_version=$withval
5819                 ;;
5820         (*)
5821                 echo "$as_me:5821: result: $withval" >&5
5822 echo "${ECHO_T}$withval" >&6
5823                 { { echo "$as_me:5823: error: option value must be one of: rel, abi, or auto" >&5
5824 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5825    { (exit 1); exit 1; }; }
5826                 ;;
5827         esac
5828
5829 else
5830   cf_cv_shlib_version=auto
5831 fi;
5832         echo "$as_me:5832: result: $cf_cv_shlib_version" >&5
5833 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5834
5835         cf_cv_rm_so_locs=no
5836         cf_try_cflags=
5837
5838         # Some less-capable ports of gcc support only -fpic
5839         CC_SHARED_OPTS=
5840
5841         cf_try_fPIC=no
5842         if test "$GCC" = yes
5843         then
5844                 cf_try_fPIC=yes
5845         else
5846                 case $cf_cv_system_name in
5847                 (*linux*)       # e.g., PGI compiler
5848                         cf_try_fPIC=yes
5849                         ;;
5850                 esac
5851         fi
5852
5853         if test "$cf_try_fPIC" = yes
5854         then
5855                 echo "$as_me:5855: checking which $CC option to use" >&5
5856 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5857                 cf_save_CFLAGS="$CFLAGS"
5858                 for CC_SHARED_OPTS in -fPIC -fpic ''
5859                 do
5860                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5861                         cat >conftest.$ac_ext <<_ACEOF
5862 #line 5862 "configure"
5863 #include "confdefs.h"
5864 #include <stdio.h>
5865 int
5866 main (void)
5867 {
5868 int x = 1
5869   ;
5870   return 0;
5871 }
5872 _ACEOF
5873 rm -f conftest.$ac_objext
5874 if { (eval echo "$as_me:5874: \"$ac_compile\"") >&5
5875   (eval $ac_compile) 2>&5
5876   ac_status=$?
5877   echo "$as_me:5877: \$? = $ac_status" >&5
5878   (exit $ac_status); } &&
5879          { ac_try='test -s conftest.$ac_objext'
5880   { (eval echo "$as_me:5880: \"$ac_try\"") >&5
5881   (eval $ac_try) 2>&5
5882   ac_status=$?
5883   echo "$as_me:5883: \$? = $ac_status" >&5
5884   (exit $ac_status); }; }; then
5885   break
5886 else
5887   echo "$as_me: failed program was:" >&5
5888 cat conftest.$ac_ext >&5
5889 fi
5890 rm -f conftest.$ac_objext conftest.$ac_ext
5891                 done
5892                 echo "$as_me:5892: result: $CC_SHARED_OPTS" >&5
5893 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5894                 CFLAGS="$cf_save_CFLAGS"
5895         fi
5896
5897         cf_cv_shlib_version_infix=no
5898
5899         case $cf_cv_system_name in
5900         (aix4.3-9*|aix[5-7]*)
5901                 if test "$GCC" = yes; then
5902                         CC_SHARED_OPTS='-Wl,-brtl'
5903                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5904                 else
5905                         CC_SHARED_OPTS='-brtl'
5906                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5907                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5908                 fi
5909                 ;;
5910         (beos*)
5911                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5912                 ;;
5913         (cygwin*)
5914                 CC_SHARED_OPTS=
5915                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5916                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5917                 cf_cv_shlib_version=cygdll
5918                 cf_cv_shlib_version_infix=cygdll
5919                 shlibdir=$bindir
5920                 MAKE_DLLS=
5921                 cat >mk_shared_lib.sh <<-CF_EOF
5922                 #!$SHELL
5923                 SHARED_LIB=\$1
5924                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5925                 shift
5926                 cat <<-EOF
5927                 Linking shared library
5928                 ** SHARED_LIB \$SHARED_LIB
5929                 ** IMPORT_LIB \$IMPORT_LIB
5930 EOF
5931                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5932 CF_EOF
5933                 chmod +x mk_shared_lib.sh
5934                 ;;
5935         (msys*)
5936                 CC_SHARED_OPTS=
5937                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5938                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5939                 cf_cv_shlib_version=msysdll
5940                 cf_cv_shlib_version_infix=msysdll
5941                 shlibdir=$bindir
5942                 MAKE_DLLS=
5943                 cat >mk_shared_lib.sh <<-CF_EOF
5944                 #!$SHELL
5945                 SHARED_LIB=\$1
5946                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5947                 shift
5948                 cat <<-EOF
5949                 Linking shared library
5950                 ** SHARED_LIB \$SHARED_LIB
5951                 ** IMPORT_LIB \$IMPORT_LIB
5952 EOF
5953                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5954 CF_EOF
5955                 chmod +x mk_shared_lib.sh
5956                 ;;
5957         (darwin*)
5958                 cf_try_cflags="no-cpp-precomp"
5959                 CC_SHARED_OPTS="-dynamic"
5960                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5961                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5962                 cf_cv_shlib_version_infix=yes
5963                 echo "$as_me:5963: checking if ld -search_paths_first works" >&5
5964 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5965 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5966   echo $ECHO_N "(cached) $ECHO_C" >&6
5967 else
5968
5969                         cf_save_LDFLAGS=$LDFLAGS
5970                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5971                         cat >conftest.$ac_ext <<_ACEOF
5972 #line 5972 "configure"
5973 #include "confdefs.h"
5974
5975 int
5976 main (void)
5977 {
5978 int i;
5979   ;
5980   return 0;
5981 }
5982 _ACEOF
5983 rm -f conftest.$ac_objext conftest$ac_exeext
5984 if { (eval echo "$as_me:5984: \"$ac_link\"") >&5
5985   (eval $ac_link) 2>&5
5986   ac_status=$?
5987   echo "$as_me:5987: \$? = $ac_status" >&5
5988   (exit $ac_status); } &&
5989          { ac_try='test -s conftest$ac_exeext'
5990   { (eval echo "$as_me:5990: \"$ac_try\"") >&5
5991   (eval $ac_try) 2>&5
5992   ac_status=$?
5993   echo "$as_me:5993: \$? = $ac_status" >&5
5994   (exit $ac_status); }; }; then
5995   cf_cv_ldflags_search_paths_first=yes
5996 else
5997   echo "$as_me: failed program was:" >&5
5998 cat conftest.$ac_ext >&5
5999 cf_cv_ldflags_search_paths_first=no
6000 fi
6001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6002                                 LDFLAGS=$cf_save_LDFLAGS
6003 fi
6004 echo "$as_me:6004: result: $cf_cv_ldflags_search_paths_first" >&5
6005 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6006                 if test $cf_cv_ldflags_search_paths_first = yes; then
6007                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6008                 fi
6009                 ;;
6010         (hpux[7-8]*)
6011                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6012                 if test "$GCC" != yes; then
6013                         CC_SHARED_OPTS='+Z'
6014                 fi
6015                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6016                 INSTALL_LIB="-m 555"
6017                 ;;
6018         (hpux*)
6019                 # (tested with gcc 2.7.2 -- I don't have c89)
6020                 if test "$GCC" = yes; then
6021                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6022                 else
6023                         CC_SHARED_OPTS='+Z'
6024                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6025                 fi
6026                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6027                 # HP-UX shared libraries must be executable, and should be
6028                 # readonly to exploit a quirk in the memory manager.
6029                 INSTALL_LIB="-m 555"
6030                 ;;
6031         (interix*)
6032                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6033                 if test "$cf_cv_shlib_version" = rel; then
6034                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6035                 else
6036                         cf_shared_soname='`basename $@`'
6037                 fi
6038                 CC_SHARED_OPTS=
6039                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6040                 ;;
6041         (irix*)
6042                 if test "$cf_cv_enable_rpath" = yes ; then
6043                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6044                 fi
6045                 # tested with IRIX 5.2 and 'cc'.
6046                 if test "$GCC" != yes; then
6047                         CC_SHARED_OPTS='-KPIC'
6048                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6049                 else
6050                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6051                 fi
6052                 cf_cv_rm_so_locs=yes
6053                 ;;
6054         (linux*|gnu*|k*bsd*-gnu)
6055                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6056                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6057                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6058                 fi
6059                 if test "$cf_cv_enable_rpath" = yes ; then
6060                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6061                 fi
6062
6063         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6064         if test "$cf_cv_shlib_version" = rel; then
6065                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6066         else
6067                 cf_cv_shared_soname='`basename $@`'
6068         fi
6069
6070                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6071                 ;;
6072         (mingw*msvc*)
6073                 cf_cv_shlib_version=msvcdll
6074                 cf_cv_shlib_version_infix=msvcdll
6075                 shlibdir=$bindir
6076                 MAKE_DLLS=
6077                 if test "$DFT_LWR_MODEL" = "shared" ; then
6078                         LOCAL_LDFLAGS="-link -dll"
6079                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6080                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6081                 fi
6082                 CC_SHARED_OPTS=
6083                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6084                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6085                 cat >mk_shared_lib.sh <<-CF_EOF
6086                 #!$SHELL
6087                 SHARED_LIB=\$1
6088                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6089                 shift
6090                 my_ld=\$1
6091                 shift
6092                 cat <<-EOF
6093                 Linking shared library
6094                 ** SHARED LIB \$SHARED_LIB
6095                 ** IMPORT_LIB \$IMPORT_LIB
6096 EOF
6097                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6098                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6099                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6100 CF_EOF
6101                 chmod +x mk_shared_lib.sh
6102                 cat >mk_prog.sh <<-CF_EOF
6103                 #!$SHELL
6104                 shift
6105                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6106                 LD="$LD"
6107                 clopts=()
6108                 ldopts=("/subsystem:console")
6109                 libs=()
6110                 isdll=0
6111                 while test \$# -gt 0; do
6112                         case "\$1" in
6113                                 -link)
6114                                         # ignore -link argument
6115                                         ;;
6116                                 -M[TD] | -M[TD]d)
6117                                         # ignore runtime-library option
6118                                         ;;
6119                                 -dll)
6120                                         isdll=1
6121                                         ;;
6122                                 -W* | -w*)
6123                                         # ignore warnings
6124                                         ;;
6125                                 -D*)
6126                                         clopts+=("\$1")
6127                                         ;;
6128                                 -I*)
6129                                         clopts+=("\$1")
6130                                         ;;
6131                                 -l*)
6132                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6133                                         ;;
6134                                 -L*)
6135                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6136                                         ;;
6137                                 *.obj | *.o)
6138                                         ldopts+=("\$1")
6139                                         ;;
6140                                 -Wl,*)
6141                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6142                                                 ldopts+=("\${linkarg}")
6143                                         done
6144                                         ;;
6145                                 *.lib)
6146                                         ldopts+=("\$1")
6147                                         ;;
6148                                 -o)
6149                                         shift
6150                                         ldopts+=("-out:\$1")
6151                                         ;;
6152                                 *)
6153                                         clopts+=("\$1")
6154                                         ldopts+=("\$1")
6155                                         ;;
6156                         esac
6157                         shift
6158                 done
6159                 if [ "\$isdll" -ne 0 ]; then
6160                         for lib in \${libs[*]}; do
6161                                 ldopts+=("\$lib.dll.lib")
6162                         done
6163                 else
6164                         for lib in \${libs[*]}; do
6165                                 ldopts+=("\$lib.lib")
6166                         done
6167                 fi
6168                 cat <<-EOF
6169                 Creating program
6170                 ** ld options:   "\${ldopts[@]}"
6171 EOF
6172                 exec \$LD \${ldopts[@]}
6173 CF_EOF
6174                 chmod +x mk_prog.sh
6175                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6176                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6177                 ;;
6178         (mingw*)
6179                 cf_cv_shlib_version=mingw
6180                 cf_cv_shlib_version_infix=mingw
6181                 shlibdir=$bindir
6182                 MAKE_DLLS=
6183                 if test "$DFT_LWR_MODEL" = "shared" ; then
6184                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6185                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6186                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6187                 fi
6188                 CC_SHARED_OPTS=
6189                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6190                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6191                 cat >mk_shared_lib.sh <<-CF_EOF
6192                 #!$SHELL
6193                 SHARED_LIB=\$1
6194                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6195                 shift
6196                 cat <<-EOF
6197                 Linking shared library
6198                 ** SHARED_LIB \$SHARED_LIB
6199                 ** IMPORT_LIB \$IMPORT_LIB
6200 EOF
6201                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6202 CF_EOF
6203                 chmod +x mk_shared_lib.sh
6204                 ;;
6205         (openbsd[2-9].*|mirbsd*)
6206                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6207                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6208                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6209                 fi
6210                 if test "$cf_cv_enable_rpath" = yes ; then
6211                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6212                 fi
6213                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6214
6215         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6216         if test "$cf_cv_shlib_version" = rel; then
6217                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6218         else
6219                 cf_cv_shared_soname='`basename $@`'
6220         fi
6221
6222                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6223                 ;;
6224         (nskJ*)
6225                 CC_SHARED_OPTS=
6226                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6227                 ;;
6228         (nskL*)
6229                 CC_SHARED_OPTS=
6230                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6231                 ;;
6232         (nto-qnx*|openbsd*|freebsd[12].*)
6233                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6234                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6235                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6236                 ;;
6237         (dragonfly*|freebsd*)
6238                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6239                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6240                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6241                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6242                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6243                 fi
6244
6245         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6246         if test "$cf_cv_shlib_version" = rel; then
6247                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6248         else
6249                 cf_cv_shared_soname='`basename $@`'
6250         fi
6251
6252                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6253                 ;;
6254         (netbsd*)
6255                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6256                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6257                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6258                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6259                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6260                         if test "$cf_cv_shlib_version" = auto; then
6261                         if test -f /usr/libexec/ld.elf_so; then
6262                                 cf_cv_shlib_version=abi
6263                         else
6264                                 cf_cv_shlib_version=rel
6265                         fi
6266                         fi
6267
6268         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6269         if test "$cf_cv_shlib_version" = rel; then
6270                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6271         else
6272                 cf_cv_shared_soname='`basename $@`'
6273         fi
6274
6275                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6276                 else
6277                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6278                 fi
6279                 ;;
6280         (osf*|mls+*)
6281                 # tested with OSF/1 V3.2 and 'cc'
6282                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6283                 # link with shared libs).
6284                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6285                 case $host_os in
6286                 (osf4*)
6287                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6288                         ;;
6289                 esac
6290                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6291                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6292                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6293                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6294                 fi
6295                 cf_cv_rm_so_locs=yes
6296                 ;;
6297         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6298                 # tested with osr5.0.5
6299                 if test "$GCC" != yes; then
6300                         CC_SHARED_OPTS='-belf -KPIC'
6301                 fi
6302                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6303                 if test "$cf_cv_enable_rpath" = yes ; then
6304                         # only way is to set LD_RUN_PATH but no switch for it
6305                         RUN_PATH=$libdir
6306                 fi
6307                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6308                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6309                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6310                 ;;
6311         (sunos4*)
6312                 # tested with SunOS 4.1.1 and gcc 2.7.0
6313                 if test "$GCC" != yes; then
6314                         CC_SHARED_OPTS='-KPIC'
6315                 fi
6316                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6317                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6318                 ;;
6319         (solaris2*)
6320                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6321                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6322                 if test "$DFT_LWR_MODEL" = "shared" ; then
6323                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6324                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6325                 fi
6326                 if test "$cf_cv_enable_rpath" = yes ; then
6327                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6328                 fi
6329
6330         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6331         if test "$cf_cv_shlib_version" = rel; then
6332                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6333         else
6334                 cf_cv_shared_soname='`basename $@`'
6335         fi
6336
6337                 if test "$GCC" != yes; then
6338                         cf_save_CFLAGS="$CFLAGS"
6339                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6340                         do
6341                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6342                                 cat >conftest.$ac_ext <<_ACEOF
6343 #line 6343 "configure"
6344 #include "confdefs.h"
6345 #include <stdio.h>
6346 int
6347 main (void)
6348 {
6349 printf("Hello\n");
6350   ;
6351   return 0;
6352 }
6353 _ACEOF
6354 rm -f conftest.$ac_objext
6355 if { (eval echo "$as_me:6355: \"$ac_compile\"") >&5
6356   (eval $ac_compile) 2>&5
6357   ac_status=$?
6358   echo "$as_me:6358: \$? = $ac_status" >&5
6359   (exit $ac_status); } &&
6360          { ac_try='test -s conftest.$ac_objext'
6361   { (eval echo "$as_me:6361: \"$ac_try\"") >&5
6362   (eval $ac_try) 2>&5
6363   ac_status=$?
6364   echo "$as_me:6364: \$? = $ac_status" >&5
6365   (exit $ac_status); }; }; then
6366   break
6367 else
6368   echo "$as_me: failed program was:" >&5
6369 cat conftest.$ac_ext >&5
6370 fi
6371 rm -f conftest.$ac_objext conftest.$ac_ext
6372                         done
6373                         CFLAGS="$cf_save_CFLAGS"
6374                         CC_SHARED_OPTS=$cf_shared_opts
6375                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6376                 else
6377                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6378                 fi
6379                 ;;
6380         (sysv5uw7*|unix_sv*)
6381                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6382                 if test "$GCC" != yes; then
6383                         CC_SHARED_OPTS='-KPIC'
6384                 fi
6385                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6386                 ;;
6387         (*)
6388                 CC_SHARED_OPTS='unknown'
6389                 MK_SHARED_LIB='echo unknown'
6390                 ;;
6391         esac
6392
6393         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6394         case "$cf_cv_shlib_version" in
6395         (rel|abi)
6396                 case "$MK_SHARED_LIB" in
6397                 (*'-o $@')
6398                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6399                         ;;
6400                 (*)
6401                         { echo "$as_me:6401: WARNING: ignored --with-shlib-version" >&5
6402 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6403                         ;;
6404                 esac
6405                 ;;
6406         esac
6407
6408         if test -n "$cf_try_cflags"
6409         then
6410 cat > conftest.$ac_ext <<EOF
6411 #line 6411 "${as_me:-configure}"
6412 #include <stdio.h>
6413 int main(int argc, char *argv[])
6414 {
6415         printf("hello\n");
6416         return (argv[argc-1] == 0) ;
6417 }
6418 EOF
6419                 cf_save_CFLAGS="$CFLAGS"
6420                 for cf_opt in $cf_try_cflags
6421                 do
6422                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6423                         echo "$as_me:6423: checking if CFLAGS option -$cf_opt works" >&5
6424 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6425                         if { (eval echo "$as_me:6425: \"$ac_compile\"") >&5
6426   (eval $ac_compile) 2>&5
6427   ac_status=$?
6428   echo "$as_me:6428: \$? = $ac_status" >&5
6429   (exit $ac_status); }; then
6430                                 echo "$as_me:6430: result: yes" >&5
6431 echo "${ECHO_T}yes" >&6
6432                                 cf_save_CFLAGS="$CFLAGS"
6433                         else
6434                                 echo "$as_me:6434: result: no" >&5
6435 echo "${ECHO_T}no" >&6
6436                         fi
6437                 done
6438                 CFLAGS="$cf_save_CFLAGS"
6439         fi
6440
6441         # RPATH_LIST is a colon-separated list of directories
6442         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6443         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6444
6445         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6446
6447         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6448
6449 echo "${as_me:-configure}:6449: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6450
6451         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6452
6453 echo "${as_me:-configure}:6453: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6454
6455 for model in $cf_list_models; do
6456         case $model in
6457         (libtool)
6458
6459 echo "$as_me:6459: checking for additional libtool options" >&5
6460 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6461
6462 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6463 if test "${with_libtool_opts+set}" = set; then
6464   withval="$with_libtool_opts"
6465   with_libtool_opts=$withval
6466 else
6467   with_libtool_opts=no
6468 fi;
6469 echo "$as_me:6469: result: $with_libtool_opts" >&5
6470 echo "${ECHO_T}$with_libtool_opts" >&6
6471
6472 case .$with_libtool_opts in
6473 (.yes|.no|.)
6474         ;;
6475 (*)
6476         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6477         ;;
6478 esac
6479
6480 echo "$as_me:6480: checking if exported-symbols file should be used" >&5
6481 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6482
6483 # Check whether --with-export-syms or --without-export-syms was given.
6484 if test "${with_export_syms+set}" = set; then
6485   withval="$with_export_syms"
6486   with_export_syms=$withval
6487 else
6488   with_export_syms=no
6489 fi;
6490 if test "x$with_export_syms" = xyes
6491 then
6492         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6493
6494 fi
6495 echo "$as_me:6495: result: $with_export_syms" >&5
6496 echo "${ECHO_T}$with_export_syms" >&6
6497 if test "x$with_export_syms" != xno
6498 then
6499         EXPORT_SYMS="-export-symbols $with_export_syms"
6500
6501 fi
6502
6503                 ;;
6504         (shared)
6505                 if test "$CC_SHARED_OPTS" = "unknown"; then
6506                         { { echo "$as_me:6506: error: Shared libraries are not supported in this version" >&5
6507 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6508    { (exit 1); exit 1; }; }
6509                 fi
6510                 # workaround for inept transition to PIE vs PIC...
6511                 echo "$as_me:6511: checking if current CFLAGS link properly" >&5
6512 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6513                 cat >conftest.$ac_ext <<_ACEOF
6514 #line 6514 "configure"
6515 #include "confdefs.h"
6516 #include <stdio.h>
6517 int
6518 main (void)
6519 {
6520 printf("Hello work\n");
6521   ;
6522   return 0;
6523 }
6524 _ACEOF
6525 rm -f conftest.$ac_objext conftest$ac_exeext
6526 if { (eval echo "$as_me:6526: \"$ac_link\"") >&5
6527   (eval $ac_link) 2>&5
6528   ac_status=$?
6529   echo "$as_me:6529: \$? = $ac_status" >&5
6530   (exit $ac_status); } &&
6531          { ac_try='test -s conftest$ac_exeext'
6532   { (eval echo "$as_me:6532: \"$ac_try\"") >&5
6533   (eval $ac_try) 2>&5
6534   ac_status=$?
6535   echo "$as_me:6535: \$? = $ac_status" >&5
6536   (exit $ac_status); }; }; then
6537   cf_cflags_work=yes
6538 else
6539   echo "$as_me: failed program was:" >&5
6540 cat conftest.$ac_ext >&5
6541 cf_cflags_work=no
6542 fi
6543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6544                 echo "$as_me:6544: result: $cf_cflags_work" >&5
6545 echo "${ECHO_T}$cf_cflags_work" >&6
6546                 if test "$cf_cflags_work" = no
6547                 then
6548                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6549
6550 echo "${as_me:-configure}:6550: testing try to work around by appending shared-options ..." 1>&5
6551
6552                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6553                 fi
6554
6555 echo "$as_me:6555: checking if versioned-symbols file should be used" >&5
6556 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6557
6558 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6559 if test "${with_versioned_syms+set}" = set; then
6560   withval="$with_versioned_syms"
6561   with_versioned_syms=$withval
6562 else
6563   with_versioned_syms=no
6564 fi;
6565 case "x$with_versioned_syms" in
6566 (xyes)
6567         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6568
6569         ;;
6570 (xno)
6571         ;;
6572 (x/*)
6573         test -f "$with_versioned_syms" || { { echo "$as_me:6573: error: expected a filename: $with_versioned_syms" >&5
6574 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6575    { (exit 1); exit 1; }; }
6576         ;;
6577 (*)
6578         test -f "$with_versioned_syms" || { { echo "$as_me:6578: error: expected a filename: $with_versioned_syms" >&5
6579 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6580    { (exit 1); exit 1; }; }
6581         with_versioned_syms=`pwd`/"$with_versioned_syms"
6582         ;;
6583 esac
6584 echo "$as_me:6584: result: $with_versioned_syms" >&5
6585 echo "${ECHO_T}$with_versioned_syms" >&6
6586
6587 RESULTING_SYMS=
6588 VERSIONED_SYMS=
6589 WILDCARD_SYMS=
6590
6591 if test "x$with_versioned_syms" != xno
6592 then
6593         RESULTING_SYMS=$with_versioned_syms
6594         case "x$MK_SHARED_LIB" in
6595         (*-Wl,*)
6596                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6597                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6598                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6599
6600 echo "${as_me:-configure}:6600: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6601
6602                 ;;
6603         (*-dy\ *)
6604                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6605                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6606                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6607
6608 echo "${as_me:-configure}:6608: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6609
6610                 ;;
6611         (*)
6612                 { echo "$as_me:6612: WARNING: this system does not support versioned-symbols" >&5
6613 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6614                 ;;
6615         esac
6616
6617         # Linux ld can selectively override scope, e.g., of symbols beginning with
6618         # "_" by first declaring some as global, and then using a wildcard to
6619         # declare the others as local.  Some other loaders cannot do this.  Check
6620         # by constructing a (very) simple shared library and inspecting its
6621         # symbols.
6622         if test "x$VERSIONED_SYMS" != "x"
6623         then
6624                 echo "$as_me:6624: checking if wildcards can be used to selectively omit symbols" >&5
6625 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6626                 WILDCARD_SYMS=no
6627
6628                 # make sources
6629                 rm -f conftest.*
6630
6631                 cat >conftest.ver <<EOF
6632 module_1.0 {
6633 global:
6634         globalf1;
6635 local:
6636         localf1;
6637 };
6638 module_2.0 {
6639 global:
6640         globalf2;
6641 local:
6642         localf2;
6643         _*;
6644 } module_1.0;
6645 submodule_1.0 {
6646 global:
6647         subglobalf1;
6648         _ismissing;
6649 local:
6650         sublocalf1;
6651 };
6652 submodule_2.0 {
6653 global:
6654         subglobalf2;
6655 local:
6656         sublocalf2;
6657         _*;
6658 } submodule_1.0;
6659 EOF
6660                 cat >conftest.$ac_ext <<EOF
6661 #line 6661 "configure"
6662 int     _ismissing(void) { return 1; }
6663 int     _localf1(void) { return 1; }
6664 int     _localf2(void) { return 2; }
6665 int     globalf1(void) { return 1; }
6666 int     globalf2(void) { return 2; }
6667 int     _sublocalf1(void) { return 1; }
6668 int     _sublocalf2(void) { return 2; }
6669 int     subglobalf1(void) { return 1; }
6670 int     subglobalf2(void) { return 2; }
6671 EOF
6672                 cat >conftest.mk <<EOF
6673 CC=${CC}
6674 CFLAGS=${CFLAGS}
6675 CPPFLAGS=${CPPFLAGS}
6676 LDFLAGS=${LDFLAGS}
6677 LIBS=${LIBS}
6678 VERSIONED_SYMS=${VERSIONED_SYMS}
6679 RESULTING_SYMS=conftest.ver
6680 MK_SHARED_LIB=${MK_SHARED_LIB}
6681 conftest.so: conftest.$ac_cv_objext
6682                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6683 EOF
6684
6685                 # compile source, make library
6686                 if make -f conftest.mk 2>&5 >/dev/null
6687                 then
6688                         # test for missing symbol in either Data or Text section
6689                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6690                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6691                 fi
6692                 echo "$as_me:6692: result: $WILDCARD_SYMS" >&5
6693 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6694                 rm -f conftest.*
6695         fi
6696 fi
6697
6698                 ;;
6699         esac
6700 done
6701
6702 ### Checks for special libraries, must be done up-front.
6703 SHLIB_LIST=""
6704
6705 echo "$as_me:6705: checking if you want to link with the GPM mouse library" >&5
6706 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6707
6708 # Check whether --with-gpm or --without-gpm was given.
6709 if test "${with_gpm+set}" = set; then
6710   withval="$with_gpm"
6711   with_gpm=$withval
6712 else
6713   with_gpm=maybe
6714 fi;
6715 echo "$as_me:6715: result: $with_gpm" >&5
6716 echo "${ECHO_T}$with_gpm" >&6
6717
6718 if test "$with_gpm" != no ; then
6719         echo "$as_me:6719: checking for gpm.h" >&5
6720 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6721 if test "${ac_cv_header_gpm_h+set}" = set; then
6722   echo $ECHO_N "(cached) $ECHO_C" >&6
6723 else
6724   cat >conftest.$ac_ext <<_ACEOF
6725 #line 6725 "configure"
6726 #include "confdefs.h"
6727 #include <gpm.h>
6728 _ACEOF
6729 if { (eval echo "$as_me:6729: \"$ac_cpp conftest.$ac_ext\"") >&5
6730   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6731   ac_status=$?
6732   egrep -v '^ *\+' conftest.er1 >conftest.err
6733   rm -f conftest.er1
6734   cat conftest.err >&5
6735   echo "$as_me:6735: \$? = $ac_status" >&5
6736   (exit $ac_status); } >/dev/null; then
6737   if test -s conftest.err; then
6738     ac_cpp_err=$ac_c_preproc_warn_flag
6739   else
6740     ac_cpp_err=
6741   fi
6742 else
6743   ac_cpp_err=yes
6744 fi
6745 if test -z "$ac_cpp_err"; then
6746   ac_cv_header_gpm_h=yes
6747 else
6748   echo "$as_me: failed program was:" >&5
6749   cat conftest.$ac_ext >&5
6750   ac_cv_header_gpm_h=no
6751 fi
6752 rm -f conftest.err conftest.$ac_ext
6753 fi
6754 echo "$as_me:6754: result: $ac_cv_header_gpm_h" >&5
6755 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6756 if test $ac_cv_header_gpm_h = yes; then
6757
6758 cat >>confdefs.h <<\EOF
6759 #define HAVE_GPM_H 1
6760 EOF
6761
6762                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6763                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6764
6765 echo "${as_me:-configure}:6765: testing assuming we really have GPM library ..." 1>&5
6766
6767 cat >>confdefs.h <<\EOF
6768 #define HAVE_LIBGPM 1
6769 EOF
6770
6771                         with_gpm=yes
6772                 else
6773                         echo "$as_me:6773: checking for Gpm_Open in -lgpm" >&5
6774 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6775 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6776   echo $ECHO_N "(cached) $ECHO_C" >&6
6777 else
6778   ac_check_lib_save_LIBS=$LIBS
6779 LIBS="-lgpm  $LIBS"
6780 cat >conftest.$ac_ext <<_ACEOF
6781 #line 6781 "configure"
6782 #include "confdefs.h"
6783
6784 /* Override any gcc2 internal prototype to avoid an error.  */
6785 #ifdef __cplusplus
6786 extern "C"
6787 #endif
6788 /* We use char because int might match the return type of a gcc2
6789    builtin and then its argument prototype would still apply.  */
6790 char Gpm_Open ();
6791 int
6792 main (void)
6793 {
6794 Gpm_Open ();
6795   ;
6796   return 0;
6797 }
6798 _ACEOF
6799 rm -f conftest.$ac_objext conftest$ac_exeext
6800 if { (eval echo "$as_me:6800: \"$ac_link\"") >&5
6801   (eval $ac_link) 2>&5
6802   ac_status=$?
6803   echo "$as_me:6803: \$? = $ac_status" >&5
6804   (exit $ac_status); } &&
6805          { ac_try='test -s conftest$ac_exeext'
6806   { (eval echo "$as_me:6806: \"$ac_try\"") >&5
6807   (eval $ac_try) 2>&5
6808   ac_status=$?
6809   echo "$as_me:6809: \$? = $ac_status" >&5
6810   (exit $ac_status); }; }; then
6811   ac_cv_lib_gpm_Gpm_Open=yes
6812 else
6813   echo "$as_me: failed program was:" >&5
6814 cat conftest.$ac_ext >&5
6815 ac_cv_lib_gpm_Gpm_Open=no
6816 fi
6817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6818 LIBS=$ac_check_lib_save_LIBS
6819 fi
6820 echo "$as_me:6820: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6821 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6822 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6823   with_gpm=yes
6824 else
6825
6826                                 if test "$with_gpm" = maybe; then
6827                                         { echo "$as_me:6827: WARNING: Cannot link with GPM library" >&5
6828 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6829                                         with_gpm=no
6830                                 else
6831                                         { { echo "$as_me:6831: error: Cannot link with GPM library" >&5
6832 echo "$as_me: error: Cannot link with GPM library" >&2;}
6833    { (exit 1); exit 1; }; }
6834                                 fi
6835
6836 fi
6837
6838                 fi
6839
6840 else
6841
6842                 test "$with_gpm" != maybe && { echo "$as_me:6842: WARNING: Cannot find GPM header" >&5
6843 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6844                 with_gpm=no
6845
6846 fi
6847
6848 fi
6849
6850 if test "$with_gpm" != no ; then
6851         echo "$as_me:6851: checking if you want to load GPM dynamically" >&5
6852 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6853
6854 # Check whether --with-dlsym or --without-dlsym was given.
6855 if test "${with_dlsym+set}" = set; then
6856   withval="$with_dlsym"
6857   with_dlsym=$withval
6858 else
6859   with_dlsym=yes
6860 fi;
6861         echo "$as_me:6861: result: $with_dlsym" >&5
6862 echo "${ECHO_T}$with_dlsym" >&6
6863         if test "x$with_dlsym" = xyes ; then
6864
6865 cf_have_dlsym=no
6866 echo "$as_me:6866: checking for dlsym" >&5
6867 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6868 if test "${ac_cv_func_dlsym+set}" = set; then
6869   echo $ECHO_N "(cached) $ECHO_C" >&6
6870 else
6871   cat >conftest.$ac_ext <<_ACEOF
6872 #line 6872 "configure"
6873 #include "confdefs.h"
6874 #define dlsym autoconf_temporary
6875 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6876 #undef dlsym
6877
6878 #ifdef __cplusplus
6879 extern "C"
6880 #endif
6881
6882 /* We use char because int might match the return type of a gcc2
6883    builtin and then its argument prototype would still apply.  */
6884 char dlsym (void);
6885
6886 int
6887 main (void)
6888 {
6889
6890 /* The GNU C library defines stubs for functions which it implements
6891     to always fail with ENOSYS.  Some functions are actually named
6892     something starting with __ and the normal name is an alias.  */
6893 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6894 #error found stub for dlsym
6895 #endif
6896
6897         return dlsym ();
6898   ;
6899   return 0;
6900 }
6901 _ACEOF
6902 rm -f conftest.$ac_objext conftest$ac_exeext
6903 if { (eval echo "$as_me:6903: \"$ac_link\"") >&5
6904   (eval $ac_link) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit $ac_status); } &&
6908          { ac_try='test -s conftest$ac_exeext'
6909   { (eval echo "$as_me:6909: \"$ac_try\"") >&5
6910   (eval $ac_try) 2>&5
6911   ac_status=$?
6912   echo "$as_me:6912: \$? = $ac_status" >&5
6913   (exit $ac_status); }; }; then
6914   ac_cv_func_dlsym=yes
6915 else
6916   echo "$as_me: failed program was:" >&5
6917 cat conftest.$ac_ext >&5
6918 ac_cv_func_dlsym=no
6919 fi
6920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6921 fi
6922 echo "$as_me:6922: result: $ac_cv_func_dlsym" >&5
6923 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6924 if test $ac_cv_func_dlsym = yes; then
6925   cf_have_dlsym=yes
6926 else
6927
6928 cf_have_libdl=no
6929 echo "$as_me:6929: checking for dlsym in -ldl" >&5
6930 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6931 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6932   echo $ECHO_N "(cached) $ECHO_C" >&6
6933 else
6934   ac_check_lib_save_LIBS=$LIBS
6935 LIBS="-ldl  $LIBS"
6936 cat >conftest.$ac_ext <<_ACEOF
6937 #line 6937 "configure"
6938 #include "confdefs.h"
6939
6940 /* Override any gcc2 internal prototype to avoid an error.  */
6941 #ifdef __cplusplus
6942 extern "C"
6943 #endif
6944 /* We use char because int might match the return type of a gcc2
6945    builtin and then its argument prototype would still apply.  */
6946 char dlsym ();
6947 int
6948 main (void)
6949 {
6950 dlsym ();
6951   ;
6952   return 0;
6953 }
6954 _ACEOF
6955 rm -f conftest.$ac_objext conftest$ac_exeext
6956 if { (eval echo "$as_me:6956: \"$ac_link\"") >&5
6957   (eval $ac_link) 2>&5
6958   ac_status=$?
6959   echo "$as_me:6959: \$? = $ac_status" >&5
6960   (exit $ac_status); } &&
6961          { ac_try='test -s conftest$ac_exeext'
6962   { (eval echo "$as_me:6962: \"$ac_try\"") >&5
6963   (eval $ac_try) 2>&5
6964   ac_status=$?
6965   echo "$as_me:6965: \$? = $ac_status" >&5
6966   (exit $ac_status); }; }; then
6967   ac_cv_lib_dl_dlsym=yes
6968 else
6969   echo "$as_me: failed program was:" >&5
6970 cat conftest.$ac_ext >&5
6971 ac_cv_lib_dl_dlsym=no
6972 fi
6973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6974 LIBS=$ac_check_lib_save_LIBS
6975 fi
6976 echo "$as_me:6976: result: $ac_cv_lib_dl_dlsym" >&5
6977 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6978 if test $ac_cv_lib_dl_dlsym = yes; then
6979
6980         cf_have_dlsym=yes
6981         cf_have_libdl=yes
6982 fi
6983
6984 fi
6985
6986 if test "$cf_have_dlsym" = yes ; then
6987         test "$cf_have_libdl" = yes && {
6988 cf_add_libs="$LIBS"
6989 # reverse order
6990 cf_add_0lib=
6991 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6992 # filter duplicates
6993 for cf_add_1lib in $cf_add_0lib; do
6994         for cf_add_2lib in $cf_add_libs; do
6995                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6996                         cf_add_1lib=
6997                         break
6998                 fi
6999         done
7000         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7001 done
7002 LIBS="$cf_add_libs"
7003  }
7004
7005         echo "$as_me:7005: checking whether able to link to dl*() functions" >&5
7006 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7007         cat >conftest.$ac_ext <<_ACEOF
7008 #line 7008 "configure"
7009 #include "confdefs.h"
7010 #include <dlfcn.h>
7011 int
7012 main (void)
7013 {
7014
7015                 void *obj;
7016                 if ((obj = dlopen("filename", 0)) != 0) {
7017                         if (dlsym(obj, "symbolname") == 0) {
7018                         dlclose(obj);
7019                         }
7020                 }
7021   ;
7022   return 0;
7023 }
7024 _ACEOF
7025 rm -f conftest.$ac_objext conftest$ac_exeext
7026 if { (eval echo "$as_me:7026: \"$ac_link\"") >&5
7027   (eval $ac_link) 2>&5
7028   ac_status=$?
7029   echo "$as_me:7029: \$? = $ac_status" >&5
7030   (exit $ac_status); } &&
7031          { ac_try='test -s conftest$ac_exeext'
7032   { (eval echo "$as_me:7032: \"$ac_try\"") >&5
7033   (eval $ac_try) 2>&5
7034   ac_status=$?
7035   echo "$as_me:7035: \$? = $ac_status" >&5
7036   (exit $ac_status); }; }; then
7037
7038 cat >>confdefs.h <<\EOF
7039 #define HAVE_LIBDL 1
7040 EOF
7041
7042 else
7043   echo "$as_me: failed program was:" >&5
7044 cat conftest.$ac_ext >&5
7045
7046                 { { echo "$as_me:7046: error: Cannot link test program for libdl" >&5
7047 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7048    { (exit 1); exit 1; }; }
7049 fi
7050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7051         echo "$as_me:7051: result: ok" >&5
7052 echo "${ECHO_T}ok" >&6
7053 else
7054         { { echo "$as_me:7054: error: Cannot find dlsym function" >&5
7055 echo "$as_me: error: Cannot find dlsym function" >&2;}
7056    { (exit 1); exit 1; }; }
7057 fi
7058
7059                 if test "x$with_gpm" != xyes ; then
7060                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7061
7062 echo "${as_me:-configure}:7062: testing assuming soname for gpm is $with_gpm ..." 1>&5
7063
7064                         cf_cv_gpm_soname="$with_gpm"
7065                 else
7066
7067 echo "$as_me:7067: checking for soname of gpm library" >&5
7068 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7069 if test "${cf_cv_gpm_soname+set}" = set; then
7070   echo $ECHO_N "(cached) $ECHO_C" >&6
7071 else
7072
7073 cf_cv_gpm_soname=unknown
7074 if test "$cross_compiling" != yes ; then
7075 cat >conftest.$ac_ext <<CF_EOF
7076 #include <gpm.h>
7077 int main(void)
7078 {
7079 if (Gpm_Open(0,0)) Gpm_Close();
7080         ${cf_cv_main_return:-return}(0);
7081 }
7082 CF_EOF
7083 cf_save_LIBS="$LIBS"
7084
7085 cf_add_libs="$LIBS"
7086 # reverse order
7087 cf_add_0lib=
7088 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7089 # filter duplicates
7090 for cf_add_1lib in $cf_add_0lib; do
7091         for cf_add_2lib in $cf_add_libs; do
7092                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7093                         cf_add_1lib=
7094                         break
7095                 fi
7096         done
7097         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7098 done
7099 LIBS="$cf_add_libs"
7100
7101         if { (eval echo "$as_me:7101: \"$ac_compile\"") >&5
7102   (eval $ac_compile) 2>&5
7103   ac_status=$?
7104   echo "$as_me:7104: \$? = $ac_status" >&5
7105   (exit $ac_status); } ; then
7106                 if { (eval echo "$as_me:7106: \"$ac_link\"") >&5
7107   (eval $ac_link) 2>&5
7108   ac_status=$?
7109   echo "$as_me:7109: \$? = $ac_status" >&5
7110   (exit $ac_status); } ; then
7111                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7112                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7113                 fi
7114         fi
7115 rm -rf conftest*
7116 LIBS="$cf_save_LIBS"
7117 fi
7118
7119 fi
7120 echo "$as_me:7120: result: $cf_cv_gpm_soname" >&5
7121 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7122
7123                 fi
7124                 test "$cf_cv_gpm_soname" != "unknown" &&
7125 cat >>confdefs.h <<EOF
7126 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7127 EOF
7128
7129                 SHLIB_LIST="-ldl $SHLIB_LIST"
7130
7131 cf_add_libs="$PRIVATE_LIBS"
7132 # reverse order
7133 cf_add_0lib=
7134 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7135 # filter duplicates
7136 for cf_add_1lib in $cf_add_0lib; do
7137         for cf_add_2lib in $cf_add_libs; do
7138                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7139                         cf_add_1lib=
7140                         break
7141                 fi
7142         done
7143         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7144 done
7145 PRIVATE_LIBS="$cf_add_libs"
7146
7147         else
7148                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7149
7150 cf_add_libs="$TEST_LIBS"
7151 # reverse order
7152 cf_add_0lib=
7153 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7154 # filter duplicates
7155 for cf_add_1lib in $cf_add_0lib; do
7156         for cf_add_2lib in $cf_add_libs; do
7157                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7158                         cf_add_1lib=
7159                         break
7160                 fi
7161         done
7162         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7163 done
7164 TEST_LIBS="$cf_add_libs"
7165
7166 cf_add_libs="$PRIVATE_LIBS"
7167 # reverse order
7168 cf_add_0lib=
7169 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7170 # filter duplicates
7171 for cf_add_1lib in $cf_add_0lib; do
7172         for cf_add_2lib in $cf_add_libs; do
7173                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7174                         cf_add_1lib=
7175                         break
7176                 fi
7177         done
7178         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7179 done
7180 PRIVATE_LIBS="$cf_add_libs"
7181
7182         fi
7183
7184 cat >>confdefs.h <<\EOF
7185 #define HAVE_LIBGPM 1
7186 EOF
7187
7188 echo "$as_me:7188: checking for Gpm_Wgetch in -lgpm" >&5
7189 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7190 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7191   echo $ECHO_N "(cached) $ECHO_C" >&6
7192 else
7193   ac_check_lib_save_LIBS=$LIBS
7194 LIBS="-lgpm  $LIBS"
7195 cat >conftest.$ac_ext <<_ACEOF
7196 #line 7196 "configure"
7197 #include "confdefs.h"
7198
7199 /* Override any gcc2 internal prototype to avoid an error.  */
7200 #ifdef __cplusplus
7201 extern "C"
7202 #endif
7203 /* We use char because int might match the return type of a gcc2
7204    builtin and then its argument prototype would still apply.  */
7205 char Gpm_Wgetch ();
7206 int
7207 main (void)
7208 {
7209 Gpm_Wgetch ();
7210   ;
7211   return 0;
7212 }
7213 _ACEOF
7214 rm -f conftest.$ac_objext conftest$ac_exeext
7215 if { (eval echo "$as_me:7215: \"$ac_link\"") >&5
7216   (eval $ac_link) 2>&5
7217   ac_status=$?
7218   echo "$as_me:7218: \$? = $ac_status" >&5
7219   (exit $ac_status); } &&
7220          { ac_try='test -s conftest$ac_exeext'
7221   { (eval echo "$as_me:7221: \"$ac_try\"") >&5
7222   (eval $ac_try) 2>&5
7223   ac_status=$?
7224   echo "$as_me:7224: \$? = $ac_status" >&5
7225   (exit $ac_status); }; }; then
7226   ac_cv_lib_gpm_Gpm_Wgetch=yes
7227 else
7228   echo "$as_me: failed program was:" >&5
7229 cat conftest.$ac_ext >&5
7230 ac_cv_lib_gpm_Gpm_Wgetch=no
7231 fi
7232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7233 LIBS=$ac_check_lib_save_LIBS
7234 fi
7235 echo "$as_me:7235: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7236 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7237 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7238
7239 echo "$as_me:7239: checking if GPM is weakly bound to curses library" >&5
7240 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7241 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7242   echo $ECHO_N "(cached) $ECHO_C" >&6
7243 else
7244
7245 cf_cv_check_gpm_wgetch=unknown
7246 if test "$cross_compiling" != yes ; then
7247
7248 cat >conftest.$ac_ext <<CF_EOF
7249 #include <gpm.h>
7250 int main(void)
7251 {
7252         Gpm_Wgetch();
7253         ${cf_cv_main_return:-return}(0);
7254 }
7255 CF_EOF
7256
7257         cf_save_LIBS="$LIBS"
7258         # This only works if we can look at the symbol table.  If a shared
7259         # library is stripped for install, we cannot use that.  So we're forced
7260         # to rely on the static library, noting that some packagers may not
7261         # include it.
7262         LIBS="-static -lgpm -dynamic $LIBS"
7263         if { (eval echo "$as_me:7263: \"$ac_compile\"") >&5
7264   (eval $ac_compile) 2>&5
7265   ac_status=$?
7266   echo "$as_me:7266: \$? = $ac_status" >&5
7267   (exit $ac_status); } ; then
7268                 if { (eval echo "$as_me:7268: \"$ac_link\"") >&5
7269   (eval $ac_link) 2>&5
7270   ac_status=$?
7271   echo "$as_me:7271: \$? = $ac_status" >&5
7272   (exit $ac_status); } ; then
7273                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7274                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7275                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7276                 fi
7277         fi
7278         rm -rf conftest*
7279         LIBS="$cf_save_LIBS"
7280 fi
7281
7282 fi
7283 echo "$as_me:7283: result: $cf_cv_check_gpm_wgetch" >&5
7284 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7285
7286 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7287         { echo "$as_me:7287: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7288 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7289 fi
7290
7291 fi
7292
7293 fi
7294
7295 echo "$as_me:7295: checking if you want to use PCRE2 for regular-expressions" >&5
7296 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7297
7298 # Check whether --with-pcre2 or --without-pcre2 was given.
7299 if test "${with_pcre2+set}" = set; then
7300   withval="$with_pcre2"
7301
7302 fi;
7303 test -z "$with_pcre2" && with_pcre2=no
7304 echo "$as_me:7304: result: $with_pcre2" >&5
7305 echo "${ECHO_T}$with_pcre2" >&6
7306
7307 if test "x$with_pcre2" != xno ; then
7308
7309 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7310         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7311
7312 echo "${as_me:-configure}:7312: testing found package libpcre2 ..." 1>&5
7313
7314         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7315         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7316         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7317
7318 echo "${as_me:-configure}:7318: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7319
7320         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7321
7322 echo "${as_me:-configure}:7322: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7323
7324 cf_fix_cppflags=no
7325 cf_new_cflags=
7326 cf_new_cppflags=
7327 cf_new_extra_cppflags=
7328
7329 for cf_add_cflags in $cf_pkgconfig_incs
7330 do
7331 case $cf_fix_cppflags in
7332 (no)
7333         case $cf_add_cflags in
7334         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7335                 case $cf_add_cflags in
7336                 (-D*)
7337                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7338
7339                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7340                                 && test -z "${cf_tst_cflags}" \
7341                                 && cf_fix_cppflags=yes
7342
7343                         if test $cf_fix_cppflags = yes ; then
7344
7345         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7346         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7347
7348                                 continue
7349                         elif test "${cf_tst_cflags}" = "\"'" ; then
7350
7351         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7352         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7353
7354                                 continue
7355                         fi
7356                         ;;
7357                 esac
7358                 case "$CPPFLAGS" in
7359                 (*$cf_add_cflags)
7360                         ;;
7361                 (*)
7362                         case $cf_add_cflags in
7363                         (-D*)
7364                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7365
7366 CPPFLAGS=`echo "$CPPFLAGS" | \
7367         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7368                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7369
7370                                 ;;
7371                         esac
7372
7373         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7374         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7375
7376                         ;;
7377                 esac
7378                 ;;
7379         (*)
7380
7381         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7382         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7383
7384                 ;;
7385         esac
7386         ;;
7387 (yes)
7388
7389         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7390         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7391
7392         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7393
7394         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7395                 && test -z "${cf_tst_cflags}" \
7396                 && cf_fix_cppflags=no
7397         ;;
7398 esac
7399 done
7400
7401 if test -n "$cf_new_cflags" ; then
7402
7403         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7404         CFLAGS="${CFLAGS}$cf_new_cflags"
7405
7406 fi
7407
7408 if test -n "$cf_new_cppflags" ; then
7409
7410         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7411         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7412
7413 fi
7414
7415 if test -n "$cf_new_extra_cppflags" ; then
7416
7417         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7418         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7419
7420 fi
7421
7422 cf_add_libs="$LIBS"
7423 # reverse order
7424 cf_add_0lib=
7425 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7426 # filter duplicates
7427 for cf_add_1lib in $cf_add_0lib; do
7428         for cf_add_2lib in $cf_add_libs; do
7429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7430                         cf_add_1lib=
7431                         break
7432                 fi
7433         done
7434         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7435 done
7436 LIBS="$cf_add_libs"
7437
7438         :
7439 else
7440         cf_pkgconfig_incs=
7441         cf_pkgconfig_libs=
7442
7443 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7444         test -n "$verbose" && echo "    found package libpcre" 1>&6
7445
7446 echo "${as_me:-configure}:7446: testing found package libpcre ..." 1>&5
7447
7448         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7449         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7450         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7451
7452 echo "${as_me:-configure}:7452: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7453
7454         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7455
7456 echo "${as_me:-configure}:7456: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7457
7458 cf_fix_cppflags=no
7459 cf_new_cflags=
7460 cf_new_cppflags=
7461 cf_new_extra_cppflags=
7462
7463 for cf_add_cflags in $cf_pkgconfig_incs
7464 do
7465 case $cf_fix_cppflags in
7466 (no)
7467         case $cf_add_cflags in
7468         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7469                 case $cf_add_cflags in
7470                 (-D*)
7471                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7472
7473                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7474                                 && test -z "${cf_tst_cflags}" \
7475                                 && cf_fix_cppflags=yes
7476
7477                         if test $cf_fix_cppflags = yes ; then
7478
7479         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7480         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7481
7482                                 continue
7483                         elif test "${cf_tst_cflags}" = "\"'" ; then
7484
7485         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7486         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7487
7488                                 continue
7489                         fi
7490                         ;;
7491                 esac
7492                 case "$CPPFLAGS" in
7493                 (*$cf_add_cflags)
7494                         ;;
7495                 (*)
7496                         case $cf_add_cflags in
7497                         (-D*)
7498                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7499
7500 CPPFLAGS=`echo "$CPPFLAGS" | \
7501         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7502                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7503
7504                                 ;;
7505                         esac
7506
7507         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7508         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7509
7510                         ;;
7511                 esac
7512                 ;;
7513         (*)
7514
7515         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7516         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7517
7518                 ;;
7519         esac
7520         ;;
7521 (yes)
7522
7523         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7524         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7525
7526         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7527
7528         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7529                 && test -z "${cf_tst_cflags}" \
7530                 && cf_fix_cppflags=no
7531         ;;
7532 esac
7533 done
7534
7535 if test -n "$cf_new_cflags" ; then
7536
7537         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7538         CFLAGS="${CFLAGS}$cf_new_cflags"
7539
7540 fi
7541
7542 if test -n "$cf_new_cppflags" ; then
7543
7544         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7545         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7546
7547 fi
7548
7549 if test -n "$cf_new_extra_cppflags" ; then
7550
7551         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7552         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7553
7554 fi
7555
7556 cf_add_libs="$LIBS"
7557 # reverse order
7558 cf_add_0lib=
7559 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7560 # filter duplicates
7561 for cf_add_1lib in $cf_add_0lib; do
7562         for cf_add_2lib in $cf_add_libs; do
7563                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7564                         cf_add_1lib=
7565                         break
7566                 fi
7567         done
7568         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7569 done
7570 LIBS="$cf_add_libs"
7571
7572         :
7573 else
7574         cf_pkgconfig_incs=
7575         cf_pkgconfig_libs=
7576
7577                         { { echo "$as_me:7577: error: Cannot find PCRE2 library" >&5
7578 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7579    { (exit 1); exit 1; }; }
7580 fi
7581
7582 fi
7583
7584 cat >>confdefs.h <<\EOF
7585 #define HAVE_LIB_PCRE2 1
7586 EOF
7587
7588         # if pkgconfig gave no results, look for the libraries directly
7589         case $LIBS in
7590         (*pcre2-posix*|*pcreposix*)
7591                 ;;
7592         (*)
7593                 echo "$as_me:7593: checking for regcomp in -lpcre2-posix" >&5
7594 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7595 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7596   echo $ECHO_N "(cached) $ECHO_C" >&6
7597 else
7598   ac_check_lib_save_LIBS=$LIBS
7599 LIBS="-lpcre2-posix  $LIBS"
7600 cat >conftest.$ac_ext <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603
7604 /* Override any gcc2 internal prototype to avoid an error.  */
7605 #ifdef __cplusplus
7606 extern "C"
7607 #endif
7608 /* We use char because int might match the return type of a gcc2
7609    builtin and then its argument prototype would still apply.  */
7610 char regcomp ();
7611 int
7612 main (void)
7613 {
7614 regcomp ();
7615   ;
7616   return 0;
7617 }
7618 _ACEOF
7619 rm -f conftest.$ac_objext conftest$ac_exeext
7620 if { (eval echo "$as_me:7620: \"$ac_link\"") >&5
7621   (eval $ac_link) 2>&5
7622   ac_status=$?
7623   echo "$as_me:7623: \$? = $ac_status" >&5
7624   (exit $ac_status); } &&
7625          { ac_try='test -s conftest$ac_exeext'
7626   { (eval echo "$as_me:7626: \"$ac_try\"") >&5
7627   (eval $ac_try) 2>&5
7628   ac_status=$?
7629   echo "$as_me:7629: \$? = $ac_status" >&5
7630   (exit $ac_status); }; }; then
7631   ac_cv_lib_pcre2_posix_regcomp=yes
7632 else
7633   echo "$as_me: failed program was:" >&5
7634 cat conftest.$ac_ext >&5
7635 ac_cv_lib_pcre2_posix_regcomp=no
7636 fi
7637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7638 LIBS=$ac_check_lib_save_LIBS
7639 fi
7640 echo "$as_me:7640: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7641 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7642 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7643
7644 cf_add_libs="$LIBS"
7645 # reverse order
7646 cf_add_0lib=
7647 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7648 # filter duplicates
7649 for cf_add_1lib in $cf_add_0lib; do
7650         for cf_add_2lib in $cf_add_libs; do
7651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7652                         cf_add_1lib=
7653                         break
7654                 fi
7655         done
7656         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7657 done
7658 LIBS="$cf_add_libs"
7659
7660 else
7661   echo "$as_me:7661: checking for regcomp in -lpcreposix" >&5
7662 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7663 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7664   echo $ECHO_N "(cached) $ECHO_C" >&6
7665 else
7666   ac_check_lib_save_LIBS=$LIBS
7667 LIBS="-lpcreposix  $LIBS"
7668 cat >conftest.$ac_ext <<_ACEOF
7669 #line 7669 "configure"
7670 #include "confdefs.h"
7671
7672 /* Override any gcc2 internal prototype to avoid an error.  */
7673 #ifdef __cplusplus
7674 extern "C"
7675 #endif
7676 /* We use char because int might match the return type of a gcc2
7677    builtin and then its argument prototype would still apply.  */
7678 char regcomp ();
7679 int
7680 main (void)
7681 {
7682 regcomp ();
7683   ;
7684   return 0;
7685 }
7686 _ACEOF
7687 rm -f conftest.$ac_objext conftest$ac_exeext
7688 if { (eval echo "$as_me:7688: \"$ac_link\"") >&5
7689   (eval $ac_link) 2>&5
7690   ac_status=$?
7691   echo "$as_me:7691: \$? = $ac_status" >&5
7692   (exit $ac_status); } &&
7693          { ac_try='test -s conftest$ac_exeext'
7694   { (eval echo "$as_me:7694: \"$ac_try\"") >&5
7695   (eval $ac_try) 2>&5
7696   ac_status=$?
7697   echo "$as_me:7697: \$? = $ac_status" >&5
7698   (exit $ac_status); }; }; then
7699   ac_cv_lib_pcreposix_regcomp=yes
7700 else
7701   echo "$as_me: failed program was:" >&5
7702 cat conftest.$ac_ext >&5
7703 ac_cv_lib_pcreposix_regcomp=no
7704 fi
7705 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7706 LIBS=$ac_check_lib_save_LIBS
7707 fi
7708 echo "$as_me:7708: result: $ac_cv_lib_pcreposix_regcomp" >&5
7709 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7710 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7711
7712 cf_add_libs="$LIBS"
7713 # reverse order
7714 cf_add_0lib=
7715 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7716 # filter duplicates
7717 for cf_add_1lib in $cf_add_0lib; do
7718         for cf_add_2lib in $cf_add_libs; do
7719                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7720                         cf_add_1lib=
7721                         break
7722                 fi
7723         done
7724         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7725 done
7726 LIBS="$cf_add_libs"
7727
7728 else
7729   { { echo "$as_me:7729: error: Cannot find PCRE2 POSIX library" >&5
7730 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7731    { (exit 1); exit 1; }; }
7732 fi
7733
7734 fi
7735
7736                 ;;
7737         esac
7738
7739         # either way, check for the library header files
7740
7741 for ac_header in pcre2posix.h pcreposix.h
7742 do
7743 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7744 echo "$as_me:7744: checking for $ac_header" >&5
7745 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7746 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7747   echo $ECHO_N "(cached) $ECHO_C" >&6
7748 else
7749   cat >conftest.$ac_ext <<_ACEOF
7750 #line 7750 "configure"
7751 #include "confdefs.h"
7752 #include <$ac_header>
7753 _ACEOF
7754 if { (eval echo "$as_me:7754: \"$ac_cpp conftest.$ac_ext\"") >&5
7755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7756   ac_status=$?
7757   egrep -v '^ *\+' conftest.er1 >conftest.err
7758   rm -f conftest.er1
7759   cat conftest.err >&5
7760   echo "$as_me:7760: \$? = $ac_status" >&5
7761   (exit $ac_status); } >/dev/null; then
7762   if test -s conftest.err; then
7763     ac_cpp_err=$ac_c_preproc_warn_flag
7764   else
7765     ac_cpp_err=
7766   fi
7767 else
7768   ac_cpp_err=yes
7769 fi
7770 if test -z "$ac_cpp_err"; then
7771   eval "$as_ac_Header=yes"
7772 else
7773   echo "$as_me: failed program was:" >&5
7774   cat conftest.$ac_ext >&5
7775   eval "$as_ac_Header=no"
7776 fi
7777 rm -f conftest.err conftest.$ac_ext
7778 fi
7779 echo "$as_me:7779: result: `eval echo '${'$as_ac_Header'}'`" >&5
7780 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7781 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7782   cat >>confdefs.h <<EOF
7783 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7784 EOF
7785
7786 fi
7787 done
7788
7789 fi
7790
7791 # not everyone has "test -c"
7792 if test -c /dev/sysmouse 2>/dev/null ; then
7793 echo "$as_me:7793: checking if you want to use sysmouse" >&5
7794 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7795
7796 # Check whether --with-sysmouse or --without-sysmouse was given.
7797 if test "${with_sysmouse+set}" = set; then
7798   withval="$with_sysmouse"
7799   cf_with_sysmouse=$withval
7800 else
7801   cf_with_sysmouse=maybe
7802 fi;
7803         if test "$cf_with_sysmouse" != no ; then
7804         cat >conftest.$ac_ext <<_ACEOF
7805 #line 7805 "configure"
7806 #include "confdefs.h"
7807
7808 #include <osreldate.h>
7809 #if (__FreeBSD_version >= 400017)
7810 #include <sys/consio.h>
7811 #include <sys/fbio.h>
7812 #else
7813 #include <machine/console.h>
7814 #endif
7815
7816 int
7817 main (void)
7818 {
7819
7820         struct mouse_info the_mouse;
7821         ioctl(0, CONS_MOUSECTL, &the_mouse);
7822
7823   ;
7824   return 0;
7825 }
7826 _ACEOF
7827 rm -f conftest.$ac_objext
7828 if { (eval echo "$as_me:7828: \"$ac_compile\"") >&5
7829   (eval $ac_compile) 2>&5
7830   ac_status=$?
7831   echo "$as_me:7831: \$? = $ac_status" >&5
7832   (exit $ac_status); } &&
7833          { ac_try='test -s conftest.$ac_objext'
7834   { (eval echo "$as_me:7834: \"$ac_try\"") >&5
7835   (eval $ac_try) 2>&5
7836   ac_status=$?
7837   echo "$as_me:7837: \$? = $ac_status" >&5
7838   (exit $ac_status); }; }; then
7839   cf_with_sysmouse=yes
7840 else
7841   echo "$as_me: failed program was:" >&5
7842 cat conftest.$ac_ext >&5
7843 cf_with_sysmouse=no
7844 fi
7845 rm -f conftest.$ac_objext conftest.$ac_ext
7846         fi
7847 echo "$as_me:7847: result: $cf_with_sysmouse" >&5
7848 echo "${ECHO_T}$cf_with_sysmouse" >&6
7849 test "$cf_with_sysmouse" = yes &&
7850 cat >>confdefs.h <<\EOF
7851 #define USE_SYSMOUSE 1
7852 EOF
7853
7854 fi
7855
7856 # pretend that ncurses==ncursesw==ncursest
7857 echo "$as_me:7857: checking if you want to disable library suffixes" >&5
7858 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7859
7860 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7861 if test "${enable_lib_suffixes+set}" = set; then
7862   enableval="$enable_lib_suffixes"
7863   test "$enableval" != no && enableval=yes
7864         if test "$enableval" != "yes" ; then
7865     disable_lib_suffixes=yes
7866         else
7867                 disable_lib_suffixes=no
7868         fi
7869 else
7870   enableval=yes
7871         disable_lib_suffixes=no
7872
7873 fi;
7874 echo "$as_me:7874: result: $disable_lib_suffixes" >&5
7875 echo "${ECHO_T}$disable_lib_suffixes" >&6
7876
7877 ### If we're building with rpath, try to link non-standard libs that way too.
7878 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7879
7880 echo "$as_me:7880: checking if rpath-hack should be disabled" >&5
7881 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7882
7883 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7884 if test "${enable_rpath_hack+set}" = set; then
7885   enableval="$enable_rpath_hack"
7886   test "$enableval" != no && enableval=yes
7887         if test "$enableval" != "yes" ; then
7888     cf_disable_rpath_hack=yes
7889         else
7890                 cf_disable_rpath_hack=no
7891         fi
7892 else
7893   enableval=yes
7894         cf_disable_rpath_hack=no
7895
7896 fi;
7897 echo "$as_me:7897: result: $cf_disable_rpath_hack" >&5
7898 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7899 if test "$cf_disable_rpath_hack" = no ; then
7900
7901 echo "$as_me:7901: checking for updated LDFLAGS" >&5
7902 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7903 if test -n "$LD_RPATH_OPT" ; then
7904         echo "$as_me:7904: result: maybe" >&5
7905 echo "${ECHO_T}maybe" >&6
7906
7907         for ac_prog in ldd
7908 do
7909   # Extract the first word of "$ac_prog", so it can be a program name with args.
7910 set dummy $ac_prog; ac_word=$2
7911 echo "$as_me:7911: checking for $ac_word" >&5
7912 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7913 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7914   echo $ECHO_N "(cached) $ECHO_C" >&6
7915 else
7916   if test -n "$cf_ldd_prog"; then
7917   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7918 else
7919   ac_save_IFS=$IFS; IFS=$ac_path_separator
7920 ac_dummy="$PATH"
7921 for ac_dir in $ac_dummy; do
7922   IFS=$ac_save_IFS
7923   test -z "$ac_dir" && ac_dir=.
7924   $as_executable_p "$ac_dir/$ac_word" || continue
7925 ac_cv_prog_cf_ldd_prog="$ac_prog"
7926 echo "$as_me:7926: found $ac_dir/$ac_word" >&5
7927 break
7928 done
7929
7930 fi
7931 fi
7932 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7933 if test -n "$cf_ldd_prog"; then
7934   echo "$as_me:7934: result: $cf_ldd_prog" >&5
7935 echo "${ECHO_T}$cf_ldd_prog" >&6
7936 else
7937   echo "$as_me:7937: result: no" >&5
7938 echo "${ECHO_T}no" >&6
7939 fi
7940
7941   test -n "$cf_ldd_prog" && break
7942 done
7943 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7944
7945         cf_rpath_list="/usr/lib /lib"
7946         if test "$cf_ldd_prog" != no
7947         then
7948                 cf_rpath_oops=
7949
7950 cat >conftest.$ac_ext <<_ACEOF
7951 #line 7951 "configure"
7952 #include "confdefs.h"
7953 #include <stdio.h>
7954 int
7955 main (void)
7956 {
7957 printf("Hello");
7958   ;
7959   return 0;
7960 }
7961 _ACEOF
7962 rm -f conftest.$ac_objext conftest$ac_exeext
7963 if { (eval echo "$as_me:7963: \"$ac_link\"") >&5
7964   (eval $ac_link) 2>&5
7965   ac_status=$?
7966   echo "$as_me:7966: \$? = $ac_status" >&5
7967   (exit $ac_status); } &&
7968          { ac_try='test -s conftest$ac_exeext'
7969   { (eval echo "$as_me:7969: \"$ac_try\"") >&5
7970   (eval $ac_try) 2>&5
7971   ac_status=$?
7972   echo "$as_me:7972: \$? = $ac_status" >&5
7973   (exit $ac_status); }; }; then
7974   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7975                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7976 else
7977   echo "$as_me: failed program was:" >&5
7978 cat conftest.$ac_ext >&5
7979 fi
7980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7981
7982                 # If we passed the link-test, but get a "not found" on a given library,
7983                 # this could be due to inept reconfiguration of gcc to make it only
7984                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7985                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7986                 # /usr/local libraries.
7987                 if test -n "$cf_rpath_oops"
7988                 then
7989                         for cf_rpath_src in $cf_rpath_oops
7990                         do
7991                                 for cf_rpath_dir in \
7992                                         /usr/local \
7993                                         /usr/pkg \
7994                                         /opt/sfw
7995                                 do
7996                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7997                                         then
7998                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7999
8000 echo "${as_me:-configure}:8000: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8001
8002                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8003                                                 break
8004                                         fi
8005                                 done
8006                         done
8007                 fi
8008         fi
8009
8010         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8011
8012 echo "${as_me:-configure}:8012: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8013
8014 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8015
8016 echo "${as_me:-configure}:8016: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8017
8018 cf_rpath_dst=
8019 for cf_rpath_src in $LDFLAGS
8020 do
8021         case $cf_rpath_src in
8022         (-L*)
8023
8024                 # check if this refers to a directory which we will ignore
8025                 cf_rpath_skip=no
8026                 if test -n "$cf_rpath_list"
8027                 then
8028                         for cf_rpath_item in $cf_rpath_list
8029                         do
8030                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8031                                 then
8032                                         cf_rpath_skip=yes
8033                                         break
8034                                 fi
8035                         done
8036                 fi
8037
8038                 if test "$cf_rpath_skip" = no
8039                 then
8040                         # transform the option
8041                         if test "$LD_RPATH_OPT" = "-R " ; then
8042                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8043                         else
8044                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8045                         fi
8046
8047                         # if we have not already added this, add it now
8048                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8049                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8050                         then
8051                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8052
8053 echo "${as_me:-configure}:8053: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8054
8055                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8056                         fi
8057                 fi
8058                 ;;
8059         esac
8060         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8061 done
8062 LDFLAGS=$cf_rpath_dst
8063
8064 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8065
8066 echo "${as_me:-configure}:8066: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8067
8068 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8069
8070 echo "${as_me:-configure}:8070: testing ...checking LIBS $LIBS ..." 1>&5
8071
8072 cf_rpath_dst=
8073 for cf_rpath_src in $LIBS
8074 do
8075         case $cf_rpath_src in
8076         (-L*)
8077
8078                 # check if this refers to a directory which we will ignore
8079                 cf_rpath_skip=no
8080                 if test -n "$cf_rpath_list"
8081                 then
8082                         for cf_rpath_item in $cf_rpath_list
8083                         do
8084                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8085                                 then
8086                                         cf_rpath_skip=yes
8087                                         break
8088                                 fi
8089                         done
8090                 fi
8091
8092                 if test "$cf_rpath_skip" = no
8093                 then
8094                         # transform the option
8095                         if test "$LD_RPATH_OPT" = "-R " ; then
8096                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8097                         else
8098                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8099                         fi
8100
8101                         # if we have not already added this, add it now
8102                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8103                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8104                         then
8105                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8106
8107 echo "${as_me:-configure}:8107: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8108
8109                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8110                         fi
8111                 fi
8112                 ;;
8113         esac
8114         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8115 done
8116 LIBS=$cf_rpath_dst
8117
8118 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8119
8120 echo "${as_me:-configure}:8120: testing ...checked LIBS $LIBS ..." 1>&5
8121
8122         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8123
8124 echo "${as_me:-configure}:8124: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8125
8126 else
8127         echo "$as_me:8127: result: no" >&5
8128 echo "${ECHO_T}no" >&6
8129 fi
8130
8131 fi
8132
8133 fi
8134
8135 ### Depending on the system, someone may use rpath to build ncurses but not
8136 # want users of the package to rely upon that feature.  Give those people an
8137 # option to suppress that detail from EXTRA_LDFLAGS.
8138 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8139 if test -n "$EXTRA_PKG_LDFLAGS"
8140 then
8141         echo "$as_me:8141: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8142 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8143
8144 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8145 if test "${enable_pkg_ldflags+set}" = set; then
8146   enableval="$enable_pkg_ldflags"
8147   test "$enableval" != no && enableval=yes
8148         if test "$enableval" != "yes" ; then
8149     disable_pkg_ldflags=yes
8150         else
8151                 disable_pkg_ldflags=no
8152         fi
8153 else
8154   enableval=yes
8155         disable_pkg_ldflags=no
8156
8157 fi;
8158         echo "$as_me:8158: result: $disable_pkg_ldflags" >&5
8159 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8160         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8161 fi
8162
8163 ###############################################################################
8164
8165 ###     use option --with-extra-suffix to append suffix to headers and libraries
8166 echo "$as_me:8166: checking if you wish to append extra suffix to header/library paths" >&5
8167 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8168 EXTRA_SUFFIX=
8169
8170 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8171 if test "${with_extra_suffix+set}" = set; then
8172   withval="$with_extra_suffix"
8173   case x$withval in
8174         (no)
8175                 ;;
8176         (xyes|x)
8177                 EXTRA_SUFFIX=$cf_cv_abi_version
8178                 ;;
8179         (*)
8180                 EXTRA_SUFFIX=$withval
8181                 ;;
8182         esac
8183
8184 fi;
8185 echo "$as_me:8185: result: $EXTRA_SUFFIX" >&5
8186 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8187
8188 ###     use option --disable-overwrite to leave out the link to -lcurses
8189 echo "$as_me:8189: checking if you wish to install ncurses overwriting curses" >&5
8190 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8191
8192 # Check whether --enable-overwrite or --disable-overwrite was given.
8193 if test "${enable_overwrite+set}" = set; then
8194   enableval="$enable_overwrite"
8195   with_overwrite=$enableval
8196 else
8197   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8198 fi;
8199 echo "$as_me:8199: result: $with_overwrite" >&5
8200 echo "${ECHO_T}$with_overwrite" >&6
8201
8202 echo "$as_me:8202: checking if external terminfo-database is used" >&5
8203 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8204
8205 # Check whether --enable-database or --disable-database was given.
8206 if test "${enable_database+set}" = set; then
8207   enableval="$enable_database"
8208   use_database=$enableval
8209 else
8210   use_database=yes
8211 fi;
8212 echo "$as_me:8212: result: $use_database" >&5
8213 echo "${ECHO_T}$use_database" >&6
8214
8215 case $host_os in
8216 (os2*)
8217         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8218         ;;
8219 (*)
8220         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8221         ;;
8222 esac
8223
8224 NCURSES_USE_DATABASE=0
8225 if test "$use_database" != no ; then
8226         NCURSES_USE_DATABASE=1
8227
8228         echo "$as_me:8228: checking which terminfo source-file will be installed" >&5
8229 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8230
8231 # Check whether --with-database or --without-database was given.
8232 if test "${with_database+set}" = set; then
8233   withval="$with_database"
8234   TERMINFO_SRC=$withval
8235 fi;
8236         echo "$as_me:8236: result: $TERMINFO_SRC" >&5
8237 echo "${ECHO_T}$TERMINFO_SRC" >&6
8238
8239         echo "$as_me:8239: checking whether to use hashed database instead of directory/tree" >&5
8240 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8241
8242 # Check whether --with-hashed-db or --without-hashed-db was given.
8243 if test "${with_hashed_db+set}" = set; then
8244   withval="$with_hashed_db"
8245
8246 else
8247   with_hashed_db=no
8248 fi;
8249         echo "$as_me:8249: result: $with_hashed_db" >&5
8250 echo "${ECHO_T}$with_hashed_db" >&6
8251 else
8252         with_hashed_db=no
8253 fi
8254
8255 echo "$as_me:8255: checking for list of fallback descriptions" >&5
8256 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8257
8258 # Check whether --with-fallbacks or --without-fallbacks was given.
8259 if test "${with_fallbacks+set}" = set; then
8260   withval="$with_fallbacks"
8261   with_fallback=$withval
8262 else
8263   with_fallback=
8264 fi;
8265 echo "$as_me:8265: result: $with_fallback" >&5
8266 echo "${ECHO_T}$with_fallback" >&6
8267
8268 case ".$with_fallback" in
8269 (.|.no)
8270         FALLBACK_LIST=
8271         ;;
8272 (.yes)
8273         { echo "$as_me:8273: WARNING: expected a list of terminal descriptions" >&5
8274 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8275         ;;
8276 (*)
8277         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8278         ;;
8279 esac
8280
8281 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8282 # tree for generating the terminal descriptions that will be compiled into the
8283 # library.  If your toolchain is old, it may not handle current terminal
8284 # databases.  Use configure-options to point to the tools which will be used,
8285 # rather than the first ones found on the $PATH.
8286 if test -n "$ac_tool_prefix"; then
8287   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8288 set dummy ${ac_tool_prefix}tic; ac_word=$2
8289 echo "$as_me:8289: checking for $ac_word" >&5
8290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8291 if test "${ac_cv_prog_TIC+set}" = set; then
8292   echo $ECHO_N "(cached) $ECHO_C" >&6
8293 else
8294   if test -n "$TIC"; then
8295   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8296 else
8297   ac_save_IFS=$IFS; IFS=$ac_path_separator
8298 ac_dummy="$PATH"
8299 for ac_dir in $ac_dummy; do
8300   IFS=$ac_save_IFS
8301   test -z "$ac_dir" && ac_dir=.
8302   $as_executable_p "$ac_dir/$ac_word" || continue
8303 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8304 echo "$as_me:8304: found $ac_dir/$ac_word" >&5
8305 break
8306 done
8307
8308 fi
8309 fi
8310 TIC=$ac_cv_prog_TIC
8311 if test -n "$TIC"; then
8312   echo "$as_me:8312: result: $TIC" >&5
8313 echo "${ECHO_T}$TIC" >&6
8314 else
8315   echo "$as_me:8315: result: no" >&5
8316 echo "${ECHO_T}no" >&6
8317 fi
8318
8319 fi
8320 if test -z "$ac_cv_prog_TIC"; then
8321   ac_ct_TIC=$TIC
8322   # Extract the first word of "tic", so it can be a program name with args.
8323 set dummy tic; ac_word=$2
8324 echo "$as_me:8324: checking for $ac_word" >&5
8325 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8326 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8327   echo $ECHO_N "(cached) $ECHO_C" >&6
8328 else
8329   if test -n "$ac_ct_TIC"; then
8330   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8331 else
8332   ac_save_IFS=$IFS; IFS=$ac_path_separator
8333 ac_dummy="$PATH"
8334 for ac_dir in $ac_dummy; do
8335   IFS=$ac_save_IFS
8336   test -z "$ac_dir" && ac_dir=.
8337   $as_executable_p "$ac_dir/$ac_word" || continue
8338 ac_cv_prog_ac_ct_TIC="tic"
8339 echo "$as_me:8339: found $ac_dir/$ac_word" >&5
8340 break
8341 done
8342
8343 fi
8344 fi
8345 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8346 if test -n "$ac_ct_TIC"; then
8347   echo "$as_me:8347: result: $ac_ct_TIC" >&5
8348 echo "${ECHO_T}$ac_ct_TIC" >&6
8349 else
8350   echo "$as_me:8350: result: no" >&5
8351 echo "${ECHO_T}no" >&6
8352 fi
8353
8354   TIC=$ac_ct_TIC
8355 else
8356   TIC="$ac_cv_prog_TIC"
8357 fi
8358
8359 if test -n "$ac_tool_prefix"; then
8360   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8361 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8362 echo "$as_me:8362: checking for $ac_word" >&5
8363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8364 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8365   echo $ECHO_N "(cached) $ECHO_C" >&6
8366 else
8367   if test -n "$INFOCMP"; then
8368   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8369 else
8370   ac_save_IFS=$IFS; IFS=$ac_path_separator
8371 ac_dummy="$PATH"
8372 for ac_dir in $ac_dummy; do
8373   IFS=$ac_save_IFS
8374   test -z "$ac_dir" && ac_dir=.
8375   $as_executable_p "$ac_dir/$ac_word" || continue
8376 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8377 echo "$as_me:8377: found $ac_dir/$ac_word" >&5
8378 break
8379 done
8380
8381 fi
8382 fi
8383 INFOCMP=$ac_cv_prog_INFOCMP
8384 if test -n "$INFOCMP"; then
8385   echo "$as_me:8385: result: $INFOCMP" >&5
8386 echo "${ECHO_T}$INFOCMP" >&6
8387 else
8388   echo "$as_me:8388: result: no" >&5
8389 echo "${ECHO_T}no" >&6
8390 fi
8391
8392 fi
8393 if test -z "$ac_cv_prog_INFOCMP"; then
8394   ac_ct_INFOCMP=$INFOCMP
8395   # Extract the first word of "infocmp", so it can be a program name with args.
8396 set dummy infocmp; ac_word=$2
8397 echo "$as_me:8397: checking for $ac_word" >&5
8398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8399 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8400   echo $ECHO_N "(cached) $ECHO_C" >&6
8401 else
8402   if test -n "$ac_ct_INFOCMP"; then
8403   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8404 else
8405   ac_save_IFS=$IFS; IFS=$ac_path_separator
8406 ac_dummy="$PATH"
8407 for ac_dir in $ac_dummy; do
8408   IFS=$ac_save_IFS
8409   test -z "$ac_dir" && ac_dir=.
8410   $as_executable_p "$ac_dir/$ac_word" || continue
8411 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8412 echo "$as_me:8412: found $ac_dir/$ac_word" >&5
8413 break
8414 done
8415
8416 fi
8417 fi
8418 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8419 if test -n "$ac_ct_INFOCMP"; then
8420   echo "$as_me:8420: result: $ac_ct_INFOCMP" >&5
8421 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8422 else
8423   echo "$as_me:8423: result: no" >&5
8424 echo "${ECHO_T}no" >&6
8425 fi
8426
8427   INFOCMP=$ac_ct_INFOCMP
8428 else
8429   INFOCMP="$ac_cv_prog_INFOCMP"
8430 fi
8431
8432 if test -n "$FALLBACK_LIST"
8433 then
8434
8435 # Check whether --with-tic-path or --without-tic-path was given.
8436 if test "${with_tic_path+set}" = set; then
8437   withval="$with_tic_path"
8438   echo "$as_me:8438: checking for tic program for fallbacks" >&5
8439 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8440                 TIC=$withval
8441                 echo "$as_me:8441: result: $TIC" >&5
8442 echo "${ECHO_T}$TIC" >&6
8443
8444 if test "x$prefix" != xNONE; then
8445         cf_path_syntax="$prefix"
8446 else
8447         cf_path_syntax="$ac_default_prefix"
8448 fi
8449
8450 case ".$TIC" in
8451 (.\$\(*\)*|.\'*\'*)
8452         ;;
8453 (..|./*|.\\*)
8454         ;;
8455 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8456         ;;
8457 (.\${*prefix}*|.\${*dir}*)
8458         eval TIC="$TIC"
8459         case ".$TIC" in
8460         (.NONE/*)
8461                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8462                 ;;
8463         esac
8464         ;;
8465 (.no|.NONE/*)
8466         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8467         ;;
8468 (*)
8469         { { echo "$as_me:8469: error: expected a pathname, not \"$TIC\"" >&5
8470 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8471    { (exit 1); exit 1; }; }
8472         ;;
8473 esac
8474
8475 else
8476
8477 test -z "$TIC" && TIC=tic
8478 for ac_prog in $TIC tic
8479 do
8480   # Extract the first word of "$ac_prog", so it can be a program name with args.
8481 set dummy $ac_prog; ac_word=$2
8482 echo "$as_me:8482: checking for $ac_word" >&5
8483 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8484 if test "${ac_cv_path_TIC+set}" = set; then
8485   echo $ECHO_N "(cached) $ECHO_C" >&6
8486 else
8487   case $TIC in
8488   [\\/]* | ?:[\\/]*)
8489   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8490   ;;
8491   *)
8492   ac_save_IFS=$IFS; IFS=$ac_path_separator
8493 ac_dummy="$PATH:/usr/local/ncurses/bin"
8494 for ac_dir in $ac_dummy; do
8495   IFS=$ac_save_IFS
8496   test -z "$ac_dir" && ac_dir=.
8497   if $as_executable_p "$ac_dir/$ac_word"; then
8498    ac_cv_path_TIC="$ac_dir/$ac_word"
8499    echo "$as_me:8499: found $ac_dir/$ac_word" >&5
8500    break
8501 fi
8502 done
8503
8504   ;;
8505 esac
8506 fi
8507 TIC=$ac_cv_path_TIC
8508
8509 if test -n "$TIC"; then
8510   echo "$as_me:8510: result: $TIC" >&5
8511 echo "${ECHO_T}$TIC" >&6
8512 else
8513   echo "$as_me:8513: result: no" >&5
8514 echo "${ECHO_T}no" >&6
8515 fi
8516
8517   test -n "$TIC" && break
8518 done
8519 test -n "$TIC" || TIC="$TIC"
8520
8521 cf_path_prog=""
8522 cf_path_args=""
8523 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8524 for cf_temp in $ac_cv_path_TIC
8525 do
8526         if test -z "$cf_path_prog" ; then
8527                 if test "$with_full_paths" = yes ; then
8528
8529 if test "x$prefix" != xNONE; then
8530         cf_path_syntax="$prefix"
8531 else
8532         cf_path_syntax="$ac_default_prefix"
8533 fi
8534
8535 case ".$cf_temp" in
8536 (.\$\(*\)*|.\'*\'*)
8537         ;;
8538 (..|./*|.\\*)
8539         ;;
8540 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8541         ;;
8542 (.\${*prefix}*|.\${*dir}*)
8543         eval cf_temp="$cf_temp"
8544         case ".$cf_temp" in
8545         (.NONE/*)
8546                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8547                 ;;
8548         esac
8549         ;;
8550 (.no|.NONE/*)
8551         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8552         ;;
8553 (*)
8554         break
8555         ;;
8556 esac
8557
8558                         cf_path_prog="$cf_temp"
8559                 else
8560                         cf_path_prog="`basename $cf_temp`"
8561                 fi
8562         elif test -z "$cf_path_args" ; then
8563                 cf_path_args="$cf_temp"
8564         else
8565                 cf_path_args="$cf_path_args $cf_temp"
8566         fi
8567 done
8568 IFS="$cf_save_ifs"
8569
8570 if test -n "$cf_path_prog" ; then
8571
8572 echo "${as_me:-configure}:8572: testing defining path for ${cf_path_prog} ..." 1>&5
8573
8574 cat >>confdefs.h <<EOF
8575 #define TIC_PATH "$cf_path_prog"
8576 EOF
8577
8578         test -n "$cf_path_args" &&
8579 cat >>confdefs.h <<EOF
8580 #define TIC_ARGS "$cf_path_args"
8581 EOF
8582
8583 fi
8584
8585                 if test -z "$TIC"
8586                 then
8587                         { echo "$as_me:8587: WARNING: no tic program found for fallbacks" >&5
8588 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8589                 fi
8590
8591 fi;
8592
8593 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8594 if test "${with_infocmp_path+set}" = set; then
8595   withval="$with_infocmp_path"
8596   echo "$as_me:8596: checking for infocmp program for fallbacks" >&5
8597 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8598                 INFOCMP=$withval
8599                 echo "$as_me:8599: result: $INFOCMP" >&5
8600 echo "${ECHO_T}$INFOCMP" >&6
8601
8602 if test "x$prefix" != xNONE; then
8603         cf_path_syntax="$prefix"
8604 else
8605         cf_path_syntax="$ac_default_prefix"
8606 fi
8607
8608 case ".$INFOCMP" in
8609 (.\$\(*\)*|.\'*\'*)
8610         ;;
8611 (..|./*|.\\*)
8612         ;;
8613 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8614         ;;
8615 (.\${*prefix}*|.\${*dir}*)
8616         eval INFOCMP="$INFOCMP"
8617         case ".$INFOCMP" in
8618         (.NONE/*)
8619                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8620                 ;;
8621         esac
8622         ;;
8623 (.no|.NONE/*)
8624         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8625         ;;
8626 (*)
8627         { { echo "$as_me:8627: error: expected a pathname, not \"$INFOCMP\"" >&5
8628 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8629    { (exit 1); exit 1; }; }
8630         ;;
8631 esac
8632
8633 else
8634
8635 test -z "$INFOCMP" && INFOCMP=infocmp
8636 for ac_prog in $INFOCMP infocmp
8637 do
8638   # Extract the first word of "$ac_prog", so it can be a program name with args.
8639 set dummy $ac_prog; ac_word=$2
8640 echo "$as_me:8640: checking for $ac_word" >&5
8641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8642 if test "${ac_cv_path_INFOCMP+set}" = set; then
8643   echo $ECHO_N "(cached) $ECHO_C" >&6
8644 else
8645   case $INFOCMP in
8646   [\\/]* | ?:[\\/]*)
8647   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8648   ;;
8649   *)
8650   ac_save_IFS=$IFS; IFS=$ac_path_separator
8651 ac_dummy="$PATH:/usr/local/ncurses/bin"
8652 for ac_dir in $ac_dummy; do
8653   IFS=$ac_save_IFS
8654   test -z "$ac_dir" && ac_dir=.
8655   if $as_executable_p "$ac_dir/$ac_word"; then
8656    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8657    echo "$as_me:8657: found $ac_dir/$ac_word" >&5
8658    break
8659 fi
8660 done
8661
8662   ;;
8663 esac
8664 fi
8665 INFOCMP=$ac_cv_path_INFOCMP
8666
8667 if test -n "$INFOCMP"; then
8668   echo "$as_me:8668: result: $INFOCMP" >&5
8669 echo "${ECHO_T}$INFOCMP" >&6
8670 else
8671   echo "$as_me:8671: result: no" >&5
8672 echo "${ECHO_T}no" >&6
8673 fi
8674
8675   test -n "$INFOCMP" && break
8676 done
8677 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8678
8679 cf_path_prog=""
8680 cf_path_args=""
8681 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8682 for cf_temp in $ac_cv_path_INFOCMP
8683 do
8684         if test -z "$cf_path_prog" ; then
8685                 if test "$with_full_paths" = yes ; then
8686
8687 if test "x$prefix" != xNONE; then
8688         cf_path_syntax="$prefix"
8689 else
8690         cf_path_syntax="$ac_default_prefix"
8691 fi
8692
8693 case ".$cf_temp" in
8694 (.\$\(*\)*|.\'*\'*)
8695         ;;
8696 (..|./*|.\\*)
8697         ;;
8698 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8699         ;;
8700 (.\${*prefix}*|.\${*dir}*)
8701         eval cf_temp="$cf_temp"
8702         case ".$cf_temp" in
8703         (.NONE/*)
8704                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8705                 ;;
8706         esac
8707         ;;
8708 (.no|.NONE/*)
8709         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8710         ;;
8711 (*)
8712         break
8713         ;;
8714 esac
8715
8716                         cf_path_prog="$cf_temp"
8717                 else
8718                         cf_path_prog="`basename $cf_temp`"
8719                 fi
8720         elif test -z "$cf_path_args" ; then
8721                 cf_path_args="$cf_temp"
8722         else
8723                 cf_path_args="$cf_path_args $cf_temp"
8724         fi
8725 done
8726 IFS="$cf_save_ifs"
8727
8728 if test -n "$cf_path_prog" ; then
8729
8730 echo "${as_me:-configure}:8730: testing defining path for ${cf_path_prog} ..." 1>&5
8731
8732 cat >>confdefs.h <<EOF
8733 #define INFOCMP_PATH "$cf_path_prog"
8734 EOF
8735
8736         test -n "$cf_path_args" &&
8737 cat >>confdefs.h <<EOF
8738 #define INFOCMP_ARGS "$cf_path_args"
8739 EOF
8740
8741 fi
8742
8743                 if test -z "$INFOCMP"
8744                 then
8745                         { echo "$as_me:8745: WARNING: no infocmp program found for fallbacks" >&5
8746 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8747                 fi
8748
8749 fi;
8750
8751         test -z "$TIC" && FALLBACK_LIST=
8752         test -z "$INFOCMP" && FALLBACK_LIST=
8753         if test -z "$FALLBACK_LIST"
8754         then
8755                 { echo "$as_me:8755: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8756 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8757         fi
8758 fi
8759
8760 USE_FALLBACKS=
8761 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8762
8763 echo "$as_me:8763: checking if you want modern xterm or antique" >&5
8764 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8765
8766 # Check whether --with-xterm-new or --without-xterm-new was given.
8767 if test "${with_xterm_new+set}" = set; then
8768   withval="$with_xterm_new"
8769   with_xterm_new=$withval
8770 else
8771   with_xterm_new=yes
8772 fi;
8773 case $with_xterm_new in
8774 (no) with_xterm_new=xterm-old;;
8775 (*)      with_xterm_new=xterm-new;;
8776 esac
8777 echo "$as_me:8777: result: $with_xterm_new" >&5
8778 echo "${ECHO_T}$with_xterm_new" >&6
8779 WHICH_XTERM=$with_xterm_new
8780
8781 echo "$as_me:8781: checking if xterm backspace sends BS or DEL" >&5
8782 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8783
8784 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8785 if test "${with_xterm_kbs+set}" = set; then
8786   withval="$with_xterm_kbs"
8787   with_xterm_kbs=$withval
8788 else
8789   with_xterm_kbs=BS
8790 fi;
8791 case x$with_xterm_kbs in
8792 (xyes|xno|xBS|xbs|x8)
8793         with_xterm_kbs=BS
8794         ;;
8795 (xDEL|xdel|x127)
8796         with_xterm_kbs=DEL
8797         ;;
8798 (*)
8799         with_xterm_kbs=$withval
8800         ;;
8801 esac
8802 echo "$as_me:8802: result: $with_xterm_kbs" >&5
8803 echo "${ECHO_T}$with_xterm_kbs" >&6
8804 XTERM_KBS=$with_xterm_kbs
8805
8806 MAKE_TERMINFO=
8807 if test "$use_database" = no ; then
8808         TERMINFO="${datadir}/terminfo"
8809         MAKE_TERMINFO="#"
8810 else
8811
8812 echo "$as_me:8812: checking for list of terminfo directories" >&5
8813 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8814
8815 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8816 if test "${with_terminfo_dirs+set}" = set; then
8817   withval="$with_terminfo_dirs"
8818
8819 else
8820   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8821 fi;
8822 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8823 cf_dst_path=
8824 for cf_src_path in $withval
8825 do
8826
8827 if test "x$prefix" != xNONE; then
8828         cf_path_syntax="$prefix"
8829 else
8830         cf_path_syntax="$ac_default_prefix"
8831 fi
8832
8833 case ".$cf_src_path" in
8834 (.\$\(*\)*|.\'*\'*)
8835         ;;
8836 (..|./*|.\\*)
8837         ;;
8838 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8839         ;;
8840 (.\${*prefix}*|.\${*dir}*)
8841         eval cf_src_path="$cf_src_path"
8842         case ".$cf_src_path" in
8843         (.NONE/*)
8844                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8845                 ;;
8846         esac
8847         ;;
8848 (.no|.NONE/*)
8849         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8850         ;;
8851 (*)
8852         { { echo "$as_me:8852: error: expected a pathname, not \"$cf_src_path\"" >&5
8853 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8854    { (exit 1); exit 1; }; }
8855         ;;
8856 esac
8857
8858   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8859   cf_dst_path="${cf_dst_path}${cf_src_path}"
8860 done
8861 IFS="$ac_save_ifs"
8862
8863 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8864 # so we have to check/work around.  We do prefer the result of "eval"...
8865 eval cf_dst_eval="$cf_dst_path"
8866 case "x$cf_dst_eval" in
8867 (xNONE*)
8868         TERMINFO_DIRS=$cf_dst_path
8869         ;;
8870 (*)
8871         TERMINFO_DIRS="$cf_dst_eval"
8872         ;;
8873 esac
8874
8875 echo "$as_me:8875: result: $TERMINFO_DIRS" >&5
8876 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8877 test -n "$TERMINFO_DIRS" &&
8878 cat >>confdefs.h <<EOF
8879 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8880 EOF
8881
8882 case "x$TERMINFO" in
8883 x???:*)
8884         { echo "$as_me:8884: WARNING: ignoring non-directory/file TERMINFO value" >&5
8885 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8886         unset TERMINFO
8887         ;;
8888 esac
8889
8890 echo "$as_me:8890: checking for default terminfo directory" >&5
8891 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8892
8893 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8894 if test "${with_default_terminfo_dir+set}" = set; then
8895   withval="$with_default_terminfo_dir"
8896
8897 else
8898   withval="${TERMINFO:-${datadir}/terminfo}"
8899 fi; if test -n "${datadir}/terminfo" ; then
8900
8901 if test "x$prefix" != xNONE; then
8902         cf_path_syntax="$prefix"
8903 else
8904         cf_path_syntax="$ac_default_prefix"
8905 fi
8906
8907 case ".$withval" in
8908 (.\$\(*\)*|.\'*\'*)
8909         ;;
8910 (..|./*|.\\*)
8911         ;;
8912 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8913         ;;
8914 (.\${*prefix}*|.\${*dir}*)
8915         eval withval="$withval"
8916         case ".$withval" in
8917         (.NONE/*)
8918                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8919                 ;;
8920         esac
8921         ;;
8922 (.no|.NONE/*)
8923         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8924         ;;
8925 (*)
8926         { { echo "$as_me:8926: error: expected a pathname, not \"$withval\"" >&5
8927 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8928    { (exit 1); exit 1; }; }
8929         ;;
8930 esac
8931
8932 fi
8933 eval TERMINFO="$withval"
8934
8935 echo "$as_me:8935: result: $TERMINFO" >&5
8936 echo "${ECHO_T}$TERMINFO" >&6
8937
8938 cat >>confdefs.h <<EOF
8939 #define TERMINFO "$TERMINFO"
8940 EOF
8941
8942 fi
8943
8944 ###     use option --disable-big-core to make tic run on small machines
8945 ###     We need 4Mb, check if we can allocate 50% more than that.
8946 echo "$as_me:8946: checking if big-core option selected" >&5
8947 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8948
8949 # Check whether --enable-big-core or --disable-big-core was given.
8950 if test "${enable_big_core+set}" = set; then
8951   enableval="$enable_big_core"
8952   with_big_core=$enableval
8953 else
8954   if test "$cross_compiling" = yes; then
8955   with_big_core=no
8956 else
8957   cat >conftest.$ac_ext <<_ACEOF
8958 #line 8958 "configure"
8959 #include "confdefs.h"
8960
8961 #include <stdlib.h>
8962 #include <string.h>
8963 int main() {
8964         unsigned long n = 6000000L;
8965         char *s = malloc(n);
8966         if (s != 0)
8967                 s[0] = s[n-1] = 0;
8968         ${cf_cv_main_return:-return}(s == 0);
8969 }
8970 _ACEOF
8971 rm -f conftest$ac_exeext
8972 if { (eval echo "$as_me:8972: \"$ac_link\"") >&5
8973   (eval $ac_link) 2>&5
8974   ac_status=$?
8975   echo "$as_me:8975: \$? = $ac_status" >&5
8976   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8977   { (eval echo "$as_me:8977: \"$ac_try\"") >&5
8978   (eval $ac_try) 2>&5
8979   ac_status=$?
8980   echo "$as_me:8980: \$? = $ac_status" >&5
8981   (exit $ac_status); }; }; then
8982   with_big_core=yes
8983 else
8984   echo "$as_me: program exited with status $ac_status" >&5
8985 echo "$as_me: failed program was:" >&5
8986 cat conftest.$ac_ext >&5
8987 with_big_core=no
8988 fi
8989 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8990 fi
8991 fi;
8992 echo "$as_me:8992: result: $with_big_core" >&5
8993 echo "${ECHO_T}$with_big_core" >&6
8994 test "x$with_big_core" = "xyes" &&
8995 cat >>confdefs.h <<\EOF
8996 #define HAVE_BIG_CORE 1
8997 EOF
8998
8999 ### ISO C only guarantees 512-char strings, we have tables which load faster
9000 ### when constructed using "big" strings.  More than the C compiler, the awk
9001 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9002 echo "$as_me:9002: checking if big-strings option selected" >&5
9003 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9004
9005 # Check whether --enable-big-strings or --disable-big-strings was given.
9006 if test "${enable_big_strings+set}" = set; then
9007   enableval="$enable_big_strings"
9008   with_big_strings=$enableval
9009 else
9010
9011         case x$AWK in
9012         (x)
9013                 eval with_big_strings=no
9014                 ;;
9015         (*)
9016                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9017                         | $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
9018                         eval with_big_strings=yes
9019                 else
9020                         eval with_big_strings=no
9021                 fi
9022                 ;;
9023         esac
9024
9025 fi;
9026 echo "$as_me:9026: result: $with_big_strings" >&5
9027 echo "${ECHO_T}$with_big_strings" >&6
9028
9029 USE_BIG_STRINGS=0
9030 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9031
9032 ###     use option --enable-termcap to compile in the termcap fallback support
9033 echo "$as_me:9033: checking if you want termcap-fallback support" >&5
9034 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9035
9036 # Check whether --enable-termcap or --disable-termcap was given.
9037 if test "${enable_termcap+set}" = set; then
9038   enableval="$enable_termcap"
9039   with_termcap=$enableval
9040 else
9041   with_termcap=no
9042 fi;
9043 echo "$as_me:9043: result: $with_termcap" >&5
9044 echo "${ECHO_T}$with_termcap" >&6
9045
9046 NCURSES_USE_TERMCAP=0
9047 if test "x$with_termcap" != "xyes" ; then
9048         if test "$use_database" = no ; then
9049                 if test -z "$with_fallback" ; then
9050                         { { echo "$as_me:9050: error: You have disabled the database w/o specifying fallbacks" >&5
9051 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9052    { (exit 1); exit 1; }; }
9053                 fi
9054         fi
9055
9056 cat >>confdefs.h <<\EOF
9057 #define PURE_TERMINFO 1
9058 EOF
9059
9060 else
9061
9062         if test "$with_ticlib" != no ; then
9063                 { { echo "$as_me:9063: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9064 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9065    { (exit 1); exit 1; }; }
9066         fi
9067
9068         NCURSES_USE_TERMCAP=1
9069         echo "$as_me:9069: checking for list of termcap files" >&5
9070 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9071
9072 # Check whether --with-termpath or --without-termpath was given.
9073 if test "${with_termpath+set}" = set; then
9074   withval="$with_termpath"
9075
9076 else
9077   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9078 fi;
9079 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9080 cf_dst_path=
9081 for cf_src_path in $withval
9082 do
9083
9084 if test "x$prefix" != xNONE; then
9085         cf_path_syntax="$prefix"
9086 else
9087         cf_path_syntax="$ac_default_prefix"
9088 fi
9089
9090 case ".$cf_src_path" in
9091 (.\$\(*\)*|.\'*\'*)
9092         ;;
9093 (..|./*|.\\*)
9094         ;;
9095 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9096         ;;
9097 (.\${*prefix}*|.\${*dir}*)
9098         eval cf_src_path="$cf_src_path"
9099         case ".$cf_src_path" in
9100         (.NONE/*)
9101                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9102                 ;;
9103         esac
9104         ;;
9105 (.no|.NONE/*)
9106         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9107         ;;
9108 (*)
9109         { { echo "$as_me:9109: error: expected a pathname, not \"$cf_src_path\"" >&5
9110 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9111    { (exit 1); exit 1; }; }
9112         ;;
9113 esac
9114
9115   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9116   cf_dst_path="${cf_dst_path}${cf_src_path}"
9117 done
9118 IFS="$ac_save_ifs"
9119
9120 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9121 # so we have to check/work around.  We do prefer the result of "eval"...
9122 eval cf_dst_eval="$cf_dst_path"
9123 case "x$cf_dst_eval" in
9124 (xNONE*)
9125         TERMPATH=$cf_dst_path
9126         ;;
9127 (*)
9128         TERMPATH="$cf_dst_eval"
9129         ;;
9130 esac
9131
9132         echo "$as_me:9132: result: $TERMPATH" >&5
9133 echo "${ECHO_T}$TERMPATH" >&6
9134         test -n "$TERMPATH" &&
9135 cat >>confdefs.h <<EOF
9136 #define TERMPATH "$TERMPATH"
9137 EOF
9138
9139         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9140         echo "$as_me:9140: checking if fast termcap-loader is needed" >&5
9141 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9142
9143 # Check whether --enable-getcap or --disable-getcap was given.
9144 if test "${enable_getcap+set}" = set; then
9145   enableval="$enable_getcap"
9146   with_getcap=$enableval
9147 else
9148   with_getcap=no
9149 fi;
9150         echo "$as_me:9150: result: $with_getcap" >&5
9151 echo "${ECHO_T}$with_getcap" >&6
9152         test "x$with_getcap" = "xyes" &&
9153 cat >>confdefs.h <<\EOF
9154 #define USE_GETCAP 1
9155 EOF
9156
9157         echo "$as_me:9157: checking if translated termcaps will be cached in ~/.terminfo" >&5
9158 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9159
9160 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9161 if test "${enable_getcap_cache+set}" = set; then
9162   enableval="$enable_getcap_cache"
9163   with_getcap_cache=$enableval
9164 else
9165   with_getcap_cache=no
9166 fi;
9167         echo "$as_me:9167: result: $with_getcap_cache" >&5
9168 echo "${ECHO_T}$with_getcap_cache" >&6
9169         test "x$with_getcap_cache" = "xyes" &&
9170 cat >>confdefs.h <<\EOF
9171 #define USE_GETCAP_CACHE 1
9172 EOF
9173
9174 fi
9175
9176 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9177 echo "$as_me:9177: checking if ~/.terminfo is wanted" >&5
9178 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9179
9180 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9181 if test "${enable_home_terminfo+set}" = set; then
9182   enableval="$enable_home_terminfo"
9183   with_home_terminfo=$enableval
9184 else
9185   with_home_terminfo=yes
9186 fi;
9187 echo "$as_me:9187: result: $with_home_terminfo" >&5
9188 echo "${ECHO_T}$with_home_terminfo" >&6
9189 test "x$with_home_terminfo" = "xyes" &&
9190 cat >>confdefs.h <<\EOF
9191 #define USE_HOME_TERMINFO 1
9192 EOF
9193
9194 echo "$as_me:9194: checking if you want to use restricted environment when running as root" >&5
9195 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9196
9197 # Check whether --enable-root-environ or --disable-root-environ was given.
9198 if test "${enable_root_environ+set}" = set; then
9199   enableval="$enable_root_environ"
9200   with_root_environ=$enableval
9201 else
9202   with_root_environ=yes
9203 fi;
9204 echo "$as_me:9204: result: $with_root_environ" >&5
9205 echo "${ECHO_T}$with_root_environ" >&6
9206 test "x$with_root_environ" = xyes &&
9207 cat >>confdefs.h <<\EOF
9208 #define USE_ROOT_ENVIRON 1
9209 EOF
9210
9211 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9212 ###   to reduce storage requirements for the terminfo database.
9213
9214 for ac_header in \
9215 unistd.h \
9216
9217 do
9218 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9219 echo "$as_me:9219: checking for $ac_header" >&5
9220 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9221 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9222   echo $ECHO_N "(cached) $ECHO_C" >&6
9223 else
9224   cat >conftest.$ac_ext <<_ACEOF
9225 #line 9225 "configure"
9226 #include "confdefs.h"
9227 #include <$ac_header>
9228 _ACEOF
9229 if { (eval echo "$as_me:9229: \"$ac_cpp conftest.$ac_ext\"") >&5
9230   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9231   ac_status=$?
9232   egrep -v '^ *\+' conftest.er1 >conftest.err
9233   rm -f conftest.er1
9234   cat conftest.err >&5
9235   echo "$as_me:9235: \$? = $ac_status" >&5
9236   (exit $ac_status); } >/dev/null; then
9237   if test -s conftest.err; then
9238     ac_cpp_err=$ac_c_preproc_warn_flag
9239   else
9240     ac_cpp_err=
9241   fi
9242 else
9243   ac_cpp_err=yes
9244 fi
9245 if test -z "$ac_cpp_err"; then
9246   eval "$as_ac_Header=yes"
9247 else
9248   echo "$as_me: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   eval "$as_ac_Header=no"
9251 fi
9252 rm -f conftest.err conftest.$ac_ext
9253 fi
9254 echo "$as_me:9254: result: `eval echo '${'$as_ac_Header'}'`" >&5
9255 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9256 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9257   cat >>confdefs.h <<EOF
9258 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9259 EOF
9260
9261 fi
9262 done
9263
9264 for ac_func in \
9265         remove \
9266         unlink
9267 do
9268 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9269 echo "$as_me:9269: checking for $ac_func" >&5
9270 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9271 if eval "test \"\${$as_ac_var+set}\" = set"; then
9272   echo $ECHO_N "(cached) $ECHO_C" >&6
9273 else
9274   cat >conftest.$ac_ext <<_ACEOF
9275 #line 9275 "configure"
9276 #include "confdefs.h"
9277 #define $ac_func autoconf_temporary
9278 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9279 #undef $ac_func
9280
9281 #ifdef __cplusplus
9282 extern "C"
9283 #endif
9284
9285 /* We use char because int might match the return type of a gcc2
9286    builtin and then its argument prototype would still apply.  */
9287 char $ac_func (void);
9288
9289 int
9290 main (void)
9291 {
9292
9293 /* The GNU C library defines stubs for functions which it implements
9294     to always fail with ENOSYS.  Some functions are actually named
9295     something starting with __ and the normal name is an alias.  */
9296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9297 #error found stub for $ac_func
9298 #endif
9299
9300         return $ac_func ();
9301   ;
9302   return 0;
9303 }
9304 _ACEOF
9305 rm -f conftest.$ac_objext conftest$ac_exeext
9306 if { (eval echo "$as_me:9306: \"$ac_link\"") >&5
9307   (eval $ac_link) 2>&5
9308   ac_status=$?
9309   echo "$as_me:9309: \$? = $ac_status" >&5
9310   (exit $ac_status); } &&
9311          { ac_try='test -s conftest$ac_exeext'
9312   { (eval echo "$as_me:9312: \"$ac_try\"") >&5
9313   (eval $ac_try) 2>&5
9314   ac_status=$?
9315   echo "$as_me:9315: \$? = $ac_status" >&5
9316   (exit $ac_status); }; }; then
9317   eval "$as_ac_var=yes"
9318 else
9319   echo "$as_me: failed program was:" >&5
9320 cat conftest.$ac_ext >&5
9321 eval "$as_ac_var=no"
9322 fi
9323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9324 fi
9325 echo "$as_me:9325: result: `eval echo '${'$as_ac_var'}'`" >&5
9326 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9327 if test `eval echo '${'$as_ac_var'}'` = yes; then
9328   cat >>confdefs.h <<EOF
9329 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9330 EOF
9331
9332 fi
9333 done
9334
9335 if test "$cross_compiling" = yes ; then
9336
9337 for ac_func in \
9338                 link \
9339                 symlink
9340 do
9341 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9342 echo "$as_me:9342: checking for $ac_func" >&5
9343 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9344 if eval "test \"\${$as_ac_var+set}\" = set"; then
9345   echo $ECHO_N "(cached) $ECHO_C" >&6
9346 else
9347   cat >conftest.$ac_ext <<_ACEOF
9348 #line 9348 "configure"
9349 #include "confdefs.h"
9350 #define $ac_func autoconf_temporary
9351 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9352 #undef $ac_func
9353
9354 #ifdef __cplusplus
9355 extern "C"
9356 #endif
9357
9358 /* We use char because int might match the return type of a gcc2
9359    builtin and then its argument prototype would still apply.  */
9360 char $ac_func (void);
9361
9362 int
9363 main (void)
9364 {
9365
9366 /* The GNU C library defines stubs for functions which it implements
9367     to always fail with ENOSYS.  Some functions are actually named
9368     something starting with __ and the normal name is an alias.  */
9369 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9370 #error found stub for $ac_func
9371 #endif
9372
9373         return $ac_func ();
9374   ;
9375   return 0;
9376 }
9377 _ACEOF
9378 rm -f conftest.$ac_objext conftest$ac_exeext
9379 if { (eval echo "$as_me:9379: \"$ac_link\"") >&5
9380   (eval $ac_link) 2>&5
9381   ac_status=$?
9382   echo "$as_me:9382: \$? = $ac_status" >&5
9383   (exit $ac_status); } &&
9384          { ac_try='test -s conftest$ac_exeext'
9385   { (eval echo "$as_me:9385: \"$ac_try\"") >&5
9386   (eval $ac_try) 2>&5
9387   ac_status=$?
9388   echo "$as_me:9388: \$? = $ac_status" >&5
9389   (exit $ac_status); }; }; then
9390   eval "$as_ac_var=yes"
9391 else
9392   echo "$as_me: failed program was:" >&5
9393 cat conftest.$ac_ext >&5
9394 eval "$as_ac_var=no"
9395 fi
9396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9397 fi
9398 echo "$as_me:9398: result: `eval echo '${'$as_ac_var'}'`" >&5
9399 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9400 if test `eval echo '${'$as_ac_var'}'` = yes; then
9401   cat >>confdefs.h <<EOF
9402 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9403 EOF
9404
9405 fi
9406 done
9407
9408 else
9409         echo "$as_me:9409: checking if link/symlink functions work" >&5
9410 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9411 if test "${cf_cv_link_funcs+set}" = set; then
9412   echo $ECHO_N "(cached) $ECHO_C" >&6
9413 else
9414
9415                 cf_cv_link_funcs=
9416                 for cf_func in link symlink ; do
9417                         if test "$cross_compiling" = yes; then
9418
9419                         eval 'ac_cv_func_'$cf_func'=error'
9420 else
9421   cat >conftest.$ac_ext <<_ACEOF
9422 #line 9422 "configure"
9423 #include "confdefs.h"
9424
9425 #include <sys/types.h>
9426 #include <sys/stat.h>
9427 #ifdef HAVE_UNISTD_H
9428 #include <unistd.h>
9429 #endif
9430 int main(void)
9431 {
9432         int fail = 0;
9433         char *src = "config.log";
9434         char *dst = "conftest.chk";
9435         struct stat src_sb;
9436         struct stat dst_sb;
9437
9438         stat(src, &src_sb);
9439         fail = ($cf_func("config.log", "conftest.chk") < 0)
9440             || (stat(dst, &dst_sb) < 0)
9441             || (dst_sb.st_mtime != src_sb.st_mtime);
9442 #ifdef HAVE_UNLINK
9443         unlink(dst);
9444 #else
9445         remove(dst);
9446 #endif
9447         ${cf_cv_main_return:-return} (fail);
9448 }
9449
9450 _ACEOF
9451 rm -f conftest$ac_exeext
9452 if { (eval echo "$as_me:9452: \"$ac_link\"") >&5
9453   (eval $ac_link) 2>&5
9454   ac_status=$?
9455   echo "$as_me:9455: \$? = $ac_status" >&5
9456   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9457   { (eval echo "$as_me:9457: \"$ac_try\"") >&5
9458   (eval $ac_try) 2>&5
9459   ac_status=$?
9460   echo "$as_me:9460: \$? = $ac_status" >&5
9461   (exit $ac_status); }; }; then
9462
9463                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9464                         eval 'ac_cv_func_'$cf_func'=yes'
9465 else
9466   echo "$as_me: program exited with status $ac_status" >&5
9467 echo "$as_me: failed program was:" >&5
9468 cat conftest.$ac_ext >&5
9469
9470                         eval 'ac_cv_func_'$cf_func'=no'
9471 fi
9472 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9473 fi
9474                 done
9475                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9476
9477 fi
9478 echo "$as_me:9478: result: $cf_cv_link_funcs" >&5
9479 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9480         test "$ac_cv_func_link"    = yes &&
9481 cat >>confdefs.h <<\EOF
9482 #define HAVE_LINK 1
9483 EOF
9484
9485         test "$ac_cv_func_symlink" = yes &&
9486 cat >>confdefs.h <<\EOF
9487 #define HAVE_SYMLINK 1
9488 EOF
9489
9490 fi
9491
9492 with_links=no
9493 with_symlinks=no
9494
9495 # soft links (symbolic links) are useful for some systems where hard links do
9496 # not work, or to make it simpler to copy terminfo trees around.
9497 if test "x$ac_cv_func_symlink" = xyes ; then
9498         echo "$as_me:9498: checking if tic should use symbolic links" >&5
9499 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9500
9501 # Check whether --enable-symlinks or --disable-symlinks was given.
9502 if test "${enable_symlinks+set}" = set; then
9503   enableval="$enable_symlinks"
9504   with_symlinks=$enableval
9505 else
9506   with_symlinks=no
9507 fi;
9508         echo "$as_me:9508: result: $with_symlinks" >&5
9509 echo "${ECHO_T}$with_symlinks" >&6
9510 fi
9511
9512 # If we have hard links and did not choose to use soft links instead, there is
9513 # no reason to make this choice optional - use the hard links.
9514 if test "$with_symlinks" = no ; then
9515         echo "$as_me:9515: checking if tic should use hard links" >&5
9516 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9517         if test "x$ac_cv_func_link" = xyes ; then
9518                 with_links=yes
9519         else
9520                 with_links=no
9521         fi
9522         echo "$as_me:9522: result: $with_links" >&5
9523 echo "${ECHO_T}$with_links" >&6
9524 fi
9525
9526 test "x$with_links" = xyes &&
9527 cat >>confdefs.h <<\EOF
9528 #define USE_LINKS 1
9529 EOF
9530
9531 test "x$with_symlinks" = xyes &&
9532 cat >>confdefs.h <<\EOF
9533 #define USE_SYMLINKS 1
9534 EOF
9535
9536 ###   use option --enable-broken-linker to force on use of broken-linker support
9537
9538 echo "$as_me:9538: checking if you want broken-linker support code" >&5
9539 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9540
9541 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9542 if test "${enable_broken_linker+set}" = set; then
9543   enableval="$enable_broken_linker"
9544   with_broken_linker=$enableval
9545 else
9546   with_broken_linker=no
9547 fi;
9548 echo "$as_me:9548: result: $with_broken_linker" >&5
9549 echo "${ECHO_T}$with_broken_linker" >&6
9550
9551 : ${BROKEN_LINKER:=0}
9552 if test "x$with_broken_linker" = xyes ; then
9553
9554 cat >>confdefs.h <<\EOF
9555 #define BROKEN_LINKER 1
9556 EOF
9557
9558         BROKEN_LINKER=1
9559 fi
9560
9561 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9562 echo "$as_me:9562: checking if tputs should process BSD-style prefix padding" >&5
9563 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9564
9565 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9566 if test "${enable_bsdpad+set}" = set; then
9567   enableval="$enable_bsdpad"
9568   with_bsdpad=$enableval
9569 else
9570   with_bsdpad=no
9571 fi;
9572 echo "$as_me:9572: result: $with_bsdpad" >&5
9573 echo "${ECHO_T}$with_bsdpad" >&6
9574 test "x$with_bsdpad" = xyes &&
9575 cat >>confdefs.h <<\EOF
9576 #define BSD_TPUTS 1
9577 EOF
9578
9579 ###   use option --enable-widec to turn on use of wide-character support
9580 NCURSES_CH_T=chtype
9581 NCURSES_LIBUTF8=0
9582
9583 NEED_WCHAR_H=0
9584 NCURSES_MBSTATE_T=0
9585 NCURSES_WCHAR_T=0
9586 NCURSES_WINT_T=0
9587
9588 # Check to define _XOPEN_SOURCE "automatically"
9589 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9590
9591 echo "$as_me:9591: checking if the POSIX test-macros are already defined" >&5
9592 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9593 if test "${cf_cv_posix_visible+set}" = set; then
9594   echo $ECHO_N "(cached) $ECHO_C" >&6
9595 else
9596
9597 cat >conftest.$ac_ext <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600 #include <stdio.h>
9601 int
9602 main (void)
9603 {
9604
9605 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9606         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9607         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9608         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9609 #error conflicting symbols found
9610 #endif
9611
9612   ;
9613   return 0;
9614 }
9615 _ACEOF
9616 rm -f conftest.$ac_objext
9617 if { (eval echo "$as_me:9617: \"$ac_compile\"") >&5
9618   (eval $ac_compile) 2>&5
9619   ac_status=$?
9620   echo "$as_me:9620: \$? = $ac_status" >&5
9621   (exit $ac_status); } &&
9622          { ac_try='test -s conftest.$ac_objext'
9623   { (eval echo "$as_me:9623: \"$ac_try\"") >&5
9624   (eval $ac_try) 2>&5
9625   ac_status=$?
9626   echo "$as_me:9626: \$? = $ac_status" >&5
9627   (exit $ac_status); }; }; then
9628   cf_cv_posix_visible=no
9629 else
9630   echo "$as_me: failed program was:" >&5
9631 cat conftest.$ac_ext >&5
9632 cf_cv_posix_visible=yes
9633 fi
9634 rm -f conftest.$ac_objext conftest.$ac_ext
9635
9636 fi
9637 echo "$as_me:9637: result: $cf_cv_posix_visible" >&5
9638 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9639
9640 if test "$cf_cv_posix_visible" = no; then
9641
9642 cf_XOPEN_SOURCE=600
9643 cf_POSIX_C_SOURCE=199506L
9644 cf_xopen_source=
9645
9646 case $host_os in
9647 (aix[4-7]*)
9648         cf_xopen_source="-D_ALL_SOURCE"
9649         ;;
9650 (msys)
9651         cf_XOPEN_SOURCE=600
9652         ;;
9653 (darwin[0-8].*)
9654         cf_xopen_source="-D_APPLE_C_SOURCE"
9655         ;;
9656 (darwin*)
9657         cf_xopen_source="-D_DARWIN_C_SOURCE"
9658         cf_XOPEN_SOURCE=
9659         ;;
9660 (freebsd*|dragonfly*|midnightbsd*)
9661         # 5.x headers associate
9662         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9663         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9664         cf_POSIX_C_SOURCE=200112L
9665         cf_XOPEN_SOURCE=600
9666         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9667         ;;
9668 (hpux11*)
9669         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9670         ;;
9671 (hpux*)
9672         cf_xopen_source="-D_HPUX_SOURCE"
9673         ;;
9674 (irix[56].*)
9675         cf_xopen_source="-D_SGI_SOURCE"
9676         cf_XOPEN_SOURCE=
9677         ;;
9678 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9679
9680 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9681
9682 echo "$as_me:9682: checking if this is the GNU C library" >&5
9683 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9684 if test "${cf_cv_gnu_library+set}" = set; then
9685   echo $ECHO_N "(cached) $ECHO_C" >&6
9686 else
9687
9688 cat >conftest.$ac_ext <<_ACEOF
9689 #line 9689 "configure"
9690 #include "confdefs.h"
9691 #include <sys/types.h>
9692 int
9693 main (void)
9694 {
9695
9696         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9697                 return 0;
9698         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9699                 return 0;
9700         #else
9701         #       error not GNU C library
9702         #endif
9703   ;
9704   return 0;
9705 }
9706 _ACEOF
9707 rm -f conftest.$ac_objext
9708 if { (eval echo "$as_me:9708: \"$ac_compile\"") >&5
9709   (eval $ac_compile) 2>&5
9710   ac_status=$?
9711   echo "$as_me:9711: \$? = $ac_status" >&5
9712   (exit $ac_status); } &&
9713          { ac_try='test -s conftest.$ac_objext'
9714   { (eval echo "$as_me:9714: \"$ac_try\"") >&5
9715   (eval $ac_try) 2>&5
9716   ac_status=$?
9717   echo "$as_me:9717: \$? = $ac_status" >&5
9718   (exit $ac_status); }; }; then
9719   cf_cv_gnu_library=yes
9720 else
9721   echo "$as_me: failed program was:" >&5
9722 cat conftest.$ac_ext >&5
9723 cf_cv_gnu_library=no
9724 fi
9725 rm -f conftest.$ac_objext conftest.$ac_ext
9726
9727 fi
9728 echo "$as_me:9728: result: $cf_cv_gnu_library" >&5
9729 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9730
9731 if test x$cf_cv_gnu_library = xyes; then
9732
9733         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9734         # was changed to help a little.  newlib incorporated the change about 4
9735         # years later.
9736         echo "$as_me:9736: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9737 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9738 if test "${cf_cv_gnu_library_219+set}" = set; then
9739   echo $ECHO_N "(cached) $ECHO_C" >&6
9740 else
9741
9742                 cf_save="$CPPFLAGS"
9743
9744         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9745         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9746
9747                 cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 #include <sys/types.h>
9751 int
9752 main (void)
9753 {
9754
9755                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9756                                 return 0;
9757                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9758                                 return 0;
9759                         #else
9760                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9761                         #endif
9762   ;
9763   return 0;
9764 }
9765 _ACEOF
9766 rm -f conftest.$ac_objext
9767 if { (eval echo "$as_me:9767: \"$ac_compile\"") >&5
9768   (eval $ac_compile) 2>&5
9769   ac_status=$?
9770   echo "$as_me:9770: \$? = $ac_status" >&5
9771   (exit $ac_status); } &&
9772          { ac_try='test -s conftest.$ac_objext'
9773   { (eval echo "$as_me:9773: \"$ac_try\"") >&5
9774   (eval $ac_try) 2>&5
9775   ac_status=$?
9776   echo "$as_me:9776: \$? = $ac_status" >&5
9777   (exit $ac_status); }; }; then
9778   cf_cv_gnu_library_219=yes
9779 else
9780   echo "$as_me: failed program was:" >&5
9781 cat conftest.$ac_ext >&5
9782 cf_cv_gnu_library_219=no
9783 fi
9784 rm -f conftest.$ac_objext conftest.$ac_ext
9785                 CPPFLAGS="$cf_save"
9786
9787 fi
9788 echo "$as_me:9788: result: $cf_cv_gnu_library_219" >&5
9789 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9790
9791         if test "x$cf_cv_gnu_library_219" = xyes; then
9792                 cf_save="$CPPFLAGS"
9793                 echo "$as_me:9793: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9794 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9795 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9796   echo $ECHO_N "(cached) $ECHO_C" >&6
9797 else
9798
9799 cf_fix_cppflags=no
9800 cf_new_cflags=
9801 cf_new_cppflags=
9802 cf_new_extra_cppflags=
9803
9804 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9805 do
9806 case $cf_fix_cppflags in
9807 (no)
9808         case $cf_add_cflags in
9809         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9810                 case $cf_add_cflags in
9811                 (-D*)
9812                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9813
9814                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9815                                 && test -z "${cf_tst_cflags}" \
9816                                 && cf_fix_cppflags=yes
9817
9818                         if test $cf_fix_cppflags = yes ; then
9819
9820         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9821         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9822
9823                                 continue
9824                         elif test "${cf_tst_cflags}" = "\"'" ; then
9825
9826         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9827         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9828
9829                                 continue
9830                         fi
9831                         ;;
9832                 esac
9833                 case "$CPPFLAGS" in
9834                 (*$cf_add_cflags)
9835                         ;;
9836                 (*)
9837                         case $cf_add_cflags in
9838                         (-D*)
9839                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9840
9841 CPPFLAGS=`echo "$CPPFLAGS" | \
9842         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9843                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9844
9845                                 ;;
9846                         esac
9847
9848         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9849         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9850
9851                         ;;
9852                 esac
9853                 ;;
9854         (*)
9855
9856         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9857         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9858
9859                 ;;
9860         esac
9861         ;;
9862 (yes)
9863
9864         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9865         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9866
9867         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9868
9869         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9870                 && test -z "${cf_tst_cflags}" \
9871                 && cf_fix_cppflags=no
9872         ;;
9873 esac
9874 done
9875
9876 if test -n "$cf_new_cflags" ; then
9877
9878         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9879         CFLAGS="${CFLAGS}$cf_new_cflags"
9880
9881 fi
9882
9883 if test -n "$cf_new_cppflags" ; then
9884
9885         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9886         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9887
9888 fi
9889
9890 if test -n "$cf_new_extra_cppflags" ; then
9891
9892         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9893         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9894
9895 fi
9896
9897                         cat >conftest.$ac_ext <<_ACEOF
9898 #line 9898 "configure"
9899 #include "confdefs.h"
9900
9901                                 #include <limits.h>
9902                                 #include <sys/types.h>
9903
9904 int
9905 main (void)
9906 {
9907
9908                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9909                                         return 0;
9910                                 #else
9911                                 #       error GNU C library is too old
9912                                 #endif
9913   ;
9914   return 0;
9915 }
9916 _ACEOF
9917 rm -f conftest.$ac_objext
9918 if { (eval echo "$as_me:9918: \"$ac_compile\"") >&5
9919   (eval $ac_compile) 2>&5
9920   ac_status=$?
9921   echo "$as_me:9921: \$? = $ac_status" >&5
9922   (exit $ac_status); } &&
9923          { ac_try='test -s conftest.$ac_objext'
9924   { (eval echo "$as_me:9924: \"$ac_try\"") >&5
9925   (eval $ac_try) 2>&5
9926   ac_status=$?
9927   echo "$as_me:9927: \$? = $ac_status" >&5
9928   (exit $ac_status); }; }; then
9929   cf_cv_gnu_dftsrc_219=yes
9930 else
9931   echo "$as_me: failed program was:" >&5
9932 cat conftest.$ac_ext >&5
9933 cf_cv_gnu_dftsrc_219=no
9934 fi
9935 rm -f conftest.$ac_objext conftest.$ac_ext
9936
9937 fi
9938 echo "$as_me:9938: result: $cf_cv_gnu_dftsrc_219" >&5
9939 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9940                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9941         else
9942                 cf_cv_gnu_dftsrc_219=maybe
9943         fi
9944
9945         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9946
9947                 echo "$as_me:9947: checking if we must define _GNU_SOURCE" >&5
9948 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9949 if test "${cf_cv_gnu_source+set}" = set; then
9950   echo $ECHO_N "(cached) $ECHO_C" >&6
9951 else
9952
9953                 cat >conftest.$ac_ext <<_ACEOF
9954 #line 9954 "configure"
9955 #include "confdefs.h"
9956 #include <sys/types.h>
9957 int
9958 main (void)
9959 {
9960
9961                         #ifndef _XOPEN_SOURCE
9962                         #error  expected _XOPEN_SOURCE to be defined
9963                         #endif
9964   ;
9965   return 0;
9966 }
9967 _ACEOF
9968 rm -f conftest.$ac_objext
9969 if { (eval echo "$as_me:9969: \"$ac_compile\"") >&5
9970   (eval $ac_compile) 2>&5
9971   ac_status=$?
9972   echo "$as_me:9972: \$? = $ac_status" >&5
9973   (exit $ac_status); } &&
9974          { ac_try='test -s conftest.$ac_objext'
9975   { (eval echo "$as_me:9975: \"$ac_try\"") >&5
9976   (eval $ac_try) 2>&5
9977   ac_status=$?
9978   echo "$as_me:9978: \$? = $ac_status" >&5
9979   (exit $ac_status); }; }; then
9980   cf_cv_gnu_source=no
9981 else
9982   echo "$as_me: failed program was:" >&5
9983 cat conftest.$ac_ext >&5
9984 cf_save="$CPPFLAGS"
9985
9986 cf_fix_cppflags=no
9987 cf_new_cflags=
9988 cf_new_cppflags=
9989 cf_new_extra_cppflags=
9990
9991 for cf_add_cflags in -D_GNU_SOURCE
9992 do
9993 case $cf_fix_cppflags in
9994 (no)
9995         case $cf_add_cflags in
9996         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9997                 case $cf_add_cflags in
9998                 (-D*)
9999                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10000
10001                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10002                                 && test -z "${cf_tst_cflags}" \
10003                                 && cf_fix_cppflags=yes
10004
10005                         if test $cf_fix_cppflags = yes ; then
10006
10007         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10008         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10009
10010                                 continue
10011                         elif test "${cf_tst_cflags}" = "\"'" ; then
10012
10013         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10014         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10015
10016                                 continue
10017                         fi
10018                         ;;
10019                 esac
10020                 case "$CPPFLAGS" in
10021                 (*$cf_add_cflags)
10022                         ;;
10023                 (*)
10024                         case $cf_add_cflags in
10025                         (-D*)
10026                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10027
10028 CPPFLAGS=`echo "$CPPFLAGS" | \
10029         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10030                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10031
10032                                 ;;
10033                         esac
10034
10035         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10036         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10037
10038                         ;;
10039                 esac
10040                 ;;
10041         (*)
10042
10043         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10044         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10045
10046                 ;;
10047         esac
10048         ;;
10049 (yes)
10050
10051         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10052         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10053
10054         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10055
10056         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10057                 && test -z "${cf_tst_cflags}" \
10058                 && cf_fix_cppflags=no
10059         ;;
10060 esac
10061 done
10062
10063 if test -n "$cf_new_cflags" ; then
10064
10065         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10066         CFLAGS="${CFLAGS}$cf_new_cflags"
10067
10068 fi
10069
10070 if test -n "$cf_new_cppflags" ; then
10071
10072         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10073         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10074
10075 fi
10076
10077 if test -n "$cf_new_extra_cppflags" ; then
10078
10079         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10080         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10081
10082 fi
10083
10084                          cat >conftest.$ac_ext <<_ACEOF
10085 #line 10085 "configure"
10086 #include "confdefs.h"
10087 #include <sys/types.h>
10088 int
10089 main (void)
10090 {
10091
10092                                 #ifdef _XOPEN_SOURCE
10093                                 #error  expected _XOPEN_SOURCE to be undefined
10094                                 #endif
10095   ;
10096   return 0;
10097 }
10098 _ACEOF
10099 rm -f conftest.$ac_objext
10100 if { (eval echo "$as_me:10100: \"$ac_compile\"") >&5
10101   (eval $ac_compile) 2>&5
10102   ac_status=$?
10103   echo "$as_me:10103: \$? = $ac_status" >&5
10104   (exit $ac_status); } &&
10105          { ac_try='test -s conftest.$ac_objext'
10106   { (eval echo "$as_me:10106: \"$ac_try\"") >&5
10107   (eval $ac_try) 2>&5
10108   ac_status=$?
10109   echo "$as_me:10109: \$? = $ac_status" >&5
10110   (exit $ac_status); }; }; then
10111   cf_cv_gnu_source=no
10112 else
10113   echo "$as_me: failed program was:" >&5
10114 cat conftest.$ac_ext >&5
10115 cf_cv_gnu_source=yes
10116 fi
10117 rm -f conftest.$ac_objext conftest.$ac_ext
10118                         CPPFLAGS="$cf_save"
10119
10120 fi
10121 rm -f conftest.$ac_objext conftest.$ac_ext
10122
10123 fi
10124 echo "$as_me:10124: result: $cf_cv_gnu_source" >&5
10125 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10126
10127                 if test "$cf_cv_gnu_source" = yes
10128                 then
10129                 echo "$as_me:10129: checking if we should also define _DEFAULT_SOURCE" >&5
10130 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10131 if test "${cf_cv_default_source+set}" = set; then
10132   echo $ECHO_N "(cached) $ECHO_C" >&6
10133 else
10134
10135         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10136         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10137
10138                         cat >conftest.$ac_ext <<_ACEOF
10139 #line 10139 "configure"
10140 #include "confdefs.h"
10141 #include <sys/types.h>
10142 int
10143 main (void)
10144 {
10145
10146                                 #ifdef _DEFAULT_SOURCE
10147                                 #error  expected _DEFAULT_SOURCE to be undefined
10148                                 #endif
10149   ;
10150   return 0;
10151 }
10152 _ACEOF
10153 rm -f conftest.$ac_objext
10154 if { (eval echo "$as_me:10154: \"$ac_compile\"") >&5
10155   (eval $ac_compile) 2>&5
10156   ac_status=$?
10157   echo "$as_me:10157: \$? = $ac_status" >&5
10158   (exit $ac_status); } &&
10159          { ac_try='test -s conftest.$ac_objext'
10160   { (eval echo "$as_me:10160: \"$ac_try\"") >&5
10161   (eval $ac_try) 2>&5
10162   ac_status=$?
10163   echo "$as_me:10163: \$? = $ac_status" >&5
10164   (exit $ac_status); }; }; then
10165   cf_cv_default_source=no
10166 else
10167   echo "$as_me: failed program was:" >&5
10168 cat conftest.$ac_ext >&5
10169 cf_cv_default_source=yes
10170 fi
10171 rm -f conftest.$ac_objext conftest.$ac_ext
10172
10173 fi
10174 echo "$as_me:10174: result: $cf_cv_default_source" >&5
10175 echo "${ECHO_T}$cf_cv_default_source" >&6
10176                         if test "$cf_cv_default_source" = yes
10177                         then
10178
10179         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10180         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10181
10182                         fi
10183                 fi
10184         fi
10185
10186 fi
10187
10188         ;;
10189 (minix*)
10190         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10191         ;;
10192 (mirbsd*)
10193         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10194         cf_XOPEN_SOURCE=
10195
10196 if test "$cf_cv_posix_visible" = no; then
10197
10198 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10199
10200 cf_save_CFLAGS="$CFLAGS"
10201 cf_save_CPPFLAGS="$CPPFLAGS"
10202
10203 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10204         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10205                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10206
10207 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10208         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10209                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10210
10211 echo "$as_me:10211: checking if we should define _POSIX_C_SOURCE" >&5
10212 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10213 if test "${cf_cv_posix_c_source+set}" = set; then
10214   echo $ECHO_N "(cached) $ECHO_C" >&6
10215 else
10216
10217 echo "${as_me:-configure}:10217: testing if the symbol is already defined go no further ..." 1>&5
10218
10219         cat >conftest.$ac_ext <<_ACEOF
10220 #line 10220 "configure"
10221 #include "confdefs.h"
10222 #include <sys/types.h>
10223 int
10224 main (void)
10225 {
10226
10227 #ifndef _POSIX_C_SOURCE
10228 make an error
10229 #endif
10230   ;
10231   return 0;
10232 }
10233 _ACEOF
10234 rm -f conftest.$ac_objext
10235 if { (eval echo "$as_me:10235: \"$ac_compile\"") >&5
10236   (eval $ac_compile) 2>&5
10237   ac_status=$?
10238   echo "$as_me:10238: \$? = $ac_status" >&5
10239   (exit $ac_status); } &&
10240          { ac_try='test -s conftest.$ac_objext'
10241   { (eval echo "$as_me:10241: \"$ac_try\"") >&5
10242   (eval $ac_try) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); }; }; then
10246   cf_cv_posix_c_source=no
10247 else
10248   echo "$as_me: failed program was:" >&5
10249 cat conftest.$ac_ext >&5
10250 cf_want_posix_source=no
10251          case .$cf_POSIX_C_SOURCE in
10252          (.[12]??*)
10253                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10254                 ;;
10255          (.2)
10256                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10257                 cf_want_posix_source=yes
10258                 ;;
10259          (.*)
10260                 cf_want_posix_source=yes
10261                 ;;
10262          esac
10263          if test "$cf_want_posix_source" = yes ; then
10264                 cat >conftest.$ac_ext <<_ACEOF
10265 #line 10265 "configure"
10266 #include "confdefs.h"
10267 #include <sys/types.h>
10268 int
10269 main (void)
10270 {
10271
10272 #ifdef _POSIX_SOURCE
10273 make an error
10274 #endif
10275   ;
10276   return 0;
10277 }
10278 _ACEOF
10279 rm -f conftest.$ac_objext
10280 if { (eval echo "$as_me:10280: \"$ac_compile\"") >&5
10281   (eval $ac_compile) 2>&5
10282   ac_status=$?
10283   echo "$as_me:10283: \$? = $ac_status" >&5
10284   (exit $ac_status); } &&
10285          { ac_try='test -s conftest.$ac_objext'
10286   { (eval echo "$as_me:10286: \"$ac_try\"") >&5
10287   (eval $ac_try) 2>&5
10288   ac_status=$?
10289   echo "$as_me:10289: \$? = $ac_status" >&5
10290   (exit $ac_status); }; }; then
10291   :
10292 else
10293   echo "$as_me: failed program was:" >&5
10294 cat conftest.$ac_ext >&5
10295 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10296 fi
10297 rm -f conftest.$ac_objext conftest.$ac_ext
10298          fi
10299
10300 echo "${as_me:-configure}:10300: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10301
10302          CFLAGS="$cf_trim_CFLAGS"
10303          CPPFLAGS="$cf_trim_CPPFLAGS"
10304
10305         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10306         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10307
10308 echo "${as_me:-configure}:10308: testing if the second compile does not leave our definition intact error ..." 1>&5
10309
10310          cat >conftest.$ac_ext <<_ACEOF
10311 #line 10311 "configure"
10312 #include "confdefs.h"
10313 #include <sys/types.h>
10314 int
10315 main (void)
10316 {
10317
10318 #ifndef _POSIX_C_SOURCE
10319 make an error
10320 #endif
10321   ;
10322   return 0;
10323 }
10324 _ACEOF
10325 rm -f conftest.$ac_objext
10326 if { (eval echo "$as_me:10326: \"$ac_compile\"") >&5
10327   (eval $ac_compile) 2>&5
10328   ac_status=$?
10329   echo "$as_me:10329: \$? = $ac_status" >&5
10330   (exit $ac_status); } &&
10331          { ac_try='test -s conftest.$ac_objext'
10332   { (eval echo "$as_me:10332: \"$ac_try\"") >&5
10333   (eval $ac_try) 2>&5
10334   ac_status=$?
10335   echo "$as_me:10335: \$? = $ac_status" >&5
10336   (exit $ac_status); }; }; then
10337   :
10338 else
10339   echo "$as_me: failed program was:" >&5
10340 cat conftest.$ac_ext >&5
10341 cf_cv_posix_c_source=no
10342 fi
10343 rm -f conftest.$ac_objext conftest.$ac_ext
10344          CFLAGS="$cf_save_CFLAGS"
10345          CPPFLAGS="$cf_save_CPPFLAGS"
10346
10347 fi
10348 rm -f conftest.$ac_objext conftest.$ac_ext
10349
10350 fi
10351 echo "$as_me:10351: result: $cf_cv_posix_c_source" >&5
10352 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10353
10354 if test "$cf_cv_posix_c_source" != no ; then
10355         CFLAGS="$cf_trim_CFLAGS"
10356         CPPFLAGS="$cf_trim_CPPFLAGS"
10357
10358 cf_fix_cppflags=no
10359 cf_new_cflags=
10360 cf_new_cppflags=
10361 cf_new_extra_cppflags=
10362
10363 for cf_add_cflags in $cf_cv_posix_c_source
10364 do
10365 case $cf_fix_cppflags in
10366 (no)
10367         case $cf_add_cflags in
10368         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10369                 case $cf_add_cflags in
10370                 (-D*)
10371                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10372
10373                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10374                                 && test -z "${cf_tst_cflags}" \
10375                                 && cf_fix_cppflags=yes
10376
10377                         if test $cf_fix_cppflags = yes ; then
10378
10379         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10380         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10381
10382                                 continue
10383                         elif test "${cf_tst_cflags}" = "\"'" ; then
10384
10385         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10386         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10387
10388                                 continue
10389                         fi
10390                         ;;
10391                 esac
10392                 case "$CPPFLAGS" in
10393                 (*$cf_add_cflags)
10394                         ;;
10395                 (*)
10396                         case $cf_add_cflags in
10397                         (-D*)
10398                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10399
10400 CPPFLAGS=`echo "$CPPFLAGS" | \
10401         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10402                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10403
10404                                 ;;
10405                         esac
10406
10407         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10408         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10409
10410                         ;;
10411                 esac
10412                 ;;
10413         (*)
10414
10415         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10416         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10417
10418                 ;;
10419         esac
10420         ;;
10421 (yes)
10422
10423         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10424         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10425
10426         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10427
10428         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10429                 && test -z "${cf_tst_cflags}" \
10430                 && cf_fix_cppflags=no
10431         ;;
10432 esac
10433 done
10434
10435 if test -n "$cf_new_cflags" ; then
10436
10437         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10438         CFLAGS="${CFLAGS}$cf_new_cflags"
10439
10440 fi
10441
10442 if test -n "$cf_new_cppflags" ; then
10443
10444         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10445         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10446
10447 fi
10448
10449 if test -n "$cf_new_extra_cppflags" ; then
10450
10451         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10452         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10453
10454 fi
10455
10456 fi
10457
10458 fi # cf_cv_posix_visible
10459
10460         ;;
10461 (netbsd*)
10462         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10463         ;;
10464 (openbsd[4-9]*)
10465         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10466         cf_xopen_source="-D_BSD_SOURCE"
10467         cf_XOPEN_SOURCE=600
10468         ;;
10469 (openbsd*)
10470         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10471         ;;
10472 (osf[45]*)
10473         cf_xopen_source="-D_OSF_SOURCE"
10474         ;;
10475 (nto-qnx*)
10476         cf_xopen_source="-D_QNX_SOURCE"
10477         ;;
10478 (sco*)
10479         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10480         ;;
10481 (solaris2.*)
10482         cf_xopen_source="-D__EXTENSIONS__"
10483         cf_cv_xopen_source=broken
10484         ;;
10485 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10486         cf_XOPEN_SOURCE=
10487         cf_POSIX_C_SOURCE=
10488         ;;
10489 (*)
10490
10491 echo "$as_me:10491: checking if we should define _XOPEN_SOURCE" >&5
10492 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10493 if test "${cf_cv_xopen_source+set}" = set; then
10494   echo $ECHO_N "(cached) $ECHO_C" >&6
10495 else
10496
10497         cat >conftest.$ac_ext <<_ACEOF
10498 #line 10498 "configure"
10499 #include "confdefs.h"
10500
10501 #include <stdlib.h>
10502 #include <string.h>
10503 #include <sys/types.h>
10504
10505 int
10506 main (void)
10507 {
10508
10509 #ifndef _XOPEN_SOURCE
10510 make an error
10511 #endif
10512   ;
10513   return 0;
10514 }
10515 _ACEOF
10516 rm -f conftest.$ac_objext
10517 if { (eval echo "$as_me:10517: \"$ac_compile\"") >&5
10518   (eval $ac_compile) 2>&5
10519   ac_status=$?
10520   echo "$as_me:10520: \$? = $ac_status" >&5
10521   (exit $ac_status); } &&
10522          { ac_try='test -s conftest.$ac_objext'
10523   { (eval echo "$as_me:10523: \"$ac_try\"") >&5
10524   (eval $ac_try) 2>&5
10525   ac_status=$?
10526   echo "$as_me:10526: \$? = $ac_status" >&5
10527   (exit $ac_status); }; }; then
10528   cf_cv_xopen_source=no
10529 else
10530   echo "$as_me: failed program was:" >&5
10531 cat conftest.$ac_ext >&5
10532 cf_save="$CPPFLAGS"
10533
10534         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10535         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10536
10537          cat >conftest.$ac_ext <<_ACEOF
10538 #line 10538 "configure"
10539 #include "confdefs.h"
10540
10541 #include <stdlib.h>
10542 #include <string.h>
10543 #include <sys/types.h>
10544
10545 int
10546 main (void)
10547 {
10548
10549 #ifdef _XOPEN_SOURCE
10550 make an error
10551 #endif
10552   ;
10553   return 0;
10554 }
10555 _ACEOF
10556 rm -f conftest.$ac_objext
10557 if { (eval echo "$as_me:10557: \"$ac_compile\"") >&5
10558   (eval $ac_compile) 2>&5
10559   ac_status=$?
10560   echo "$as_me:10560: \$? = $ac_status" >&5
10561   (exit $ac_status); } &&
10562          { ac_try='test -s conftest.$ac_objext'
10563   { (eval echo "$as_me:10563: \"$ac_try\"") >&5
10564   (eval $ac_try) 2>&5
10565   ac_status=$?
10566   echo "$as_me:10566: \$? = $ac_status" >&5
10567   (exit $ac_status); }; }; then
10568   cf_cv_xopen_source=no
10569 else
10570   echo "$as_me: failed program was:" >&5
10571 cat conftest.$ac_ext >&5
10572 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10573 fi
10574 rm -f conftest.$ac_objext conftest.$ac_ext
10575         CPPFLAGS="$cf_save"
10576
10577 fi
10578 rm -f conftest.$ac_objext conftest.$ac_ext
10579
10580 fi
10581 echo "$as_me:10581: result: $cf_cv_xopen_source" >&5
10582 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10583
10584 if test "$cf_cv_xopen_source" != no ; then
10585
10586 CFLAGS=`echo "$CFLAGS" | \
10587         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10588                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10589
10590 CPPFLAGS=`echo "$CPPFLAGS" | \
10591         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10592                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10593
10594         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10595
10596 cf_fix_cppflags=no
10597 cf_new_cflags=
10598 cf_new_cppflags=
10599 cf_new_extra_cppflags=
10600
10601 for cf_add_cflags in $cf_temp_xopen_source
10602 do
10603 case $cf_fix_cppflags in
10604 (no)
10605         case $cf_add_cflags in
10606         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10607                 case $cf_add_cflags in
10608                 (-D*)
10609                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10610
10611                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10612                                 && test -z "${cf_tst_cflags}" \
10613                                 && cf_fix_cppflags=yes
10614
10615                         if test $cf_fix_cppflags = yes ; then
10616
10617         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10618         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10619
10620                                 continue
10621                         elif test "${cf_tst_cflags}" = "\"'" ; then
10622
10623         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10624         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10625
10626                                 continue
10627                         fi
10628                         ;;
10629                 esac
10630                 case "$CPPFLAGS" in
10631                 (*$cf_add_cflags)
10632                         ;;
10633                 (*)
10634                         case $cf_add_cflags in
10635                         (-D*)
10636                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10637
10638 CPPFLAGS=`echo "$CPPFLAGS" | \
10639         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10640                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10641
10642                                 ;;
10643                         esac
10644
10645         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10646         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10647
10648                         ;;
10649                 esac
10650                 ;;
10651         (*)
10652
10653         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10654         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10655
10656                 ;;
10657         esac
10658         ;;
10659 (yes)
10660
10661         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10662         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10663
10664         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10665
10666         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10667                 && test -z "${cf_tst_cflags}" \
10668                 && cf_fix_cppflags=no
10669         ;;
10670 esac
10671 done
10672
10673 if test -n "$cf_new_cflags" ; then
10674
10675         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10676         CFLAGS="${CFLAGS}$cf_new_cflags"
10677
10678 fi
10679
10680 if test -n "$cf_new_cppflags" ; then
10681
10682         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10683         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10684
10685 fi
10686
10687 if test -n "$cf_new_extra_cppflags" ; then
10688
10689         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10690         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10691
10692 fi
10693
10694 fi
10695
10696 if test "$cf_cv_posix_visible" = no; then
10697
10698 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10699
10700 cf_save_CFLAGS="$CFLAGS"
10701 cf_save_CPPFLAGS="$CPPFLAGS"
10702
10703 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10704         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10705                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10706
10707 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10708         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10709                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10710
10711 echo "$as_me:10711: checking if we should define _POSIX_C_SOURCE" >&5
10712 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10713 if test "${cf_cv_posix_c_source+set}" = set; then
10714   echo $ECHO_N "(cached) $ECHO_C" >&6
10715 else
10716
10717 echo "${as_me:-configure}:10717: testing if the symbol is already defined go no further ..." 1>&5
10718
10719         cat >conftest.$ac_ext <<_ACEOF
10720 #line 10720 "configure"
10721 #include "confdefs.h"
10722 #include <sys/types.h>
10723 int
10724 main (void)
10725 {
10726
10727 #ifndef _POSIX_C_SOURCE
10728 make an error
10729 #endif
10730   ;
10731   return 0;
10732 }
10733 _ACEOF
10734 rm -f conftest.$ac_objext
10735 if { (eval echo "$as_me:10735: \"$ac_compile\"") >&5
10736   (eval $ac_compile) 2>&5
10737   ac_status=$?
10738   echo "$as_me:10738: \$? = $ac_status" >&5
10739   (exit $ac_status); } &&
10740          { ac_try='test -s conftest.$ac_objext'
10741   { (eval echo "$as_me:10741: \"$ac_try\"") >&5
10742   (eval $ac_try) 2>&5
10743   ac_status=$?
10744   echo "$as_me:10744: \$? = $ac_status" >&5
10745   (exit $ac_status); }; }; then
10746   cf_cv_posix_c_source=no
10747 else
10748   echo "$as_me: failed program was:" >&5
10749 cat conftest.$ac_ext >&5
10750 cf_want_posix_source=no
10751          case .$cf_POSIX_C_SOURCE in
10752          (.[12]??*)
10753                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10754                 ;;
10755          (.2)
10756                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10757                 cf_want_posix_source=yes
10758                 ;;
10759          (.*)
10760                 cf_want_posix_source=yes
10761                 ;;
10762          esac
10763          if test "$cf_want_posix_source" = yes ; then
10764                 cat >conftest.$ac_ext <<_ACEOF
10765 #line 10765 "configure"
10766 #include "confdefs.h"
10767 #include <sys/types.h>
10768 int
10769 main (void)
10770 {
10771
10772 #ifdef _POSIX_SOURCE
10773 make an error
10774 #endif
10775   ;
10776   return 0;
10777 }
10778 _ACEOF
10779 rm -f conftest.$ac_objext
10780 if { (eval echo "$as_me:10780: \"$ac_compile\"") >&5
10781   (eval $ac_compile) 2>&5
10782   ac_status=$?
10783   echo "$as_me:10783: \$? = $ac_status" >&5
10784   (exit $ac_status); } &&
10785          { ac_try='test -s conftest.$ac_objext'
10786   { (eval echo "$as_me:10786: \"$ac_try\"") >&5
10787   (eval $ac_try) 2>&5
10788   ac_status=$?
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit $ac_status); }; }; then
10791   :
10792 else
10793   echo "$as_me: failed program was:" >&5
10794 cat conftest.$ac_ext >&5
10795 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10796 fi
10797 rm -f conftest.$ac_objext conftest.$ac_ext
10798          fi
10799
10800 echo "${as_me:-configure}:10800: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10801
10802          CFLAGS="$cf_trim_CFLAGS"
10803          CPPFLAGS="$cf_trim_CPPFLAGS"
10804
10805         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10806         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10807
10808 echo "${as_me:-configure}:10808: testing if the second compile does not leave our definition intact error ..." 1>&5
10809
10810          cat >conftest.$ac_ext <<_ACEOF
10811 #line 10811 "configure"
10812 #include "confdefs.h"
10813 #include <sys/types.h>
10814 int
10815 main (void)
10816 {
10817
10818 #ifndef _POSIX_C_SOURCE
10819 make an error
10820 #endif
10821   ;
10822   return 0;
10823 }
10824 _ACEOF
10825 rm -f conftest.$ac_objext
10826 if { (eval echo "$as_me:10826: \"$ac_compile\"") >&5
10827   (eval $ac_compile) 2>&5
10828   ac_status=$?
10829   echo "$as_me:10829: \$? = $ac_status" >&5
10830   (exit $ac_status); } &&
10831          { ac_try='test -s conftest.$ac_objext'
10832   { (eval echo "$as_me:10832: \"$ac_try\"") >&5
10833   (eval $ac_try) 2>&5
10834   ac_status=$?
10835   echo "$as_me:10835: \$? = $ac_status" >&5
10836   (exit $ac_status); }; }; then
10837   :
10838 else
10839   echo "$as_me: failed program was:" >&5
10840 cat conftest.$ac_ext >&5
10841 cf_cv_posix_c_source=no
10842 fi
10843 rm -f conftest.$ac_objext conftest.$ac_ext
10844          CFLAGS="$cf_save_CFLAGS"
10845          CPPFLAGS="$cf_save_CPPFLAGS"
10846
10847 fi
10848 rm -f conftest.$ac_objext conftest.$ac_ext
10849
10850 fi
10851 echo "$as_me:10851: result: $cf_cv_posix_c_source" >&5
10852 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10853
10854 if test "$cf_cv_posix_c_source" != no ; then
10855         CFLAGS="$cf_trim_CFLAGS"
10856         CPPFLAGS="$cf_trim_CPPFLAGS"
10857
10858 cf_fix_cppflags=no
10859 cf_new_cflags=
10860 cf_new_cppflags=
10861 cf_new_extra_cppflags=
10862
10863 for cf_add_cflags in $cf_cv_posix_c_source
10864 do
10865 case $cf_fix_cppflags in
10866 (no)
10867         case $cf_add_cflags in
10868         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10869                 case $cf_add_cflags in
10870                 (-D*)
10871                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10872
10873                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10874                                 && test -z "${cf_tst_cflags}" \
10875                                 && cf_fix_cppflags=yes
10876
10877                         if test $cf_fix_cppflags = yes ; then
10878
10879         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10880         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10881
10882                                 continue
10883                         elif test "${cf_tst_cflags}" = "\"'" ; then
10884
10885         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10886         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10887
10888                                 continue
10889                         fi
10890                         ;;
10891                 esac
10892                 case "$CPPFLAGS" in
10893                 (*$cf_add_cflags)
10894                         ;;
10895                 (*)
10896                         case $cf_add_cflags in
10897                         (-D*)
10898                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10899
10900 CPPFLAGS=`echo "$CPPFLAGS" | \
10901         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10902                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10903
10904                                 ;;
10905                         esac
10906
10907         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10908         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10909
10910                         ;;
10911                 esac
10912                 ;;
10913         (*)
10914
10915         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10916         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10917
10918                 ;;
10919         esac
10920         ;;
10921 (yes)
10922
10923         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10924         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10925
10926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10927
10928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10929                 && test -z "${cf_tst_cflags}" \
10930                 && cf_fix_cppflags=no
10931         ;;
10932 esac
10933 done
10934
10935 if test -n "$cf_new_cflags" ; then
10936
10937         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10938         CFLAGS="${CFLAGS}$cf_new_cflags"
10939
10940 fi
10941
10942 if test -n "$cf_new_cppflags" ; then
10943
10944         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10945         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10946
10947 fi
10948
10949 if test -n "$cf_new_extra_cppflags" ; then
10950
10951         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10952         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10953
10954 fi
10955
10956 fi
10957
10958 fi # cf_cv_posix_visible
10959
10960         ;;
10961 esac
10962
10963 if test -n "$cf_xopen_source" ; then
10964
10965 cf_fix_cppflags=no
10966 cf_new_cflags=
10967 cf_new_cppflags=
10968 cf_new_extra_cppflags=
10969
10970 for cf_add_cflags in $cf_xopen_source
10971 do
10972 case $cf_fix_cppflags in
10973 (no)
10974         case $cf_add_cflags in
10975         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10976                 case $cf_add_cflags in
10977                 (-D*)
10978                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10979
10980                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10981                                 && test -z "${cf_tst_cflags}" \
10982                                 && cf_fix_cppflags=yes
10983
10984                         if test $cf_fix_cppflags = yes ; then
10985
10986         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10987         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10988
10989                                 continue
10990                         elif test "${cf_tst_cflags}" = "\"'" ; then
10991
10992         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10993         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10994
10995                                 continue
10996                         fi
10997                         ;;
10998                 esac
10999                 case "$CPPFLAGS" in
11000                 (*$cf_add_cflags)
11001                         ;;
11002                 (*)
11003                         case $cf_add_cflags in
11004                         (-D*)
11005                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11006
11007 CPPFLAGS=`echo "$CPPFLAGS" | \
11008         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11009                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11010
11011                                 ;;
11012                         esac
11013
11014         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11015         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11016
11017                         ;;
11018                 esac
11019                 ;;
11020         (*)
11021
11022         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11023         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11024
11025                 ;;
11026         esac
11027         ;;
11028 (yes)
11029
11030         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11031         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11032
11033         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11034
11035         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11036                 && test -z "${cf_tst_cflags}" \
11037                 && cf_fix_cppflags=no
11038         ;;
11039 esac
11040 done
11041
11042 if test -n "$cf_new_cflags" ; then
11043         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11044
11045 echo "${as_me:-configure}:11045: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11046
11047         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11048         CFLAGS="${CFLAGS}$cf_new_cflags"
11049
11050 fi
11051
11052 if test -n "$cf_new_cppflags" ; then
11053         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11054
11055 echo "${as_me:-configure}:11055: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11056
11057         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11058         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11059
11060 fi
11061
11062 if test -n "$cf_new_extra_cppflags" ; then
11063         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11064
11065 echo "${as_me:-configure}:11065: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11066
11067         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11068         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11069
11070 fi
11071
11072 fi
11073
11074 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11075         echo "$as_me:11075: checking if _XOPEN_SOURCE really is set" >&5
11076 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11077         cat >conftest.$ac_ext <<_ACEOF
11078 #line 11078 "configure"
11079 #include "confdefs.h"
11080 #include <stdlib.h>
11081 int
11082 main (void)
11083 {
11084
11085 #ifndef _XOPEN_SOURCE
11086 make an error
11087 #endif
11088   ;
11089   return 0;
11090 }
11091 _ACEOF
11092 rm -f conftest.$ac_objext
11093 if { (eval echo "$as_me:11093: \"$ac_compile\"") >&5
11094   (eval $ac_compile) 2>&5
11095   ac_status=$?
11096   echo "$as_me:11096: \$? = $ac_status" >&5
11097   (exit $ac_status); } &&
11098          { ac_try='test -s conftest.$ac_objext'
11099   { (eval echo "$as_me:11099: \"$ac_try\"") >&5
11100   (eval $ac_try) 2>&5
11101   ac_status=$?
11102   echo "$as_me:11102: \$? = $ac_status" >&5
11103   (exit $ac_status); }; }; then
11104   cf_XOPEN_SOURCE_set=yes
11105 else
11106   echo "$as_me: failed program was:" >&5
11107 cat conftest.$ac_ext >&5
11108 cf_XOPEN_SOURCE_set=no
11109 fi
11110 rm -f conftest.$ac_objext conftest.$ac_ext
11111         echo "$as_me:11111: result: $cf_XOPEN_SOURCE_set" >&5
11112 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11113         if test $cf_XOPEN_SOURCE_set = yes
11114         then
11115                 cat >conftest.$ac_ext <<_ACEOF
11116 #line 11116 "configure"
11117 #include "confdefs.h"
11118 #include <stdlib.h>
11119 int
11120 main (void)
11121 {
11122
11123 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11124 make an error
11125 #endif
11126   ;
11127   return 0;
11128 }
11129 _ACEOF
11130 rm -f conftest.$ac_objext
11131 if { (eval echo "$as_me:11131: \"$ac_compile\"") >&5
11132   (eval $ac_compile) 2>&5
11133   ac_status=$?
11134   echo "$as_me:11134: \$? = $ac_status" >&5
11135   (exit $ac_status); } &&
11136          { ac_try='test -s conftest.$ac_objext'
11137   { (eval echo "$as_me:11137: \"$ac_try\"") >&5
11138   (eval $ac_try) 2>&5
11139   ac_status=$?
11140   echo "$as_me:11140: \$? = $ac_status" >&5
11141   (exit $ac_status); }; }; then
11142   cf_XOPEN_SOURCE_set_ok=yes
11143 else
11144   echo "$as_me: failed program was:" >&5
11145 cat conftest.$ac_ext >&5
11146 cf_XOPEN_SOURCE_set_ok=no
11147 fi
11148 rm -f conftest.$ac_objext conftest.$ac_ext
11149                 if test $cf_XOPEN_SOURCE_set_ok = no
11150                 then
11151                         { echo "$as_me:11151: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11152 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11153                 fi
11154         else
11155
11156 echo "$as_me:11156: checking if we should define _XOPEN_SOURCE" >&5
11157 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11158 if test "${cf_cv_xopen_source+set}" = set; then
11159   echo $ECHO_N "(cached) $ECHO_C" >&6
11160 else
11161
11162         cat >conftest.$ac_ext <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11165
11166 #include <stdlib.h>
11167 #include <string.h>
11168 #include <sys/types.h>
11169
11170 int
11171 main (void)
11172 {
11173
11174 #ifndef _XOPEN_SOURCE
11175 make an error
11176 #endif
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f conftest.$ac_objext
11182 if { (eval echo "$as_me:11182: \"$ac_compile\"") >&5
11183   (eval $ac_compile) 2>&5
11184   ac_status=$?
11185   echo "$as_me:11185: \$? = $ac_status" >&5
11186   (exit $ac_status); } &&
11187          { ac_try='test -s conftest.$ac_objext'
11188   { (eval echo "$as_me:11188: \"$ac_try\"") >&5
11189   (eval $ac_try) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit $ac_status); }; }; then
11193   cf_cv_xopen_source=no
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat conftest.$ac_ext >&5
11197 cf_save="$CPPFLAGS"
11198
11199         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11200         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11201
11202          cat >conftest.$ac_ext <<_ACEOF
11203 #line 11203 "configure"
11204 #include "confdefs.h"
11205
11206 #include <stdlib.h>
11207 #include <string.h>
11208 #include <sys/types.h>
11209
11210 int
11211 main (void)
11212 {
11213
11214 #ifdef _XOPEN_SOURCE
11215 make an error
11216 #endif
11217   ;
11218   return 0;
11219 }
11220 _ACEOF
11221 rm -f conftest.$ac_objext
11222 if { (eval echo "$as_me:11222: \"$ac_compile\"") >&5
11223   (eval $ac_compile) 2>&5
11224   ac_status=$?
11225   echo "$as_me:11225: \$? = $ac_status" >&5
11226   (exit $ac_status); } &&
11227          { ac_try='test -s conftest.$ac_objext'
11228   { (eval echo "$as_me:11228: \"$ac_try\"") >&5
11229   (eval $ac_try) 2>&5
11230   ac_status=$?
11231   echo "$as_me:11231: \$? = $ac_status" >&5
11232   (exit $ac_status); }; }; then
11233   cf_cv_xopen_source=no
11234 else
11235   echo "$as_me: failed program was:" >&5
11236 cat conftest.$ac_ext >&5
11237 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11238 fi
11239 rm -f conftest.$ac_objext conftest.$ac_ext
11240         CPPFLAGS="$cf_save"
11241
11242 fi
11243 rm -f conftest.$ac_objext conftest.$ac_ext
11244
11245 fi
11246 echo "$as_me:11246: result: $cf_cv_xopen_source" >&5
11247 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11248
11249 if test "$cf_cv_xopen_source" != no ; then
11250
11251 CFLAGS=`echo "$CFLAGS" | \
11252         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11253                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11254
11255 CPPFLAGS=`echo "$CPPFLAGS" | \
11256         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11257                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11258
11259         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11260
11261 cf_fix_cppflags=no
11262 cf_new_cflags=
11263 cf_new_cppflags=
11264 cf_new_extra_cppflags=
11265
11266 for cf_add_cflags in $cf_temp_xopen_source
11267 do
11268 case $cf_fix_cppflags in
11269 (no)
11270         case $cf_add_cflags in
11271         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11272                 case $cf_add_cflags in
11273                 (-D*)
11274                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11275
11276                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11277                                 && test -z "${cf_tst_cflags}" \
11278                                 && cf_fix_cppflags=yes
11279
11280                         if test $cf_fix_cppflags = yes ; then
11281
11282         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11283         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11284
11285                                 continue
11286                         elif test "${cf_tst_cflags}" = "\"'" ; then
11287
11288         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11289         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11290
11291                                 continue
11292                         fi
11293                         ;;
11294                 esac
11295                 case "$CPPFLAGS" in
11296                 (*$cf_add_cflags)
11297                         ;;
11298                 (*)
11299                         case $cf_add_cflags in
11300                         (-D*)
11301                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11302
11303 CPPFLAGS=`echo "$CPPFLAGS" | \
11304         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11305                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11306
11307                                 ;;
11308                         esac
11309
11310         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11311         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11312
11313                         ;;
11314                 esac
11315                 ;;
11316         (*)
11317
11318         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11319         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11320
11321                 ;;
11322         esac
11323         ;;
11324 (yes)
11325
11326         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11327         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11328
11329         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11330
11331         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11332                 && test -z "${cf_tst_cflags}" \
11333                 && cf_fix_cppflags=no
11334         ;;
11335 esac
11336 done
11337
11338 if test -n "$cf_new_cflags" ; then
11339
11340         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11341         CFLAGS="${CFLAGS}$cf_new_cflags"
11342
11343 fi
11344
11345 if test -n "$cf_new_cppflags" ; then
11346
11347         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11348         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11349
11350 fi
11351
11352 if test -n "$cf_new_extra_cppflags" ; then
11353
11354         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11355         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11356
11357 fi
11358
11359 fi
11360
11361         fi
11362 fi
11363 fi # cf_cv_posix_visible
11364
11365 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11366
11367 # Work around breakage on OS X
11368
11369 echo "$as_me:11369: checking if SIGWINCH is defined" >&5
11370 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11371 if test "${cf_cv_define_sigwinch+set}" = set; then
11372   echo $ECHO_N "(cached) $ECHO_C" >&6
11373 else
11374
11375         cat >conftest.$ac_ext <<_ACEOF
11376 #line 11376 "configure"
11377 #include "confdefs.h"
11378
11379 #include <sys/types.h>
11380 #include <sys/signal.h>
11381
11382 int
11383 main (void)
11384 {
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_define_sigwinch=yes
11403 else
11404   echo "$as_me: failed program was:" >&5
11405 cat conftest.$ac_ext >&5
11406 cat >conftest.$ac_ext <<_ACEOF
11407 #line 11407 "configure"
11408 #include "confdefs.h"
11409
11410 #undef _XOPEN_SOURCE
11411 #undef _POSIX_SOURCE
11412 #undef _POSIX_C_SOURCE
11413 #include <sys/types.h>
11414 #include <sys/signal.h>
11415
11416 int
11417 main (void)
11418 {
11419 int x = SIGWINCH; (void)x
11420   ;
11421   return 0;
11422 }
11423 _ACEOF
11424 rm -f conftest.$ac_objext
11425 if { (eval echo "$as_me:11425: \"$ac_compile\"") >&5
11426   (eval $ac_compile) 2>&5
11427   ac_status=$?
11428   echo "$as_me:11428: \$? = $ac_status" >&5
11429   (exit $ac_status); } &&
11430          { ac_try='test -s conftest.$ac_objext'
11431   { (eval echo "$as_me:11431: \"$ac_try\"") >&5
11432   (eval $ac_try) 2>&5
11433   ac_status=$?
11434   echo "$as_me:11434: \$? = $ac_status" >&5
11435   (exit $ac_status); }; }; then
11436   cf_cv_define_sigwinch=maybe
11437 else
11438   echo "$as_me: failed program was:" >&5
11439 cat conftest.$ac_ext >&5
11440 cf_cv_define_sigwinch=no
11441 fi
11442 rm -f conftest.$ac_objext conftest.$ac_ext
11443
11444 fi
11445 rm -f conftest.$ac_objext conftest.$ac_ext
11446
11447 fi
11448 echo "$as_me:11448: result: $cf_cv_define_sigwinch" >&5
11449 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11450
11451 if test "$cf_cv_define_sigwinch" = maybe ; then
11452 echo "$as_me:11452: checking for actual SIGWINCH definition" >&5
11453 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11454 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11455   echo $ECHO_N "(cached) $ECHO_C" >&6
11456 else
11457
11458 cf_cv_fixup_sigwinch=unknown
11459 cf_sigwinch=32
11460 while test $cf_sigwinch != 1
11461 do
11462         cat >conftest.$ac_ext <<_ACEOF
11463 #line 11463 "configure"
11464 #include "confdefs.h"
11465
11466 #undef _XOPEN_SOURCE
11467 #undef _POSIX_SOURCE
11468 #undef _POSIX_C_SOURCE
11469 #include <sys/types.h>
11470 #include <sys/signal.h>
11471
11472 int
11473 main (void)
11474 {
11475
11476 #if SIGWINCH != $cf_sigwinch
11477 make an error
11478 #endif
11479 int x = SIGWINCH; (void)x
11480   ;
11481   return 0;
11482 }
11483 _ACEOF
11484 rm -f conftest.$ac_objext
11485 if { (eval echo "$as_me:11485: \"$ac_compile\"") >&5
11486   (eval $ac_compile) 2>&5
11487   ac_status=$?
11488   echo "$as_me:11488: \$? = $ac_status" >&5
11489   (exit $ac_status); } &&
11490          { ac_try='test -s conftest.$ac_objext'
11491   { (eval echo "$as_me:11491: \"$ac_try\"") >&5
11492   (eval $ac_try) 2>&5
11493   ac_status=$?
11494   echo "$as_me:11494: \$? = $ac_status" >&5
11495   (exit $ac_status); }; }; then
11496   cf_cv_fixup_sigwinch=$cf_sigwinch
11497          break
11498 else
11499   echo "$as_me: failed program was:" >&5
11500 cat conftest.$ac_ext >&5
11501 fi
11502 rm -f conftest.$ac_objext conftest.$ac_ext
11503
11504 cf_sigwinch=`expr $cf_sigwinch - 1`
11505 done
11506
11507 fi
11508 echo "$as_me:11508: result: $cf_cv_fixup_sigwinch" >&5
11509 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11510
11511         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11512                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11513         fi
11514 fi
11515
11516 # Checks for CODESET support.
11517
11518 echo "$as_me:11518: checking for nl_langinfo and CODESET" >&5
11519 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11520 if test "${am_cv_langinfo_codeset+set}" = set; then
11521   echo $ECHO_N "(cached) $ECHO_C" >&6
11522 else
11523   cat >conftest.$ac_ext <<_ACEOF
11524 #line 11524 "configure"
11525 #include "confdefs.h"
11526 #include <langinfo.h>
11527 int
11528 main (void)
11529 {
11530 char* cs = nl_langinfo(CODESET); (void)cs
11531   ;
11532   return 0;
11533 }
11534 _ACEOF
11535 rm -f conftest.$ac_objext conftest$ac_exeext
11536 if { (eval echo "$as_me:11536: \"$ac_link\"") >&5
11537   (eval $ac_link) 2>&5
11538   ac_status=$?
11539   echo "$as_me:11539: \$? = $ac_status" >&5
11540   (exit $ac_status); } &&
11541          { ac_try='test -s conftest$ac_exeext'
11542   { (eval echo "$as_me:11542: \"$ac_try\"") >&5
11543   (eval $ac_try) 2>&5
11544   ac_status=$?
11545   echo "$as_me:11545: \$? = $ac_status" >&5
11546   (exit $ac_status); }; }; then
11547   am_cv_langinfo_codeset=yes
11548 else
11549   echo "$as_me: failed program was:" >&5
11550 cat conftest.$ac_ext >&5
11551 am_cv_langinfo_codeset=no
11552 fi
11553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11554
11555 fi
11556 echo "$as_me:11556: result: $am_cv_langinfo_codeset" >&5
11557 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11558         if test $am_cv_langinfo_codeset = yes; then
11559
11560 cat >>confdefs.h <<\EOF
11561 #define HAVE_LANGINFO_CODESET 1
11562 EOF
11563
11564         fi
11565
11566 # use these variables to work around a defect in gcc's fixincludes.
11567 NCURSES_OK_WCHAR_T=
11568 NCURSES_OK_WINT_T=
11569
11570 echo "$as_me:11570: checking if you want wide-character code" >&5
11571 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11572
11573 # Check whether --enable-widec or --disable-widec was given.
11574 if test "${enable_widec+set}" = set; then
11575   enableval="$enable_widec"
11576   with_widec=$enableval
11577 else
11578   with_widec=no
11579 fi;
11580 echo "$as_me:11580: result: $with_widec" >&5
11581 echo "${ECHO_T}$with_widec" >&6
11582
11583 NCURSES_WCWIDTH_GRAPHICS=1
11584
11585 if test "x$with_widec" = xyes ; then
11586         if test "x$disable_lib_suffixes" = xno ; then
11587                 LIB_SUFFIX="w${LIB_SUFFIX}"
11588         fi
11589
11590 cat >>confdefs.h <<\EOF
11591 #define USE_WIDEC_SUPPORT 1
11592 EOF
11593
11594 cat >>confdefs.h <<\EOF
11595 #define NCURSES_WIDECHAR 1
11596 EOF
11597
11598 for ac_header in \
11599 wchar.h \
11600 wctype.h \
11601
11602 do
11603 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11604 echo "$as_me:11604: checking for $ac_header" >&5
11605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11607   echo $ECHO_N "(cached) $ECHO_C" >&6
11608 else
11609   cat >conftest.$ac_ext <<_ACEOF
11610 #line 11610 "configure"
11611 #include "confdefs.h"
11612 #include <$ac_header>
11613 _ACEOF
11614 if { (eval echo "$as_me:11614: \"$ac_cpp conftest.$ac_ext\"") >&5
11615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11616   ac_status=$?
11617   egrep -v '^ *\+' conftest.er1 >conftest.err
11618   rm -f conftest.er1
11619   cat conftest.err >&5
11620   echo "$as_me:11620: \$? = $ac_status" >&5
11621   (exit $ac_status); } >/dev/null; then
11622   if test -s conftest.err; then
11623     ac_cpp_err=$ac_c_preproc_warn_flag
11624   else
11625     ac_cpp_err=
11626   fi
11627 else
11628   ac_cpp_err=yes
11629 fi
11630 if test -z "$ac_cpp_err"; then
11631   eval "$as_ac_Header=yes"
11632 else
11633   echo "$as_me: failed program was:" >&5
11634   cat conftest.$ac_ext >&5
11635   eval "$as_ac_Header=no"
11636 fi
11637 rm -f conftest.err conftest.$ac_ext
11638 fi
11639 echo "$as_me:11639: result: `eval echo '${'$as_ac_Header'}'`" >&5
11640 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11641 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11642   cat >>confdefs.h <<EOF
11643 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11644 EOF
11645
11646 fi
11647 done
11648
11649 echo "$as_me:11649: checking if wchar.h can be used as is" >&5
11650 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11651 if test "${cf_cv_wchar_h_okay+set}" = set; then
11652   echo $ECHO_N "(cached) $ECHO_C" >&6
11653 else
11654
11655 cat >conftest.$ac_ext <<_ACEOF
11656 #line 11656 "configure"
11657 #include "confdefs.h"
11658
11659 #include <stdlib.h>
11660 #ifdef HAVE_WCHAR_H
11661 #include <wchar.h>
11662 #endif
11663 #ifdef HAVE_WCTYPE_H
11664 #include <wctype.h>
11665 #endif
11666
11667 int
11668 main (void)
11669 {
11670
11671         wint_t foo = 0;
11672         int bar = iswpunct(foo)
11673   ;
11674   return 0;
11675 }
11676 _ACEOF
11677 rm -f conftest.$ac_objext
11678 if { (eval echo "$as_me:11678: \"$ac_compile\"") >&5
11679   (eval $ac_compile) 2>&5
11680   ac_status=$?
11681   echo "$as_me:11681: \$? = $ac_status" >&5
11682   (exit $ac_status); } &&
11683          { ac_try='test -s conftest.$ac_objext'
11684   { (eval echo "$as_me:11684: \"$ac_try\"") >&5
11685   (eval $ac_try) 2>&5
11686   ac_status=$?
11687   echo "$as_me:11687: \$? = $ac_status" >&5
11688   (exit $ac_status); }; }; then
11689   cf_cv_wchar_h_okay=yes
11690 else
11691   echo "$as_me: failed program was:" >&5
11692 cat conftest.$ac_ext >&5
11693 cf_cv_wchar_h_okay=no
11694 fi
11695 rm -f conftest.$ac_objext conftest.$ac_ext
11696 fi
11697 echo "$as_me:11697: result: $cf_cv_wchar_h_okay" >&5
11698 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11699
11700 if test $cf_cv_wchar_h_okay = no
11701 then
11702
11703 echo "$as_me:11703: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11704 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11705 cat >conftest.$ac_ext <<_ACEOF
11706 #line 11706 "configure"
11707 #include "confdefs.h"
11708 #include <sys/types.h>
11709
11710 int
11711 main (void)
11712 {
11713
11714 #ifndef _XOPEN_SOURCE_EXTENDED
11715 make an error
11716 #endif
11717   ;
11718   return 0;
11719 }
11720 _ACEOF
11721 rm -f conftest.$ac_objext
11722 if { (eval echo "$as_me:11722: \"$ac_compile\"") >&5
11723   (eval $ac_compile) 2>&5
11724   ac_status=$?
11725   echo "$as_me:11725: \$? = $ac_status" >&5
11726   (exit $ac_status); } &&
11727          { ac_try='test -s conftest.$ac_objext'
11728   { (eval echo "$as_me:11728: \"$ac_try\"") >&5
11729   (eval $ac_try) 2>&5
11730   ac_status=$?
11731   echo "$as_me:11731: \$? = $ac_status" >&5
11732   (exit $ac_status); }; }; then
11733   cf_result=no
11734 else
11735   echo "$as_me: failed program was:" >&5
11736 cat conftest.$ac_ext >&5
11737 cf_result=yes
11738 fi
11739 rm -f conftest.$ac_objext conftest.$ac_ext
11740 echo "$as_me:11740: result: $cf_result" >&5
11741 echo "${ECHO_T}$cf_result" >&6
11742
11743 if test "$cf_result" = yes ; then
11744         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11745 elif test "x" != "x" ; then
11746         echo "$as_me:11746: checking checking for compatible value versus " >&5
11747 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11748         cat >conftest.$ac_ext <<_ACEOF
11749 #line 11749 "configure"
11750 #include "confdefs.h"
11751 #include <sys/types.h>
11752
11753 int
11754 main (void)
11755 {
11756
11757 #if _XOPEN_SOURCE_EXTENDED- < 0
11758 make an error
11759 #endif
11760   ;
11761   return 0;
11762 }
11763 _ACEOF
11764 rm -f conftest.$ac_objext
11765 if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766   (eval $ac_compile) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit $ac_status); } &&
11770          { ac_try='test -s conftest.$ac_objext'
11771   { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit $ac_status); }; }; then
11776   cf_result=yes
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 cat conftest.$ac_ext >&5
11780 cf_result=no
11781 fi
11782 rm -f conftest.$ac_objext conftest.$ac_ext
11783         echo "$as_me:11783: result: $cf_result" >&5
11784 echo "${ECHO_T}$cf_result" >&6
11785         if test "$cf_result" = no ; then
11786                 # perhaps we can override it - try...
11787                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11788         fi
11789 fi
11790
11791 fi
11792
11793 echo "$as_me:11793: checking if wcwidth agrees graphics are single-width" >&5
11794 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11795 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11796   echo $ECHO_N "(cached) $ECHO_C" >&6
11797 else
11798
11799 cat >conftest.in <<CF_EOF
11800 -       VT100 symbols
11801 0x250c  upper left corner
11802 0x2514  lower left corner
11803 0x2510  upper right corner
11804 0x2518  lower right corner
11805 0x251c  tee pointing left
11806 0x2524  tee pointing right
11807 0x2534  tee pointing up
11808 0x252c  tee pointing down
11809 0x2500  horizontal line
11810 0x2502  vertical line
11811 0x253c  large plus or crossover
11812 0x23ba  scan line 1
11813 0x23bd  scan line 9
11814 0x25c6  diamond
11815 0x2592  checker board (stipple)
11816 0x00b0  degree symbol
11817 0x00b1  plus/minus
11818 0x00b7  bullet
11819 -       Teletype 5410v1 symbols
11820 0x2190  arrow pointing left
11821 0x2192  arrow pointing right
11822 0x2193  arrow pointing down
11823 0x2191  arrow pointing up
11824 0x2592  board of squares
11825 0x2603  lantern symbol
11826 0x25ae  solid square block
11827 -       these defaults were invented for ncurses
11828 0x23bb  scan line 3
11829 0x23bc  scan line 7
11830 0x2264  less-than-or-equal-to
11831 0x2265  greater-than-or-equal-to
11832 0x03c0  greek pi
11833 0x2260  not-equal
11834 0x00a3  pound-sterling symbol
11835 -       thick-line-drawing
11836 0x250f  upper left corner
11837 0x2517  lower left corner
11838 0x2513  upper right corner
11839 0x251b  lower right corner
11840 0x2523  tee pointing left
11841 0x252b  tee pointing right
11842 0x253b  tee pointing up
11843 0x2533  tee pointing down
11844 0x2501  horizontal line
11845 0x2503  vertical line
11846 0x254b  large plus or crossover
11847 -       double-line-drawing
11848 0x2554  upper left corner
11849 0x255a  lower left corner
11850 0x2557  upper right corner
11851 0x255d  lower right corner
11852 0x2563  tee pointing left
11853 0x2560  tee pointing right
11854 0x2569  tee pointing up
11855 0x2566  tee pointing down
11856 0x2550  horizontal line
11857 0x2551  vertical line
11858 0x256c  large plus or crossover
11859 CF_EOF
11860 if test "$cross_compiling" = yes; then
11861   cf_cv_wcwidth_graphics=unknown
11862 else
11863   cat >conftest.$ac_ext <<_ACEOF
11864 #line 11864 "configure"
11865 #include "confdefs.h"
11866
11867 #include <locale.h>
11868 #include <stdio.h>
11869 #include <wchar.h>
11870
11871 #define MY_LEN 80
11872
11873 int
11874 main(void)
11875 {
11876         FILE *fp;
11877         int value;
11878         char buffer[MY_LEN + 1];
11879         char notes[MY_LEN + 1];
11880         int totals = 0;
11881         int passed = 0;
11882
11883         if (setlocale(LC_ALL, "en_US.UTF8") ||
11884                 setlocale(LC_ALL, "en_US.UTF-8") ||
11885                 setlocale(LC_ALL, "en_US.utf8") ||
11886                 setlocale(LC_ALL, "en_US.utf-8")) {
11887                 if ((fp = fopen("conftest.in", "r")) != 0) {
11888                         while (fgets(buffer, MY_LEN, fp) != 0) {
11889                                 if (*buffer == '-') {
11890                                         fprintf(stderr, "\t%s", buffer);
11891                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11892                                         ++totals;
11893                                         if (wcwidth(value) == 1)
11894                                                 ++passed;
11895                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11896                                 } else {
11897                                         fprintf(stderr, "?\t%s", buffer);
11898                                 }
11899                         }
11900                 }
11901         }
11902         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11903         return (totals == passed) ? 0 : 1;
11904 }
11905
11906 _ACEOF
11907 rm -f conftest$ac_exeext
11908 if { (eval echo "$as_me:11908: \"$ac_link\"") >&5
11909   (eval $ac_link) 2>&5
11910   ac_status=$?
11911   echo "$as_me:11911: \$? = $ac_status" >&5
11912   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11913   { (eval echo "$as_me:11913: \"$ac_try\"") >&5
11914   (eval $ac_try) 2>&5
11915   ac_status=$?
11916   echo "$as_me:11916: \$? = $ac_status" >&5
11917   (exit $ac_status); }; }; then
11918   cf_cv_wcwidth_graphics=yes
11919 else
11920   echo "$as_me: program exited with status $ac_status" >&5
11921 echo "$as_me: failed program was:" >&5
11922 cat conftest.$ac_ext >&5
11923 cf_cv_wcwidth_graphics=no
11924 fi
11925 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11926 fi
11927
11928 fi
11929 echo "$as_me:11929: result: $cf_cv_wcwidth_graphics" >&5
11930 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11931
11932         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11933
11934         # with_overwrite=no
11935         NCURSES_CH_T=cchar_t
11936
11937 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11938 do
11939 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11940 echo "$as_me:11940: checking for $ac_func" >&5
11941 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11942 if eval "test \"\${$as_ac_var+set}\" = set"; then
11943   echo $ECHO_N "(cached) $ECHO_C" >&6
11944 else
11945   cat >conftest.$ac_ext <<_ACEOF
11946 #line 11946 "configure"
11947 #include "confdefs.h"
11948 #define $ac_func autoconf_temporary
11949 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11950 #undef $ac_func
11951
11952 #ifdef __cplusplus
11953 extern "C"
11954 #endif
11955
11956 /* We use char because int might match the return type of a gcc2
11957    builtin and then its argument prototype would still apply.  */
11958 char $ac_func (void);
11959
11960 int
11961 main (void)
11962 {
11963
11964 /* The GNU C library defines stubs for functions which it implements
11965     to always fail with ENOSYS.  Some functions are actually named
11966     something starting with __ and the normal name is an alias.  */
11967 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11968 #error found stub for $ac_func
11969 #endif
11970
11971         return $ac_func ();
11972   ;
11973   return 0;
11974 }
11975 _ACEOF
11976 rm -f conftest.$ac_objext conftest$ac_exeext
11977 if { (eval echo "$as_me:11977: \"$ac_link\"") >&5
11978   (eval $ac_link) 2>&5
11979   ac_status=$?
11980   echo "$as_me:11980: \$? = $ac_status" >&5
11981   (exit $ac_status); } &&
11982          { ac_try='test -s conftest$ac_exeext'
11983   { (eval echo "$as_me:11983: \"$ac_try\"") >&5
11984   (eval $ac_try) 2>&5
11985   ac_status=$?
11986   echo "$as_me:11986: \$? = $ac_status" >&5
11987   (exit $ac_status); }; }; then
11988   eval "$as_ac_var=yes"
11989 else
11990   echo "$as_me: failed program was:" >&5
11991 cat conftest.$ac_ext >&5
11992 eval "$as_ac_var=no"
11993 fi
11994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11995 fi
11996 echo "$as_me:11996: result: `eval echo '${'$as_ac_var'}'`" >&5
11997 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11998 if test `eval echo '${'$as_ac_var'}'` = yes; then
11999   cat >>confdefs.h <<EOF
12000 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12001 EOF
12002
12003 fi
12004 done
12005
12006         if test "x$ac_cv_func_putwc" != xyes ; then
12007
12008 echo "$as_me:12008: checking for multibyte character support" >&5
12009 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12010 if test "${cf_cv_utf8_lib+set}" = set; then
12011   echo $ECHO_N "(cached) $ECHO_C" >&6
12012 else
12013
12014         cf_save_LIBS="$LIBS"
12015         cat >conftest.$ac_ext <<_ACEOF
12016 #line 12016 "configure"
12017 #include "confdefs.h"
12018
12019 #include <stdlib.h>
12020 int
12021 main (void)
12022 {
12023 putwc(0,0);
12024   ;
12025   return 0;
12026 }
12027 _ACEOF
12028 rm -f conftest.$ac_objext conftest$ac_exeext
12029 if { (eval echo "$as_me:12029: \"$ac_link\"") >&5
12030   (eval $ac_link) 2>&5
12031   ac_status=$?
12032   echo "$as_me:12032: \$? = $ac_status" >&5
12033   (exit $ac_status); } &&
12034          { ac_try='test -s conftest$ac_exeext'
12035   { (eval echo "$as_me:12035: \"$ac_try\"") >&5
12036   (eval $ac_try) 2>&5
12037   ac_status=$?
12038   echo "$as_me:12038: \$? = $ac_status" >&5
12039   (exit $ac_status); }; }; then
12040   cf_cv_utf8_lib=yes
12041 else
12042   echo "$as_me: failed program was:" >&5
12043 cat conftest.$ac_ext >&5
12044
12045 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12046 # will be set on completion of the AC_TRY_LINK below.
12047 cf_cv_header_path_utf8=
12048 cf_cv_library_path_utf8=
12049
12050 echo "${as_me:-configure}:12050: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12051
12052 cf_save_LIBS="$LIBS"
12053
12054 cat >conftest.$ac_ext <<_ACEOF
12055 #line 12055 "configure"
12056 #include "confdefs.h"
12057
12058 #include <libutf8.h>
12059 int
12060 main (void)
12061 {
12062 putwc(0,0);
12063   ;
12064   return 0;
12065 }
12066 _ACEOF
12067 rm -f conftest.$ac_objext conftest$ac_exeext
12068 if { (eval echo "$as_me:12068: \"$ac_link\"") >&5
12069   (eval $ac_link) 2>&5
12070   ac_status=$?
12071   echo "$as_me:12071: \$? = $ac_status" >&5
12072   (exit $ac_status); } &&
12073          { ac_try='test -s conftest$ac_exeext'
12074   { (eval echo "$as_me:12074: \"$ac_try\"") >&5
12075   (eval $ac_try) 2>&5
12076   ac_status=$?
12077   echo "$as_me:12077: \$? = $ac_status" >&5
12078   (exit $ac_status); }; }; then
12079
12080         cf_cv_find_linkage_utf8=yes
12081         cf_cv_header_path_utf8=/usr/include
12082         cf_cv_library_path_utf8=/usr/lib
12083
12084 else
12085   echo "$as_me: failed program was:" >&5
12086 cat conftest.$ac_ext >&5
12087
12088 LIBS="-lutf8  $cf_save_LIBS"
12089
12090 cat >conftest.$ac_ext <<_ACEOF
12091 #line 12091 "configure"
12092 #include "confdefs.h"
12093
12094 #include <libutf8.h>
12095 int
12096 main (void)
12097 {
12098 putwc(0,0);
12099   ;
12100   return 0;
12101 }
12102 _ACEOF
12103 rm -f conftest.$ac_objext conftest$ac_exeext
12104 if { (eval echo "$as_me:12104: \"$ac_link\"") >&5
12105   (eval $ac_link) 2>&5
12106   ac_status=$?
12107   echo "$as_me:12107: \$? = $ac_status" >&5
12108   (exit $ac_status); } &&
12109          { ac_try='test -s conftest$ac_exeext'
12110   { (eval echo "$as_me:12110: \"$ac_try\"") >&5
12111   (eval $ac_try) 2>&5
12112   ac_status=$?
12113   echo "$as_me:12113: \$? = $ac_status" >&5
12114   (exit $ac_status); }; }; then
12115
12116         cf_cv_find_linkage_utf8=yes
12117         cf_cv_header_path_utf8=/usr/include
12118         cf_cv_library_path_utf8=/usr/lib
12119         cf_cv_library_file_utf8="-lutf8"
12120
12121 else
12122   echo "$as_me: failed program was:" >&5
12123 cat conftest.$ac_ext >&5
12124
12125         cf_cv_find_linkage_utf8=no
12126         LIBS="$cf_save_LIBS"
12127
12128         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12129
12130 echo "${as_me:-configure}:12130: testing find linkage for utf8 library ..." 1>&5
12131
12132 echo "${as_me:-configure}:12132: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12133
12134         cf_save_CPPFLAGS="$CPPFLAGS"
12135         cf_test_CPPFLAGS="$CPPFLAGS"
12136
12137 cf_search=
12138
12139 # collect the current set of include-directories from compiler flags
12140 cf_header_path_list=""
12141 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12142         for cf_header_path in $CPPFLAGS $CFLAGS
12143         do
12144                 case $cf_header_path in
12145                 (-I*)
12146                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12147
12148 test "x$cf_header_path" != "xNONE" && \
12149 test -d "$cf_header_path" && \
12150  {
12151         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12152         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
12153         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
12154         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12155         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
12156         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12157 }
12158
12159                         cf_header_path_list="$cf_header_path_list $cf_search"
12160                         ;;
12161                 esac
12162         done
12163 fi
12164
12165 # add the variations for the package we are looking for
12166
12167 cf_search=
12168
12169 test "x$prefix" != "xNONE" && \
12170 test -d "$prefix" && \
12171  {
12172         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12173         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
12174         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
12175         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
12176         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
12177         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12178 }
12179
12180 for cf_subdir_prefix in \
12181         /usr \
12182         /usr/local \
12183         /usr/pkg \
12184         /opt \
12185         /opt/local \
12186         $HOME
12187 do
12188
12189 test "x$cf_subdir_prefix" != "x$prefix" && \
12190 test -d "$cf_subdir_prefix" && \
12191 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12192         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12193         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
12194         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12195         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12196         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12197         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12198 }
12199
12200 done
12201
12202 test "$includedir" != NONE && \
12203 test "$includedir" != "/usr/include" && \
12204 test -d "$includedir" && {
12205         test -d $includedir &&    cf_search="$cf_search $includedir"
12206         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
12207 }
12208
12209 test "$oldincludedir" != NONE && \
12210 test "$oldincludedir" != "/usr/include" && \
12211 test -d "$oldincludedir" && {
12212         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
12213         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
12214 }
12215
12216 cf_search="$cf_search $cf_header_path_list"
12217
12218         for cf_cv_header_path_utf8 in $cf_search
12219         do
12220                 if test -d $cf_cv_header_path_utf8 ; then
12221                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12222
12223 echo "${as_me:-configure}:12223: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12224
12225                         CPPFLAGS="$cf_save_CPPFLAGS"
12226
12227         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12228         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12229
12230                         cat >conftest.$ac_ext <<_ACEOF
12231 #line 12231 "configure"
12232 #include "confdefs.h"
12233
12234 #include <libutf8.h>
12235 int
12236 main (void)
12237 {
12238 putwc(0,0);
12239   ;
12240   return 0;
12241 }
12242 _ACEOF
12243 rm -f conftest.$ac_objext
12244 if { (eval echo "$as_me:12244: \"$ac_compile\"") >&5
12245   (eval $ac_compile) 2>&5
12246   ac_status=$?
12247   echo "$as_me:12247: \$? = $ac_status" >&5
12248   (exit $ac_status); } &&
12249          { ac_try='test -s conftest.$ac_objext'
12250   { (eval echo "$as_me:12250: \"$ac_try\"") >&5
12251   (eval $ac_try) 2>&5
12252   ac_status=$?
12253   echo "$as_me:12253: \$? = $ac_status" >&5
12254   (exit $ac_status); }; }; then
12255
12256                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12257
12258 echo "${as_me:-configure}:12258: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12259
12260                                 cf_cv_find_linkage_utf8=maybe
12261                                 cf_test_CPPFLAGS="$CPPFLAGS"
12262                                 break
12263 else
12264   echo "$as_me: failed program was:" >&5
12265 cat conftest.$ac_ext >&5
12266
12267                                 CPPFLAGS="$cf_save_CPPFLAGS"
12268
12269 fi
12270 rm -f conftest.$ac_objext conftest.$ac_ext
12271                 fi
12272         done
12273
12274         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12275
12276 echo "${as_me:-configure}:12276: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12277
12278                 cf_save_LIBS="$LIBS"
12279                 cf_save_LDFLAGS="$LDFLAGS"
12280
12281                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12282
12283 cf_search=
12284 cf_library_path_list=""
12285 if test -n "${LDFLAGS}${LIBS}" ; then
12286         for cf_library_path in $LDFLAGS $LIBS
12287         do
12288                 case $cf_library_path in
12289                 (-L*)
12290                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12291
12292 test "x$cf_library_path" != "xNONE" && \
12293 test -d "$cf_library_path" && \
12294  {
12295         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12296         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12297         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12298         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12299         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12300         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12301 }
12302
12303                         cf_library_path_list="$cf_library_path_list $cf_search"
12304                         ;;
12305                 esac
12306         done
12307 fi
12308
12309 cf_search=
12310
12311 test "x$prefix" != "xNONE" && \
12312 test -d "$prefix" && \
12313  {
12314         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12315         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12316         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12317         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12318         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12319         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12320 }
12321
12322 for cf_subdir_prefix in \
12323         /usr \
12324         /usr/local \
12325         /usr/pkg \
12326         /opt \
12327         /opt/local \
12328         $HOME
12329 do
12330
12331 test "x$cf_subdir_prefix" != "x$prefix" && \
12332 test -d "$cf_subdir_prefix" && \
12333 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12334         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12335         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12336         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12337         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12338         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12339         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12340 }
12341
12342 done
12343
12344 cf_search="$cf_library_path_list $cf_search"
12345
12346                         for cf_cv_library_path_utf8 in $cf_search
12347                         do
12348                                 if test -d $cf_cv_library_path_utf8 ; then
12349                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12350
12351 echo "${as_me:-configure}:12351: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12352
12353                                         CPPFLAGS="$cf_test_CPPFLAGS"
12354                                         LIBS="-lutf8  $cf_save_LIBS"
12355                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12356                                         cat >conftest.$ac_ext <<_ACEOF
12357 #line 12357 "configure"
12358 #include "confdefs.h"
12359
12360 #include <libutf8.h>
12361 int
12362 main (void)
12363 {
12364 putwc(0,0);
12365   ;
12366   return 0;
12367 }
12368 _ACEOF
12369 rm -f conftest.$ac_objext conftest$ac_exeext
12370 if { (eval echo "$as_me:12370: \"$ac_link\"") >&5
12371   (eval $ac_link) 2>&5
12372   ac_status=$?
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit $ac_status); } &&
12375          { ac_try='test -s conftest$ac_exeext'
12376   { (eval echo "$as_me:12376: \"$ac_try\"") >&5
12377   (eval $ac_try) 2>&5
12378   ac_status=$?
12379   echo "$as_me:12379: \$? = $ac_status" >&5
12380   (exit $ac_status); }; }; then
12381
12382                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12383
12384 echo "${as_me:-configure}:12384: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12385
12386                                         cf_cv_find_linkage_utf8=yes
12387                                         cf_cv_library_file_utf8="-lutf8"
12388                                         break
12389 else
12390   echo "$as_me: failed program was:" >&5
12391 cat conftest.$ac_ext >&5
12392
12393                                         CPPFLAGS="$cf_save_CPPFLAGS"
12394                                         LIBS="$cf_save_LIBS"
12395                                         LDFLAGS="$cf_save_LDFLAGS"
12396
12397 fi
12398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12399                                 fi
12400                         done
12401                         CPPFLAGS="$cf_save_CPPFLAGS"
12402                         LDFLAGS="$cf_save_LDFLAGS"
12403                 fi
12404
12405         else
12406                 cf_cv_find_linkage_utf8=no
12407         fi
12408
12409 fi
12410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12411
12412 fi
12413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12414
12415 LIBS="$cf_save_LIBS"
12416
12417 if test "$cf_cv_find_linkage_utf8" = yes ; then
12418 cf_cv_utf8_lib=add-on
12419 else
12420 cf_cv_utf8_lib=no
12421 fi
12422
12423 fi
12424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12425 fi
12426 echo "$as_me:12426: result: $cf_cv_utf8_lib" >&5
12427 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12428
12429 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12430 # ncurses/ncursesw:
12431 if test "$cf_cv_utf8_lib" = "add-on" ; then
12432
12433 cat >>confdefs.h <<\EOF
12434 #define HAVE_LIBUTF8_H 1
12435 EOF
12436
12437 if test -n "$cf_cv_header_path_utf8" ; then
12438   for cf_add_incdir in $cf_cv_header_path_utf8
12439   do
12440         while test $cf_add_incdir != /usr/include
12441         do
12442           if test -d $cf_add_incdir
12443           then
12444                 cf_have_incdir=no
12445                 if test -n "$CFLAGS$CPPFLAGS" ; then
12446                   # a loop is needed to ensure we can add subdirs of existing dirs
12447                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12448                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12449                           cf_have_incdir=yes; break
12450                         fi
12451                   done
12452                 fi
12453
12454                 if test "$cf_have_incdir" = no ; then
12455                   if test "$cf_add_incdir" = /usr/local/include ; then
12456                         if test "$GCC" = yes
12457                         then
12458                           cf_save_CPPFLAGS=$CPPFLAGS
12459
12460         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12461         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12462
12463                           cat >conftest.$ac_ext <<_ACEOF
12464 #line 12464 "configure"
12465 #include "confdefs.h"
12466 #include <stdio.h>
12467 int
12468 main (void)
12469 {
12470 printf("Hello")
12471   ;
12472   return 0;
12473 }
12474 _ACEOF
12475 rm -f conftest.$ac_objext
12476 if { (eval echo "$as_me:12476: \"$ac_compile\"") >&5
12477   (eval $ac_compile) 2>&5
12478   ac_status=$?
12479   echo "$as_me:12479: \$? = $ac_status" >&5
12480   (exit $ac_status); } &&
12481          { ac_try='test -s conftest.$ac_objext'
12482   { (eval echo "$as_me:12482: \"$ac_try\"") >&5
12483   (eval $ac_try) 2>&5
12484   ac_status=$?
12485   echo "$as_me:12485: \$? = $ac_status" >&5
12486   (exit $ac_status); }; }; then
12487   :
12488 else
12489   echo "$as_me: failed program was:" >&5
12490 cat conftest.$ac_ext >&5
12491 cf_have_incdir=yes
12492 fi
12493 rm -f conftest.$ac_objext conftest.$ac_ext
12494                           CPPFLAGS=$cf_save_CPPFLAGS
12495                         fi
12496                   fi
12497                 fi
12498
12499                 if test "$cf_have_incdir" = no ; then
12500                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12501
12502 echo "${as_me:-configure}:12502: testing adding $cf_add_incdir to include-path ..." 1>&5
12503
12504                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12505
12506                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12507                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12508                   cf_add_incdir="$cf_top_incdir"
12509                 else
12510                   break
12511                 fi
12512           else
12513                 break
12514           fi
12515         done
12516   done
12517 fi
12518
12519 if test -n "$cf_cv_library_path_utf8" ; then
12520         for cf_add_libdir in $cf_cv_library_path_utf8
12521         do
12522                 if test $cf_add_libdir = /usr/lib ; then
12523                         :
12524                 elif test -d $cf_add_libdir
12525                 then
12526                         cf_have_libdir=no
12527                         if test -n "$LDFLAGS$LIBS" ; then
12528                                 # a loop is needed to ensure we can add subdirs of existing dirs
12529                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12530                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12531                                                 cf_have_libdir=yes; break
12532                                         fi
12533                                 done
12534                         fi
12535                         if test "$cf_have_libdir" = no ; then
12536                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12537
12538 echo "${as_me:-configure}:12538: testing adding $cf_add_libdir to library-path ..." 1>&5
12539
12540                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12541                         fi
12542                 fi
12543         done
12544 fi
12545
12546 cf_add_libs="$LIBS"
12547 # reverse order
12548 cf_add_0lib=
12549 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12550 # filter duplicates
12551 for cf_add_1lib in $cf_add_0lib; do
12552         for cf_add_2lib in $cf_add_libs; do
12553                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12554                         cf_add_1lib=
12555                         break
12556                 fi
12557         done
12558         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12559 done
12560 LIBS="$cf_add_libs"
12561
12562 fi
12563
12564                 if test "$cf_cv_utf8_lib" != no ; then
12565                         NCURSES_LIBUTF8=1
12566                 fi
12567         fi
12568
12569 # This is needed on Tru64 5.0 to declare mbstate_t
12570 echo "$as_me:12570: checking if we must include wchar.h to declare mbstate_t" >&5
12571 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12572 if test "${cf_cv_mbstate_t+set}" = set; then
12573   echo $ECHO_N "(cached) $ECHO_C" >&6
12574 else
12575
12576 cat >conftest.$ac_ext <<_ACEOF
12577 #line 12577 "configure"
12578 #include "confdefs.h"
12579
12580 #include <stdlib.h>
12581 #include <stdarg.h>
12582 #include <stdio.h>
12583 #ifdef HAVE_LIBUTF8_H
12584 #include <libutf8.h>
12585 #endif
12586 int
12587 main (void)
12588 {
12589 mbstate_t state
12590   ;
12591   return 0;
12592 }
12593 _ACEOF
12594 rm -f conftest.$ac_objext
12595 if { (eval echo "$as_me:12595: \"$ac_compile\"") >&5
12596   (eval $ac_compile) 2>&5
12597   ac_status=$?
12598   echo "$as_me:12598: \$? = $ac_status" >&5
12599   (exit $ac_status); } &&
12600          { ac_try='test -s conftest.$ac_objext'
12601   { (eval echo "$as_me:12601: \"$ac_try\"") >&5
12602   (eval $ac_try) 2>&5
12603   ac_status=$?
12604   echo "$as_me:12604: \$? = $ac_status" >&5
12605   (exit $ac_status); }; }; then
12606   cf_cv_mbstate_t=no
12607 else
12608   echo "$as_me: failed program was:" >&5
12609 cat conftest.$ac_ext >&5
12610 cat >conftest.$ac_ext <<_ACEOF
12611 #line 12611 "configure"
12612 #include "confdefs.h"
12613
12614 #include <stdlib.h>
12615 #include <stdarg.h>
12616 #include <stdio.h>
12617 #include <wchar.h>
12618 #ifdef HAVE_LIBUTF8_H
12619 #include <libutf8.h>
12620 #endif
12621 int
12622 main (void)
12623 {
12624 mbstate_t value
12625   ;
12626   return 0;
12627 }
12628 _ACEOF
12629 rm -f conftest.$ac_objext
12630 if { (eval echo "$as_me:12630: \"$ac_compile\"") >&5
12631   (eval $ac_compile) 2>&5
12632   ac_status=$?
12633   echo "$as_me:12633: \$? = $ac_status" >&5
12634   (exit $ac_status); } &&
12635          { ac_try='test -s conftest.$ac_objext'
12636   { (eval echo "$as_me:12636: \"$ac_try\"") >&5
12637   (eval $ac_try) 2>&5
12638   ac_status=$?
12639   echo "$as_me:12639: \$? = $ac_status" >&5
12640   (exit $ac_status); }; }; then
12641   cf_cv_mbstate_t=yes
12642 else
12643   echo "$as_me: failed program was:" >&5
12644 cat conftest.$ac_ext >&5
12645 cf_cv_mbstate_t=unknown
12646 fi
12647 rm -f conftest.$ac_objext conftest.$ac_ext
12648 fi
12649 rm -f conftest.$ac_objext conftest.$ac_ext
12650 fi
12651 echo "$as_me:12651: result: $cf_cv_mbstate_t" >&5
12652 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12653
12654 if test "$cf_cv_mbstate_t" = yes ; then
12655
12656 cat >>confdefs.h <<\EOF
12657 #define NEED_WCHAR_H 1
12658 EOF
12659
12660         NEED_WCHAR_H=1
12661 fi
12662
12663 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12664 if test "$cf_cv_mbstate_t" = unknown ; then
12665         NCURSES_MBSTATE_T=1
12666 fi
12667
12668 # This is needed on Tru64 5.0 to declare wchar_t
12669 echo "$as_me:12669: checking if we must include wchar.h to declare wchar_t" >&5
12670 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12671 if test "${cf_cv_wchar_t+set}" = set; then
12672   echo $ECHO_N "(cached) $ECHO_C" >&6
12673 else
12674
12675 cat >conftest.$ac_ext <<_ACEOF
12676 #line 12676 "configure"
12677 #include "confdefs.h"
12678
12679 #include <stdlib.h>
12680 #include <stdarg.h>
12681 #include <stdio.h>
12682 #ifdef HAVE_LIBUTF8_H
12683 #include <libutf8.h>
12684 #endif
12685 int
12686 main (void)
12687 {
12688 wchar_t state
12689   ;
12690   return 0;
12691 }
12692 _ACEOF
12693 rm -f conftest.$ac_objext
12694 if { (eval echo "$as_me:12694: \"$ac_compile\"") >&5
12695   (eval $ac_compile) 2>&5
12696   ac_status=$?
12697   echo "$as_me:12697: \$? = $ac_status" >&5
12698   (exit $ac_status); } &&
12699          { ac_try='test -s conftest.$ac_objext'
12700   { (eval echo "$as_me:12700: \"$ac_try\"") >&5
12701   (eval $ac_try) 2>&5
12702   ac_status=$?
12703   echo "$as_me:12703: \$? = $ac_status" >&5
12704   (exit $ac_status); }; }; then
12705   cf_cv_wchar_t=no
12706 else
12707   echo "$as_me: failed program was:" >&5
12708 cat conftest.$ac_ext >&5
12709 cat >conftest.$ac_ext <<_ACEOF
12710 #line 12710 "configure"
12711 #include "confdefs.h"
12712
12713 #include <stdlib.h>
12714 #include <stdarg.h>
12715 #include <stdio.h>
12716 #include <wchar.h>
12717 #ifdef HAVE_LIBUTF8_H
12718 #include <libutf8.h>
12719 #endif
12720 int
12721 main (void)
12722 {
12723 wchar_t value
12724   ;
12725   return 0;
12726 }
12727 _ACEOF
12728 rm -f conftest.$ac_objext
12729 if { (eval echo "$as_me:12729: \"$ac_compile\"") >&5
12730   (eval $ac_compile) 2>&5
12731   ac_status=$?
12732   echo "$as_me:12732: \$? = $ac_status" >&5
12733   (exit $ac_status); } &&
12734          { ac_try='test -s conftest.$ac_objext'
12735   { (eval echo "$as_me:12735: \"$ac_try\"") >&5
12736   (eval $ac_try) 2>&5
12737   ac_status=$?
12738   echo "$as_me:12738: \$? = $ac_status" >&5
12739   (exit $ac_status); }; }; then
12740   cf_cv_wchar_t=yes
12741 else
12742   echo "$as_me: failed program was:" >&5
12743 cat conftest.$ac_ext >&5
12744 cf_cv_wchar_t=unknown
12745 fi
12746 rm -f conftest.$ac_objext conftest.$ac_ext
12747 fi
12748 rm -f conftest.$ac_objext conftest.$ac_ext
12749 fi
12750 echo "$as_me:12750: result: $cf_cv_wchar_t" >&5
12751 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12752
12753 if test "$cf_cv_wchar_t" = yes ; then
12754
12755 cat >>confdefs.h <<\EOF
12756 #define NEED_WCHAR_H 1
12757 EOF
12758
12759         NEED_WCHAR_H=1
12760 fi
12761
12762 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12763 if test "$cf_cv_wchar_t" = unknown ; then
12764         NCURSES_WCHAR_T=1
12765 fi
12766
12767 # if we find wchar_t in either place, use substitution to provide a fallback.
12768 if test "$cf_cv_wchar_t" != unknown ; then
12769         NCURSES_OK_WCHAR_T=1
12770 fi
12771
12772 # This is needed on Tru64 5.0 to declare wint_t
12773 echo "$as_me:12773: checking if we must include wchar.h to declare wint_t" >&5
12774 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12775 if test "${cf_cv_wint_t+set}" = set; then
12776   echo $ECHO_N "(cached) $ECHO_C" >&6
12777 else
12778
12779 cat >conftest.$ac_ext <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12782
12783 #include <stdlib.h>
12784 #include <stdarg.h>
12785 #include <stdio.h>
12786 #ifdef HAVE_LIBUTF8_H
12787 #include <libutf8.h>
12788 #endif
12789 int
12790 main (void)
12791 {
12792 wint_t state
12793   ;
12794   return 0;
12795 }
12796 _ACEOF
12797 rm -f conftest.$ac_objext
12798 if { (eval echo "$as_me:12798: \"$ac_compile\"") >&5
12799   (eval $ac_compile) 2>&5
12800   ac_status=$?
12801   echo "$as_me:12801: \$? = $ac_status" >&5
12802   (exit $ac_status); } &&
12803          { ac_try='test -s conftest.$ac_objext'
12804   { (eval echo "$as_me:12804: \"$ac_try\"") >&5
12805   (eval $ac_try) 2>&5
12806   ac_status=$?
12807   echo "$as_me:12807: \$? = $ac_status" >&5
12808   (exit $ac_status); }; }; then
12809   cf_cv_wint_t=no
12810 else
12811   echo "$as_me: failed program was:" >&5
12812 cat conftest.$ac_ext >&5
12813 cat >conftest.$ac_ext <<_ACEOF
12814 #line 12814 "configure"
12815 #include "confdefs.h"
12816
12817 #include <stdlib.h>
12818 #include <stdarg.h>
12819 #include <stdio.h>
12820 #include <wchar.h>
12821 #ifdef HAVE_LIBUTF8_H
12822 #include <libutf8.h>
12823 #endif
12824 int
12825 main (void)
12826 {
12827 wint_t value
12828   ;
12829   return 0;
12830 }
12831 _ACEOF
12832 rm -f conftest.$ac_objext
12833 if { (eval echo "$as_me:12833: \"$ac_compile\"") >&5
12834   (eval $ac_compile) 2>&5
12835   ac_status=$?
12836   echo "$as_me:12836: \$? = $ac_status" >&5
12837   (exit $ac_status); } &&
12838          { ac_try='test -s conftest.$ac_objext'
12839   { (eval echo "$as_me:12839: \"$ac_try\"") >&5
12840   (eval $ac_try) 2>&5
12841   ac_status=$?
12842   echo "$as_me:12842: \$? = $ac_status" >&5
12843   (exit $ac_status); }; }; then
12844   cf_cv_wint_t=yes
12845 else
12846   echo "$as_me: failed program was:" >&5
12847 cat conftest.$ac_ext >&5
12848 cf_cv_wint_t=unknown
12849 fi
12850 rm -f conftest.$ac_objext conftest.$ac_ext
12851 fi
12852 rm -f conftest.$ac_objext conftest.$ac_ext
12853 fi
12854 echo "$as_me:12854: result: $cf_cv_wint_t" >&5
12855 echo "${ECHO_T}$cf_cv_wint_t" >&6
12856
12857 if test "$cf_cv_wint_t" = yes ; then
12858
12859 cat >>confdefs.h <<\EOF
12860 #define NEED_WCHAR_H 1
12861 EOF
12862
12863         NEED_WCHAR_H=1
12864 fi
12865
12866 # if we do not find wint_t in either place, use substitution to provide a fallback.
12867 if test "$cf_cv_wint_t" = unknown ; then
12868         NCURSES_WINT_T=1
12869 fi
12870
12871 # if we find wint_t in either place, use substitution to provide a fallback.
12872 if test "$cf_cv_wint_t" != unknown ; then
12873         NCURSES_OK_WINT_T=1
12874 fi
12875
12876         if test "$NCURSES_MBSTATE_T" != 0; then
12877
12878 cat >>confdefs.h <<\EOF
12879 #define NEED_MBSTATE_T_DEF 1
12880 EOF
12881
12882         fi
12883 fi
12884
12885 ###   use option --disable-lp64 to allow long chtype
12886 echo "$as_me:12886: checking whether to enable _LP64 definition in curses.h" >&5
12887 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12888
12889 # Check whether --enable-lp64 or --disable-lp64 was given.
12890 if test "${enable_lp64+set}" = set; then
12891   enableval="$enable_lp64"
12892   with_lp64=$enableval
12893 else
12894   with_lp64=$cf_dft_with_lp64
12895 fi;
12896 echo "$as_me:12896: result: $with_lp64" >&5
12897 echo "${ECHO_T}$with_lp64" >&6
12898
12899 if test "x$with_lp64" = xyes ; then
12900         cf_cv_enable_lp64=1
12901 else
12902         cf_cv_enable_lp64=0
12903 fi
12904
12905 # Check whether --enable-largefile or --disable-largefile was given.
12906 if test "${enable_largefile+set}" = set; then
12907   enableval="$enable_largefile"
12908
12909 fi;
12910 if test "$enable_largefile" != no; then
12911
12912   echo "$as_me:12912: checking for special C compiler options needed for large files" >&5
12913 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12914 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12915   echo $ECHO_N "(cached) $ECHO_C" >&6
12916 else
12917   ac_cv_sys_largefile_CC=no
12918      if test "$GCC" != yes; then
12919        ac_save_CC=$CC
12920        while :; do
12921          # IRIX 6.2 and later do not support large files by default,
12922          # so use the C compiler's -n32 option if that helps.
12923          cat >conftest.$ac_ext <<_ACEOF
12924 #line 12924 "configure"
12925 #include "confdefs.h"
12926 #include <sys/types.h>
12927  /* Check that off_t can represent 2**63 - 1 correctly.
12928     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12929     since some C++ compilers masquerading as C compilers
12930     incorrectly reject 9223372036854775807.  */
12931 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12932   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12933                        && LARGE_OFF_T % 2147483647 == 1)
12934                       ? 1 : -1];
12935 int
12936 main (void)
12937 {
12938
12939   ;
12940   return 0;
12941 }
12942 _ACEOF
12943          rm -f conftest.$ac_objext
12944 if { (eval echo "$as_me:12944: \"$ac_compile\"") >&5
12945   (eval $ac_compile) 2>&5
12946   ac_status=$?
12947   echo "$as_me:12947: \$? = $ac_status" >&5
12948   (exit $ac_status); } &&
12949          { ac_try='test -s conftest.$ac_objext'
12950   { (eval echo "$as_me:12950: \"$ac_try\"") >&5
12951   (eval $ac_try) 2>&5
12952   ac_status=$?
12953   echo "$as_me:12953: \$? = $ac_status" >&5
12954   (exit $ac_status); }; }; then
12955   break
12956 else
12957   echo "$as_me: failed program was:" >&5
12958 cat conftest.$ac_ext >&5
12959 fi
12960 rm -f conftest.$ac_objext
12961          CC="$CC -n32"
12962          rm -f conftest.$ac_objext
12963 if { (eval echo "$as_me:12963: \"$ac_compile\"") >&5
12964   (eval $ac_compile) 2>&5
12965   ac_status=$?
12966   echo "$as_me:12966: \$? = $ac_status" >&5
12967   (exit $ac_status); } &&
12968          { ac_try='test -s conftest.$ac_objext'
12969   { (eval echo "$as_me:12969: \"$ac_try\"") >&5
12970   (eval $ac_try) 2>&5
12971   ac_status=$?
12972   echo "$as_me:12972: \$? = $ac_status" >&5
12973   (exit $ac_status); }; }; then
12974   ac_cv_sys_largefile_CC=' -n32'; break
12975 else
12976   echo "$as_me: failed program was:" >&5
12977 cat conftest.$ac_ext >&5
12978 fi
12979 rm -f conftest.$ac_objext
12980          break
12981        done
12982        CC=$ac_save_CC
12983        rm -f conftest.$ac_ext
12984     fi
12985 fi
12986 echo "$as_me:12986: result: $ac_cv_sys_largefile_CC" >&5
12987 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12988   if test "$ac_cv_sys_largefile_CC" != no; then
12989     CC=$CC$ac_cv_sys_largefile_CC
12990   fi
12991
12992   echo "$as_me:12992: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12993 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12994 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12995   echo $ECHO_N "(cached) $ECHO_C" >&6
12996 else
12997   while :; do
12998   ac_cv_sys_file_offset_bits=no
12999   cat >conftest.$ac_ext <<_ACEOF
13000 #line 13000 "configure"
13001 #include "confdefs.h"
13002 #include <sys/types.h>
13003  /* Check that off_t can represent 2**63 - 1 correctly.
13004     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13005     since some C++ compilers masquerading as C compilers
13006     incorrectly reject 9223372036854775807.  */
13007 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13008   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13009                        && LARGE_OFF_T % 2147483647 == 1)
13010                       ? 1 : -1];
13011 int
13012 main (void)
13013 {
13014
13015   ;
13016   return 0;
13017 }
13018 _ACEOF
13019 rm -f conftest.$ac_objext
13020 if { (eval echo "$as_me:13020: \"$ac_compile\"") >&5
13021   (eval $ac_compile) 2>&5
13022   ac_status=$?
13023   echo "$as_me:13023: \$? = $ac_status" >&5
13024   (exit $ac_status); } &&
13025          { ac_try='test -s conftest.$ac_objext'
13026   { (eval echo "$as_me:13026: \"$ac_try\"") >&5
13027   (eval $ac_try) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); }; }; then
13031   break
13032 else
13033   echo "$as_me: failed program was:" >&5
13034 cat conftest.$ac_ext >&5
13035 fi
13036 rm -f conftest.$ac_objext conftest.$ac_ext
13037   cat >conftest.$ac_ext <<_ACEOF
13038 #line 13038 "configure"
13039 #include "confdefs.h"
13040 #define _FILE_OFFSET_BITS 64
13041 #include <sys/types.h>
13042  /* Check that off_t can represent 2**63 - 1 correctly.
13043     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13044     since some C++ compilers masquerading as C compilers
13045     incorrectly reject 9223372036854775807.  */
13046 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13047   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13048                        && LARGE_OFF_T % 2147483647 == 1)
13049                       ? 1 : -1];
13050 int
13051 main (void)
13052 {
13053
13054   ;
13055   return 0;
13056 }
13057 _ACEOF
13058 rm -f conftest.$ac_objext
13059 if { (eval echo "$as_me:13059: \"$ac_compile\"") >&5
13060   (eval $ac_compile) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit $ac_status); } &&
13064          { ac_try='test -s conftest.$ac_objext'
13065   { (eval echo "$as_me:13065: \"$ac_try\"") >&5
13066   (eval $ac_try) 2>&5
13067   ac_status=$?
13068   echo "$as_me:13068: \$? = $ac_status" >&5
13069   (exit $ac_status); }; }; then
13070   ac_cv_sys_file_offset_bits=64; break
13071 else
13072   echo "$as_me: failed program was:" >&5
13073 cat conftest.$ac_ext >&5
13074 fi
13075 rm -f conftest.$ac_objext conftest.$ac_ext
13076   break
13077 done
13078 fi
13079 echo "$as_me:13079: result: $ac_cv_sys_file_offset_bits" >&5
13080 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13081 if test "$ac_cv_sys_file_offset_bits" != no; then
13082
13083 cat >>confdefs.h <<EOF
13084 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13085 EOF
13086
13087 fi
13088 rm -rf conftest*
13089   echo "$as_me:13089: checking for _LARGE_FILES value needed for large files" >&5
13090 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13091 if test "${ac_cv_sys_large_files+set}" = set; then
13092   echo $ECHO_N "(cached) $ECHO_C" >&6
13093 else
13094   while :; do
13095   ac_cv_sys_large_files=no
13096   cat >conftest.$ac_ext <<_ACEOF
13097 #line 13097 "configure"
13098 #include "confdefs.h"
13099 #include <sys/types.h>
13100  /* Check that off_t can represent 2**63 - 1 correctly.
13101     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13102     since some C++ compilers masquerading as C compilers
13103     incorrectly reject 9223372036854775807.  */
13104 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13105   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13106                        && LARGE_OFF_T % 2147483647 == 1)
13107                       ? 1 : -1];
13108 int
13109 main (void)
13110 {
13111
13112   ;
13113   return 0;
13114 }
13115 _ACEOF
13116 rm -f conftest.$ac_objext
13117 if { (eval echo "$as_me:13117: \"$ac_compile\"") >&5
13118   (eval $ac_compile) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); } &&
13122          { ac_try='test -s conftest.$ac_objext'
13123   { (eval echo "$as_me:13123: \"$ac_try\"") >&5
13124   (eval $ac_try) 2>&5
13125   ac_status=$?
13126   echo "$as_me:13126: \$? = $ac_status" >&5
13127   (exit $ac_status); }; }; then
13128   break
13129 else
13130   echo "$as_me: failed program was:" >&5
13131 cat conftest.$ac_ext >&5
13132 fi
13133 rm -f conftest.$ac_objext conftest.$ac_ext
13134   cat >conftest.$ac_ext <<_ACEOF
13135 #line 13135 "configure"
13136 #include "confdefs.h"
13137 #define _LARGE_FILES 1
13138 #include <sys/types.h>
13139  /* Check that off_t can represent 2**63 - 1 correctly.
13140     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13141     since some C++ compilers masquerading as C compilers
13142     incorrectly reject 9223372036854775807.  */
13143 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13144   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13145                        && LARGE_OFF_T % 2147483647 == 1)
13146                       ? 1 : -1];
13147 int
13148 main (void)
13149 {
13150
13151   ;
13152   return 0;
13153 }
13154 _ACEOF
13155 rm -f conftest.$ac_objext
13156 if { (eval echo "$as_me:13156: \"$ac_compile\"") >&5
13157   (eval $ac_compile) 2>&5
13158   ac_status=$?
13159   echo "$as_me:13159: \$? = $ac_status" >&5
13160   (exit $ac_status); } &&
13161          { ac_try='test -s conftest.$ac_objext'
13162   { (eval echo "$as_me:13162: \"$ac_try\"") >&5
13163   (eval $ac_try) 2>&5
13164   ac_status=$?
13165   echo "$as_me:13165: \$? = $ac_status" >&5
13166   (exit $ac_status); }; }; then
13167   ac_cv_sys_large_files=1; break
13168 else
13169   echo "$as_me: failed program was:" >&5
13170 cat conftest.$ac_ext >&5
13171 fi
13172 rm -f conftest.$ac_objext conftest.$ac_ext
13173   break
13174 done
13175 fi
13176 echo "$as_me:13176: result: $ac_cv_sys_large_files" >&5
13177 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13178 if test "$ac_cv_sys_large_files" != no; then
13179
13180 cat >>confdefs.h <<EOF
13181 #define _LARGE_FILES $ac_cv_sys_large_files
13182 EOF
13183
13184 fi
13185 rm -rf conftest*
13186 fi
13187
13188         if test "$enable_largefile" != no ; then
13189         echo "$as_me:13189: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13190 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13191 if test "${ac_cv_sys_largefile_source+set}" = set; then
13192   echo $ECHO_N "(cached) $ECHO_C" >&6
13193 else
13194   while :; do
13195   ac_cv_sys_largefile_source=no
13196   cat >conftest.$ac_ext <<_ACEOF
13197 #line 13197 "configure"
13198 #include "confdefs.h"
13199 #include <stdio.h>
13200 int
13201 main (void)
13202 {
13203 return !fseeko;
13204   ;
13205   return 0;
13206 }
13207 _ACEOF
13208 rm -f conftest.$ac_objext
13209 if { (eval echo "$as_me:13209: \"$ac_compile\"") >&5
13210   (eval $ac_compile) 2>&5
13211   ac_status=$?
13212   echo "$as_me:13212: \$? = $ac_status" >&5
13213   (exit $ac_status); } &&
13214          { ac_try='test -s conftest.$ac_objext'
13215   { (eval echo "$as_me:13215: \"$ac_try\"") >&5
13216   (eval $ac_try) 2>&5
13217   ac_status=$?
13218   echo "$as_me:13218: \$? = $ac_status" >&5
13219   (exit $ac_status); }; }; then
13220   break
13221 else
13222   echo "$as_me: failed program was:" >&5
13223 cat conftest.$ac_ext >&5
13224 fi
13225 rm -f conftest.$ac_objext conftest.$ac_ext
13226   cat >conftest.$ac_ext <<_ACEOF
13227 #line 13227 "configure"
13228 #include "confdefs.h"
13229 #define _LARGEFILE_SOURCE 1
13230 #include <stdio.h>
13231 int
13232 main (void)
13233 {
13234 return !fseeko;
13235   ;
13236   return 0;
13237 }
13238 _ACEOF
13239 rm -f conftest.$ac_objext
13240 if { (eval echo "$as_me:13240: \"$ac_compile\"") >&5
13241   (eval $ac_compile) 2>&5
13242   ac_status=$?
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); } &&
13245          { ac_try='test -s conftest.$ac_objext'
13246   { (eval echo "$as_me:13246: \"$ac_try\"") >&5
13247   (eval $ac_try) 2>&5
13248   ac_status=$?
13249   echo "$as_me:13249: \$? = $ac_status" >&5
13250   (exit $ac_status); }; }; then
13251   ac_cv_sys_largefile_source=1; break
13252 else
13253   echo "$as_me: failed program was:" >&5
13254 cat conftest.$ac_ext >&5
13255 fi
13256 rm -f conftest.$ac_objext conftest.$ac_ext
13257   break
13258 done
13259 fi
13260 echo "$as_me:13260: result: $ac_cv_sys_largefile_source" >&5
13261 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13262 if test "$ac_cv_sys_largefile_source" != no; then
13263
13264 cat >>confdefs.h <<EOF
13265 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13266 EOF
13267
13268 fi
13269 rm -rf conftest*
13270
13271 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13272 # in glibc 2.1.3, but that breaks too many other things.
13273 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13274 echo "$as_me:13274: checking for fseeko" >&5
13275 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13276 if test "${ac_cv_func_fseeko+set}" = set; then
13277   echo $ECHO_N "(cached) $ECHO_C" >&6
13278 else
13279   cat >conftest.$ac_ext <<_ACEOF
13280 #line 13280 "configure"
13281 #include "confdefs.h"
13282 #include <stdio.h>
13283 int
13284 main (void)
13285 {
13286 return fseeko && fseeko (stdin, 0, 0);
13287   ;
13288   return 0;
13289 }
13290 _ACEOF
13291 rm -f conftest.$ac_objext conftest$ac_exeext
13292 if { (eval echo "$as_me:13292: \"$ac_link\"") >&5
13293   (eval $ac_link) 2>&5
13294   ac_status=$?
13295   echo "$as_me:13295: \$? = $ac_status" >&5
13296   (exit $ac_status); } &&
13297          { ac_try='test -s conftest$ac_exeext'
13298   { (eval echo "$as_me:13298: \"$ac_try\"") >&5
13299   (eval $ac_try) 2>&5
13300   ac_status=$?
13301   echo "$as_me:13301: \$? = $ac_status" >&5
13302   (exit $ac_status); }; }; then
13303   ac_cv_func_fseeko=yes
13304 else
13305   echo "$as_me: failed program was:" >&5
13306 cat conftest.$ac_ext >&5
13307 ac_cv_func_fseeko=no
13308 fi
13309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13310 fi
13311 echo "$as_me:13311: result: $ac_cv_func_fseeko" >&5
13312 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13313 if test $ac_cv_func_fseeko = yes; then
13314
13315 cat >>confdefs.h <<\EOF
13316 #define HAVE_FSEEKO 1
13317 EOF
13318
13319 fi
13320
13321         # Normally we would collect these definitions in the config.h,
13322         # but (like _XOPEN_SOURCE), some environments rely on having these
13323         # defined before any of the system headers are included.  Another
13324         # case comes up with C++, e.g., on AIX the compiler compiles the
13325         # header files by themselves before looking at the body files it is
13326         # told to compile.  For ncurses, those header files do not include
13327         # the config.h
13328         if test "$ac_cv_sys_large_files" != no
13329         then
13330
13331         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13332         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13333
13334         fi
13335         if test "$ac_cv_sys_largefile_source" != no
13336         then
13337
13338         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13339         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13340
13341         fi
13342         if test "$ac_cv_sys_file_offset_bits" != no
13343         then
13344
13345         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13346         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13347
13348         fi
13349
13350         echo "$as_me:13350: checking whether to use struct dirent64" >&5
13351 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13352 if test "${cf_cv_struct_dirent64+set}" = set; then
13353   echo $ECHO_N "(cached) $ECHO_C" >&6
13354 else
13355
13356                 cat >conftest.$ac_ext <<_ACEOF
13357 #line 13357 "configure"
13358 #include "confdefs.h"
13359
13360 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13361 #include <sys/types.h>
13362 #include <dirent.h>
13363
13364 int
13365 main (void)
13366 {
13367
13368                 /* if transitional largefile support is setup, this is true */
13369                 extern struct dirent64 * readdir(DIR *);
13370                 struct dirent64 *x = readdir((DIR *)0);
13371                 struct dirent *y = readdir((DIR *)0);
13372                 int z = x - y;
13373                 (void)z;
13374
13375   ;
13376   return 0;
13377 }
13378 _ACEOF
13379 rm -f conftest.$ac_objext
13380 if { (eval echo "$as_me:13380: \"$ac_compile\"") >&5
13381   (eval $ac_compile) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit $ac_status); } &&
13385          { ac_try='test -s conftest.$ac_objext'
13386   { (eval echo "$as_me:13386: \"$ac_try\"") >&5
13387   (eval $ac_try) 2>&5
13388   ac_status=$?
13389   echo "$as_me:13389: \$? = $ac_status" >&5
13390   (exit $ac_status); }; }; then
13391   cf_cv_struct_dirent64=yes
13392 else
13393   echo "$as_me: failed program was:" >&5
13394 cat conftest.$ac_ext >&5
13395 cf_cv_struct_dirent64=no
13396 fi
13397 rm -f conftest.$ac_objext conftest.$ac_ext
13398
13399 fi
13400 echo "$as_me:13400: result: $cf_cv_struct_dirent64" >&5
13401 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13402         test "$cf_cv_struct_dirent64" = yes &&
13403 cat >>confdefs.h <<\EOF
13404 #define HAVE_STRUCT_DIRENT64 1
13405 EOF
13406
13407         fi
13408
13409 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13410 echo "$as_me:13410: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13411 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13412
13413 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13414 if test "${enable_tparm_varargs+set}" = set; then
13415   enableval="$enable_tparm_varargs"
13416   with_tparm_varargs=$enableval
13417 else
13418   with_tparm_varargs=yes
13419 fi;
13420 echo "$as_me:13420: result: $with_tparm_varargs" >&5
13421 echo "${ECHO_T}$with_tparm_varargs" >&6
13422 NCURSES_TPARM_VARARGS=0
13423 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13424
13425 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13426 if test "$with_ticlib" != no ; then
13427 echo "$as_me:13427: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13428 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13429
13430 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13431 if test "${enable_tic_depends+set}" = set; then
13432   enableval="$enable_tic_depends"
13433   with_tic_depends=$enableval
13434 else
13435   with_tic_depends=yes
13436 fi;
13437 echo "$as_me:13437: result: $with_tic_depends" >&5
13438 echo "${ECHO_T}$with_tic_depends" >&6
13439 else
13440         with_tic_depends=no
13441 fi
13442
13443 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13444 echo "$as_me:13444: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13445 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13446
13447 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13448 if test "${enable_wattr_macros+set}" = set; then
13449   enableval="$enable_wattr_macros"
13450   with_wattr_macros=$enableval
13451 else
13452   with_wattr_macros=yes
13453 fi;
13454 if [ "x$with_wattr_macros" != xyes ]; then
13455         NCURSES_WATTR_MACROS=0
13456         echo "$as_me:13456: result: yes" >&5
13457 echo "${ECHO_T}yes" >&6
13458 else
13459         NCURSES_WATTR_MACROS=1
13460         echo "$as_me:13460: result: no" >&5
13461 echo "${ECHO_T}no" >&6
13462 fi
13463
13464 echo "$as_me:13464: checking for X11 rgb file" >&5
13465 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13466
13467 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13468 if test "${with_x11_rgb+set}" = set; then
13469   withval="$with_x11_rgb"
13470   RGB_PATH=$withval
13471 else
13472   RGB_PATH=auto
13473 fi;
13474
13475 if test "x$RGB_PATH" = xauto
13476 then
13477         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13478         for cf_path in \
13479                 /opt/local/share/X11/rgb.txt \
13480                 /opt/X11/share/X11/rgb.txt \
13481                 /usr/share/X11/rgb.txt \
13482                 /usr/X11/share/X11/rgb.txt \
13483                 /usr/X11/lib/X11/rgb.txt \
13484                 /usr/lib/X11/rgb.txt \
13485                 /etc/X11/rgb.txt \
13486                 /usr/pkg/lib/X11/rgb.txt \
13487                 /usr/X11R7/lib/X11/rgb.txt \
13488                 /usr/X11R6/lib/X11/rgb.txt \
13489                 /usr/X11R5/lib/X11/rgb.txt \
13490                 /usr/X11R4/lib/X11/rgb.txt \
13491                 /usr/local/lib/X11/rgb.txt \
13492                 /usr/local/share/X11/rgb.txt \
13493                 /usr/lib64/X11/rgb.txt
13494         do
13495                 if test -f "$cf_path" ; then
13496                         RGB_PATH="$cf_path"
13497                         break
13498                 fi
13499         done
13500 else
13501         cf_path=$RGB_PATH
13502
13503 if test "x$prefix" != xNONE; then
13504         cf_path_syntax="$prefix"
13505 else
13506         cf_path_syntax="$ac_default_prefix"
13507 fi
13508
13509 case ".$cf_path" in
13510 (.\$\(*\)*|.\'*\'*)
13511         ;;
13512 (..|./*|.\\*)
13513         ;;
13514 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13515         ;;
13516 (.\${*prefix}*|.\${*dir}*)
13517         eval cf_path="$cf_path"
13518         case ".$cf_path" in
13519         (.NONE/*)
13520                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13521                 ;;
13522         esac
13523         ;;
13524 (.no|.NONE/*)
13525         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13526         ;;
13527 (*)
13528         { { echo "$as_me:13528: error: expected a pathname, not \"$cf_path\"" >&5
13529 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13530    { (exit 1); exit 1; }; }
13531         ;;
13532 esac
13533
13534 fi
13535
13536 echo "$as_me:13536: result: $RGB_PATH" >&5
13537 echo "${ECHO_T}$RGB_PATH" >&6
13538
13539 cat >>confdefs.h <<EOF
13540 #define RGB_PATH "$cf_path"
13541 EOF
13542
13543 no_x11_rgb=
13544 if test "$RGB_PATH" = no
13545 then
13546         no_x11_rgb="#"
13547 fi
13548
13549 ###   use option --with-bool to override bool's type
13550 echo "$as_me:13550: checking for type of bool" >&5
13551 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13552
13553 # Check whether --with-bool or --without-bool was given.
13554 if test "${with_bool+set}" = set; then
13555   withval="$with_bool"
13556   NCURSES_BOOL="$withval"
13557 else
13558   NCURSES_BOOL=auto
13559 fi;
13560 echo "$as_me:13560: result: $NCURSES_BOOL" >&5
13561 echo "${ECHO_T}$NCURSES_BOOL" >&6
13562
13563 echo "$as_me:13563: checking for alternate terminal capabilities file" >&5
13564 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13565
13566 # Check whether --with-caps or --without-caps was given.
13567 if test "${with_caps+set}" = set; then
13568   withval="$with_caps"
13569   TERMINFO_CAPS=Caps.$withval
13570 else
13571   TERMINFO_CAPS=Caps
13572 fi;
13573 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13574 echo "$as_me:13574: result: $TERMINFO_CAPS" >&5
13575 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13576
13577 ###   use option --with-chtype to override chtype's type
13578 echo "$as_me:13578: checking for type of chtype" >&5
13579 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13580
13581 # Check whether --with-chtype or --without-chtype was given.
13582 if test "${with_chtype+set}" = set; then
13583   withval="$with_chtype"
13584   NCURSES_CHTYPE="$withval"
13585 else
13586   NCURSES_CHTYPE=$cf_dft_chtype
13587 fi;
13588 echo "$as_me:13588: result: $NCURSES_CHTYPE" >&5
13589 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13590
13591 ###   use option --with-ospeed to override ospeed's type
13592 echo "$as_me:13592: checking for type of ospeed" >&5
13593 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13594
13595 # Check whether --with-ospeed or --without-ospeed was given.
13596 if test "${with_ospeed+set}" = set; then
13597   withval="$with_ospeed"
13598   NCURSES_OSPEED="$withval"
13599 else
13600   NCURSES_OSPEED=short
13601 fi;
13602 echo "$as_me:13602: result: $NCURSES_OSPEED" >&5
13603 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13604
13605 ###   use option --with-mmask-t to override mmask_t's type
13606 echo "$as_me:13606: checking for type of mmask_t" >&5
13607 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13608
13609 # Check whether --with-mmask-t or --without-mmask-t was given.
13610 if test "${with_mmask_t+set}" = set; then
13611   withval="$with_mmask_t"
13612   NCURSES_MMASK_T="$withval"
13613 else
13614   NCURSES_MMASK_T=$cf_dft_mmask_t
13615 fi;
13616 echo "$as_me:13616: result: $NCURSES_MMASK_T" >&5
13617 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13618
13619 ###   use option --with-ccharw-max to override CCHARW_MAX size
13620 echo "$as_me:13620: checking for size CCHARW_MAX" >&5
13621 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13622
13623 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13624 if test "${with_ccharw_max+set}" = set; then
13625   withval="$with_ccharw_max"
13626   NCURSES_CCHARW_MAX="$withval"
13627 else
13628   NCURSES_CCHARW_MAX=5
13629 fi;
13630 echo "$as_me:13630: result: $NCURSES_CCHARW_MAX" >&5
13631 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13632
13633 echo "$as_me:13633: checking for ANSI C header files" >&5
13634 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13635 if test "${ac_cv_header_stdc+set}" = set; then
13636   echo $ECHO_N "(cached) $ECHO_C" >&6
13637 else
13638   cat >conftest.$ac_ext <<_ACEOF
13639 #line 13639 "configure"
13640 #include "confdefs.h"
13641 #include <stdlib.h>
13642 #include <stdarg.h>
13643 #include <string.h>
13644 #include <float.h>
13645
13646 _ACEOF
13647 if { (eval echo "$as_me:13647: \"$ac_cpp conftest.$ac_ext\"") >&5
13648   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13649   ac_status=$?
13650   egrep -v '^ *\+' conftest.er1 >conftest.err
13651   rm -f conftest.er1
13652   cat conftest.err >&5
13653   echo "$as_me:13653: \$? = $ac_status" >&5
13654   (exit $ac_status); } >/dev/null; then
13655   if test -s conftest.err; then
13656     ac_cpp_err=$ac_c_preproc_warn_flag
13657   else
13658     ac_cpp_err=
13659   fi
13660 else
13661   ac_cpp_err=yes
13662 fi
13663 if test -z "$ac_cpp_err"; then
13664   ac_cv_header_stdc=yes
13665 else
13666   echo "$as_me: failed program was:" >&5
13667   cat conftest.$ac_ext >&5
13668   ac_cv_header_stdc=no
13669 fi
13670 rm -f conftest.err conftest.$ac_ext
13671
13672 if test $ac_cv_header_stdc = yes; then
13673   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13674   cat >conftest.$ac_ext <<_ACEOF
13675 #line 13675 "configure"
13676 #include "confdefs.h"
13677 #include <string.h>
13678
13679 _ACEOF
13680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13681   egrep "memchr" >/dev/null 2>&1; then
13682   :
13683 else
13684   ac_cv_header_stdc=no
13685 fi
13686 rm -rf conftest*
13687
13688 fi
13689
13690 if test $ac_cv_header_stdc = yes; then
13691   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13692   cat >conftest.$ac_ext <<_ACEOF
13693 #line 13693 "configure"
13694 #include "confdefs.h"
13695 #include <stdlib.h>
13696
13697 _ACEOF
13698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13699   egrep "free" >/dev/null 2>&1; then
13700   :
13701 else
13702   ac_cv_header_stdc=no
13703 fi
13704 rm -rf conftest*
13705
13706 fi
13707
13708 if test $ac_cv_header_stdc = yes; then
13709   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13710   if test "$cross_compiling" = yes; then
13711   :
13712 else
13713   cat >conftest.$ac_ext <<_ACEOF
13714 #line 13714 "configure"
13715 #include "confdefs.h"
13716 #include <ctype.h>
13717 #if ((' ' & 0x0FF) == 0x020)
13718 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13719 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13720 #else
13721 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13722                      || ('j' <= (c) && (c) <= 'r') \
13723                      || ('s' <= (c) && (c) <= 'z'))
13724 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13725 #endif
13726
13727 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13728 int
13729 main (void)
13730 {
13731   int i;
13732   for (i = 0; i < 256; i++)
13733     if (XOR (islower (i), ISLOWER (i))
13734         || toupper (i) != TOUPPER (i))
13735       $ac_main_return(2);
13736   $ac_main_return (0);
13737 }
13738 _ACEOF
13739 rm -f conftest$ac_exeext
13740 if { (eval echo "$as_me:13740: \"$ac_link\"") >&5
13741   (eval $ac_link) 2>&5
13742   ac_status=$?
13743   echo "$as_me:13743: \$? = $ac_status" >&5
13744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13745   { (eval echo "$as_me:13745: \"$ac_try\"") >&5
13746   (eval $ac_try) 2>&5
13747   ac_status=$?
13748   echo "$as_me:13748: \$? = $ac_status" >&5
13749   (exit $ac_status); }; }; then
13750   :
13751 else
13752   echo "$as_me: program exited with status $ac_status" >&5
13753 echo "$as_me: failed program was:" >&5
13754 cat conftest.$ac_ext >&5
13755 ac_cv_header_stdc=no
13756 fi
13757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13758 fi
13759 fi
13760 fi
13761 echo "$as_me:13761: result: $ac_cv_header_stdc" >&5
13762 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13763 if test $ac_cv_header_stdc = yes; then
13764
13765 cat >>confdefs.h <<\EOF
13766 #define STDC_HEADERS 1
13767 EOF
13768
13769 fi
13770
13771 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13772
13773 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13774                   inttypes.h stdint.h unistd.h
13775 do
13776 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13777 echo "$as_me:13777: checking for $ac_header" >&5
13778 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13779 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13780   echo $ECHO_N "(cached) $ECHO_C" >&6
13781 else
13782   cat >conftest.$ac_ext <<_ACEOF
13783 #line 13783 "configure"
13784 #include "confdefs.h"
13785 $ac_includes_default
13786 #include <$ac_header>
13787 _ACEOF
13788 rm -f conftest.$ac_objext
13789 if { (eval echo "$as_me:13789: \"$ac_compile\"") >&5
13790   (eval $ac_compile) 2>&5
13791   ac_status=$?
13792   echo "$as_me:13792: \$? = $ac_status" >&5
13793   (exit $ac_status); } &&
13794          { ac_try='test -s conftest.$ac_objext'
13795   { (eval echo "$as_me:13795: \"$ac_try\"") >&5
13796   (eval $ac_try) 2>&5
13797   ac_status=$?
13798   echo "$as_me:13798: \$? = $ac_status" >&5
13799   (exit $ac_status); }; }; then
13800   eval "$as_ac_Header=yes"
13801 else
13802   echo "$as_me: failed program was:" >&5
13803 cat conftest.$ac_ext >&5
13804 eval "$as_ac_Header=no"
13805 fi
13806 rm -f conftest.$ac_objext conftest.$ac_ext
13807 fi
13808 echo "$as_me:13808: result: `eval echo '${'$as_ac_Header'}'`" >&5
13809 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13810 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13811   cat >>confdefs.h <<EOF
13812 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13813 EOF
13814
13815 fi
13816 done
13817
13818 echo "$as_me:13818: checking for signed char" >&5
13819 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13820 if test "${ac_cv_type_signed_char+set}" = set; then
13821   echo $ECHO_N "(cached) $ECHO_C" >&6
13822 else
13823   cat >conftest.$ac_ext <<_ACEOF
13824 #line 13824 "configure"
13825 #include "confdefs.h"
13826 $ac_includes_default
13827 int
13828 main (void)
13829 {
13830 if ((signed char *) 0)
13831   return 0;
13832 if (sizeof (signed char))
13833   return 0;
13834   ;
13835   return 0;
13836 }
13837 _ACEOF
13838 rm -f conftest.$ac_objext
13839 if { (eval echo "$as_me:13839: \"$ac_compile\"") >&5
13840   (eval $ac_compile) 2>&5
13841   ac_status=$?
13842   echo "$as_me:13842: \$? = $ac_status" >&5
13843   (exit $ac_status); } &&
13844          { ac_try='test -s conftest.$ac_objext'
13845   { (eval echo "$as_me:13845: \"$ac_try\"") >&5
13846   (eval $ac_try) 2>&5
13847   ac_status=$?
13848   echo "$as_me:13848: \$? = $ac_status" >&5
13849   (exit $ac_status); }; }; then
13850   ac_cv_type_signed_char=yes
13851 else
13852   echo "$as_me: failed program was:" >&5
13853 cat conftest.$ac_ext >&5
13854 ac_cv_type_signed_char=no
13855 fi
13856 rm -f conftest.$ac_objext conftest.$ac_ext
13857 fi
13858 echo "$as_me:13858: result: $ac_cv_type_signed_char" >&5
13859 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13860
13861 echo "$as_me:13861: checking size of signed char" >&5
13862 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13863 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13864   echo $ECHO_N "(cached) $ECHO_C" >&6
13865 else
13866   if test "$ac_cv_type_signed_char" = yes; then
13867   if test "$cross_compiling" = yes; then
13868   # Depending upon the size, compute the lo and hi bounds.
13869 cat >conftest.$ac_ext <<_ACEOF
13870 #line 13870 "configure"
13871 #include "confdefs.h"
13872 $ac_includes_default
13873 int
13874 main (void)
13875 {
13876 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13877   ;
13878   return 0;
13879 }
13880 _ACEOF
13881 rm -f conftest.$ac_objext
13882 if { (eval echo "$as_me:13882: \"$ac_compile\"") >&5
13883   (eval $ac_compile) 2>&5
13884   ac_status=$?
13885   echo "$as_me:13885: \$? = $ac_status" >&5
13886   (exit $ac_status); } &&
13887          { ac_try='test -s conftest.$ac_objext'
13888   { (eval echo "$as_me:13888: \"$ac_try\"") >&5
13889   (eval $ac_try) 2>&5
13890   ac_status=$?
13891   echo "$as_me:13891: \$? = $ac_status" >&5
13892   (exit $ac_status); }; }; then
13893   ac_lo=0 ac_mid=0
13894   while :; do
13895     cat >conftest.$ac_ext <<_ACEOF
13896 #line 13896 "configure"
13897 #include "confdefs.h"
13898 $ac_includes_default
13899 int
13900 main (void)
13901 {
13902 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13903   ;
13904   return 0;
13905 }
13906 _ACEOF
13907 rm -f conftest.$ac_objext
13908 if { (eval echo "$as_me:13908: \"$ac_compile\"") >&5
13909   (eval $ac_compile) 2>&5
13910   ac_status=$?
13911   echo "$as_me:13911: \$? = $ac_status" >&5
13912   (exit $ac_status); } &&
13913          { ac_try='test -s conftest.$ac_objext'
13914   { (eval echo "$as_me:13914: \"$ac_try\"") >&5
13915   (eval $ac_try) 2>&5
13916   ac_status=$?
13917   echo "$as_me:13917: \$? = $ac_status" >&5
13918   (exit $ac_status); }; }; then
13919   ac_hi=$ac_mid; break
13920 else
13921   echo "$as_me: failed program was:" >&5
13922 cat conftest.$ac_ext >&5
13923 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13924 fi
13925 rm -f conftest.$ac_objext conftest.$ac_ext
13926   done
13927 else
13928   echo "$as_me: failed program was:" >&5
13929 cat conftest.$ac_ext >&5
13930 ac_hi=-1 ac_mid=-1
13931   while :; do
13932     cat >conftest.$ac_ext <<_ACEOF
13933 #line 13933 "configure"
13934 #include "confdefs.h"
13935 $ac_includes_default
13936 int
13937 main (void)
13938 {
13939 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13940   ;
13941   return 0;
13942 }
13943 _ACEOF
13944 rm -f conftest.$ac_objext
13945 if { (eval echo "$as_me:13945: \"$ac_compile\"") >&5
13946   (eval $ac_compile) 2>&5
13947   ac_status=$?
13948   echo "$as_me:13948: \$? = $ac_status" >&5
13949   (exit $ac_status); } &&
13950          { ac_try='test -s conftest.$ac_objext'
13951   { (eval echo "$as_me:13951: \"$ac_try\"") >&5
13952   (eval $ac_try) 2>&5
13953   ac_status=$?
13954   echo "$as_me:13954: \$? = $ac_status" >&5
13955   (exit $ac_status); }; }; then
13956   ac_lo=$ac_mid; break
13957 else
13958   echo "$as_me: failed program was:" >&5
13959 cat conftest.$ac_ext >&5
13960 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13961 fi
13962 rm -f conftest.$ac_objext conftest.$ac_ext
13963   done
13964 fi
13965 rm -f conftest.$ac_objext conftest.$ac_ext
13966 # Binary search between lo and hi bounds.
13967 while test "x$ac_lo" != "x$ac_hi"; do
13968   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13969   cat >conftest.$ac_ext <<_ACEOF
13970 #line 13970 "configure"
13971 #include "confdefs.h"
13972 $ac_includes_default
13973 int
13974 main (void)
13975 {
13976 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13977   ;
13978   return 0;
13979 }
13980 _ACEOF
13981 rm -f conftest.$ac_objext
13982 if { (eval echo "$as_me:13982: \"$ac_compile\"") >&5
13983   (eval $ac_compile) 2>&5
13984   ac_status=$?
13985   echo "$as_me:13985: \$? = $ac_status" >&5
13986   (exit $ac_status); } &&
13987          { ac_try='test -s conftest.$ac_objext'
13988   { (eval echo "$as_me:13988: \"$ac_try\"") >&5
13989   (eval $ac_try) 2>&5
13990   ac_status=$?
13991   echo "$as_me:13991: \$? = $ac_status" >&5
13992   (exit $ac_status); }; }; then
13993   ac_hi=$ac_mid
13994 else
13995   echo "$as_me: failed program was:" >&5
13996 cat conftest.$ac_ext >&5
13997 ac_lo=`expr $ac_mid + 1`
13998 fi
13999 rm -f conftest.$ac_objext conftest.$ac_ext
14000 done
14001 ac_cv_sizeof_signed_char=$ac_lo
14002 else
14003   if test "$cross_compiling" = yes; then
14004   { { echo "$as_me:14004: error: cannot run test program while cross compiling" >&5
14005 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14006    { (exit 1); exit 1; }; }
14007 else
14008   cat >conftest.$ac_ext <<_ACEOF
14009 #line 14009 "configure"
14010 #include "confdefs.h"
14011 $ac_includes_default
14012 int
14013 main (void)
14014 {
14015 FILE *f = fopen ("conftest.val", "w");
14016 if (!f)
14017   $ac_main_return (1);
14018 fprintf (f, "%d", (sizeof (signed char)));
14019 fclose (f);
14020   ;
14021   return 0;
14022 }
14023 _ACEOF
14024 rm -f conftest$ac_exeext
14025 if { (eval echo "$as_me:14025: \"$ac_link\"") >&5
14026   (eval $ac_link) 2>&5
14027   ac_status=$?
14028   echo "$as_me:14028: \$? = $ac_status" >&5
14029   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14030   { (eval echo "$as_me:14030: \"$ac_try\"") >&5
14031   (eval $ac_try) 2>&5
14032   ac_status=$?
14033   echo "$as_me:14033: \$? = $ac_status" >&5
14034   (exit $ac_status); }; }; then
14035   ac_cv_sizeof_signed_char=`cat conftest.val`
14036 else
14037   echo "$as_me: program exited with status $ac_status" >&5
14038 echo "$as_me: failed program was:" >&5
14039 cat conftest.$ac_ext >&5
14040 fi
14041 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14042 fi
14043 fi
14044 rm -f conftest.val
14045 else
14046   ac_cv_sizeof_signed_char=0
14047 fi
14048 fi
14049 echo "$as_me:14049: result: $ac_cv_sizeof_signed_char" >&5
14050 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14051 cat >>confdefs.h <<EOF
14052 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14053 EOF
14054
14055 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14056         NCURSES_SBOOL="signed char"
14057 else
14058         NCURSES_SBOOL="char"
14059 fi
14060 echo "$as_me:14060: checking if you want to use signed Boolean array in term.h" >&5
14061 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14062
14063 # Check whether --enable-signed-char or --disable-signed-char was given.
14064 if test "${enable_signed_char+set}" = set; then
14065   enableval="$enable_signed_char"
14066   with_signed_char=$enableval
14067 else
14068   with_signed_char=no
14069 fi;
14070 echo "$as_me:14070: result: $with_signed_char" >&5
14071 echo "${ECHO_T}$with_signed_char" >&6
14072 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14073
14074 ###   use option --with-tparm-arg to override tparm's argument type
14075 echo "$as_me:14075: checking for type of tparm args" >&5
14076 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14077
14078 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14079 if test "${with_tparm_arg+set}" = set; then
14080   withval="$with_tparm_arg"
14081   NCURSES_TPARM_ARG="$withval"
14082 else
14083   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14084 fi;
14085 echo "$as_me:14085: result: $NCURSES_TPARM_ARG" >&5
14086 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14087
14088 ### Enable compiling-in rcs id's
14089 echo "$as_me:14089: checking if RCS identifiers should be compiled-in" >&5
14090 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14091
14092 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14093 if test "${with_rcs_ids+set}" = set; then
14094   withval="$with_rcs_ids"
14095   with_rcs_ids=$withval
14096 else
14097   with_rcs_ids=no
14098 fi;
14099 echo "$as_me:14099: result: $with_rcs_ids" >&5
14100 echo "${ECHO_T}$with_rcs_ids" >&6
14101 test "x$with_rcs_ids" = xyes &&
14102 cat >>confdefs.h <<\EOF
14103 #define USE_RCS_IDS 1
14104 EOF
14105
14106 ###############################################################################
14107
14108 echo "$as_me:14108: checking format of man-pages" >&5
14109 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14110
14111 # Check whether --with-manpage-format or --without-manpage-format was given.
14112 if test "${with_manpage_format+set}" = set; then
14113   withval="$with_manpage_format"
14114   MANPAGE_FORMAT=$withval
14115 else
14116   MANPAGE_FORMAT=unknown
14117 fi;
14118
14119 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14120 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14121
14122 cf_unknown=
14123
14124 case $MANPAGE_FORMAT in
14125 (unknown)
14126         if test -z "$MANPATH" ; then
14127                 MANPATH="/usr/man:/usr/share/man"
14128         fi
14129
14130         # look for the 'date' man-page (it's most likely to be installed!)
14131         MANPAGE_FORMAT=
14132         cf_preform=no
14133         cf_catonly=yes
14134         cf_example=date
14135
14136         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14137         for cf_dir in $MANPATH; do
14138                 test -z "$cf_dir" && cf_dir=/usr/man
14139                 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
14140                 do
14141                         cf_test=`echo $cf_name | sed -e 's/*//'`
14142                         if test "x$cf_test" = "x$cf_name" ; then
14143
14144                                 case "$cf_name" in
14145                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14146                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14147                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14148                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14149                                 esac
14150
14151                                 case "$cf_name" in
14152                                 ($cf_dir/man*)
14153                                         cf_catonly=no
14154                                         ;;
14155                                 ($cf_dir/cat*)
14156                                         cf_preform=yes
14157                                         ;;
14158                                 esac
14159                                 break
14160                         fi
14161
14162                         # if we found a match in either man* or cat*, stop looking
14163                         if test -n "$MANPAGE_FORMAT" ; then
14164                                 cf_found=no
14165                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14166                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14167                                 case "$cf_name" in
14168                                 ($cf_dir/cat*)
14169                                         cf_found=yes
14170                                         ;;
14171                                 esac
14172                                 test $cf_found=yes && break
14173                         fi
14174                 done
14175                 # only check the first directory in $MANPATH where we find manpages
14176                 if test -n "$MANPAGE_FORMAT" ; then
14177                         break
14178                 fi
14179         done
14180         # if we did not find the example, just assume it is normal
14181         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14182         IFS="$ac_save_ifs"
14183         ;;
14184 (*)
14185         for cf_option in $MANPAGE_FORMAT; do
14186         case $cf_option in
14187         (gzip|compress|BSDI|normal|formatted|catonly)
14188                 ;;
14189         (*)
14190                 cf_unknown="$cf_unknown $cf_option"
14191                 ;;
14192         esac
14193         done
14194         ;;
14195 esac
14196
14197 echo "$as_me:14197: result: $MANPAGE_FORMAT" >&5
14198 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14199 if test -n "$cf_unknown" ; then
14200         { echo "$as_me:14200: WARNING: Unexpected manpage-format $cf_unknown" >&5
14201 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14202 fi
14203
14204 echo "$as_me:14204: checking for manpage renaming" >&5
14205 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14206
14207 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14208 if test "${with_manpage_renames+set}" = set; then
14209   withval="$with_manpage_renames"
14210   MANPAGE_RENAMES=$withval
14211 else
14212   MANPAGE_RENAMES=yes
14213 fi;
14214
14215 case ".$MANPAGE_RENAMES" in
14216 (.no)
14217         ;;
14218 (.|.yes)
14219         # Debian 'man' program?
14220         if test -f /etc/debian_version ; then
14221                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
14222         else
14223                 MANPAGE_RENAMES=no
14224         fi
14225         ;;
14226 esac
14227
14228 if test "$MANPAGE_RENAMES" != no ; then
14229         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
14230                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
14231         elif test ! -f $MANPAGE_RENAMES ; then
14232                 { { echo "$as_me:14232: error: not a filename: $MANPAGE_RENAMES" >&5
14233 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14234    { (exit 1); exit 1; }; }
14235         fi
14236
14237         test ! -d man && mkdir man
14238
14239         # Construct a sed-script to perform renaming within man-pages
14240         if test -n "$MANPAGE_RENAMES" ; then
14241                 test ! -d man && mkdir man
14242                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
14243         fi
14244 fi
14245
14246 echo "$as_me:14246: result: $MANPAGE_RENAMES" >&5
14247 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14248
14249 echo "$as_me:14249: checking if manpage aliases will be installed" >&5
14250 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14251
14252 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14253 if test "${with_manpage_aliases+set}" = set; then
14254   withval="$with_manpage_aliases"
14255   MANPAGE_ALIASES=$withval
14256 else
14257   MANPAGE_ALIASES=yes
14258 fi;
14259
14260 echo "$as_me:14260: result: $MANPAGE_ALIASES" >&5
14261 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14262
14263 case "x$LN_S" in
14264 (xln*)
14265         cf_use_symlinks=yes
14266         ;;
14267 (*)
14268         cf_use_symlinks=no
14269         ;;
14270 esac
14271
14272 MANPAGE_SYMLINKS=no
14273 if test "$MANPAGE_ALIASES" = yes ; then
14274 echo "$as_me:14274: checking if manpage symlinks should be used" >&5
14275 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14276
14277 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14278 if test "${with_manpage_symlinks+set}" = set; then
14279   withval="$with_manpage_symlinks"
14280   MANPAGE_SYMLINKS=$withval
14281 else
14282   MANPAGE_SYMLINKS=$cf_use_symlinks
14283 fi;
14284
14285 if test "$$cf_use_symlinks" = no; then
14286 if test "$MANPAGE_SYMLINKS" = yes ; then
14287         { echo "$as_me:14287: WARNING: cannot make symlinks" >&5
14288 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14289         MANPAGE_SYMLINKS=no
14290 fi
14291 fi
14292
14293 echo "$as_me:14293: result: $MANPAGE_SYMLINKS" >&5
14294 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14295 fi
14296
14297 echo "$as_me:14297: checking for manpage tbl" >&5
14298 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14299
14300 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14301 if test "${with_manpage_tbl+set}" = set; then
14302   withval="$with_manpage_tbl"
14303   MANPAGE_TBL=$withval
14304 else
14305   MANPAGE_TBL=no
14306 fi;
14307
14308 echo "$as_me:14308: result: $MANPAGE_TBL" >&5
14309 echo "${ECHO_T}$MANPAGE_TBL" >&6
14310
14311 if test "$prefix" = "NONE" ; then
14312         cf_prefix="$ac_default_prefix"
14313 else
14314         cf_prefix="$prefix"
14315 fi
14316
14317 case "$MANPAGE_FORMAT" in
14318 (*catonly*)
14319         cf_format=yes
14320         cf_inboth=no
14321         ;;
14322 (*formatted*)
14323         cf_format=yes
14324         cf_inboth=yes
14325         ;;
14326 (*)
14327         cf_format=no
14328         cf_inboth=no
14329         ;;
14330 esac
14331
14332 test ! -d man && mkdir man
14333
14334 cf_so_strip=
14335 cf_compress=
14336 case "$MANPAGE_FORMAT" in
14337 (*compress*)
14338         cf_so_strip="Z"
14339         cf_compress=compress
14340         ;;
14341 (*gzip*)
14342         cf_so_strip="gz"
14343         cf_compress=gzip
14344         ;;
14345 esac
14346
14347 cf_edit_man=./edit_man.sh
14348 cf_man_alias=`pwd`/man_alias.sed
14349
14350 cat >$cf_edit_man <<CF_EOF
14351 #! $SHELL
14352 # this script is generated by the configure-script CF_MAN_PAGES macro.
14353
14354 prefix="$cf_prefix"
14355 datarootdir="$datarootdir"
14356 datadir="$datadir"
14357
14358 NCURSES_MAJOR="$NCURSES_MAJOR"
14359 NCURSES_MINOR="$NCURSES_MINOR"
14360 NCURSES_PATCH="$NCURSES_PATCH"
14361
14362 NCURSES_OSPEED="$NCURSES_OSPEED"
14363 TERMINFO="$TERMINFO"
14364
14365 INSTALL="$INSTALL"
14366 INSTALL_DATA="$INSTALL_DATA"
14367
14368 transform="$program_transform_name"
14369
14370 TMP=\${TMPDIR:=/tmp}/man\$\$
14371 trap "rm -f \$TMP" 0 1 2 3 15
14372
14373 form=\$1
14374 shift || exit 1
14375
14376 verb=\$1
14377 shift || exit 1
14378
14379 mandir=\$1
14380 shift || exit 1
14381
14382 srcdir=\$1
14383 top_srcdir=\$srcdir/..
14384 shift || exit 1
14385
14386 if test "\$form" = normal ; then
14387         if test "$cf_format" = yes ; then
14388         if test "$cf_inboth" = no ; then
14389                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14390                 exit $?
14391         fi
14392         fi
14393         cf_subdir=\$mandir/man
14394         cf_tables=$MANPAGE_TBL
14395 else
14396         cf_subdir=\$mandir/cat
14397         cf_tables=yes
14398 fi
14399
14400 # process the list of source-files
14401 for i in \$* ; do
14402 case \$i in
14403 (*.orig|*.rej) ;;
14404 (*.[0-9]*)
14405         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14406         if test \$verb = installing ; then
14407         if test ! -d \$cf_subdir\${section} ; then
14408                 mkdir -p \$cf_subdir\$section
14409         fi
14410         fi
14411
14412         # replace variables in man page
14413         if test ! -f $cf_man_alias ; then
14414 cat >>$cf_man_alias <<-CF_EOF2
14415                 s,@DATADIR@,\$datadir,g
14416                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14417                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14418                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14419                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14420                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14421                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14422 CF_EOF
14423
14424         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14425         do
14426                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14427                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14428 cat >>$cf_edit_man <<-CF_EOF
14429                 s,@$cf_NAME@,$cf_name,g
14430 CF_EOF
14431         done
14432
14433 cat >>$cf_edit_man <<CF_EOF
14434 CF_EOF2
14435                 echo "...made $cf_man_alias"
14436         fi
14437
14438         aliases=
14439         cf_source=\`basename \$i\`
14440         inalias=\$cf_source
14441         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14442         if test ! -f \$inalias ; then
14443                 echo .. skipped \$cf_source
14444                 continue
14445         fi
14446 CF_EOF
14447
14448 if test "$MANPAGE_ALIASES" != no ; then
14449 cat >>$cf_edit_man <<CF_EOF
14450         nCurses=ignore.3x
14451         test $with_curses_h = yes && nCurses=ncurses.3x
14452         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14453 CF_EOF
14454 fi
14455
14456 if test "$MANPAGE_RENAMES" = no ; then
14457 cat >>$cf_edit_man <<CF_EOF
14458         # perform program transformations for section 1 man pages
14459         if test \$section = 1 ; then
14460                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14461         else
14462                 cf_target=\$cf_subdir\${section}/\$cf_source
14463         fi
14464 CF_EOF
14465 else
14466 cat >>$cf_edit_man <<CF_EOF
14467         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14468         if test -z "\$cf_target" ; then
14469                 echo '? missing rename for '\$cf_source
14470                 cf_target="\$cf_source"
14471         fi
14472         cf_target="\$cf_subdir\${section}/\${cf_target}"
14473
14474 CF_EOF
14475 fi
14476
14477 cat >>$cf_edit_man <<CF_EOF
14478         sed     -f $cf_man_alias \\
14479 CF_EOF
14480
14481 if test -f $MANPAGE_RENAMES ; then
14482 cat >>$cf_edit_man <<CF_EOF
14483                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14484 CF_EOF
14485 else
14486 cat >>$cf_edit_man <<CF_EOF
14487                 < \$i >\$TMP
14488 CF_EOF
14489 fi
14490
14491 cat >>$cf_edit_man <<CF_EOF
14492 if test \$cf_tables = yes ; then
14493         tbl \$TMP >\$TMP.out
14494         mv \$TMP.out \$TMP
14495 fi
14496 CF_EOF
14497
14498 if test $with_overwrite != yes ; then
14499 cat >>$cf_edit_man <<CF_EOF
14500         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14501         mv \$TMP.out \$TMP
14502 CF_EOF
14503 fi
14504
14505 if test $with_curses_h != yes ; then
14506 cat >>$cf_edit_man <<CF_EOF
14507         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14508         mv \$TMP.out \$TMP
14509 CF_EOF
14510 fi
14511
14512 cat >>$cf_edit_man <<CF_EOF
14513         if test \$form = format ; then
14514                 nroff -man \$TMP >\$TMP.out
14515                 mv \$TMP.out \$TMP
14516         fi
14517 CF_EOF
14518
14519 if test -n "$cf_compress" ; then
14520 cat >>$cf_edit_man <<CF_EOF
14521         if test \$verb = installing ; then
14522         if ( $cf_compress -f \$TMP )
14523         then
14524                 mv \$TMP.$cf_so_strip \$TMP
14525         fi
14526         fi
14527         cf_target="\$cf_target.$cf_so_strip"
14528 CF_EOF
14529 fi
14530
14531 case "$MANPAGE_FORMAT" in
14532 (*BSDI*)
14533 cat >>$cf_edit_man <<CF_EOF
14534         if test \$form = format ; then
14535                 # BSDI installs only .0 suffixes in the cat directories
14536                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14537         fi
14538 CF_EOF
14539   ;;
14540 esac
14541
14542 cat >>$cf_edit_man <<CF_EOF
14543         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14544         if test \$verb = installing ; then
14545                 echo \$verb \$cf_target
14546                 \$INSTALL_DATA \$TMP \$cf_target
14547                 test -d \$cf_subdir\${section} &&
14548                 test -n "\$aliases" && (
14549                         cd \$cf_subdir\${section} && (
14550                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14551                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14552                                 cf_target=\`basename \$cf_target\`
14553                                 for cf_alias in \$aliases
14554                                 do
14555                                         if test \$section = 1 ; then
14556                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14557                                         fi
14558
14559                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14560                                                 if test -f \$cf_alias\${suffix} ; then
14561                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14562                                                         then
14563                                                                 continue
14564                                                         fi
14565                                                 fi
14566                                                 echo .. \$verb alias \$cf_alias\${suffix}
14567 CF_EOF
14568 case "x$LN_S" in
14569 (*-f)
14570 cat >>$cf_edit_man <<CF_EOF
14571                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14572 CF_EOF
14573         ;;
14574 (*)
14575 cat >>$cf_edit_man <<CF_EOF
14576                                                 rm -f \$cf_alias\${suffix}
14577                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14578 CF_EOF
14579         ;;
14580 esac
14581 cat >>$cf_edit_man <<CF_EOF
14582                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14583                                                 echo ".so \$cf_source" >\$TMP
14584 CF_EOF
14585 if test -n "$cf_compress" ; then
14586 cat >>$cf_edit_man <<CF_EOF
14587                                                 if test -n "$cf_so_strip" ; then
14588                                                         $cf_compress -f \$TMP
14589                                                         mv \$TMP.$cf_so_strip \$TMP
14590                                                 fi
14591 CF_EOF
14592 fi
14593 cat >>$cf_edit_man <<CF_EOF
14594                                                 echo .. \$verb alias \$cf_alias\${suffix}
14595                                                 rm -f \$cf_alias\${suffix}
14596                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14597                                         fi
14598                                 done
14599                         )
14600                 )
14601         elif test \$verb = removing ; then
14602                 test -f \$cf_target && (
14603                         echo \$verb \$cf_target
14604                         rm -f \$cf_target
14605                 )
14606                 test -d \$cf_subdir\${section} &&
14607                 test -n "\$aliases" && (
14608                         cd \$cf_subdir\${section} && (
14609                                 for cf_alias in \$aliases
14610                                 do
14611                                         if test \$section = 1 ; then
14612                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14613                                         fi
14614
14615                                         echo .. \$verb alias \$cf_alias\${suffix}
14616                                         rm -f \$cf_alias\${suffix}
14617                                 done
14618                         )
14619                 )
14620         else
14621 #               echo ".hy 0"
14622                 cat \$TMP
14623         fi
14624         ;;
14625 esac
14626 done
14627
14628 if test $cf_inboth = yes ; then
14629 if test \$form != format ; then
14630         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14631 fi
14632 fi
14633
14634 exit 0
14635 CF_EOF
14636 chmod 755 $cf_edit_man
14637
14638 ###############################################################################
14639
14640 ### Note that some functions (such as const) are normally disabled anyway.
14641 echo "$as_me:14641: checking if you want to build with function extensions" >&5
14642 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14643
14644 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14645 if test "${enable_ext_funcs+set}" = set; then
14646   enableval="$enable_ext_funcs"
14647   with_ext_funcs=$enableval
14648 else
14649   with_ext_funcs=yes
14650 fi;
14651 echo "$as_me:14651: result: $with_ext_funcs" >&5
14652 echo "${ECHO_T}$with_ext_funcs" >&6
14653 if test "x$with_ext_funcs" = xyes ; then
14654         NCURSES_EXT_FUNCS=1
14655
14656 cat >>confdefs.h <<\EOF
14657 #define NCURSES_EXT_FUNCS 1
14658 EOF
14659
14660 cat >>confdefs.h <<\EOF
14661 #define HAVE_ASSUME_DEFAULT_COLORS 1
14662 EOF
14663
14664 cat >>confdefs.h <<\EOF
14665 #define HAVE_CURSES_VERSION 1
14666 EOF
14667
14668 cat >>confdefs.h <<\EOF
14669 #define HAVE_HAS_KEY 1
14670 EOF
14671
14672 cat >>confdefs.h <<\EOF
14673 #define HAVE_RESIZETERM 1
14674 EOF
14675
14676 cat >>confdefs.h <<\EOF
14677 #define HAVE_RESIZE_TERM 1
14678 EOF
14679
14680 cat >>confdefs.h <<\EOF
14681 #define HAVE_TERM_ENTRY_H 1
14682 EOF
14683
14684 cat >>confdefs.h <<\EOF
14685 #define HAVE_USE_DEFAULT_COLORS 1
14686 EOF
14687
14688 cat >>confdefs.h <<\EOF
14689 #define HAVE_USE_EXTENDED_NAMES 1
14690 EOF
14691
14692 cat >>confdefs.h <<\EOF
14693 #define HAVE_USE_SCREEN 1
14694 EOF
14695
14696 cat >>confdefs.h <<\EOF
14697 #define HAVE_USE_WINDOW 1
14698 EOF
14699
14700 cat >>confdefs.h <<\EOF
14701 #define HAVE_WRESIZE 1
14702 EOF
14703
14704         GENERATED_EXT_FUNCS=generated
14705         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14706 else
14707         NCURSES_EXT_FUNCS=0
14708         GENERATED_EXT_FUNCS=
14709 fi
14710
14711 echo "$as_me:14711: checking if you want to build with SCREEN extensions" >&5
14712 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14713
14714 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14715 if test "${enable_sp_funcs+set}" = set; then
14716   enableval="$enable_sp_funcs"
14717   with_sp_funcs=$enableval
14718 else
14719   with_sp_funcs=$cf_dft_ext_spfuncs
14720 fi;
14721 echo "$as_me:14721: result: $with_sp_funcs" >&5
14722 echo "${ECHO_T}$with_sp_funcs" >&6
14723 if test "x$with_sp_funcs" = xyes ; then
14724         NCURSES_SP_FUNCS=1
14725
14726 cat >>confdefs.h <<\EOF
14727 #define NCURSES_SP_FUNCS 1
14728 EOF
14729
14730 cat >>confdefs.h <<\EOF
14731 #define HAVE_TPUTS_SP 1
14732 EOF
14733
14734         GENERATED_SP_FUNCS=generated
14735 else
14736         NCURSES_SP_FUNCS=0
14737         GENERATED_SP_FUNCS=
14738 fi
14739
14740 echo "$as_me:14740: checking if you want to build with terminal-driver" >&5
14741 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14742
14743 # Check whether --enable-term-driver or --disable-term-driver was given.
14744 if test "${enable_term_driver+set}" = set; then
14745   enableval="$enable_term_driver"
14746   with_term_driver=$enableval
14747 else
14748   with_term_driver=no
14749 fi;
14750 echo "$as_me:14750: result: $with_term_driver" >&5
14751 echo "${ECHO_T}$with_term_driver" >&6
14752 if test "x$with_term_driver" = xyes ; then
14753
14754 cat >>confdefs.h <<\EOF
14755 #define USE_TERM_DRIVER 1
14756 EOF
14757
14758         if test "x$with_termlib" != xno ; then
14759                 { { echo "$as_me:14759: error: The term-driver option conflicts with the termlib option" >&5
14760 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14761    { (exit 1); exit 1; }; }
14762         fi
14763         if test "x$with_sp_funcs" != xyes ; then
14764                 { { echo "$as_me:14764: error: The term-driver option relies upon sp-funcs" >&5
14765 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14766    { (exit 1); exit 1; }; }
14767         fi
14768 fi
14769
14770 ###   use option --enable-const to turn on use of const beyond that in XSI.
14771 echo "$as_me:14771: checking for extended use of const keyword" >&5
14772 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14773
14774 # Check whether --enable-const or --disable-const was given.
14775 if test "${enable_const+set}" = set; then
14776   enableval="$enable_const"
14777   with_ext_const=$enableval
14778 else
14779   with_ext_const=$cf_dft_ext_const
14780 fi;
14781 echo "$as_me:14781: result: $with_ext_const" >&5
14782 echo "${ECHO_T}$with_ext_const" >&6
14783 NCURSES_CONST='/*nothing*/'
14784 if test "x$with_ext_const" = xyes ; then
14785         NCURSES_CONST=const
14786 fi
14787
14788 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14789 echo "$as_me:14789: checking if you want to use extended colors" >&5
14790 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14791
14792 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14793 if test "${enable_ext_colors+set}" = set; then
14794   enableval="$enable_ext_colors"
14795   with_ext_colors=$enableval
14796 else
14797   with_ext_colors=$cf_dft_ext_colors
14798 fi;
14799 echo "$as_me:14799: result: $with_ext_colors" >&5
14800 echo "${ECHO_T}$with_ext_colors" >&6
14801 NCURSES_EXT_COLORS=0
14802 if test "x$with_ext_colors" = xyes ; then
14803         if test "x$with_widec" != xyes ; then
14804                 { echo "$as_me:14804: WARNING: This option applies only to wide-character library" >&5
14805 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14806         else
14807                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14808
14809 if test "${with_abi_version+set}" != set; then
14810         case $cf_cv_rel_version in
14811         (5.*)
14812                 cf_cv_rel_version=6.0
14813                 cf_cv_abi_version=6
14814                 { echo "$as_me:14814: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14815 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14816                 ;;
14817         esac
14818 fi
14819
14820                 NCURSES_EXT_COLORS=1
14821
14822 cat >>confdefs.h <<\EOF
14823 #define NCURSES_EXT_COLORS 1
14824 EOF
14825
14826 cat >>confdefs.h <<\EOF
14827 #define HAVE_ALLOC_PAIR 1
14828 EOF
14829
14830 cat >>confdefs.h <<\EOF
14831 #define HAVE_INIT_EXTENDED_COLOR 1
14832 EOF
14833
14834 cat >>confdefs.h <<\EOF
14835 #define HAVE_RESET_COLOR_PAIRS 1
14836 EOF
14837
14838         fi
14839 fi
14840
14841 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14842 echo "$as_me:14842: checking if you want to use extended mouse encoding" >&5
14843 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14844
14845 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14846 if test "${enable_ext_mouse+set}" = set; then
14847   enableval="$enable_ext_mouse"
14848   with_ext_mouse=$enableval
14849 else
14850   with_ext_mouse=$cf_dft_ext_mouse
14851 fi;
14852 echo "$as_me:14852: result: $with_ext_mouse" >&5
14853 echo "${ECHO_T}$with_ext_mouse" >&6
14854 NCURSES_MOUSE_VERSION=1
14855 if test "x$with_ext_mouse" = xyes ; then
14856         NCURSES_MOUSE_VERSION=2
14857
14858 if test "${with_abi_version+set}" != set; then
14859         case $cf_cv_rel_version in
14860         (5.*)
14861                 cf_cv_rel_version=6.0
14862                 cf_cv_abi_version=6
14863                 { echo "$as_me:14863: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14864 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14865                 ;;
14866         esac
14867 fi
14868
14869 fi
14870
14871 ###   use option --enable-ext-putwin to turn on extended screendumps
14872 echo "$as_me:14872: checking if you want to use extended putwin/screendump" >&5
14873 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14874
14875 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14876 if test "${enable_ext_putwin+set}" = set; then
14877   enableval="$enable_ext_putwin"
14878   with_ext_putwin=$enableval
14879 else
14880   with_ext_putwin=$cf_dft_ext_putwin
14881 fi;
14882 echo "$as_me:14882: result: $with_ext_putwin" >&5
14883 echo "${ECHO_T}$with_ext_putwin" >&6
14884 if test "x$with_ext_putwin" = xyes ; then
14885
14886 cat >>confdefs.h <<\EOF
14887 #define NCURSES_EXT_PUTWIN 1
14888 EOF
14889
14890 fi
14891
14892 echo "$as_me:14892: checking if you want \$NCURSES_NO_PADDING code" >&5
14893 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14894
14895 # Check whether --enable-no-padding or --disable-no-padding was given.
14896 if test "${enable_no_padding+set}" = set; then
14897   enableval="$enable_no_padding"
14898   with_no_padding=$enableval
14899 else
14900   with_no_padding=$with_ext_funcs
14901 fi;
14902 echo "$as_me:14902: result: $with_no_padding" >&5
14903 echo "${ECHO_T}$with_no_padding" >&6
14904 test "x$with_no_padding" = xyes &&
14905 cat >>confdefs.h <<\EOF
14906 #define NCURSES_NO_PADDING 1
14907 EOF
14908
14909 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14910 echo "$as_me:14910: checking if you want SIGWINCH handler" >&5
14911 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14912
14913 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14914 if test "${enable_sigwinch+set}" = set; then
14915   enableval="$enable_sigwinch"
14916   with_sigwinch=$enableval
14917 else
14918   with_sigwinch=$with_ext_funcs
14919 fi;
14920 echo "$as_me:14920: result: $with_sigwinch" >&5
14921 echo "${ECHO_T}$with_sigwinch" >&6
14922 test "x$with_sigwinch" = xyes &&
14923 cat >>confdefs.h <<\EOF
14924 #define USE_SIGWINCH 1
14925 EOF
14926
14927 ###   use option --enable-tcap-names to allow user to define new capabilities
14928 echo "$as_me:14928: checking if you want user-definable terminal capabilities like termcap" >&5
14929 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14930
14931 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14932 if test "${enable_tcap_names+set}" = set; then
14933   enableval="$enable_tcap_names"
14934   with_tcap_names=$enableval
14935 else
14936   with_tcap_names=$with_ext_funcs
14937 fi;
14938 echo "$as_me:14938: result: $with_tcap_names" >&5
14939 echo "${ECHO_T}$with_tcap_names" >&6
14940 NCURSES_XNAMES=0
14941 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14942
14943 ##############################################################################
14944
14945 echo "$as_me:14945: checking if you want to link with the pthread library" >&5
14946 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14947
14948 # Check whether --with-pthread or --without-pthread was given.
14949 if test "${with_pthread+set}" = set; then
14950   withval="$with_pthread"
14951   with_pthread=$withval
14952 else
14953   with_pthread=no
14954 fi;
14955 echo "$as_me:14955: result: $with_pthread" >&5
14956 echo "${ECHO_T}$with_pthread" >&6
14957
14958 if test "$with_pthread" != no ; then
14959         echo "$as_me:14959: checking for pthread.h" >&5
14960 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14961 if test "${ac_cv_header_pthread_h+set}" = set; then
14962   echo $ECHO_N "(cached) $ECHO_C" >&6
14963 else
14964   cat >conftest.$ac_ext <<_ACEOF
14965 #line 14965 "configure"
14966 #include "confdefs.h"
14967 #include <pthread.h>
14968 _ACEOF
14969 if { (eval echo "$as_me:14969: \"$ac_cpp conftest.$ac_ext\"") >&5
14970   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14971   ac_status=$?
14972   egrep -v '^ *\+' conftest.er1 >conftest.err
14973   rm -f conftest.er1
14974   cat conftest.err >&5
14975   echo "$as_me:14975: \$? = $ac_status" >&5
14976   (exit $ac_status); } >/dev/null; then
14977   if test -s conftest.err; then
14978     ac_cpp_err=$ac_c_preproc_warn_flag
14979   else
14980     ac_cpp_err=
14981   fi
14982 else
14983   ac_cpp_err=yes
14984 fi
14985 if test -z "$ac_cpp_err"; then
14986   ac_cv_header_pthread_h=yes
14987 else
14988   echo "$as_me: failed program was:" >&5
14989   cat conftest.$ac_ext >&5
14990   ac_cv_header_pthread_h=no
14991 fi
14992 rm -f conftest.err conftest.$ac_ext
14993 fi
14994 echo "$as_me:14994: result: $ac_cv_header_pthread_h" >&5
14995 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14996 if test $ac_cv_header_pthread_h = yes; then
14997
14998 cat >>confdefs.h <<\EOF
14999 #define HAVE_PTHREADS_H 1
15000 EOF
15001
15002         for cf_lib_pthread in pthread c_r
15003         do
15004             echo "$as_me:15004: checking if we can link with the $cf_lib_pthread library" >&5
15005 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15006             cf_save_LIBS="$LIBS"
15007
15008 cf_add_libs="$LIBS"
15009 # reverse order
15010 cf_add_0lib=
15011 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15012 # filter duplicates
15013 for cf_add_1lib in $cf_add_0lib; do
15014         for cf_add_2lib in $cf_add_libs; do
15015                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15016                         cf_add_1lib=
15017                         break
15018                 fi
15019         done
15020         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15021 done
15022 LIBS="$cf_add_libs"
15023
15024             cat >conftest.$ac_ext <<_ACEOF
15025 #line 15025 "configure"
15026 #include "confdefs.h"
15027
15028 #include <pthread.h>
15029
15030 int
15031 main (void)
15032 {
15033
15034                 int rc = pthread_create(0,0,0,0);
15035                 int r2 = pthread_mutexattr_settype(0, 0);
15036
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   with_pthread=yes
15054 else
15055   echo "$as_me: failed program was:" >&5
15056 cat conftest.$ac_ext >&5
15057 with_pthread=no
15058 fi
15059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15060             LIBS="$cf_save_LIBS"
15061             echo "$as_me:15061: result: $with_pthread" >&5
15062 echo "${ECHO_T}$with_pthread" >&6
15063             test "$with_pthread" = yes && break
15064         done
15065
15066         if test "$with_pthread" = yes ; then
15067
15068 cf_add_libs="$LIBS"
15069 # reverse order
15070 cf_add_0lib=
15071 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15072 # filter duplicates
15073 for cf_add_1lib in $cf_add_0lib; do
15074         for cf_add_2lib in $cf_add_libs; do
15075                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15076                         cf_add_1lib=
15077                         break
15078                 fi
15079         done
15080         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15081 done
15082 LIBS="$cf_add_libs"
15083
15084 cat >>confdefs.h <<\EOF
15085 #define HAVE_LIBPTHREADS 1
15086 EOF
15087
15088         else
15089             { { echo "$as_me:15089: error: Cannot link with pthread library" >&5
15090 echo "$as_me: error: Cannot link with pthread library" >&2;}
15091    { (exit 1); exit 1; }; }
15092         fi
15093
15094 fi
15095
15096 fi
15097
15098 if test "x$with_pthread" != xno; then
15099         echo "$as_me:15099: checking for pthread_kill" >&5
15100 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15101 if test "${ac_cv_func_pthread_kill+set}" = set; then
15102   echo $ECHO_N "(cached) $ECHO_C" >&6
15103 else
15104   cat >conftest.$ac_ext <<_ACEOF
15105 #line 15105 "configure"
15106 #include "confdefs.h"
15107 #define pthread_kill autoconf_temporary
15108 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15109 #undef pthread_kill
15110
15111 #ifdef __cplusplus
15112 extern "C"
15113 #endif
15114
15115 /* We use char because int might match the return type of a gcc2
15116    builtin and then its argument prototype would still apply.  */
15117 char pthread_kill (void);
15118
15119 int
15120 main (void)
15121 {
15122
15123 /* The GNU C library defines stubs for functions which it implements
15124     to always fail with ENOSYS.  Some functions are actually named
15125     something starting with __ and the normal name is an alias.  */
15126 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15127 #error found stub for pthread_kill
15128 #endif
15129
15130         return pthread_kill ();
15131   ;
15132   return 0;
15133 }
15134 _ACEOF
15135 rm -f conftest.$ac_objext conftest$ac_exeext
15136 if { (eval echo "$as_me:15136: \"$ac_link\"") >&5
15137   (eval $ac_link) 2>&5
15138   ac_status=$?
15139   echo "$as_me:15139: \$? = $ac_status" >&5
15140   (exit $ac_status); } &&
15141          { ac_try='test -s conftest$ac_exeext'
15142   { (eval echo "$as_me:15142: \"$ac_try\"") >&5
15143   (eval $ac_try) 2>&5
15144   ac_status=$?
15145   echo "$as_me:15145: \$? = $ac_status" >&5
15146   (exit $ac_status); }; }; then
15147   ac_cv_func_pthread_kill=yes
15148 else
15149   echo "$as_me: failed program was:" >&5
15150 cat conftest.$ac_ext >&5
15151 ac_cv_func_pthread_kill=no
15152 fi
15153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15154 fi
15155 echo "$as_me:15155: result: $ac_cv_func_pthread_kill" >&5
15156 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15157 if test $ac_cv_func_pthread_kill = yes; then
15158
15159                 echo "$as_me:15159: checking if you want to allow EINTR in wgetch with pthreads" >&5
15160 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15161
15162 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15163 if test "${enable_pthreads_eintr+set}" = set; then
15164   enableval="$enable_pthreads_eintr"
15165   use_pthreads_eintr=$enableval
15166 else
15167   use_pthreads_eintr=no
15168 fi;
15169                 echo "$as_me:15169: result: $use_pthreads_eintr" >&5
15170 echo "${ECHO_T}$use_pthreads_eintr" >&6
15171                 if test "x$use_pthreads_eintr" = xyes ; then
15172
15173 cat >>confdefs.h <<\EOF
15174 #define USE_PTHREADS_EINTR 1
15175 EOF
15176
15177                 fi
15178 fi
15179
15180         echo "$as_me:15180: checking if you want to use weak-symbols for pthreads" >&5
15181 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15182
15183 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15184 if test "${enable_weak_symbols+set}" = set; then
15185   enableval="$enable_weak_symbols"
15186   use_weak_symbols=$enableval
15187 else
15188   use_weak_symbols=no
15189 fi;
15190         echo "$as_me:15190: result: $use_weak_symbols" >&5
15191 echo "${ECHO_T}$use_weak_symbols" >&6
15192         if test "x$use_weak_symbols" = xyes ; then
15193
15194 echo "$as_me:15194: checking if $CC supports weak symbols" >&5
15195 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15196 if test "${cf_cv_weak_symbols+set}" = set; then
15197   echo $ECHO_N "(cached) $ECHO_C" >&6
15198 else
15199
15200 cat >conftest.$ac_ext <<_ACEOF
15201 #line 15201 "configure"
15202 #include "confdefs.h"
15203
15204 #include <stdio.h>
15205 int
15206 main (void)
15207 {
15208
15209 #if defined(__GNUC__)
15210 #  if defined __USE_ISOC99
15211 #    define _cat_pragma(exp)    _Pragma(#exp)
15212 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15213 #  else
15214 #    define _weak_pragma(exp)
15215 #  endif
15216 #  define _declare(name)        __extension__ extern __typeof__(name) name
15217 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15218 #endif
15219
15220 weak_symbol(fopen);
15221
15222   ;
15223   return 0;
15224 }
15225 _ACEOF
15226 rm -f conftest.$ac_objext
15227 if { (eval echo "$as_me:15227: \"$ac_compile\"") >&5
15228   (eval $ac_compile) 2>&5
15229   ac_status=$?
15230   echo "$as_me:15230: \$? = $ac_status" >&5
15231   (exit $ac_status); } &&
15232          { ac_try='test -s conftest.$ac_objext'
15233   { (eval echo "$as_me:15233: \"$ac_try\"") >&5
15234   (eval $ac_try) 2>&5
15235   ac_status=$?
15236   echo "$as_me:15236: \$? = $ac_status" >&5
15237   (exit $ac_status); }; }; then
15238   cf_cv_weak_symbols=yes
15239 else
15240   echo "$as_me: failed program was:" >&5
15241 cat conftest.$ac_ext >&5
15242 cf_cv_weak_symbols=no
15243 fi
15244 rm -f conftest.$ac_objext conftest.$ac_ext
15245
15246 fi
15247 echo "$as_me:15247: result: $cf_cv_weak_symbols" >&5
15248 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15249
15250         else
15251                 cf_cv_weak_symbols=no
15252         fi
15253
15254         if test "x$cf_cv_weak_symbols" = xyes ; then
15255
15256 cat >>confdefs.h <<\EOF
15257 #define USE_WEAK_SYMBOLS 1
15258 EOF
15259
15260         fi
15261 fi
15262
15263 PTHREAD=
15264 if test "x$with_pthread" = "xyes" ; then
15265
15266 cat >>confdefs.h <<\EOF
15267 #define USE_PTHREADS 1
15268 EOF
15269
15270         enable_reentrant=yes
15271         if test "x$cf_cv_weak_symbols" = xyes ; then
15272                 PTHREAD=-lpthread
15273
15274 cf_add_libs="$PRIVATE_LIBS"
15275 # reverse order
15276 cf_add_0lib=
15277 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15278 # filter duplicates
15279 for cf_add_1lib in $cf_add_0lib; do
15280         for cf_add_2lib in $cf_add_libs; do
15281                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15282                         cf_add_1lib=
15283                         break
15284                 fi
15285         done
15286         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15287 done
15288 PRIVATE_LIBS="$cf_add_libs"
15289
15290         fi
15291 fi
15292
15293 # Reentrant code has to be opaque; there's little advantage to making ncurses
15294 # opaque outside of that, so there is no --enable-opaque option.  We can use
15295 # this option without --with-pthreads, but this will be always set for
15296 # pthreads.
15297 echo "$as_me:15297: checking if you want reentrant code" >&5
15298 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15299
15300 # Check whether --enable-reentrant or --disable-reentrant was given.
15301 if test "${enable_reentrant+set}" = set; then
15302   enableval="$enable_reentrant"
15303   with_reentrant=$enableval
15304 else
15305   with_reentrant=no
15306 fi;
15307 echo "$as_me:15307: result: $with_reentrant" >&5
15308 echo "${ECHO_T}$with_reentrant" >&6
15309 if test "x$with_reentrant" = xyes ; then
15310         cf_cv_enable_reentrant=1
15311         cf_cv_enable_opaque="NCURSES_INTERNALS"
15312         NCURSES_SIZE_T=int
15313         if test "x$cf_cv_weak_symbols" = xyes ; then
15314
15315 # remove pthread library from $LIBS
15316 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15317
15318 cf_add_libs="$TEST_LIBS"
15319 # reverse order
15320 cf_add_0lib=
15321 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15322 # filter duplicates
15323 for cf_add_1lib in $cf_add_0lib; do
15324         for cf_add_2lib in $cf_add_libs; do
15325                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15326                         cf_add_1lib=
15327                         break
15328                 fi
15329         done
15330         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15331 done
15332 TEST_LIBS="$cf_add_libs"
15333
15334 cf_add_libs="$TEST_LIBS2"
15335 # reverse order
15336 cf_add_0lib=
15337 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15338 # filter duplicates
15339 for cf_add_1lib in $cf_add_0lib; do
15340         for cf_add_2lib in $cf_add_libs; do
15341                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15342                         cf_add_1lib=
15343                         break
15344                 fi
15345         done
15346         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15347 done
15348 TEST_LIBS2="$cf_add_libs"
15349
15350 cf_add_libs="$PRIVATE_LIBS"
15351 # reverse order
15352 cf_add_0lib=
15353 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15354 # filter duplicates
15355 for cf_add_1lib in $cf_add_0lib; do
15356         for cf_add_2lib in $cf_add_libs; do
15357                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15358                         cf_add_1lib=
15359                         break
15360                 fi
15361         done
15362         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15363 done
15364 PRIVATE_LIBS="$cf_add_libs"
15365
15366         else
15367                 # when not using weak symbols but with_reentrant,
15368                 # add 't' to the library suffix on all platforms
15369                 # except cygwin, where we only do that if ALSO
15370                 # compiling with full thread support.
15371                 case "$host" in
15372                 (*cygwin* | *msys*)
15373                         if test "$with_pthread" = "yes" ; then
15374                                 if test "x$disable_lib_suffixes" = "xno" ; then
15375                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15376                                 fi
15377                         fi ;;
15378                 (*)
15379                         if test "x$disable_lib_suffixes" = "xno" ; then
15380                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15381                         fi
15382                         ;;
15383                 esac
15384         fi
15385
15386 cat >>confdefs.h <<\EOF
15387 #define USE_REENTRANT 1
15388 EOF
15389
15390 if test "${with_abi_version+set}" != set; then
15391         case $cf_cv_rel_version in
15392         (5.*)
15393                 cf_cv_rel_version=6.0
15394                 cf_cv_abi_version=6
15395                 { echo "$as_me:15395: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15396 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15397                 ;;
15398         esac
15399 fi
15400
15401 else
15402         cf_cv_enable_reentrant=0
15403         cf_cv_enable_opaque="NCURSES_OPAQUE"
15404         NCURSES_SIZE_T=short
15405 fi
15406
15407 echo "$as_me:15407: checking if you want opaque curses-library structures" >&5
15408 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15409
15410 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15411 if test "${enable_opaque_curses+set}" = set; then
15412   enableval="$enable_opaque_curses"
15413   test "$enableval" != yes && enableval=no
15414         if test "$enableval" != "no" ; then
15415     enable_opaque_curses=yes
15416         else
15417
15418          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15419          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15420
15421         fi
15422 else
15423   enableval=no
15424
15425          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15426          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15427
15428 fi;
15429 echo "$as_me:15429: result: $enable_opaque_curses" >&5
15430 echo "${ECHO_T}$enable_opaque_curses" >&6
15431
15432 test "$cf_cv_enable_reentrant" = 1 && \
15433 test "$enable_opaque_curses" = no && \
15434 { { echo "$as_me:15434: error: reentrant configuration requires opaque library" >&5
15435 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15436    { (exit 1); exit 1; }; }
15437
15438 echo "$as_me:15438: checking if you want opaque form-library structures" >&5
15439 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15440
15441 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15442 if test "${enable_opaque_form+set}" = set; then
15443   enableval="$enable_opaque_form"
15444   enable_opaque_form=yes
15445 else
15446   enable_opaque_form=no
15447 fi;
15448 echo "$as_me:15448: result: $enable_opaque_form" >&5
15449 echo "${ECHO_T}$enable_opaque_form" >&6
15450
15451 echo "$as_me:15451: checking if you want opaque menu-library structures" >&5
15452 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15453
15454 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15455 if test "${enable_opaque_menu+set}" = set; then
15456   enableval="$enable_opaque_menu"
15457   enable_opaque_menu=yes
15458 else
15459   enable_opaque_menu=no
15460 fi;
15461 echo "$as_me:15461: result: $enable_opaque_menu" >&5
15462 echo "${ECHO_T}$enable_opaque_menu" >&6
15463
15464 echo "$as_me:15464: checking if you want opaque panel-library structures" >&5
15465 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15466
15467 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15468 if test "${enable_opaque_panel+set}" = set; then
15469   enableval="$enable_opaque_panel"
15470   enable_opaque_panel=yes
15471 else
15472   enable_opaque_panel=no
15473 fi;
15474 echo "$as_me:15474: result: $enable_opaque_panel" >&5
15475 echo "${ECHO_T}$enable_opaque_panel" >&6
15476
15477 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15478 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15479 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15480 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15481
15482 ### Allow using a different wrap-prefix
15483 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15484         echo "$as_me:15484: checking for prefix used to wrap public variables" >&5
15485 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15486
15487 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15488 if test "${with_wrap_prefix+set}" = set; then
15489   withval="$with_wrap_prefix"
15490   NCURSES_WRAP_PREFIX=$withval
15491 else
15492   NCURSES_WRAP_PREFIX=_nc_
15493 fi;
15494         echo "$as_me:15494: result: $NCURSES_WRAP_PREFIX" >&5
15495 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15496 else
15497         NCURSES_WRAP_PREFIX=_nc_
15498 fi
15499
15500 cat >>confdefs.h <<EOF
15501 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15502 EOF
15503
15504 ###############################################################################
15505 # These options are relatively safe to experiment with.
15506
15507 echo "$as_me:15507: checking if you want all development code" >&5
15508 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15509
15510 # Check whether --with-develop or --without-develop was given.
15511 if test "${with_develop+set}" = set; then
15512   withval="$with_develop"
15513   with_develop=$withval
15514 else
15515   with_develop=no
15516 fi;
15517 echo "$as_me:15517: result: $with_develop" >&5
15518 echo "${ECHO_T}$with_develop" >&6
15519
15520 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15521 echo "$as_me:15521: checking if you want hard-tabs code" >&5
15522 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15523
15524 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15525 if test "${enable_hard_tabs+set}" = set; then
15526   enableval="$enable_hard_tabs"
15527
15528 else
15529   enable_hard_tabs=$with_develop
15530 fi;
15531 echo "$as_me:15531: result: $enable_hard_tabs" >&5
15532 echo "${ECHO_T}$enable_hard_tabs" >&6
15533 test "x$enable_hard_tabs" = xyes &&
15534 cat >>confdefs.h <<\EOF
15535 #define USE_HARD_TABS 1
15536 EOF
15537
15538 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15539 echo "$as_me:15539: checking if you want limited support for xmc" >&5
15540 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15541
15542 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15543 if test "${enable_xmc_glitch+set}" = set; then
15544   enableval="$enable_xmc_glitch"
15545
15546 else
15547   enable_xmc_glitch=$with_develop
15548 fi;
15549 echo "$as_me:15549: result: $enable_xmc_glitch" >&5
15550 echo "${ECHO_T}$enable_xmc_glitch" >&6
15551 test "x$enable_xmc_glitch" = xyes &&
15552 cat >>confdefs.h <<\EOF
15553 #define USE_XMC_SUPPORT 1
15554 EOF
15555
15556 ###############################################################################
15557 # These are just experimental, probably should not be in a package:
15558
15559 echo "$as_me:15559: checking if you do not want to assume colors are white-on-black" >&5
15560 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15561
15562 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15563 if test "${enable_assumed_color+set}" = set; then
15564   enableval="$enable_assumed_color"
15565   with_assumed_color=$enableval
15566 else
15567   with_assumed_color=yes
15568 fi;
15569 echo "$as_me:15569: result: $with_assumed_color" >&5
15570 echo "${ECHO_T}$with_assumed_color" >&6
15571 test "x$with_assumed_color" = xyes &&
15572 cat >>confdefs.h <<\EOF
15573 #define USE_ASSUMED_COLOR 1
15574 EOF
15575
15576 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15577 echo "$as_me:15577: checking if you want hashmap scrolling-optimization code" >&5
15578 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15579
15580 # Check whether --enable-hashmap or --disable-hashmap was given.
15581 if test "${enable_hashmap+set}" = set; then
15582   enableval="$enable_hashmap"
15583   with_hashmap=$enableval
15584 else
15585   with_hashmap=yes
15586 fi;
15587 echo "$as_me:15587: result: $with_hashmap" >&5
15588 echo "${ECHO_T}$with_hashmap" >&6
15589 test "x$with_hashmap" = xyes &&
15590 cat >>confdefs.h <<\EOF
15591 #define USE_HASHMAP 1
15592 EOF
15593
15594 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15595 echo "$as_me:15595: checking if you want colorfgbg code" >&5
15596 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15597
15598 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15599 if test "${enable_colorfgbg+set}" = set; then
15600   enableval="$enable_colorfgbg"
15601   with_colorfgbg=$enableval
15602 else
15603   with_colorfgbg=no
15604 fi;
15605 echo "$as_me:15605: result: $with_colorfgbg" >&5
15606 echo "${ECHO_T}$with_colorfgbg" >&6
15607 test "x$with_colorfgbg" = xyes &&
15608 cat >>confdefs.h <<\EOF
15609 #define USE_COLORFGBG 1
15610 EOF
15611
15612 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15613 echo "$as_me:15613: checking if you want to use gcc -fvisibility option" >&5
15614 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15615
15616 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15617 if test "${enable_fvisibility+set}" = set; then
15618   enableval="$enable_fvisibility"
15619   cf_with_fvisibility=$enableval
15620 else
15621   cf_with_fvisibility=no
15622 fi;
15623 echo "$as_me:15623: result: $cf_with_fvisibility" >&5
15624 echo "${ECHO_T}$cf_with_fvisibility" >&6
15625
15626 NCURSES_IMPEXP=
15627 NCURSES_CXX_IMPEXP=
15628 if test "x$cf_with_fvisibility" = xyes; then
15629
15630 echo "$as_me:15630: checking if $CC -fvisibility=hidden option works" >&5
15631 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15632 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15633   echo $ECHO_N "(cached) $ECHO_C" >&6
15634 else
15635
15636     cf_save_cflags="$CFLAGS"
15637     CFLAGS="$CFLAGS -fvisibility=hidden"
15638     cat >conftest.$ac_ext <<_ACEOF
15639 #line 15639 "configure"
15640 #include "confdefs.h"
15641
15642 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15643
15644 int
15645 main (void)
15646 {
15647
15648         if (somefunc()) return 1;
15649
15650   ;
15651   return 0;
15652 }
15653 _ACEOF
15654 rm -f conftest.$ac_objext conftest$ac_exeext
15655 if { (eval echo "$as_me:15655: \"$ac_link\"") >&5
15656   (eval $ac_link) 2>&5
15657   ac_status=$?
15658   echo "$as_me:15658: \$? = $ac_status" >&5
15659   (exit $ac_status); } &&
15660          { ac_try='test -s conftest$ac_exeext'
15661   { (eval echo "$as_me:15661: \"$ac_try\"") >&5
15662   (eval $ac_try) 2>&5
15663   ac_status=$?
15664   echo "$as_me:15664: \$? = $ac_status" >&5
15665   (exit $ac_status); }; }; then
15666   cf_cv_fvisibility_hidden=yes
15667 else
15668   echo "$as_me: failed program was:" >&5
15669 cat conftest.$ac_ext >&5
15670 cf_cv_fvisibility_hidden=no
15671 fi
15672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15673     CFLAGS=$cf_save_cflags
15674
15675 fi
15676 echo "$as_me:15676: result: $cf_cv_fvisibility_hidden" >&5
15677 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15678
15679         if test "x$cf_cv_fvisibility_hidden" = xyes
15680         then
15681
15682 cf_fix_cppflags=no
15683 cf_new_cflags=
15684 cf_new_cppflags=
15685 cf_new_extra_cppflags=
15686
15687 for cf_add_cflags in -fvisibility=hidden
15688 do
15689 case $cf_fix_cppflags in
15690 (no)
15691         case $cf_add_cflags in
15692         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15693                 case $cf_add_cflags in
15694                 (-D*)
15695                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15696
15697                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15698                                 && test -z "${cf_tst_cflags}" \
15699                                 && cf_fix_cppflags=yes
15700
15701                         if test $cf_fix_cppflags = yes ; then
15702
15703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15705
15706                                 continue
15707                         elif test "${cf_tst_cflags}" = "\"'" ; then
15708
15709         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15710         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15711
15712                                 continue
15713                         fi
15714                         ;;
15715                 esac
15716                 case "$CPPFLAGS" in
15717                 (*$cf_add_cflags)
15718                         ;;
15719                 (*)
15720                         case $cf_add_cflags in
15721                         (-D*)
15722                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15723
15724 CPPFLAGS=`echo "$CPPFLAGS" | \
15725         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15726                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15727
15728                                 ;;
15729                         esac
15730
15731         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15732         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15733
15734                         ;;
15735                 esac
15736                 ;;
15737         (*)
15738
15739         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15740         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15741
15742                 ;;
15743         esac
15744         ;;
15745 (yes)
15746
15747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15749
15750         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15751
15752         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15753                 && test -z "${cf_tst_cflags}" \
15754                 && cf_fix_cppflags=no
15755         ;;
15756 esac
15757 done
15758
15759 if test -n "$cf_new_cflags" ; then
15760
15761         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15762         CFLAGS="${CFLAGS}$cf_new_cflags"
15763
15764 fi
15765
15766 if test -n "$cf_new_cppflags" ; then
15767
15768         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15769         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15770
15771 fi
15772
15773 if test -n "$cf_new_extra_cppflags" ; then
15774
15775         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15776         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15777
15778 fi
15779
15780                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15781         fi
15782         if test -n "$CXX"
15783         then
15784                 ac_ext=cc
15785 ac_cpp='$CXXCPP $CPPFLAGS'
15786 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15787 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15788 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15789 ac_main_return=return
15790
15791 echo "$as_me:15791: checking if $CXX -fvisibility=hidden option works" >&5
15792 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15793 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15794   echo $ECHO_N "(cached) $ECHO_C" >&6
15795 else
15796
15797     cf_save_cflags="$CXXFLAGS"
15798     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15799     cat >conftest.$ac_ext <<_ACEOF
15800 #line 15800 "configure"
15801 #include "confdefs.h"
15802
15803 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15804
15805 int
15806 main (void)
15807 {
15808
15809         if (somefunc()) return 1;
15810
15811   ;
15812   return 0;
15813 }
15814 _ACEOF
15815 rm -f conftest.$ac_objext conftest$ac_exeext
15816 if { (eval echo "$as_me:15816: \"$ac_link\"") >&5
15817   (eval $ac_link) 2>&5
15818   ac_status=$?
15819   echo "$as_me:15819: \$? = $ac_status" >&5
15820   (exit $ac_status); } &&
15821          { ac_try='test -s conftest$ac_exeext'
15822   { (eval echo "$as_me:15822: \"$ac_try\"") >&5
15823   (eval $ac_try) 2>&5
15824   ac_status=$?
15825   echo "$as_me:15825: \$? = $ac_status" >&5
15826   (exit $ac_status); }; }; then
15827   cf_cv_fvisibility_hidden2=yes
15828 else
15829   echo "$as_me: failed program was:" >&5
15830 cat conftest.$ac_ext >&5
15831 cf_cv_fvisibility_hidden2=no
15832 fi
15833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15834     CXXFLAGS=$cf_save_cflags
15835
15836 fi
15837 echo "$as_me:15837: result: $cf_cv_fvisibility_hidden2" >&5
15838 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15839
15840                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15841                 then
15842
15843 cf_save_CXXFLAGS="$CFLAGS"
15844 CFLAGS="$CXXFLAGS"
15845
15846 cf_fix_cppflags=no
15847 cf_new_cflags=
15848 cf_new_cppflags=
15849 cf_new_extra_cppflags=
15850
15851 for cf_add_cflags in -fvisibility=hidden
15852 do
15853 case $cf_fix_cppflags in
15854 (no)
15855         case $cf_add_cflags in
15856         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15857                 case $cf_add_cflags in
15858                 (-D*)
15859                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15860
15861                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15862                                 && test -z "${cf_tst_cflags}" \
15863                                 && cf_fix_cppflags=yes
15864
15865                         if test $cf_fix_cppflags = yes ; then
15866
15867         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15868         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15869
15870                                 continue
15871                         elif test "${cf_tst_cflags}" = "\"'" ; then
15872
15873         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15874         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15875
15876                                 continue
15877                         fi
15878                         ;;
15879                 esac
15880                 case "$CPPFLAGS" in
15881                 (*$cf_add_cflags)
15882                         ;;
15883                 (*)
15884                         case $cf_add_cflags in
15885                         (-D*)
15886                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15887
15888 CPPFLAGS=`echo "$CPPFLAGS" | \
15889         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15890                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15891
15892                                 ;;
15893                         esac
15894
15895         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15896         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15897
15898                         ;;
15899                 esac
15900                 ;;
15901         (*)
15902
15903         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15904         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15905
15906                 ;;
15907         esac
15908         ;;
15909 (yes)
15910
15911         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15912         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15913
15914         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15915
15916         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15917                 && test -z "${cf_tst_cflags}" \
15918                 && cf_fix_cppflags=no
15919         ;;
15920 esac
15921 done
15922
15923 if test -n "$cf_new_cflags" ; then
15924
15925         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15926         CFLAGS="${CFLAGS}$cf_new_cflags"
15927
15928 fi
15929
15930 if test -n "$cf_new_cppflags" ; then
15931
15932         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15933         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15934
15935 fi
15936
15937 if test -n "$cf_new_extra_cppflags" ; then
15938
15939         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15940         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15941
15942 fi
15943
15944 CXXFLAGS="$CFLAGS"
15945 CFLAGS="$cf_save_CXXFLAGS"
15946
15947                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15948                 fi
15949                 ac_ext=c
15950 ac_cpp='$CPP $CPPFLAGS'
15951 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15952 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15953 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15954 ac_main_return=return
15955
15956         fi
15957 fi
15958
15959 ###   use option --enable-interop to turn on use of bindings used for interop
15960 echo "$as_me:15960: checking if you want interop bindings" >&5
15961 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15962
15963 # Check whether --enable-interop or --disable-interop was given.
15964 if test "${enable_interop+set}" = set; then
15965   enableval="$enable_interop"
15966   with_exp_interop=$enableval
15967 else
15968   with_exp_interop=$cf_dft_interop
15969 fi;
15970 echo "$as_me:15970: result: $with_exp_interop" >&5
15971 echo "${ECHO_T}$with_exp_interop" >&6
15972
15973 NCURSES_INTEROP_FUNCS=0
15974 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15975
15976 echo "$as_me:15976: checking if you want experimental safe-sprintf code" >&5
15977 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15978
15979 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15980 if test "${enable_safe_sprintf+set}" = set; then
15981   enableval="$enable_safe_sprintf"
15982   with_safe_sprintf=$enableval
15983 else
15984   with_safe_sprintf=no
15985 fi;
15986 echo "$as_me:15986: result: $with_safe_sprintf" >&5
15987 echo "${ECHO_T}$with_safe_sprintf" >&6
15988
15989 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15990 # when hashmap is used scroll hints are useless
15991 if test "$with_hashmap" = no ; then
15992 echo "$as_me:15992: checking if you want to experiment without scrolling-hints code" >&5
15993 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15994
15995 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15996 if test "${enable_scroll_hints+set}" = set; then
15997   enableval="$enable_scroll_hints"
15998   with_scroll_hints=$enableval
15999 else
16000   with_scroll_hints=yes
16001 fi;
16002 echo "$as_me:16002: result: $with_scroll_hints" >&5
16003 echo "${ECHO_T}$with_scroll_hints" >&6
16004 test "x$with_scroll_hints" = xyes &&
16005 cat >>confdefs.h <<\EOF
16006 #define USE_SCROLL_HINTS 1
16007 EOF
16008
16009 fi
16010
16011 echo "$as_me:16011: checking if you want wgetch-events code" >&5
16012 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16013
16014 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16015 if test "${enable_wgetch_events+set}" = set; then
16016   enableval="$enable_wgetch_events"
16017   with_wgetch_events=$enableval
16018 else
16019   with_wgetch_events=no
16020 fi;
16021 echo "$as_me:16021: result: $with_wgetch_events" >&5
16022 echo "${ECHO_T}$with_wgetch_events" >&6
16023 if test "x$with_wgetch_events" = xyes ; then
16024
16025 cat >>confdefs.h <<\EOF
16026 #define NCURSES_WGETCH_EVENTS 1
16027 EOF
16028
16029         NCURSES_WGETCH_EVENTS=1
16030 else
16031         NCURSES_WGETCH_EVENTS=0
16032 fi
16033
16034 case $cf_cv_system_name in
16035 (*mingw32*|*mingw64*|*-msvc*)
16036         echo "$as_me:16036: checking if you want experimental-Windows driver" >&5
16037 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16038
16039 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16040 if test "${enable_exp_win32+set}" = set; then
16041   enableval="$enable_exp_win32"
16042   with_exp_win32=$enableval
16043 else
16044   with_exp_win32=no
16045 fi;
16046         echo "$as_me:16046: result: $with_exp_win32" >&5
16047 echo "${ECHO_T}$with_exp_win32" >&6
16048         if test "x$with_exp_win32" = xyes
16049         then
16050
16051 cat >>confdefs.h <<\EOF
16052 #define EXP_WIN32_DRIVER 1
16053 EOF
16054
16055                 EXP_WIN32_DRIVER=1
16056                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16057         else
16058                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16059                 EXP_WIN32_DRIVER=0
16060         fi
16061         ;;
16062 (*)
16063         EXP_WIN32_DRIVER=0
16064         INTERNALS_HDR=
16065         ;;
16066 esac
16067
16068 ###############################################################################
16069
16070 ###     use option --disable-echo to suppress full display compiling commands
16071
16072 echo "$as_me:16072: checking if you want to see long compiling messages" >&5
16073 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16074
16075 # Check whether --enable-echo or --disable-echo was given.
16076 if test "${enable_echo+set}" = set; then
16077   enableval="$enable_echo"
16078   test "$enableval" != no && enableval=yes
16079         if test "$enableval" != "yes" ; then
16080
16081         ECHO_LT='--silent'
16082         ECHO_LD='@echo linking $@;'
16083         RULE_CC='@echo compiling $<'
16084         SHOW_CC='@echo compiling $@'
16085         ECHO_CC='@'
16086
16087         else
16088
16089         ECHO_LT=''
16090         ECHO_LD=''
16091         RULE_CC=''
16092         SHOW_CC=''
16093         ECHO_CC=''
16094
16095         fi
16096 else
16097   enableval=yes
16098
16099         ECHO_LT=''
16100         ECHO_LD=''
16101         RULE_CC=''
16102         SHOW_CC=''
16103         ECHO_CC=''
16104
16105 fi;
16106 echo "$as_me:16106: result: $enableval" >&5
16107 echo "${ECHO_T}$enableval" >&6
16108
16109 if test "x$enable_echo" = xyes; then
16110         ECHO_LINK=
16111 else
16112         ECHO_LINK='@ echo linking $@ ... ;'
16113         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16114         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16115 fi
16116
16117 # --disable-stripping is used for debugging
16118
16119 echo "$as_me:16119: checking if you want to install stripped executables" >&5
16120 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16121
16122 # Check whether --enable-stripping or --disable-stripping was given.
16123 if test "${enable_stripping+set}" = set; then
16124   enableval="$enable_stripping"
16125   test "$enableval" != no && enableval=yes
16126         if test "$enableval" != "yes" ; then
16127     with_stripping=no
16128         else
16129                 with_stripping=yes
16130         fi
16131 else
16132   enableval=yes
16133         with_stripping=yes
16134
16135 fi;
16136 echo "$as_me:16136: result: $with_stripping" >&5
16137 echo "${ECHO_T}$with_stripping" >&6
16138
16139 if test "$with_stripping" = yes
16140 then
16141         INSTALL_OPT_S="-s"
16142 else
16143         INSTALL_OPT_S=
16144 fi
16145
16146 : ${INSTALL:=install}
16147 echo "$as_me:16147: checking if install accepts -p option" >&5
16148 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16149 if test "${cf_cv_install_p+set}" = set; then
16150   echo $ECHO_N "(cached) $ECHO_C" >&6
16151 else
16152
16153         rm -rf conftest*
16154         date >conftest.in
16155         mkdir conftest.out
16156         sleep 3
16157         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16158         then
16159                 if test -f conftest.out/conftest.in
16160                 then
16161                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16162                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16163                         if test -s conftest.err
16164                         then
16165                                 cf_cv_install_p=no
16166                         else
16167                                 cf_cv_install_p=yes
16168                         fi
16169                 else
16170                         cf_cv_install_p=no
16171                 fi
16172         else
16173                 cf_cv_install_p=no
16174         fi
16175         rm -rf conftest*
16176
16177 fi
16178 echo "$as_me:16178: result: $cf_cv_install_p" >&5
16179 echo "${ECHO_T}$cf_cv_install_p" >&6
16180
16181 echo "$as_me:16181: checking if install needs to be told about ownership" >&5
16182 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16183 case `$ac_config_guess` in
16184 (*minix)
16185         with_install_o=yes
16186         ;;
16187 (*)
16188         with_install_o=no
16189         ;;
16190 esac
16191
16192 echo "$as_me:16192: result: $with_install_o" >&5
16193 echo "${ECHO_T}$with_install_o" >&6
16194 if test "x$with_install_o" = xyes
16195 then
16196         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'`
16197 else
16198         INSTALL_OPT_O=
16199 fi
16200
16201 # If we're avoiding relinking of shared libraries during install, that is to
16202 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16203 # the install program has "-p" (for preserving timestamps).
16204 cf_cv_do_reranlib=yes
16205 if test "x$cf_cv_install_p" = xyes
16206 then
16207         if test "x$cf_cv_do_relink" != xyes
16208         then
16209                 cf_cv_do_reranlib=no
16210                 INSTALL_OPT_P="-p"
16211                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16212         fi
16213 fi
16214
16215 ###     use option --enable-warnings to turn on all gcc warnings
16216
16217 if ( test "$GCC" = yes || test "$GXX" = yes )
16218 then
16219
16220 if ( test "$GCC" = yes || test "$GXX" = yes )
16221 then
16222         case $CFLAGS in
16223         (*-Werror=*)
16224                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16225
16226 echo "${as_me:-configure}:16226: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16227
16228                 cf_temp_flags=
16229                 for cf_temp_scan in $CFLAGS
16230                 do
16231                         case "x$cf_temp_scan" in
16232                         (x-Werror=*)
16233
16234         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16235         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16236
16237                                 ;;
16238                         (*)
16239
16240         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16241         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16242
16243                                 ;;
16244                         esac
16245                 done
16246                 CFLAGS="$cf_temp_flags"
16247                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16248
16249 echo "${as_me:-configure}:16249: testing ... fixed $CFLAGS ..." 1>&5
16250
16251                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16252
16253 echo "${as_me:-configure}:16253: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16254
16255                 ;;
16256         esac
16257 fi
16258
16259 if ( test "$GCC" = yes || test "$GXX" = yes )
16260 then
16261         case $CPPFLAGS in
16262         (*-Werror=*)
16263                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16264
16265 echo "${as_me:-configure}:16265: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16266
16267                 cf_temp_flags=
16268                 for cf_temp_scan in $CPPFLAGS
16269                 do
16270                         case "x$cf_temp_scan" in
16271                         (x-Werror=*)
16272
16273         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16274         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16275
16276                                 ;;
16277                         (*)
16278
16279         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16280         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16281
16282                                 ;;
16283                         esac
16284                 done
16285                 CPPFLAGS="$cf_temp_flags"
16286                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16287
16288 echo "${as_me:-configure}:16288: testing ... fixed $CPPFLAGS ..." 1>&5
16289
16290                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16291
16292 echo "${as_me:-configure}:16292: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16293
16294                 ;;
16295         esac
16296 fi
16297
16298 if ( test "$GCC" = yes || test "$GXX" = yes )
16299 then
16300         case $LDFLAGS in
16301         (*-Werror=*)
16302                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16303
16304 echo "${as_me:-configure}:16304: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16305
16306                 cf_temp_flags=
16307                 for cf_temp_scan in $LDFLAGS
16308                 do
16309                         case "x$cf_temp_scan" in
16310                         (x-Werror=*)
16311
16312         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16313         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16314
16315                                 ;;
16316                         (*)
16317
16318         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16319         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16320
16321                                 ;;
16322                         esac
16323                 done
16324                 LDFLAGS="$cf_temp_flags"
16325                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16326
16327 echo "${as_me:-configure}:16327: testing ... fixed $LDFLAGS ..." 1>&5
16328
16329                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16330
16331 echo "${as_me:-configure}:16331: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16332
16333                 ;;
16334         esac
16335 fi
16336
16337 echo "$as_me:16337: checking if you want to turn on gcc warnings" >&5
16338 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16339
16340 # Check whether --enable-warnings or --disable-warnings was given.
16341 if test "${enable_warnings+set}" = set; then
16342   enableval="$enable_warnings"
16343   test "$enableval" != yes && enableval=no
16344         if test "$enableval" != "no" ; then
16345     with_warnings=yes
16346         else
16347                 with_warnings=no
16348         fi
16349 else
16350   enableval=no
16351         with_warnings=no
16352
16353 fi;
16354 echo "$as_me:16354: result: $with_warnings" >&5
16355 echo "${ECHO_T}$with_warnings" >&6
16356 if test "$with_warnings" = "yes"
16357 then
16358
16359 if test "x$have_x" = xyes; then
16360
16361 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16362 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16363 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16364 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16365 for cf_X_CFLAGS in $X_CFLAGS
16366 do
16367         case "x$cf_X_CFLAGS" in
16368         x-[IUD]*)
16369                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16370                 ;;
16371         *)
16372                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16373                 ;;
16374         esac
16375 done
16376
16377 cat >conftest.$ac_ext <<_ACEOF
16378 #line 16378 "configure"
16379 #include "confdefs.h"
16380
16381 #include <stdlib.h>
16382 #include <X11/Intrinsic.h>
16383
16384 int
16385 main (void)
16386 {
16387 String foo = malloc(1); (void)foo
16388   ;
16389   return 0;
16390 }
16391 _ACEOF
16392 rm -f conftest.$ac_objext
16393 if { (eval echo "$as_me:16393: \"$ac_compile\"") >&5
16394   (eval $ac_compile) 2>&5
16395   ac_status=$?
16396   echo "$as_me:16396: \$? = $ac_status" >&5
16397   (exit $ac_status); } &&
16398          { ac_try='test -s conftest.$ac_objext'
16399   { (eval echo "$as_me:16399: \"$ac_try\"") >&5
16400   (eval $ac_try) 2>&5
16401   ac_status=$?
16402   echo "$as_me:16402: \$? = $ac_status" >&5
16403   (exit $ac_status); }; }; then
16404
16405 echo "$as_me:16405: checking for X11/Xt const-feature" >&5
16406 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16407 if test "${cf_cv_const_x_string+set}" = set; then
16408   echo $ECHO_N "(cached) $ECHO_C" >&6
16409 else
16410
16411         cat >conftest.$ac_ext <<_ACEOF
16412 #line 16412 "configure"
16413 #include "confdefs.h"
16414
16415 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16416 #undef  XTSTRINGDEFINES /* X11R5 and later */
16417 #include <stdlib.h>
16418 #include <X11/Intrinsic.h>
16419
16420 int
16421 main (void)
16422 {
16423 String foo = malloc(1); *foo = 0
16424   ;
16425   return 0;
16426 }
16427 _ACEOF
16428 rm -f conftest.$ac_objext
16429 if { (eval echo "$as_me:16429: \"$ac_compile\"") >&5
16430   (eval $ac_compile) 2>&5
16431   ac_status=$?
16432   echo "$as_me:16432: \$? = $ac_status" >&5
16433   (exit $ac_status); } &&
16434          { ac_try='test -s conftest.$ac_objext'
16435   { (eval echo "$as_me:16435: \"$ac_try\"") >&5
16436   (eval $ac_try) 2>&5
16437   ac_status=$?
16438   echo "$as_me:16438: \$? = $ac_status" >&5
16439   (exit $ac_status); }; }; then
16440
16441                         cf_cv_const_x_string=no
16442
16443 else
16444   echo "$as_me: failed program was:" >&5
16445 cat conftest.$ac_ext >&5
16446
16447                         cf_cv_const_x_string=yes
16448
16449 fi
16450 rm -f conftest.$ac_objext conftest.$ac_ext
16451
16452 fi
16453 echo "$as_me:16453: result: $cf_cv_const_x_string" >&5
16454 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16455
16456 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16457 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16458 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16459
16460 case $cf_cv_const_x_string in
16461 (no)
16462
16463         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16464         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16465
16466         ;;
16467 (*)
16468
16469         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16470         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16471
16472         ;;
16473 esac
16474
16475 else
16476   echo "$as_me: failed program was:" >&5
16477 cat conftest.$ac_ext >&5
16478 fi
16479 rm -f conftest.$ac_objext conftest.$ac_ext
16480  fi
16481 cat > conftest.$ac_ext <<EOF
16482 #line 16482 "${as_me:-configure}"
16483 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16484 EOF
16485 if test "$INTEL_COMPILER" = yes
16486 then
16487 # The "-wdXXX" options suppress warnings:
16488 # remark #1419: external declaration in primary source file
16489 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16490 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16491 # remark #193: zero used for undefined preprocessing identifier
16492 # remark #593: variable "curs_sb_left_arrow" was set but never used
16493 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16494 # remark #869: parameter "tw" was never referenced
16495 # remark #981: operands are evaluated in unspecified order
16496 # warning #279: controlling expression is constant
16497
16498         { echo "$as_me:16498: checking for $CC warning options..." >&5
16499 echo "$as_me: checking for $CC warning options..." >&6;}
16500         cf_save_CFLAGS="$CFLAGS"
16501         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16502         for cf_opt in \
16503                 wd1419 \
16504                 wd1683 \
16505                 wd1684 \
16506                 wd193 \
16507                 wd593 \
16508                 wd279 \
16509                 wd810 \
16510                 wd869 \
16511                 wd981
16512         do
16513                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16514                 if { (eval echo "$as_me:16514: \"$ac_compile\"") >&5
16515   (eval $ac_compile) 2>&5
16516   ac_status=$?
16517   echo "$as_me:16517: \$? = $ac_status" >&5
16518   (exit $ac_status); }; then
16519                         test -n "$verbose" && echo "$as_me:16519: result: ... -$cf_opt" >&5
16520 echo "${ECHO_T}... -$cf_opt" >&6
16521                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16522                 fi
16523         done
16524         CFLAGS="$cf_save_CFLAGS"
16525 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16526 then
16527         { echo "$as_me:16527: checking for $CC warning options..." >&5
16528 echo "$as_me: checking for $CC warning options..." >&6;}
16529         cf_save_CFLAGS="$CFLAGS"
16530         cf_warn_CONST=""
16531         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16532         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16533         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16534         for cf_opt in W Wall \
16535                 Wbad-function-cast \
16536                 Wcast-align \
16537                 Wcast-qual \
16538                 Wdeclaration-after-statement \
16539                 Wextra \
16540                 Winline \
16541                 Wmissing-declarations \
16542                 Wmissing-prototypes \
16543                 Wnested-externs \
16544                 Wpointer-arith \
16545                 Wshadow \
16546                 Wstrict-prototypes \
16547                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16548         do
16549                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16550                 if { (eval echo "$as_me:16550: \"$ac_compile\"") >&5
16551   (eval $ac_compile) 2>&5
16552   ac_status=$?
16553   echo "$as_me:16553: \$? = $ac_status" >&5
16554   (exit $ac_status); }; then
16555                         test -n "$verbose" && echo "$as_me:16555: result: ... -$cf_opt" >&5
16556 echo "${ECHO_T}... -$cf_opt" >&6
16557                         case $cf_opt in
16558                         (Winline)
16559                                 case $GCC_VERSION in
16560                                 ([34].*)
16561                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16562
16563 echo "${as_me:-configure}:16563: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16564
16565                                         continue;;
16566                                 esac
16567                                 ;;
16568                         (Wpointer-arith)
16569                                 case $GCC_VERSION in
16570                                 ([12].*)
16571                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16572
16573 echo "${as_me:-configure}:16573: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16574
16575                                         continue;;
16576                                 esac
16577                                 ;;
16578                         esac
16579                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16580                 fi
16581         done
16582         CFLAGS="$cf_save_CFLAGS"
16583 fi
16584 rm -rf conftest*
16585
16586 fi
16587
16588 if ( test "$GCC" = yes || test "$GXX" = yes )
16589 then
16590 cat > conftest.i <<EOF
16591 #ifndef GCC_PRINTF
16592 #define GCC_PRINTF 0
16593 #endif
16594 #ifndef GCC_SCANF
16595 #define GCC_SCANF 0
16596 #endif
16597 #ifndef GCC_NORETURN
16598 #define GCC_NORETURN /* nothing */
16599 #endif
16600 #ifndef GCC_UNUSED
16601 #define GCC_UNUSED /* nothing */
16602 #endif
16603 EOF
16604 if test "$GCC" = yes
16605 then
16606         { echo "$as_me:16606: checking for $CC __attribute__ directives..." >&5
16607 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16608 cat > conftest.$ac_ext <<EOF
16609 #line 16609 "${as_me:-configure}"
16610 #include "confdefs.h"
16611 #include "conftest.h"
16612 #include "conftest.i"
16613 #if     GCC_PRINTF
16614 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16615 #else
16616 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16617 #endif
16618 #if     GCC_SCANF
16619 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16620 #else
16621 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16622 #endif
16623 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16624 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16625 extern void foo(void) GCC_NORETURN;
16626 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16627 EOF
16628         cf_printf_attribute=no
16629         cf_scanf_attribute=no
16630         for cf_attribute in scanf printf unused noreturn
16631         do
16632
16633 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16634
16635                 cf_directive="__attribute__(($cf_attribute))"
16636                 echo "checking for $CC $cf_directive" 1>&5
16637
16638                 case $cf_attribute in
16639                 (printf)
16640                         cf_printf_attribute=yes
16641                         cat >conftest.h <<EOF
16642 #define GCC_$cf_ATTRIBUTE 1
16643 EOF
16644                         ;;
16645                 (scanf)
16646                         cf_scanf_attribute=yes
16647                         cat >conftest.h <<EOF
16648 #define GCC_$cf_ATTRIBUTE 1
16649 EOF
16650                         ;;
16651                 (*)
16652                         cat >conftest.h <<EOF
16653 #define GCC_$cf_ATTRIBUTE $cf_directive
16654 EOF
16655                         ;;
16656                 esac
16657
16658                 if { (eval echo "$as_me:16658: \"$ac_compile\"") >&5
16659   (eval $ac_compile) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); }; then
16663                         test -n "$verbose" && echo "$as_me:16663: result: ... $cf_attribute" >&5
16664 echo "${ECHO_T}... $cf_attribute" >&6
16665                         cat conftest.h >>confdefs.h
16666                         case $cf_attribute in
16667                         (noreturn)
16668
16669 cat >>confdefs.h <<EOF
16670 #define GCC_NORETURN $cf_directive
16671 EOF
16672
16673                                 ;;
16674                         (printf)
16675                                 cf_value='/* nothing */'
16676                                 if test "$cf_printf_attribute" != no ; then
16677                                         cf_value='__attribute__((format(printf,fmt,var)))'
16678
16679 cat >>confdefs.h <<\EOF
16680 #define GCC_PRINTF 1
16681 EOF
16682
16683                                 fi
16684
16685 cat >>confdefs.h <<EOF
16686 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16687 EOF
16688
16689                                 ;;
16690                         (scanf)
16691                                 cf_value='/* nothing */'
16692                                 if test "$cf_scanf_attribute" != no ; then
16693                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16694
16695 cat >>confdefs.h <<\EOF
16696 #define GCC_SCANF 1
16697 EOF
16698
16699                                 fi
16700
16701 cat >>confdefs.h <<EOF
16702 #define GCC_SCANFLIKE(fmt,var) $cf_value
16703 EOF
16704
16705                                 ;;
16706                         (unused)
16707
16708 cat >>confdefs.h <<EOF
16709 #define GCC_UNUSED $cf_directive
16710 EOF
16711
16712                                 ;;
16713                         esac
16714                 fi
16715         done
16716 else
16717         fgrep define conftest.i >>confdefs.h
16718 fi
16719 rm -rf conftest*
16720 fi
16721
16722 fi
16723
16724 if test "x$with_warnings" = "xyes"; then
16725
16726         ADAFLAGS="$ADAFLAGS -gnatg"
16727
16728         if test "x$cf_with_cxx" = xyes ; then
16729
16730 INTEL_CPLUSPLUS=no
16731
16732 if test "$GCC" = yes ; then
16733         case $host_os in
16734         (linux*|gnu*)
16735                 echo "$as_me:16735: checking if this is really Intel C++ compiler" >&5
16736 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16737                 cf_save_CFLAGS="$CXXFLAGS"
16738                 CXXFLAGS="$CXXFLAGS -no-gcc"
16739                 cat >conftest.$ac_ext <<_ACEOF
16740 #line 16740 "configure"
16741 #include "confdefs.h"
16742
16743 int
16744 main (void)
16745 {
16746
16747 #ifdef __INTEL_COMPILER
16748 #else
16749 make an error
16750 #endif
16751
16752   ;
16753   return 0;
16754 }
16755 _ACEOF
16756 rm -f conftest.$ac_objext
16757 if { (eval echo "$as_me:16757: \"$ac_compile\"") >&5
16758   (eval $ac_compile) 2>&5
16759   ac_status=$?
16760   echo "$as_me:16760: \$? = $ac_status" >&5
16761   (exit $ac_status); } &&
16762          { ac_try='test -s conftest.$ac_objext'
16763   { (eval echo "$as_me:16763: \"$ac_try\"") >&5
16764   (eval $ac_try) 2>&5
16765   ac_status=$?
16766   echo "$as_me:16766: \$? = $ac_status" >&5
16767   (exit $ac_status); }; }; then
16768   INTEL_CPLUSPLUS=yes
16769 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16770
16771 else
16772   echo "$as_me: failed program was:" >&5
16773 cat conftest.$ac_ext >&5
16774 fi
16775 rm -f conftest.$ac_objext conftest.$ac_ext
16776                 CXXFLAGS="$cf_save_CFLAGS"
16777                 echo "$as_me:16777: result: $INTEL_CPLUSPLUS" >&5
16778 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16779                 ;;
16780         esac
16781 fi
16782
16783 CLANG_CPLUSPLUS=no
16784
16785 if test "$GCC" = yes ; then
16786         echo "$as_me:16786: checking if this is really Clang C++ compiler" >&5
16787 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16788         cf_save_CFLAGS="$CXXFLAGS"
16789         cat >conftest.$ac_ext <<_ACEOF
16790 #line 16790 "configure"
16791 #include "confdefs.h"
16792
16793 int
16794 main (void)
16795 {
16796
16797 #ifdef __clang__
16798 #else
16799 make an error
16800 #endif
16801
16802   ;
16803   return 0;
16804 }
16805 _ACEOF
16806 rm -f conftest.$ac_objext
16807 if { (eval echo "$as_me:16807: \"$ac_compile\"") >&5
16808   (eval $ac_compile) 2>&5
16809   ac_status=$?
16810   echo "$as_me:16810: \$? = $ac_status" >&5
16811   (exit $ac_status); } &&
16812          { ac_try='test -s conftest.$ac_objext'
16813   { (eval echo "$as_me:16813: \"$ac_try\"") >&5
16814   (eval $ac_try) 2>&5
16815   ac_status=$?
16816   echo "$as_me:16816: \$? = $ac_status" >&5
16817   (exit $ac_status); }; }; then
16818   CLANG_CPLUSPLUS=yes
16819
16820 else
16821   echo "$as_me: failed program was:" >&5
16822 cat conftest.$ac_ext >&5
16823 fi
16824 rm -f conftest.$ac_objext conftest.$ac_ext
16825         CXXFLAGS="$cf_save_CFLAGS"
16826         echo "$as_me:16826: result: $CLANG_CPLUSPLUS" >&5
16827 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16828 fi
16829
16830 CLANG_VERSION=none
16831
16832 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16833         case "$CC" in
16834         (c[1-9][0-9]|*/c[1-9][0-9])
16835                 { echo "$as_me:16835: WARNING: replacing broken compiler alias $CC" >&5
16836 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
16837                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
16838                 CC=clang
16839                 ;;
16840         esac
16841
16842         echo "$as_me:16842: checking version of $CC" >&5
16843 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
16844         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
16845         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
16846         echo "$as_me:16846: result: $CLANG_VERSION" >&5
16847 echo "${ECHO_T}$CLANG_VERSION" >&6
16848
16849         for cf_clang_opt in \
16850                 -Qunused-arguments \
16851                 -Wno-error=implicit-function-declaration
16852         do
16853                 echo "$as_me:16853: checking if option $cf_clang_opt works" >&5
16854 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16855                 cf_save_CFLAGS="$CFLAGS"
16856                 CFLAGS="$CFLAGS $cf_clang_opt"
16857                 cat >conftest.$ac_ext <<_ACEOF
16858 #line 16858 "configure"
16859 #include "confdefs.h"
16860
16861                         #include <stdio.h>
16862 int
16863 main (void)
16864 {
16865
16866                         printf("hello!\n");
16867   ;
16868   return 0;
16869 }
16870 _ACEOF
16871 rm -f conftest.$ac_objext conftest$ac_exeext
16872 if { (eval echo "$as_me:16872: \"$ac_link\"") >&5
16873   (eval $ac_link) 2>&5
16874   ac_status=$?
16875   echo "$as_me:16875: \$? = $ac_status" >&5
16876   (exit $ac_status); } &&
16877          { ac_try='test -s conftest$ac_exeext'
16878   { (eval echo "$as_me:16878: \"$ac_try\"") >&5
16879   (eval $ac_try) 2>&5
16880   ac_status=$?
16881   echo "$as_me:16881: \$? = $ac_status" >&5
16882   (exit $ac_status); }; }; then
16883
16884                         cf_clang_optok=yes
16885 else
16886   echo "$as_me: failed program was:" >&5
16887 cat conftest.$ac_ext >&5
16888
16889                         cf_clang_optok=no
16890 fi
16891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16892                 echo "$as_me:16892: result: $cf_clang_optok" >&5
16893 echo "${ECHO_T}$cf_clang_optok" >&6
16894                 CFLAGS="$cf_save_CFLAGS"
16895                 if test $cf_clang_optok = yes; then
16896                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
16897
16898 echo "${as_me:-configure}:16898: testing adding option $cf_clang_opt ..." 1>&5
16899
16900         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16901         CFLAGS="${CFLAGS}$cf_clang_opt"
16902
16903                 fi
16904         done
16905 fi
16906
16907 ac_ext=cc
16908 ac_cpp='$CXXCPP $CPPFLAGS'
16909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16912 ac_main_return=return
16913
16914 cat > conftest.$ac_ext <<EOF
16915 #line 16915 "configure"
16916 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16917 EOF
16918
16919 if test "$INTEL_CPLUSPLUS" = yes
16920 then
16921 # The "-wdXXX" options suppress warnings:
16922 # remark #1419: external declaration in primary source file
16923 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16924 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16925 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16926 # remark #193: zero used for undefined preprocessing identifier
16927 # remark #593: variable "curs_sb_left_arrow" was set but never used
16928 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16929 # remark #869: parameter "tw" was never referenced
16930 # remark #981: operands are evaluated in unspecified order
16931 # warning #269: invalid format string conversion
16932
16933         { echo "$as_me:16933: checking for $CC warning options..." >&5
16934 echo "$as_me: checking for $CC warning options..." >&6;}
16935         cf_save_CXXFLAGS="$CXXFLAGS"
16936         EXTRA_CXXFLAGS="-Wall"
16937         for cf_opt in \
16938                 wd1419 \
16939                 wd1682 \
16940                 wd1683 \
16941                 wd1684 \
16942                 wd193 \
16943                 wd279 \
16944                 wd593 \
16945                 wd810 \
16946                 wd869 \
16947                 wd981
16948         do
16949                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16950                 if { (eval echo "$as_me:16950: \"$ac_compile\"") >&5
16951   (eval $ac_compile) 2>&5
16952   ac_status=$?
16953   echo "$as_me:16953: \$? = $ac_status" >&5
16954   (exit $ac_status); }; then
16955                         test -n "$verbose" && echo "$as_me:16955: result: ... -$cf_opt" >&5
16956 echo "${ECHO_T}... -$cf_opt" >&6
16957                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16958                 fi
16959         done
16960         CXXFLAGS="$cf_save_CXXFLAGS"
16961
16962 elif test "$GXX" = yes
16963 then
16964         { echo "$as_me:16964: checking for $CXX warning options..." >&5
16965 echo "$as_me: checking for $CXX warning options..." >&6;}
16966         cf_save_CXXFLAGS="$CXXFLAGS"
16967         EXTRA_CXXFLAGS="-W -Wall"
16968         cf_gxx_extra_warnings=""
16969         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16970         case "$GCC_VERSION" in
16971         ([1-2].*)
16972                 ;;
16973         (*)
16974                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16975                 ;;
16976         esac
16977         for cf_opt in \
16978                 Wabi \
16979                 fabi-version=0 \
16980                 Wextra \
16981                 Wignored-qualifiers \
16982                 Wlogical-op \
16983                 Woverloaded-virtual \
16984                 Wsign-promo \
16985                 Wsynth \
16986                 Wold-style-cast \
16987                 Wcast-align \
16988                 Wcast-qual \
16989                 Wpointer-arith \
16990                 Wshadow \
16991                 Wundef $cf_gxx_extra_warnings Wno-unused
16992         do
16993                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16994                 if { (eval echo "$as_me:16994: \"$ac_compile\"") >&5
16995   (eval $ac_compile) 2>&5
16996   ac_status=$?
16997   echo "$as_me:16997: \$? = $ac_status" >&5
16998   (exit $ac_status); }; then
16999                         test -n "$verbose" && echo "$as_me:16999: result: ... -$cf_opt" >&5
17000 echo "${ECHO_T}... -$cf_opt" >&6
17001                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17002                 else
17003                         test -n "$verbose" && echo "$as_me:17003: result: ... no -$cf_opt" >&5
17004 echo "${ECHO_T}... no -$cf_opt" >&6
17005                 fi
17006         done
17007         CXXFLAGS="$cf_save_CXXFLAGS"
17008 fi
17009
17010 rm -rf conftest*
17011 ac_ext=c
17012 ac_cpp='$CPP $CPPFLAGS'
17013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17016 ac_main_return=return
17017
17018         fi
17019 fi
17020
17021 echo "$as_me:17021: checking if you want to work around bogus compiler/loader warnings" >&5
17022 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17023
17024 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17025 if test "${enable_string_hacks+set}" = set; then
17026   enableval="$enable_string_hacks"
17027   with_string_hacks=$enableval
17028 else
17029   with_string_hacks=no
17030 fi;
17031 echo "$as_me:17031: result: $with_string_hacks" >&5
17032 echo "${ECHO_T}$with_string_hacks" >&6
17033
17034 if test "x$with_string_hacks" = "xyes"; then
17035
17036 cat >>confdefs.h <<\EOF
17037 #define USE_STRING_HACKS 1
17038 EOF
17039
17040         { echo "$as_me:17040: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17041 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17042         echo "$as_me:17042: checking for strlcat" >&5
17043 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17044 if test "${ac_cv_func_strlcat+set}" = set; then
17045   echo $ECHO_N "(cached) $ECHO_C" >&6
17046 else
17047   cat >conftest.$ac_ext <<_ACEOF
17048 #line 17048 "configure"
17049 #include "confdefs.h"
17050 #define strlcat autoconf_temporary
17051 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17052 #undef strlcat
17053
17054 #ifdef __cplusplus
17055 extern "C"
17056 #endif
17057
17058 /* We use char because int might match the return type of a gcc2
17059    builtin and then its argument prototype would still apply.  */
17060 char strlcat (void);
17061
17062 int
17063 main (void)
17064 {
17065
17066 /* The GNU C library defines stubs for functions which it implements
17067     to always fail with ENOSYS.  Some functions are actually named
17068     something starting with __ and the normal name is an alias.  */
17069 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17070 #error found stub for strlcat
17071 #endif
17072
17073         return strlcat ();
17074   ;
17075   return 0;
17076 }
17077 _ACEOF
17078 rm -f conftest.$ac_objext conftest$ac_exeext
17079 if { (eval echo "$as_me:17079: \"$ac_link\"") >&5
17080   (eval $ac_link) 2>&5
17081   ac_status=$?
17082   echo "$as_me:17082: \$? = $ac_status" >&5
17083   (exit $ac_status); } &&
17084          { ac_try='test -s conftest$ac_exeext'
17085   { (eval echo "$as_me:17085: \"$ac_try\"") >&5
17086   (eval $ac_try) 2>&5
17087   ac_status=$?
17088   echo "$as_me:17088: \$? = $ac_status" >&5
17089   (exit $ac_status); }; }; then
17090   ac_cv_func_strlcat=yes
17091 else
17092   echo "$as_me: failed program was:" >&5
17093 cat conftest.$ac_ext >&5
17094 ac_cv_func_strlcat=no
17095 fi
17096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17097 fi
17098 echo "$as_me:17098: result: $ac_cv_func_strlcat" >&5
17099 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17100 if test $ac_cv_func_strlcat = yes; then
17101
17102 cat >>confdefs.h <<\EOF
17103 #define HAVE_STRLCAT 1
17104 EOF
17105
17106 else
17107
17108                 echo "$as_me:17108: checking for strlcat in -lbsd" >&5
17109 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17110 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17111   echo $ECHO_N "(cached) $ECHO_C" >&6
17112 else
17113   ac_check_lib_save_LIBS=$LIBS
17114 LIBS="-lbsd  $LIBS"
17115 cat >conftest.$ac_ext <<_ACEOF
17116 #line 17116 "configure"
17117 #include "confdefs.h"
17118
17119 /* Override any gcc2 internal prototype to avoid an error.  */
17120 #ifdef __cplusplus
17121 extern "C"
17122 #endif
17123 /* We use char because int might match the return type of a gcc2
17124    builtin and then its argument prototype would still apply.  */
17125 char strlcat ();
17126 int
17127 main (void)
17128 {
17129 strlcat ();
17130   ;
17131   return 0;
17132 }
17133 _ACEOF
17134 rm -f conftest.$ac_objext conftest$ac_exeext
17135 if { (eval echo "$as_me:17135: \"$ac_link\"") >&5
17136   (eval $ac_link) 2>&5
17137   ac_status=$?
17138   echo "$as_me:17138: \$? = $ac_status" >&5
17139   (exit $ac_status); } &&
17140          { ac_try='test -s conftest$ac_exeext'
17141   { (eval echo "$as_me:17141: \"$ac_try\"") >&5
17142   (eval $ac_try) 2>&5
17143   ac_status=$?
17144   echo "$as_me:17144: \$? = $ac_status" >&5
17145   (exit $ac_status); }; }; then
17146   ac_cv_lib_bsd_strlcat=yes
17147 else
17148   echo "$as_me: failed program was:" >&5
17149 cat conftest.$ac_ext >&5
17150 ac_cv_lib_bsd_strlcat=no
17151 fi
17152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17153 LIBS=$ac_check_lib_save_LIBS
17154 fi
17155 echo "$as_me:17155: result: $ac_cv_lib_bsd_strlcat" >&5
17156 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17157 if test $ac_cv_lib_bsd_strlcat = yes; then
17158
17159 cf_add_libs="$LIBS"
17160 # reverse order
17161 cf_add_0lib=
17162 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17163 # filter duplicates
17164 for cf_add_1lib in $cf_add_0lib; do
17165         for cf_add_2lib in $cf_add_libs; do
17166                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17167                         cf_add_1lib=
17168                         break
17169                 fi
17170         done
17171         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17172 done
17173 LIBS="$cf_add_libs"
17174
17175 for ac_header in bsd/string.h
17176 do
17177 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17178 echo "$as_me:17178: checking for $ac_header" >&5
17179 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17180 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17181   echo $ECHO_N "(cached) $ECHO_C" >&6
17182 else
17183   cat >conftest.$ac_ext <<_ACEOF
17184 #line 17184 "configure"
17185 #include "confdefs.h"
17186 #include <$ac_header>
17187 _ACEOF
17188 if { (eval echo "$as_me:17188: \"$ac_cpp conftest.$ac_ext\"") >&5
17189   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17190   ac_status=$?
17191   egrep -v '^ *\+' conftest.er1 >conftest.err
17192   rm -f conftest.er1
17193   cat conftest.err >&5
17194   echo "$as_me:17194: \$? = $ac_status" >&5
17195   (exit $ac_status); } >/dev/null; then
17196   if test -s conftest.err; then
17197     ac_cpp_err=$ac_c_preproc_warn_flag
17198   else
17199     ac_cpp_err=
17200   fi
17201 else
17202   ac_cpp_err=yes
17203 fi
17204 if test -z "$ac_cpp_err"; then
17205   eval "$as_ac_Header=yes"
17206 else
17207   echo "$as_me: failed program was:" >&5
17208   cat conftest.$ac_ext >&5
17209   eval "$as_ac_Header=no"
17210 fi
17211 rm -f conftest.err conftest.$ac_ext
17212 fi
17213 echo "$as_me:17213: result: `eval echo '${'$as_ac_Header'}'`" >&5
17214 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17215 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17216   cat >>confdefs.h <<EOF
17217 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17218 EOF
17219
17220 fi
17221 done
17222
17223 cat >>confdefs.h <<\EOF
17224 #define HAVE_STRLCAT 1
17225 EOF
17226
17227 fi
17228
17229 fi
17230
17231 for ac_func in strlcpy snprintf
17232 do
17233 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17234 echo "$as_me:17234: checking for $ac_func" >&5
17235 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17236 if eval "test \"\${$as_ac_var+set}\" = set"; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239   cat >conftest.$ac_ext <<_ACEOF
17240 #line 17240 "configure"
17241 #include "confdefs.h"
17242 #define $ac_func autoconf_temporary
17243 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17244 #undef $ac_func
17245
17246 #ifdef __cplusplus
17247 extern "C"
17248 #endif
17249
17250 /* We use char because int might match the return type of a gcc2
17251    builtin and then its argument prototype would still apply.  */
17252 char $ac_func (void);
17253
17254 int
17255 main (void)
17256 {
17257
17258 /* The GNU C library defines stubs for functions which it implements
17259     to always fail with ENOSYS.  Some functions are actually named
17260     something starting with __ and the normal name is an alias.  */
17261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17262 #error found stub for $ac_func
17263 #endif
17264
17265         return $ac_func ();
17266   ;
17267   return 0;
17268 }
17269 _ACEOF
17270 rm -f conftest.$ac_objext conftest$ac_exeext
17271 if { (eval echo "$as_me:17271: \"$ac_link\"") >&5
17272   (eval $ac_link) 2>&5
17273   ac_status=$?
17274   echo "$as_me:17274: \$? = $ac_status" >&5
17275   (exit $ac_status); } &&
17276          { ac_try='test -s conftest$ac_exeext'
17277   { (eval echo "$as_me:17277: \"$ac_try\"") >&5
17278   (eval $ac_try) 2>&5
17279   ac_status=$?
17280   echo "$as_me:17280: \$? = $ac_status" >&5
17281   (exit $ac_status); }; }; then
17282   eval "$as_ac_var=yes"
17283 else
17284   echo "$as_me: failed program was:" >&5
17285 cat conftest.$ac_ext >&5
17286 eval "$as_ac_var=no"
17287 fi
17288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17289 fi
17290 echo "$as_me:17290: result: `eval echo '${'$as_ac_var'}'`" >&5
17291 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17292 if test `eval echo '${'$as_ac_var'}'` = yes; then
17293   cat >>confdefs.h <<EOF
17294 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17295 EOF
17296
17297 fi
17298 done
17299
17300 fi
17301
17302 ###     use option --enable-assertions to turn on generation of assertion code
17303 echo "$as_me:17303: checking if you want to enable runtime assertions" >&5
17304 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17305
17306 # Check whether --enable-assertions or --disable-assertions was given.
17307 if test "${enable_assertions+set}" = set; then
17308   enableval="$enable_assertions"
17309   with_assertions=$enableval
17310 else
17311   with_assertions=no
17312 fi;
17313 echo "$as_me:17313: result: $with_assertions" >&5
17314 echo "${ECHO_T}$with_assertions" >&6
17315 if test -n "$GCC"
17316 then
17317         if test "$with_assertions" = no
17318         then
17319                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17320         else
17321
17322         ADAFLAGS="$ADAFLAGS -gnata"
17323
17324         fi
17325 fi
17326
17327 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17328
17329 echo "$as_me:17329: checking if you want to use dmalloc for testing" >&5
17330 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17331
17332 # Check whether --with-dmalloc or --without-dmalloc was given.
17333 if test "${with_dmalloc+set}" = set; then
17334   withval="$with_dmalloc"
17335
17336 cat >>confdefs.h <<EOF
17337 #define USE_DMALLOC 1
17338 EOF
17339
17340         : ${with_cflags:=-g}
17341         : ${with_no_leaks:=yes}
17342          with_dmalloc=yes
17343 else
17344   with_dmalloc=
17345 fi;
17346 echo "$as_me:17346: result: ${with_dmalloc:-no}" >&5
17347 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17348
17349 case .$with_cflags in
17350 (.*-g*)
17351         case .$CFLAGS in
17352         (.*-g*)
17353                 ;;
17354         (*)
17355
17356 cf_fix_cppflags=no
17357 cf_new_cflags=
17358 cf_new_cppflags=
17359 cf_new_extra_cppflags=
17360
17361 for cf_add_cflags in -g
17362 do
17363 case $cf_fix_cppflags in
17364 (no)
17365         case $cf_add_cflags in
17366         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17367                 case $cf_add_cflags in
17368                 (-D*)
17369                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17370
17371                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17372                                 && test -z "${cf_tst_cflags}" \
17373                                 && cf_fix_cppflags=yes
17374
17375                         if test $cf_fix_cppflags = yes ; then
17376
17377         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17378         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17379
17380                                 continue
17381                         elif test "${cf_tst_cflags}" = "\"'" ; then
17382
17383         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17384         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17385
17386                                 continue
17387                         fi
17388                         ;;
17389                 esac
17390                 case "$CPPFLAGS" in
17391                 (*$cf_add_cflags)
17392                         ;;
17393                 (*)
17394                         case $cf_add_cflags in
17395                         (-D*)
17396                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17397
17398 CPPFLAGS=`echo "$CPPFLAGS" | \
17399         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17400                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17401
17402                                 ;;
17403                         esac
17404
17405         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17406         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17407
17408                         ;;
17409                 esac
17410                 ;;
17411         (*)
17412
17413         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17414         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17415
17416                 ;;
17417         esac
17418         ;;
17419 (yes)
17420
17421         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17422         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17423
17424         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17425
17426         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17427                 && test -z "${cf_tst_cflags}" \
17428                 && cf_fix_cppflags=no
17429         ;;
17430 esac
17431 done
17432
17433 if test -n "$cf_new_cflags" ; then
17434
17435         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17436         CFLAGS="${CFLAGS}$cf_new_cflags"
17437
17438 fi
17439
17440 if test -n "$cf_new_cppflags" ; then
17441
17442         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17443         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17444
17445 fi
17446
17447 if test -n "$cf_new_extra_cppflags" ; then
17448
17449         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17450         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17451
17452 fi
17453
17454                 ;;
17455         esac
17456         ;;
17457 esac
17458
17459 if test "$with_dmalloc" = yes ; then
17460         echo "$as_me:17460: checking for dmalloc.h" >&5
17461 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17462 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17463   echo $ECHO_N "(cached) $ECHO_C" >&6
17464 else
17465   cat >conftest.$ac_ext <<_ACEOF
17466 #line 17466 "configure"
17467 #include "confdefs.h"
17468 #include <dmalloc.h>
17469 _ACEOF
17470 if { (eval echo "$as_me:17470: \"$ac_cpp conftest.$ac_ext\"") >&5
17471   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17472   ac_status=$?
17473   egrep -v '^ *\+' conftest.er1 >conftest.err
17474   rm -f conftest.er1
17475   cat conftest.err >&5
17476   echo "$as_me:17476: \$? = $ac_status" >&5
17477   (exit $ac_status); } >/dev/null; then
17478   if test -s conftest.err; then
17479     ac_cpp_err=$ac_c_preproc_warn_flag
17480   else
17481     ac_cpp_err=
17482   fi
17483 else
17484   ac_cpp_err=yes
17485 fi
17486 if test -z "$ac_cpp_err"; then
17487   ac_cv_header_dmalloc_h=yes
17488 else
17489   echo "$as_me: failed program was:" >&5
17490   cat conftest.$ac_ext >&5
17491   ac_cv_header_dmalloc_h=no
17492 fi
17493 rm -f conftest.err conftest.$ac_ext
17494 fi
17495 echo "$as_me:17495: result: $ac_cv_header_dmalloc_h" >&5
17496 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17497 if test $ac_cv_header_dmalloc_h = yes; then
17498
17499 echo "$as_me:17499: checking for dmalloc_debug in -ldmalloc" >&5
17500 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17501 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17502   echo $ECHO_N "(cached) $ECHO_C" >&6
17503 else
17504   ac_check_lib_save_LIBS=$LIBS
17505 LIBS="-ldmalloc  $LIBS"
17506 cat >conftest.$ac_ext <<_ACEOF
17507 #line 17507 "configure"
17508 #include "confdefs.h"
17509
17510 /* Override any gcc2 internal prototype to avoid an error.  */
17511 #ifdef __cplusplus
17512 extern "C"
17513 #endif
17514 /* We use char because int might match the return type of a gcc2
17515    builtin and then its argument prototype would still apply.  */
17516 char dmalloc_debug ();
17517 int
17518 main (void)
17519 {
17520 dmalloc_debug ();
17521   ;
17522   return 0;
17523 }
17524 _ACEOF
17525 rm -f conftest.$ac_objext conftest$ac_exeext
17526 if { (eval echo "$as_me:17526: \"$ac_link\"") >&5
17527   (eval $ac_link) 2>&5
17528   ac_status=$?
17529   echo "$as_me:17529: \$? = $ac_status" >&5
17530   (exit $ac_status); } &&
17531          { ac_try='test -s conftest$ac_exeext'
17532   { (eval echo "$as_me:17532: \"$ac_try\"") >&5
17533   (eval $ac_try) 2>&5
17534   ac_status=$?
17535   echo "$as_me:17535: \$? = $ac_status" >&5
17536   (exit $ac_status); }; }; then
17537   ac_cv_lib_dmalloc_dmalloc_debug=yes
17538 else
17539   echo "$as_me: failed program was:" >&5
17540 cat conftest.$ac_ext >&5
17541 ac_cv_lib_dmalloc_dmalloc_debug=no
17542 fi
17543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17544 LIBS=$ac_check_lib_save_LIBS
17545 fi
17546 echo "$as_me:17546: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17547 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17548 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17549   cat >>confdefs.h <<EOF
17550 #define HAVE_LIBDMALLOC 1
17551 EOF
17552
17553   LIBS="-ldmalloc $LIBS"
17554
17555 fi
17556
17557 fi
17558
17559 fi
17560
17561 echo "$as_me:17561: checking if you want to use dbmalloc for testing" >&5
17562 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17563
17564 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17565 if test "${with_dbmalloc+set}" = set; then
17566   withval="$with_dbmalloc"
17567
17568 cat >>confdefs.h <<EOF
17569 #define USE_DBMALLOC 1
17570 EOF
17571
17572         : ${with_cflags:=-g}
17573         : ${with_no_leaks:=yes}
17574          with_dbmalloc=yes
17575 else
17576   with_dbmalloc=
17577 fi;
17578 echo "$as_me:17578: result: ${with_dbmalloc:-no}" >&5
17579 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17580
17581 case .$with_cflags in
17582 (.*-g*)
17583         case .$CFLAGS in
17584         (.*-g*)
17585                 ;;
17586         (*)
17587
17588 cf_fix_cppflags=no
17589 cf_new_cflags=
17590 cf_new_cppflags=
17591 cf_new_extra_cppflags=
17592
17593 for cf_add_cflags in -g
17594 do
17595 case $cf_fix_cppflags in
17596 (no)
17597         case $cf_add_cflags in
17598         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17599                 case $cf_add_cflags in
17600                 (-D*)
17601                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17602
17603                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17604                                 && test -z "${cf_tst_cflags}" \
17605                                 && cf_fix_cppflags=yes
17606
17607                         if test $cf_fix_cppflags = yes ; then
17608
17609         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17610         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17611
17612                                 continue
17613                         elif test "${cf_tst_cflags}" = "\"'" ; then
17614
17615         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17616         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17617
17618                                 continue
17619                         fi
17620                         ;;
17621                 esac
17622                 case "$CPPFLAGS" in
17623                 (*$cf_add_cflags)
17624                         ;;
17625                 (*)
17626                         case $cf_add_cflags in
17627                         (-D*)
17628                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17629
17630 CPPFLAGS=`echo "$CPPFLAGS" | \
17631         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17632                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17633
17634                                 ;;
17635                         esac
17636
17637         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17638         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17639
17640                         ;;
17641                 esac
17642                 ;;
17643         (*)
17644
17645         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17646         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17647
17648                 ;;
17649         esac
17650         ;;
17651 (yes)
17652
17653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17655
17656         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17657
17658         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17659                 && test -z "${cf_tst_cflags}" \
17660                 && cf_fix_cppflags=no
17661         ;;
17662 esac
17663 done
17664
17665 if test -n "$cf_new_cflags" ; then
17666
17667         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17668         CFLAGS="${CFLAGS}$cf_new_cflags"
17669
17670 fi
17671
17672 if test -n "$cf_new_cppflags" ; then
17673
17674         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17675         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17676
17677 fi
17678
17679 if test -n "$cf_new_extra_cppflags" ; then
17680
17681         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17682         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17683
17684 fi
17685
17686                 ;;
17687         esac
17688         ;;
17689 esac
17690
17691 if test "$with_dbmalloc" = yes ; then
17692         echo "$as_me:17692: checking for dbmalloc.h" >&5
17693 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17694 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17695   echo $ECHO_N "(cached) $ECHO_C" >&6
17696 else
17697   cat >conftest.$ac_ext <<_ACEOF
17698 #line 17698 "configure"
17699 #include "confdefs.h"
17700 #include <dbmalloc.h>
17701 _ACEOF
17702 if { (eval echo "$as_me:17702: \"$ac_cpp conftest.$ac_ext\"") >&5
17703   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17704   ac_status=$?
17705   egrep -v '^ *\+' conftest.er1 >conftest.err
17706   rm -f conftest.er1
17707   cat conftest.err >&5
17708   echo "$as_me:17708: \$? = $ac_status" >&5
17709   (exit $ac_status); } >/dev/null; then
17710   if test -s conftest.err; then
17711     ac_cpp_err=$ac_c_preproc_warn_flag
17712   else
17713     ac_cpp_err=
17714   fi
17715 else
17716   ac_cpp_err=yes
17717 fi
17718 if test -z "$ac_cpp_err"; then
17719   ac_cv_header_dbmalloc_h=yes
17720 else
17721   echo "$as_me: failed program was:" >&5
17722   cat conftest.$ac_ext >&5
17723   ac_cv_header_dbmalloc_h=no
17724 fi
17725 rm -f conftest.err conftest.$ac_ext
17726 fi
17727 echo "$as_me:17727: result: $ac_cv_header_dbmalloc_h" >&5
17728 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17729 if test $ac_cv_header_dbmalloc_h = yes; then
17730
17731 echo "$as_me:17731: checking for debug_malloc in -ldbmalloc" >&5
17732 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17733 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17734   echo $ECHO_N "(cached) $ECHO_C" >&6
17735 else
17736   ac_check_lib_save_LIBS=$LIBS
17737 LIBS="-ldbmalloc  $LIBS"
17738 cat >conftest.$ac_ext <<_ACEOF
17739 #line 17739 "configure"
17740 #include "confdefs.h"
17741
17742 /* Override any gcc2 internal prototype to avoid an error.  */
17743 #ifdef __cplusplus
17744 extern "C"
17745 #endif
17746 /* We use char because int might match the return type of a gcc2
17747    builtin and then its argument prototype would still apply.  */
17748 char debug_malloc ();
17749 int
17750 main (void)
17751 {
17752 debug_malloc ();
17753   ;
17754   return 0;
17755 }
17756 _ACEOF
17757 rm -f conftest.$ac_objext conftest$ac_exeext
17758 if { (eval echo "$as_me:17758: \"$ac_link\"") >&5
17759   (eval $ac_link) 2>&5
17760   ac_status=$?
17761   echo "$as_me:17761: \$? = $ac_status" >&5
17762   (exit $ac_status); } &&
17763          { ac_try='test -s conftest$ac_exeext'
17764   { (eval echo "$as_me:17764: \"$ac_try\"") >&5
17765   (eval $ac_try) 2>&5
17766   ac_status=$?
17767   echo "$as_me:17767: \$? = $ac_status" >&5
17768   (exit $ac_status); }; }; then
17769   ac_cv_lib_dbmalloc_debug_malloc=yes
17770 else
17771   echo "$as_me: failed program was:" >&5
17772 cat conftest.$ac_ext >&5
17773 ac_cv_lib_dbmalloc_debug_malloc=no
17774 fi
17775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17776 LIBS=$ac_check_lib_save_LIBS
17777 fi
17778 echo "$as_me:17778: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17779 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17780 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17781   cat >>confdefs.h <<EOF
17782 #define HAVE_LIBDBMALLOC 1
17783 EOF
17784
17785   LIBS="-ldbmalloc $LIBS"
17786
17787 fi
17788
17789 fi
17790
17791 fi
17792
17793 echo "$as_me:17793: checking if you want to use valgrind for testing" >&5
17794 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17795
17796 # Check whether --with-valgrind or --without-valgrind was given.
17797 if test "${with_valgrind+set}" = set; then
17798   withval="$with_valgrind"
17799
17800 cat >>confdefs.h <<EOF
17801 #define USE_VALGRIND 1
17802 EOF
17803
17804         : ${with_cflags:=-g}
17805         : ${with_no_leaks:=yes}
17806          with_valgrind=yes
17807 else
17808   with_valgrind=
17809 fi;
17810 echo "$as_me:17810: result: ${with_valgrind:-no}" >&5
17811 echo "${ECHO_T}${with_valgrind:-no}" >&6
17812
17813 case .$with_cflags in
17814 (.*-g*)
17815         case .$CFLAGS in
17816         (.*-g*)
17817                 ;;
17818         (*)
17819
17820 cf_fix_cppflags=no
17821 cf_new_cflags=
17822 cf_new_cppflags=
17823 cf_new_extra_cppflags=
17824
17825 for cf_add_cflags in -g
17826 do
17827 case $cf_fix_cppflags in
17828 (no)
17829         case $cf_add_cflags in
17830         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17831                 case $cf_add_cflags in
17832                 (-D*)
17833                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17834
17835                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17836                                 && test -z "${cf_tst_cflags}" \
17837                                 && cf_fix_cppflags=yes
17838
17839                         if test $cf_fix_cppflags = yes ; then
17840
17841         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17842         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17843
17844                                 continue
17845                         elif test "${cf_tst_cflags}" = "\"'" ; then
17846
17847         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17848         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17849
17850                                 continue
17851                         fi
17852                         ;;
17853                 esac
17854                 case "$CPPFLAGS" in
17855                 (*$cf_add_cflags)
17856                         ;;
17857                 (*)
17858                         case $cf_add_cflags in
17859                         (-D*)
17860                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17861
17862 CPPFLAGS=`echo "$CPPFLAGS" | \
17863         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17864                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17865
17866                                 ;;
17867                         esac
17868
17869         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17870         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17871
17872                         ;;
17873                 esac
17874                 ;;
17875         (*)
17876
17877         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17878         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17879
17880                 ;;
17881         esac
17882         ;;
17883 (yes)
17884
17885         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17886         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17887
17888         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17889
17890         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17891                 && test -z "${cf_tst_cflags}" \
17892                 && cf_fix_cppflags=no
17893         ;;
17894 esac
17895 done
17896
17897 if test -n "$cf_new_cflags" ; then
17898
17899         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17900         CFLAGS="${CFLAGS}$cf_new_cflags"
17901
17902 fi
17903
17904 if test -n "$cf_new_cppflags" ; then
17905
17906         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17907         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17908
17909 fi
17910
17911 if test -n "$cf_new_extra_cppflags" ; then
17912
17913         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17914         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17915
17916 fi
17917
17918                 ;;
17919         esac
17920         ;;
17921 esac
17922
17923 echo "$as_me:17923: checking if you want to perform memory-leak testing" >&5
17924 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17925
17926 # Check whether --enable-leaks or --disable-leaks was given.
17927 if test "${enable_leaks+set}" = set; then
17928   enableval="$enable_leaks"
17929   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17930 else
17931   : ${with_no_leaks:=no}
17932 fi;
17933 echo "$as_me:17933: result: $with_no_leaks" >&5
17934 echo "${ECHO_T}$with_no_leaks" >&6
17935
17936 if test "$with_no_leaks" = yes ; then
17937
17938 cat >>confdefs.h <<\EOF
17939 #define NO_LEAKS 1
17940 EOF
17941
17942 cat >>confdefs.h <<\EOF
17943 #define YY_NO_LEAKS 1
17944 EOF
17945
17946 fi
17947
17948 cat >>confdefs.h <<\EOF
17949 #define HAVE_NC_ALLOC_H 1
17950 EOF
17951
17952 ###     use option --enable-expanded to generate certain macros as functions
17953
17954 # Check whether --enable-expanded or --disable-expanded was given.
17955 if test "${enable_expanded+set}" = set; then
17956   enableval="$enable_expanded"
17957   test "x$enableval" = xyes &&
17958 cat >>confdefs.h <<\EOF
17959 #define NCURSES_EXPANDED 1
17960 EOF
17961
17962 fi;
17963
17964 ###     use option --disable-macros to suppress macros in favor of functions
17965
17966 # Check whether --enable-macros or --disable-macros was given.
17967 if test "${enable_macros+set}" = set; then
17968   enableval="$enable_macros"
17969   test "$enableval" = no &&
17970 cat >>confdefs.h <<\EOF
17971 #define NCURSES_NOMACROS 1
17972 EOF
17973
17974 fi;
17975
17976 # Normally we only add trace() to the debug-library.  Allow this to be
17977 # extended to all models of the ncurses library:
17978 cf_all_traces=no
17979 case "$CFLAGS $CPPFLAGS" in
17980 (*-DTRACE*)
17981         cf_all_traces=yes
17982         ;;
17983 esac
17984
17985 echo "$as_me:17985: checking whether to add trace feature to all models" >&5
17986 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17987
17988 # Check whether --with-trace or --without-trace was given.
17989 if test "${with_trace+set}" = set; then
17990   withval="$with_trace"
17991   cf_with_trace=$withval
17992 else
17993   cf_with_trace=$cf_all_traces
17994 fi;
17995 echo "$as_me:17995: result: $cf_with_trace" >&5
17996 echo "${ECHO_T}$cf_with_trace" >&6
17997
17998 if test "x$cf_with_trace" = xyes ; then
17999         LIB_TRACING=all
18000         ADA_TRACE=TRUE
18001
18002 cf_fix_cppflags=no
18003 cf_new_cflags=
18004 cf_new_cppflags=
18005 cf_new_extra_cppflags=
18006
18007 for cf_add_cflags in -DTRACE
18008 do
18009 case $cf_fix_cppflags in
18010 (no)
18011         case $cf_add_cflags in
18012         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18013                 case $cf_add_cflags in
18014                 (-D*)
18015                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18016
18017                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18018                                 && test -z "${cf_tst_cflags}" \
18019                                 && cf_fix_cppflags=yes
18020
18021                         if test $cf_fix_cppflags = yes ; then
18022
18023         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18024         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18025
18026                                 continue
18027                         elif test "${cf_tst_cflags}" = "\"'" ; then
18028
18029         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18030         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18031
18032                                 continue
18033                         fi
18034                         ;;
18035                 esac
18036                 case "$CPPFLAGS" in
18037                 (*$cf_add_cflags)
18038                         ;;
18039                 (*)
18040                         case $cf_add_cflags in
18041                         (-D*)
18042                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18043
18044 CPPFLAGS=`echo "$CPPFLAGS" | \
18045         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18046                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18047
18048                                 ;;
18049                         esac
18050
18051         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18052         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18053
18054                         ;;
18055                 esac
18056                 ;;
18057         (*)
18058
18059         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18060         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18061
18062                 ;;
18063         esac
18064         ;;
18065 (yes)
18066
18067         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18068         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18069
18070         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18071
18072         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18073                 && test -z "${cf_tst_cflags}" \
18074                 && cf_fix_cppflags=no
18075         ;;
18076 esac
18077 done
18078
18079 if test -n "$cf_new_cflags" ; then
18080
18081         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18082         CFLAGS="${CFLAGS}$cf_new_cflags"
18083
18084 fi
18085
18086 if test -n "$cf_new_cppflags" ; then
18087
18088         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18089         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18090
18091 fi
18092
18093 if test -n "$cf_new_extra_cppflags" ; then
18094
18095         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18096         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18097
18098 fi
18099
18100 cat >>confdefs.h <<\EOF
18101 #define HAVE__TRACEF 1
18102 EOF
18103
18104 else
18105         LIB_TRACING=DEBUG
18106         ADA_TRACE=FALSE
18107 fi
18108
18109 echo "$as_me:18109: checking if we want to use GNAT projects" >&5
18110 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18111
18112 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18113 if test "${enable_gnat_projects+set}" = set; then
18114   enableval="$enable_gnat_projects"
18115   test "$enableval" != no && enableval=yes
18116         if test "$enableval" != "yes" ; then
18117     enable_gnat_projects=no
18118         else
18119                 enable_gnat_projects=yes
18120         fi
18121 else
18122   enableval=yes
18123         enable_gnat_projects=yes
18124
18125 fi;
18126 echo "$as_me:18126: result: $enable_gnat_projects" >&5
18127 echo "${ECHO_T}$enable_gnat_projects" >&6
18128
18129 ###     Checks for libraries.
18130 case $cf_cv_system_name in
18131 (*mingw32*|*mingw64*)
18132         if test "x$with_exp_win32" = xyes ; then
18133         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18134         else
18135         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18136         fi
18137         # Note: WINVER may be a problem with Windows 10
18138         ;;
18139 (*)
18140 echo "$as_me:18140: checking for gettimeofday" >&5
18141 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18142 if test "${ac_cv_func_gettimeofday+set}" = set; then
18143   echo $ECHO_N "(cached) $ECHO_C" >&6
18144 else
18145   cat >conftest.$ac_ext <<_ACEOF
18146 #line 18146 "configure"
18147 #include "confdefs.h"
18148 #define gettimeofday autoconf_temporary
18149 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18150 #undef gettimeofday
18151
18152 #ifdef __cplusplus
18153 extern "C"
18154 #endif
18155
18156 /* We use char because int might match the return type of a gcc2
18157    builtin and then its argument prototype would still apply.  */
18158 char gettimeofday (void);
18159
18160 int
18161 main (void)
18162 {
18163
18164 /* The GNU C library defines stubs for functions which it implements
18165     to always fail with ENOSYS.  Some functions are actually named
18166     something starting with __ and the normal name is an alias.  */
18167 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18168 #error found stub for gettimeofday
18169 #endif
18170
18171         return gettimeofday ();
18172   ;
18173   return 0;
18174 }
18175 _ACEOF
18176 rm -f conftest.$ac_objext conftest$ac_exeext
18177 if { (eval echo "$as_me:18177: \"$ac_link\"") >&5
18178   (eval $ac_link) 2>&5
18179   ac_status=$?
18180   echo "$as_me:18180: \$? = $ac_status" >&5
18181   (exit $ac_status); } &&
18182          { ac_try='test -s conftest$ac_exeext'
18183   { (eval echo "$as_me:18183: \"$ac_try\"") >&5
18184   (eval $ac_try) 2>&5
18185   ac_status=$?
18186   echo "$as_me:18186: \$? = $ac_status" >&5
18187   (exit $ac_status); }; }; then
18188   ac_cv_func_gettimeofday=yes
18189 else
18190   echo "$as_me: failed program was:" >&5
18191 cat conftest.$ac_ext >&5
18192 ac_cv_func_gettimeofday=no
18193 fi
18194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18195 fi
18196 echo "$as_me:18196: result: $ac_cv_func_gettimeofday" >&5
18197 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18198 if test $ac_cv_func_gettimeofday = yes; then
18199
18200 cat >>confdefs.h <<\EOF
18201 #define HAVE_GETTIMEOFDAY 1
18202 EOF
18203
18204 else
18205
18206 echo "$as_me:18206: checking for gettimeofday in -lbsd" >&5
18207 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18208 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18209   echo $ECHO_N "(cached) $ECHO_C" >&6
18210 else
18211   ac_check_lib_save_LIBS=$LIBS
18212 LIBS="-lbsd  $LIBS"
18213 cat >conftest.$ac_ext <<_ACEOF
18214 #line 18214 "configure"
18215 #include "confdefs.h"
18216
18217 /* Override any gcc2 internal prototype to avoid an error.  */
18218 #ifdef __cplusplus
18219 extern "C"
18220 #endif
18221 /* We use char because int might match the return type of a gcc2
18222    builtin and then its argument prototype would still apply.  */
18223 char gettimeofday ();
18224 int
18225 main (void)
18226 {
18227 gettimeofday ();
18228   ;
18229   return 0;
18230 }
18231 _ACEOF
18232 rm -f conftest.$ac_objext conftest$ac_exeext
18233 if { (eval echo "$as_me:18233: \"$ac_link\"") >&5
18234   (eval $ac_link) 2>&5
18235   ac_status=$?
18236   echo "$as_me:18236: \$? = $ac_status" >&5
18237   (exit $ac_status); } &&
18238          { ac_try='test -s conftest$ac_exeext'
18239   { (eval echo "$as_me:18239: \"$ac_try\"") >&5
18240   (eval $ac_try) 2>&5
18241   ac_status=$?
18242   echo "$as_me:18242: \$? = $ac_status" >&5
18243   (exit $ac_status); }; }; then
18244   ac_cv_lib_bsd_gettimeofday=yes
18245 else
18246   echo "$as_me: failed program was:" >&5
18247 cat conftest.$ac_ext >&5
18248 ac_cv_lib_bsd_gettimeofday=no
18249 fi
18250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18251 LIBS=$ac_check_lib_save_LIBS
18252 fi
18253 echo "$as_me:18253: result: $ac_cv_lib_bsd_gettimeofday" >&5
18254 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18255 if test $ac_cv_lib_bsd_gettimeofday = yes; then
18256
18257 cat >>confdefs.h <<\EOF
18258 #define HAVE_GETTIMEOFDAY 1
18259 EOF
18260
18261 cf_add_libs="$LIBS"
18262 # reverse order
18263 cf_add_0lib=
18264 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18265 # filter duplicates
18266 for cf_add_1lib in $cf_add_0lib; do
18267         for cf_add_2lib in $cf_add_libs; do
18268                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18269                         cf_add_1lib=
18270                         break
18271                 fi
18272         done
18273         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18274 done
18275 LIBS="$cf_add_libs"
18276
18277 fi
18278
18279 fi
18280         ;;
18281 esac
18282
18283 echo "$as_me:18283: checking if -lm needed for math functions" >&5
18284 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18285 if test "${cf_cv_need_libm+set}" = set; then
18286   echo $ECHO_N "(cached) $ECHO_C" >&6
18287 else
18288
18289         cat >conftest.$ac_ext <<_ACEOF
18290 #line 18290 "configure"
18291 #include "confdefs.h"
18292
18293         #include <stdio.h>
18294         #include <stdlib.h>
18295         #include <math.h>
18296
18297 int
18298 main (void)
18299 {
18300 double x = rand(); printf("result = %g\n", pow(sin(x),x))
18301   ;
18302   return 0;
18303 }
18304 _ACEOF
18305 rm -f conftest.$ac_objext conftest$ac_exeext
18306 if { (eval echo "$as_me:18306: \"$ac_link\"") >&5
18307   (eval $ac_link) 2>&5
18308   ac_status=$?
18309   echo "$as_me:18309: \$? = $ac_status" >&5
18310   (exit $ac_status); } &&
18311          { ac_try='test -s conftest$ac_exeext'
18312   { (eval echo "$as_me:18312: \"$ac_try\"") >&5
18313   (eval $ac_try) 2>&5
18314   ac_status=$?
18315   echo "$as_me:18315: \$? = $ac_status" >&5
18316   (exit $ac_status); }; }; then
18317   cf_cv_need_libm=no
18318 else
18319   echo "$as_me: failed program was:" >&5
18320 cat conftest.$ac_ext >&5
18321 cf_cv_need_libm=yes
18322 fi
18323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18324 fi
18325 echo "$as_me:18325: result: $cf_cv_need_libm" >&5
18326 echo "${ECHO_T}$cf_cv_need_libm" >&6
18327 if test "$cf_cv_need_libm" = yes
18328 then
18329 MATH_LIB=-lm
18330 fi
18331
18332 ###     Checks for header files.
18333 echo "$as_me:18333: checking for ANSI C header files" >&5
18334 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18335 if test "${ac_cv_header_stdc+set}" = set; then
18336   echo $ECHO_N "(cached) $ECHO_C" >&6
18337 else
18338   cat >conftest.$ac_ext <<_ACEOF
18339 #line 18339 "configure"
18340 #include "confdefs.h"
18341 #include <stdlib.h>
18342 #include <stdarg.h>
18343 #include <string.h>
18344 #include <float.h>
18345
18346 _ACEOF
18347 if { (eval echo "$as_me:18347: \"$ac_cpp conftest.$ac_ext\"") >&5
18348   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18349   ac_status=$?
18350   egrep -v '^ *\+' conftest.er1 >conftest.err
18351   rm -f conftest.er1
18352   cat conftest.err >&5
18353   echo "$as_me:18353: \$? = $ac_status" >&5
18354   (exit $ac_status); } >/dev/null; then
18355   if test -s conftest.err; then
18356     ac_cpp_err=$ac_c_preproc_warn_flag
18357   else
18358     ac_cpp_err=
18359   fi
18360 else
18361   ac_cpp_err=yes
18362 fi
18363 if test -z "$ac_cpp_err"; then
18364   ac_cv_header_stdc=yes
18365 else
18366   echo "$as_me: failed program was:" >&5
18367   cat conftest.$ac_ext >&5
18368   ac_cv_header_stdc=no
18369 fi
18370 rm -f conftest.err conftest.$ac_ext
18371
18372 if test $ac_cv_header_stdc = yes; then
18373   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18374   cat >conftest.$ac_ext <<_ACEOF
18375 #line 18375 "configure"
18376 #include "confdefs.h"
18377 #include <string.h>
18378
18379 _ACEOF
18380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18381   egrep "memchr" >/dev/null 2>&1; then
18382   :
18383 else
18384   ac_cv_header_stdc=no
18385 fi
18386 rm -rf conftest*
18387
18388 fi
18389
18390 if test $ac_cv_header_stdc = yes; then
18391   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18392   cat >conftest.$ac_ext <<_ACEOF
18393 #line 18393 "configure"
18394 #include "confdefs.h"
18395 #include <stdlib.h>
18396
18397 _ACEOF
18398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18399   egrep "free" >/dev/null 2>&1; then
18400   :
18401 else
18402   ac_cv_header_stdc=no
18403 fi
18404 rm -rf conftest*
18405
18406 fi
18407
18408 if test $ac_cv_header_stdc = yes; then
18409   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18410   if test "$cross_compiling" = yes; then
18411   :
18412 else
18413   cat >conftest.$ac_ext <<_ACEOF
18414 #line 18414 "configure"
18415 #include "confdefs.h"
18416 #include <ctype.h>
18417 #if ((' ' & 0x0FF) == 0x020)
18418 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18419 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18420 #else
18421 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18422                      || ('j' <= (c) && (c) <= 'r') \
18423                      || ('s' <= (c) && (c) <= 'z'))
18424 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18425 #endif
18426
18427 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18428 int
18429 main (void)
18430 {
18431   int i;
18432   for (i = 0; i < 256; i++)
18433     if (XOR (islower (i), ISLOWER (i))
18434         || toupper (i) != TOUPPER (i))
18435       $ac_main_return(2);
18436   $ac_main_return (0);
18437 }
18438 _ACEOF
18439 rm -f 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); } && { ac_try='./conftest$ac_exeext'
18445   { (eval echo "$as_me:18445: \"$ac_try\"") >&5
18446   (eval $ac_try) 2>&5
18447   ac_status=$?
18448   echo "$as_me:18448: \$? = $ac_status" >&5
18449   (exit $ac_status); }; }; then
18450   :
18451 else
18452   echo "$as_me: program exited with status $ac_status" >&5
18453 echo "$as_me: failed program was:" >&5
18454 cat conftest.$ac_ext >&5
18455 ac_cv_header_stdc=no
18456 fi
18457 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18458 fi
18459 fi
18460 fi
18461 echo "$as_me:18461: result: $ac_cv_header_stdc" >&5
18462 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18463 if test $ac_cv_header_stdc = yes; then
18464
18465 cat >>confdefs.h <<\EOF
18466 #define STDC_HEADERS 1
18467 EOF
18468
18469 fi
18470
18471 ac_header_dirent=no
18472 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18473   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18474 echo "$as_me:18474: checking for $ac_hdr that defines DIR" >&5
18475 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18476 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18477   echo $ECHO_N "(cached) $ECHO_C" >&6
18478 else
18479   cat >conftest.$ac_ext <<_ACEOF
18480 #line 18480 "configure"
18481 #include "confdefs.h"
18482 #include <sys/types.h>
18483 #include <$ac_hdr>
18484
18485 int
18486 main (void)
18487 {
18488 if ((DIR *) 0)
18489 return 0;
18490   ;
18491   return 0;
18492 }
18493 _ACEOF
18494 rm -f conftest.$ac_objext
18495 if { (eval echo "$as_me:18495: \"$ac_compile\"") >&5
18496   (eval $ac_compile) 2>&5
18497   ac_status=$?
18498   echo "$as_me:18498: \$? = $ac_status" >&5
18499   (exit $ac_status); } &&
18500          { ac_try='test -s conftest.$ac_objext'
18501   { (eval echo "$as_me:18501: \"$ac_try\"") >&5
18502   (eval $ac_try) 2>&5
18503   ac_status=$?
18504   echo "$as_me:18504: \$? = $ac_status" >&5
18505   (exit $ac_status); }; }; then
18506   eval "$as_ac_Header=yes"
18507 else
18508   echo "$as_me: failed program was:" >&5
18509 cat conftest.$ac_ext >&5
18510 eval "$as_ac_Header=no"
18511 fi
18512 rm -f conftest.$ac_objext conftest.$ac_ext
18513 fi
18514 echo "$as_me:18514: result: `eval echo '${'$as_ac_Header'}'`" >&5
18515 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18516 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18517   cat >>confdefs.h <<EOF
18518 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18519 EOF
18520
18521 ac_header_dirent=$ac_hdr; break
18522 fi
18523
18524 done
18525 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18526 if test $ac_header_dirent = dirent.h; then
18527   echo "$as_me:18527: checking for opendir in -ldir" >&5
18528 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18529 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18530   echo $ECHO_N "(cached) $ECHO_C" >&6
18531 else
18532   ac_check_lib_save_LIBS=$LIBS
18533 LIBS="-ldir  $LIBS"
18534 cat >conftest.$ac_ext <<_ACEOF
18535 #line 18535 "configure"
18536 #include "confdefs.h"
18537
18538 /* Override any gcc2 internal prototype to avoid an error.  */
18539 #ifdef __cplusplus
18540 extern "C"
18541 #endif
18542 /* We use char because int might match the return type of a gcc2
18543    builtin and then its argument prototype would still apply.  */
18544 char opendir ();
18545 int
18546 main (void)
18547 {
18548 opendir ();
18549   ;
18550   return 0;
18551 }
18552 _ACEOF
18553 rm -f conftest.$ac_objext conftest$ac_exeext
18554 if { (eval echo "$as_me:18554: \"$ac_link\"") >&5
18555   (eval $ac_link) 2>&5
18556   ac_status=$?
18557   echo "$as_me:18557: \$? = $ac_status" >&5
18558   (exit $ac_status); } &&
18559          { ac_try='test -s conftest$ac_exeext'
18560   { (eval echo "$as_me:18560: \"$ac_try\"") >&5
18561   (eval $ac_try) 2>&5
18562   ac_status=$?
18563   echo "$as_me:18563: \$? = $ac_status" >&5
18564   (exit $ac_status); }; }; then
18565   ac_cv_lib_dir_opendir=yes
18566 else
18567   echo "$as_me: failed program was:" >&5
18568 cat conftest.$ac_ext >&5
18569 ac_cv_lib_dir_opendir=no
18570 fi
18571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18572 LIBS=$ac_check_lib_save_LIBS
18573 fi
18574 echo "$as_me:18574: result: $ac_cv_lib_dir_opendir" >&5
18575 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18576 if test $ac_cv_lib_dir_opendir = yes; then
18577   LIBS="$LIBS -ldir"
18578 fi
18579
18580 else
18581   echo "$as_me:18581: checking for opendir in -lx" >&5
18582 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18583 if test "${ac_cv_lib_x_opendir+set}" = set; then
18584   echo $ECHO_N "(cached) $ECHO_C" >&6
18585 else
18586   ac_check_lib_save_LIBS=$LIBS
18587 LIBS="-lx  $LIBS"
18588 cat >conftest.$ac_ext <<_ACEOF
18589 #line 18589 "configure"
18590 #include "confdefs.h"
18591
18592 /* Override any gcc2 internal prototype to avoid an error.  */
18593 #ifdef __cplusplus
18594 extern "C"
18595 #endif
18596 /* We use char because int might match the return type of a gcc2
18597    builtin and then its argument prototype would still apply.  */
18598 char opendir ();
18599 int
18600 main (void)
18601 {
18602 opendir ();
18603   ;
18604   return 0;
18605 }
18606 _ACEOF
18607 rm -f conftest.$ac_objext conftest$ac_exeext
18608 if { (eval echo "$as_me:18608: \"$ac_link\"") >&5
18609   (eval $ac_link) 2>&5
18610   ac_status=$?
18611   echo "$as_me:18611: \$? = $ac_status" >&5
18612   (exit $ac_status); } &&
18613          { ac_try='test -s conftest$ac_exeext'
18614   { (eval echo "$as_me:18614: \"$ac_try\"") >&5
18615   (eval $ac_try) 2>&5
18616   ac_status=$?
18617   echo "$as_me:18617: \$? = $ac_status" >&5
18618   (exit $ac_status); }; }; then
18619   ac_cv_lib_x_opendir=yes
18620 else
18621   echo "$as_me: failed program was:" >&5
18622 cat conftest.$ac_ext >&5
18623 ac_cv_lib_x_opendir=no
18624 fi
18625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18626 LIBS=$ac_check_lib_save_LIBS
18627 fi
18628 echo "$as_me:18628: result: $ac_cv_lib_x_opendir" >&5
18629 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18630 if test $ac_cv_lib_x_opendir = yes; then
18631   LIBS="$LIBS -lx"
18632 fi
18633
18634 fi
18635
18636 echo "$as_me:18636: checking whether time.h and sys/time.h may both be included" >&5
18637 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18638 if test "${ac_cv_header_time+set}" = set; then
18639   echo $ECHO_N "(cached) $ECHO_C" >&6
18640 else
18641   cat >conftest.$ac_ext <<_ACEOF
18642 #line 18642 "configure"
18643 #include "confdefs.h"
18644 #include <sys/types.h>
18645 #include <sys/time.h>
18646 #include <time.h>
18647
18648 int
18649 main (void)
18650 {
18651 if ((struct tm *) 0)
18652 return 0;
18653   ;
18654   return 0;
18655 }
18656 _ACEOF
18657 rm -f conftest.$ac_objext
18658 if { (eval echo "$as_me:18658: \"$ac_compile\"") >&5
18659   (eval $ac_compile) 2>&5
18660   ac_status=$?
18661   echo "$as_me:18661: \$? = $ac_status" >&5
18662   (exit $ac_status); } &&
18663          { ac_try='test -s conftest.$ac_objext'
18664   { (eval echo "$as_me:18664: \"$ac_try\"") >&5
18665   (eval $ac_try) 2>&5
18666   ac_status=$?
18667   echo "$as_me:18667: \$? = $ac_status" >&5
18668   (exit $ac_status); }; }; then
18669   ac_cv_header_time=yes
18670 else
18671   echo "$as_me: failed program was:" >&5
18672 cat conftest.$ac_ext >&5
18673 ac_cv_header_time=no
18674 fi
18675 rm -f conftest.$ac_objext conftest.$ac_ext
18676 fi
18677 echo "$as_me:18677: result: $ac_cv_header_time" >&5
18678 echo "${ECHO_T}$ac_cv_header_time" >&6
18679 if test $ac_cv_header_time = yes; then
18680
18681 cat >>confdefs.h <<\EOF
18682 #define TIME_WITH_SYS_TIME 1
18683 EOF
18684
18685 fi
18686
18687 cf_regex_func=no
18688 cf_regex_libs=
18689 case $host_os in
18690 (mingw*)
18691         # -lsystre -ltre -lintl -liconv
18692         echo "$as_me:18692: checking for regcomp in -lsystre" >&5
18693 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18694 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18695   echo $ECHO_N "(cached) $ECHO_C" >&6
18696 else
18697   ac_check_lib_save_LIBS=$LIBS
18698 LIBS="-lsystre  $LIBS"
18699 cat >conftest.$ac_ext <<_ACEOF
18700 #line 18700 "configure"
18701 #include "confdefs.h"
18702
18703 /* Override any gcc2 internal prototype to avoid an error.  */
18704 #ifdef __cplusplus
18705 extern "C"
18706 #endif
18707 /* We use char because int might match the return type of a gcc2
18708    builtin and then its argument prototype would still apply.  */
18709 char regcomp ();
18710 int
18711 main (void)
18712 {
18713 regcomp ();
18714   ;
18715   return 0;
18716 }
18717 _ACEOF
18718 rm -f conftest.$ac_objext conftest$ac_exeext
18719 if { (eval echo "$as_me:18719: \"$ac_link\"") >&5
18720   (eval $ac_link) 2>&5
18721   ac_status=$?
18722   echo "$as_me:18722: \$? = $ac_status" >&5
18723   (exit $ac_status); } &&
18724          { ac_try='test -s conftest$ac_exeext'
18725   { (eval echo "$as_me:18725: \"$ac_try\"") >&5
18726   (eval $ac_try) 2>&5
18727   ac_status=$?
18728   echo "$as_me:18728: \$? = $ac_status" >&5
18729   (exit $ac_status); }; }; then
18730   ac_cv_lib_systre_regcomp=yes
18731 else
18732   echo "$as_me: failed program was:" >&5
18733 cat conftest.$ac_ext >&5
18734 ac_cv_lib_systre_regcomp=no
18735 fi
18736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18737 LIBS=$ac_check_lib_save_LIBS
18738 fi
18739 echo "$as_me:18739: result: $ac_cv_lib_systre_regcomp" >&5
18740 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18741 if test $ac_cv_lib_systre_regcomp = yes; then
18742
18743                 echo "$as_me:18743: checking for libiconv_open in -liconv" >&5
18744 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18745 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18746   echo $ECHO_N "(cached) $ECHO_C" >&6
18747 else
18748   ac_check_lib_save_LIBS=$LIBS
18749 LIBS="-liconv  $LIBS"
18750 cat >conftest.$ac_ext <<_ACEOF
18751 #line 18751 "configure"
18752 #include "confdefs.h"
18753
18754 /* Override any gcc2 internal prototype to avoid an error.  */
18755 #ifdef __cplusplus
18756 extern "C"
18757 #endif
18758 /* We use char because int might match the return type of a gcc2
18759    builtin and then its argument prototype would still apply.  */
18760 char libiconv_open ();
18761 int
18762 main (void)
18763 {
18764 libiconv_open ();
18765   ;
18766   return 0;
18767 }
18768 _ACEOF
18769 rm -f conftest.$ac_objext conftest$ac_exeext
18770 if { (eval echo "$as_me:18770: \"$ac_link\"") >&5
18771   (eval $ac_link) 2>&5
18772   ac_status=$?
18773   echo "$as_me:18773: \$? = $ac_status" >&5
18774   (exit $ac_status); } &&
18775          { ac_try='test -s conftest$ac_exeext'
18776   { (eval echo "$as_me:18776: \"$ac_try\"") >&5
18777   (eval $ac_try) 2>&5
18778   ac_status=$?
18779   echo "$as_me:18779: \$? = $ac_status" >&5
18780   (exit $ac_status); }; }; then
18781   ac_cv_lib_iconv_libiconv_open=yes
18782 else
18783   echo "$as_me: failed program was:" >&5
18784 cat conftest.$ac_ext >&5
18785 ac_cv_lib_iconv_libiconv_open=no
18786 fi
18787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18788 LIBS=$ac_check_lib_save_LIBS
18789 fi
18790 echo "$as_me:18790: result: $ac_cv_lib_iconv_libiconv_open" >&5
18791 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18792 if test $ac_cv_lib_iconv_libiconv_open = yes; then
18793
18794 cf_add_libs="$LIBS"
18795 # reverse order
18796 cf_add_0lib=
18797 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18798 # filter duplicates
18799 for cf_add_1lib in $cf_add_0lib; do
18800         for cf_add_2lib in $cf_add_libs; do
18801                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18802                         cf_add_1lib=
18803                         break
18804                 fi
18805         done
18806         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18807 done
18808 LIBS="$cf_add_libs"
18809
18810 fi
18811
18812                 echo "$as_me:18812: checking for libintl_gettext in -lintl" >&5
18813 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18814 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18815   echo $ECHO_N "(cached) $ECHO_C" >&6
18816 else
18817   ac_check_lib_save_LIBS=$LIBS
18818 LIBS="-lintl  $LIBS"
18819 cat >conftest.$ac_ext <<_ACEOF
18820 #line 18820 "configure"
18821 #include "confdefs.h"
18822
18823 /* Override any gcc2 internal prototype to avoid an error.  */
18824 #ifdef __cplusplus
18825 extern "C"
18826 #endif
18827 /* We use char because int might match the return type of a gcc2
18828    builtin and then its argument prototype would still apply.  */
18829 char libintl_gettext ();
18830 int
18831 main (void)
18832 {
18833 libintl_gettext ();
18834   ;
18835   return 0;
18836 }
18837 _ACEOF
18838 rm -f conftest.$ac_objext conftest$ac_exeext
18839 if { (eval echo "$as_me:18839: \"$ac_link\"") >&5
18840   (eval $ac_link) 2>&5
18841   ac_status=$?
18842   echo "$as_me:18842: \$? = $ac_status" >&5
18843   (exit $ac_status); } &&
18844          { ac_try='test -s conftest$ac_exeext'
18845   { (eval echo "$as_me:18845: \"$ac_try\"") >&5
18846   (eval $ac_try) 2>&5
18847   ac_status=$?
18848   echo "$as_me:18848: \$? = $ac_status" >&5
18849   (exit $ac_status); }; }; then
18850   ac_cv_lib_intl_libintl_gettext=yes
18851 else
18852   echo "$as_me: failed program was:" >&5
18853 cat conftest.$ac_ext >&5
18854 ac_cv_lib_intl_libintl_gettext=no
18855 fi
18856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18857 LIBS=$ac_check_lib_save_LIBS
18858 fi
18859 echo "$as_me:18859: result: $ac_cv_lib_intl_libintl_gettext" >&5
18860 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18861 if test $ac_cv_lib_intl_libintl_gettext = yes; then
18862
18863 cf_add_libs="$LIBS"
18864 # reverse order
18865 cf_add_0lib=
18866 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18867 # filter duplicates
18868 for cf_add_1lib in $cf_add_0lib; do
18869         for cf_add_2lib in $cf_add_libs; do
18870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18871                         cf_add_1lib=
18872                         break
18873                 fi
18874         done
18875         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18876 done
18877 LIBS="$cf_add_libs"
18878
18879 fi
18880
18881                 echo "$as_me:18881: checking for tre_regcomp in -ltre" >&5
18882 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
18883 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
18884   echo $ECHO_N "(cached) $ECHO_C" >&6
18885 else
18886   ac_check_lib_save_LIBS=$LIBS
18887 LIBS="-ltre  $LIBS"
18888 cat >conftest.$ac_ext <<_ACEOF
18889 #line 18889 "configure"
18890 #include "confdefs.h"
18891
18892 /* Override any gcc2 internal prototype to avoid an error.  */
18893 #ifdef __cplusplus
18894 extern "C"
18895 #endif
18896 /* We use char because int might match the return type of a gcc2
18897    builtin and then its argument prototype would still apply.  */
18898 char tre_regcomp ();
18899 int
18900 main (void)
18901 {
18902 tre_regcomp ();
18903   ;
18904   return 0;
18905 }
18906 _ACEOF
18907 rm -f conftest.$ac_objext conftest$ac_exeext
18908 if { (eval echo "$as_me:18908: \"$ac_link\"") >&5
18909   (eval $ac_link) 2>&5
18910   ac_status=$?
18911   echo "$as_me:18911: \$? = $ac_status" >&5
18912   (exit $ac_status); } &&
18913          { ac_try='test -s conftest$ac_exeext'
18914   { (eval echo "$as_me:18914: \"$ac_try\"") >&5
18915   (eval $ac_try) 2>&5
18916   ac_status=$?
18917   echo "$as_me:18917: \$? = $ac_status" >&5
18918   (exit $ac_status); }; }; then
18919   ac_cv_lib_tre_tre_regcomp=yes
18920 else
18921   echo "$as_me: failed program was:" >&5
18922 cat conftest.$ac_ext >&5
18923 ac_cv_lib_tre_tre_regcomp=no
18924 fi
18925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18926 LIBS=$ac_check_lib_save_LIBS
18927 fi
18928 echo "$as_me:18928: result: $ac_cv_lib_tre_tre_regcomp" >&5
18929 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
18930 if test $ac_cv_lib_tre_tre_regcomp = yes; then
18931
18932 cf_add_libs="$LIBS"
18933 # reverse order
18934 cf_add_0lib=
18935 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18936 # filter duplicates
18937 for cf_add_1lib in $cf_add_0lib; do
18938         for cf_add_2lib in $cf_add_libs; do
18939                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18940                         cf_add_1lib=
18941                         break
18942                 fi
18943         done
18944         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18945 done
18946 LIBS="$cf_add_libs"
18947
18948 fi
18949
18950 cf_add_libs="$LIBS"
18951 # reverse order
18952 cf_add_0lib=
18953 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18954 # filter duplicates
18955 for cf_add_1lib in $cf_add_0lib; do
18956         for cf_add_2lib in $cf_add_libs; do
18957                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18958                         cf_add_1lib=
18959                         break
18960                 fi
18961         done
18962         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18963 done
18964 LIBS="$cf_add_libs"
18965
18966                 cf_regex_func=regcomp
18967
18968 else
18969
18970                 echo "$as_me:18970: checking for regcomp in -lgnurx" >&5
18971 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
18972 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
18973   echo $ECHO_N "(cached) $ECHO_C" >&6
18974 else
18975   ac_check_lib_save_LIBS=$LIBS
18976 LIBS="-lgnurx  $LIBS"
18977 cat >conftest.$ac_ext <<_ACEOF
18978 #line 18978 "configure"
18979 #include "confdefs.h"
18980
18981 /* Override any gcc2 internal prototype to avoid an error.  */
18982 #ifdef __cplusplus
18983 extern "C"
18984 #endif
18985 /* We use char because int might match the return type of a gcc2
18986    builtin and then its argument prototype would still apply.  */
18987 char regcomp ();
18988 int
18989 main (void)
18990 {
18991 regcomp ();
18992   ;
18993   return 0;
18994 }
18995 _ACEOF
18996 rm -f conftest.$ac_objext conftest$ac_exeext
18997 if { (eval echo "$as_me:18997: \"$ac_link\"") >&5
18998   (eval $ac_link) 2>&5
18999   ac_status=$?
19000   echo "$as_me:19000: \$? = $ac_status" >&5
19001   (exit $ac_status); } &&
19002          { ac_try='test -s conftest$ac_exeext'
19003   { (eval echo "$as_me:19003: \"$ac_try\"") >&5
19004   (eval $ac_try) 2>&5
19005   ac_status=$?
19006   echo "$as_me:19006: \$? = $ac_status" >&5
19007   (exit $ac_status); }; }; then
19008   ac_cv_lib_gnurx_regcomp=yes
19009 else
19010   echo "$as_me: failed program was:" >&5
19011 cat conftest.$ac_ext >&5
19012 ac_cv_lib_gnurx_regcomp=no
19013 fi
19014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19015 LIBS=$ac_check_lib_save_LIBS
19016 fi
19017 echo "$as_me:19017: result: $ac_cv_lib_gnurx_regcomp" >&5
19018 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19019 if test $ac_cv_lib_gnurx_regcomp = yes; then
19020
19021 cf_add_libs="$LIBS"
19022 # reverse order
19023 cf_add_0lib=
19024 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19025 # filter duplicates
19026 for cf_add_1lib in $cf_add_0lib; do
19027         for cf_add_2lib in $cf_add_libs; do
19028                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19029                         cf_add_1lib=
19030                         break
19031                 fi
19032         done
19033         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19034 done
19035 LIBS="$cf_add_libs"
19036
19037                         cf_regex_func=regcomp
19038 fi
19039
19040 fi
19041
19042         ;;
19043 (*)
19044         cf_regex_libs="regex re"
19045         echo "$as_me:19045: checking for regcomp" >&5
19046 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19047 if test "${ac_cv_func_regcomp+set}" = set; then
19048   echo $ECHO_N "(cached) $ECHO_C" >&6
19049 else
19050   cat >conftest.$ac_ext <<_ACEOF
19051 #line 19051 "configure"
19052 #include "confdefs.h"
19053 #define regcomp autoconf_temporary
19054 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19055 #undef regcomp
19056
19057 #ifdef __cplusplus
19058 extern "C"
19059 #endif
19060
19061 /* We use char because int might match the return type of a gcc2
19062    builtin and then its argument prototype would still apply.  */
19063 char regcomp (void);
19064
19065 int
19066 main (void)
19067 {
19068
19069 /* The GNU C library defines stubs for functions which it implements
19070     to always fail with ENOSYS.  Some functions are actually named
19071     something starting with __ and the normal name is an alias.  */
19072 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19073 #error found stub for regcomp
19074 #endif
19075
19076         return regcomp ();
19077   ;
19078   return 0;
19079 }
19080 _ACEOF
19081 rm -f conftest.$ac_objext conftest$ac_exeext
19082 if { (eval echo "$as_me:19082: \"$ac_link\"") >&5
19083   (eval $ac_link) 2>&5
19084   ac_status=$?
19085   echo "$as_me:19085: \$? = $ac_status" >&5
19086   (exit $ac_status); } &&
19087          { ac_try='test -s conftest$ac_exeext'
19088   { (eval echo "$as_me:19088: \"$ac_try\"") >&5
19089   (eval $ac_try) 2>&5
19090   ac_status=$?
19091   echo "$as_me:19091: \$? = $ac_status" >&5
19092   (exit $ac_status); }; }; then
19093   ac_cv_func_regcomp=yes
19094 else
19095   echo "$as_me: failed program was:" >&5
19096 cat conftest.$ac_ext >&5
19097 ac_cv_func_regcomp=no
19098 fi
19099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19100 fi
19101 echo "$as_me:19101: result: $ac_cv_func_regcomp" >&5
19102 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19103 if test $ac_cv_func_regcomp = yes; then
19104   cf_regex_func=regcomp
19105 else
19106
19107                 for cf_regex_lib in $cf_regex_libs
19108                 do
19109                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19110 echo "$as_me:19110: checking for regcomp in -l$cf_regex_lib" >&5
19111 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19112 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19113   echo $ECHO_N "(cached) $ECHO_C" >&6
19114 else
19115   ac_check_lib_save_LIBS=$LIBS
19116 LIBS="-l$cf_regex_lib  $LIBS"
19117 cat >conftest.$ac_ext <<_ACEOF
19118 #line 19118 "configure"
19119 #include "confdefs.h"
19120
19121 /* Override any gcc2 internal prototype to avoid an error.  */
19122 #ifdef __cplusplus
19123 extern "C"
19124 #endif
19125 /* We use char because int might match the return type of a gcc2
19126    builtin and then its argument prototype would still apply.  */
19127 char regcomp ();
19128 int
19129 main (void)
19130 {
19131 regcomp ();
19132   ;
19133   return 0;
19134 }
19135 _ACEOF
19136 rm -f conftest.$ac_objext conftest$ac_exeext
19137 if { (eval echo "$as_me:19137: \"$ac_link\"") >&5
19138   (eval $ac_link) 2>&5
19139   ac_status=$?
19140   echo "$as_me:19140: \$? = $ac_status" >&5
19141   (exit $ac_status); } &&
19142          { ac_try='test -s conftest$ac_exeext'
19143   { (eval echo "$as_me:19143: \"$ac_try\"") >&5
19144   (eval $ac_try) 2>&5
19145   ac_status=$?
19146   echo "$as_me:19146: \$? = $ac_status" >&5
19147   (exit $ac_status); }; }; then
19148   eval "$as_ac_Lib=yes"
19149 else
19150   echo "$as_me: failed program was:" >&5
19151 cat conftest.$ac_ext >&5
19152 eval "$as_ac_Lib=no"
19153 fi
19154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19155 LIBS=$ac_check_lib_save_LIBS
19156 fi
19157 echo "$as_me:19157: result: `eval echo '${'$as_ac_Lib'}'`" >&5
19158 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
19159 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
19160
19161 cf_add_libs="$LIBS"
19162 # reverse order
19163 cf_add_0lib=
19164 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19165 # filter duplicates
19166 for cf_add_1lib in $cf_add_0lib; do
19167         for cf_add_2lib in $cf_add_libs; do
19168                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19169                         cf_add_1lib=
19170                         break
19171                 fi
19172         done
19173         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19174 done
19175 LIBS="$cf_add_libs"
19176
19177                                         cf_regex_func=regcomp
19178                                         break
19179 fi
19180
19181                 done
19182
19183 fi
19184
19185         ;;
19186 esac
19187
19188 if test "$cf_regex_func" = no ; then
19189         echo "$as_me:19189: checking for compile" >&5
19190 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19191 if test "${ac_cv_func_compile+set}" = set; then
19192   echo $ECHO_N "(cached) $ECHO_C" >&6
19193 else
19194   cat >conftest.$ac_ext <<_ACEOF
19195 #line 19195 "configure"
19196 #include "confdefs.h"
19197 #define compile autoconf_temporary
19198 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19199 #undef compile
19200
19201 #ifdef __cplusplus
19202 extern "C"
19203 #endif
19204
19205 /* We use char because int might match the return type of a gcc2
19206    builtin and then its argument prototype would still apply.  */
19207 char compile (void);
19208
19209 int
19210 main (void)
19211 {
19212
19213 /* The GNU C library defines stubs for functions which it implements
19214     to always fail with ENOSYS.  Some functions are actually named
19215     something starting with __ and the normal name is an alias.  */
19216 #if defined (__stub_compile) || defined (__stub___compile)
19217 #error found stub for compile
19218 #endif
19219
19220         return compile ();
19221   ;
19222   return 0;
19223 }
19224 _ACEOF
19225 rm -f conftest.$ac_objext conftest$ac_exeext
19226 if { (eval echo "$as_me:19226: \"$ac_link\"") >&5
19227   (eval $ac_link) 2>&5
19228   ac_status=$?
19229   echo "$as_me:19229: \$? = $ac_status" >&5
19230   (exit $ac_status); } &&
19231          { ac_try='test -s conftest$ac_exeext'
19232   { (eval echo "$as_me:19232: \"$ac_try\"") >&5
19233   (eval $ac_try) 2>&5
19234   ac_status=$?
19235   echo "$as_me:19235: \$? = $ac_status" >&5
19236   (exit $ac_status); }; }; then
19237   ac_cv_func_compile=yes
19238 else
19239   echo "$as_me: failed program was:" >&5
19240 cat conftest.$ac_ext >&5
19241 ac_cv_func_compile=no
19242 fi
19243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19244 fi
19245 echo "$as_me:19245: result: $ac_cv_func_compile" >&5
19246 echo "${ECHO_T}$ac_cv_func_compile" >&6
19247 if test $ac_cv_func_compile = yes; then
19248   cf_regex_func=compile
19249 else
19250
19251                 echo "$as_me:19251: checking for compile in -lgen" >&5
19252 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19253 if test "${ac_cv_lib_gen_compile+set}" = set; then
19254   echo $ECHO_N "(cached) $ECHO_C" >&6
19255 else
19256   ac_check_lib_save_LIBS=$LIBS
19257 LIBS="-lgen  $LIBS"
19258 cat >conftest.$ac_ext <<_ACEOF
19259 #line 19259 "configure"
19260 #include "confdefs.h"
19261
19262 /* Override any gcc2 internal prototype to avoid an error.  */
19263 #ifdef __cplusplus
19264 extern "C"
19265 #endif
19266 /* We use char because int might match the return type of a gcc2
19267    builtin and then its argument prototype would still apply.  */
19268 char compile ();
19269 int
19270 main (void)
19271 {
19272 compile ();
19273   ;
19274   return 0;
19275 }
19276 _ACEOF
19277 rm -f conftest.$ac_objext conftest$ac_exeext
19278 if { (eval echo "$as_me:19278: \"$ac_link\"") >&5
19279   (eval $ac_link) 2>&5
19280   ac_status=$?
19281   echo "$as_me:19281: \$? = $ac_status" >&5
19282   (exit $ac_status); } &&
19283          { ac_try='test -s conftest$ac_exeext'
19284   { (eval echo "$as_me:19284: \"$ac_try\"") >&5
19285   (eval $ac_try) 2>&5
19286   ac_status=$?
19287   echo "$as_me:19287: \$? = $ac_status" >&5
19288   (exit $ac_status); }; }; then
19289   ac_cv_lib_gen_compile=yes
19290 else
19291   echo "$as_me: failed program was:" >&5
19292 cat conftest.$ac_ext >&5
19293 ac_cv_lib_gen_compile=no
19294 fi
19295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19296 LIBS=$ac_check_lib_save_LIBS
19297 fi
19298 echo "$as_me:19298: result: $ac_cv_lib_gen_compile" >&5
19299 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19300 if test $ac_cv_lib_gen_compile = yes; then
19301
19302 cf_add_libs="$LIBS"
19303 # reverse order
19304 cf_add_0lib=
19305 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19306 # filter duplicates
19307 for cf_add_1lib in $cf_add_0lib; do
19308         for cf_add_2lib in $cf_add_libs; do
19309                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19310                         cf_add_1lib=
19311                         break
19312                 fi
19313         done
19314         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19315 done
19316 LIBS="$cf_add_libs"
19317
19318                                 cf_regex_func=compile
19319 fi
19320
19321 fi
19322
19323 fi
19324
19325 if test "$cf_regex_func" = no ; then
19326         { echo "$as_me:19326: WARNING: cannot find regular expression library" >&5
19327 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19328 fi
19329
19330 echo "$as_me:19330: checking for regular-expression headers" >&5
19331 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19332 if test "${cf_cv_regex_hdrs+set}" = set; then
19333   echo $ECHO_N "(cached) $ECHO_C" >&6
19334 else
19335
19336 cf_cv_regex_hdrs=no
19337 case $cf_regex_func in
19338 (compile)
19339         for cf_regex_hdr in regexp.h regexpr.h
19340         do
19341                 cat >conftest.$ac_ext <<_ACEOF
19342 #line 19342 "configure"
19343 #include "confdefs.h"
19344 #include <$cf_regex_hdr>
19345 int
19346 main (void)
19347 {
19348
19349                         char *p = compile("", "", "", 0);
19350                         int x = step("", "");
19351                         (void)p;
19352                         (void)x;
19353
19354   ;
19355   return 0;
19356 }
19357 _ACEOF
19358 rm -f conftest.$ac_objext conftest$ac_exeext
19359 if { (eval echo "$as_me:19359: \"$ac_link\"") >&5
19360   (eval $ac_link) 2>&5
19361   ac_status=$?
19362   echo "$as_me:19362: \$? = $ac_status" >&5
19363   (exit $ac_status); } &&
19364          { ac_try='test -s conftest$ac_exeext'
19365   { (eval echo "$as_me:19365: \"$ac_try\"") >&5
19366   (eval $ac_try) 2>&5
19367   ac_status=$?
19368   echo "$as_me:19368: \$? = $ac_status" >&5
19369   (exit $ac_status); }; }; then
19370
19371                         cf_cv_regex_hdrs=$cf_regex_hdr
19372                         break
19373
19374 else
19375   echo "$as_me: failed program was:" >&5
19376 cat conftest.$ac_ext >&5
19377 fi
19378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19379         done
19380         ;;
19381 (*)
19382         for cf_regex_hdr in regex.h
19383         do
19384                 cat >conftest.$ac_ext <<_ACEOF
19385 #line 19385 "configure"
19386 #include "confdefs.h"
19387 #include <sys/types.h>
19388 #include <$cf_regex_hdr>
19389 int
19390 main (void)
19391 {
19392
19393                         regex_t *p = 0;
19394                         int x = regcomp(p, "", 0);
19395                         int y = regexec(p, "", 0, 0, 0);
19396                         (void)x;
19397                         (void)y;
19398                         regfree(p);
19399
19400   ;
19401   return 0;
19402 }
19403 _ACEOF
19404 rm -f conftest.$ac_objext conftest$ac_exeext
19405 if { (eval echo "$as_me:19405: \"$ac_link\"") >&5
19406   (eval $ac_link) 2>&5
19407   ac_status=$?
19408   echo "$as_me:19408: \$? = $ac_status" >&5
19409   (exit $ac_status); } &&
19410          { ac_try='test -s conftest$ac_exeext'
19411   { (eval echo "$as_me:19411: \"$ac_try\"") >&5
19412   (eval $ac_try) 2>&5
19413   ac_status=$?
19414   echo "$as_me:19414: \$? = $ac_status" >&5
19415   (exit $ac_status); }; }; then
19416
19417                         cf_cv_regex_hdrs=$cf_regex_hdr
19418                         break
19419
19420 else
19421   echo "$as_me: failed program was:" >&5
19422 cat conftest.$ac_ext >&5
19423 fi
19424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19425         done
19426         ;;
19427 esac
19428
19429 fi
19430 echo "$as_me:19430: result: $cf_cv_regex_hdrs" >&5
19431 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19432
19433 case $cf_cv_regex_hdrs in
19434         (no)            { echo "$as_me:19434: WARNING: no regular expression header found" >&5
19435 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19436         (regex.h)
19437 cat >>confdefs.h <<\EOF
19438 #define HAVE_REGEX_H_FUNCS 1
19439 EOF
19440  ;;
19441         (regexp.h)
19442 cat >>confdefs.h <<\EOF
19443 #define HAVE_REGEXP_H_FUNCS 1
19444 EOF
19445  ;;
19446         (regexpr.h)
19447 cat >>confdefs.h <<\EOF
19448 #define HAVE_REGEXPR_H_FUNCS 1
19449 EOF
19450  ;;
19451 esac
19452
19453 for ac_header in \
19454 fcntl.h \
19455 getopt.h \
19456 limits.h \
19457 locale.h \
19458 math.h \
19459 poll.h \
19460 sys/ioctl.h \
19461 sys/param.h \
19462 sys/poll.h \
19463 sys/select.h \
19464 sys/time.h \
19465 sys/times.h \
19466 ttyent.h \
19467 unistd.h \
19468 wctype.h \
19469
19470 do
19471 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19472 echo "$as_me:19472: checking for $ac_header" >&5
19473 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19474 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19475   echo $ECHO_N "(cached) $ECHO_C" >&6
19476 else
19477   cat >conftest.$ac_ext <<_ACEOF
19478 #line 19478 "configure"
19479 #include "confdefs.h"
19480 #include <$ac_header>
19481 _ACEOF
19482 if { (eval echo "$as_me:19482: \"$ac_cpp conftest.$ac_ext\"") >&5
19483   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19484   ac_status=$?
19485   egrep -v '^ *\+' conftest.er1 >conftest.err
19486   rm -f conftest.er1
19487   cat conftest.err >&5
19488   echo "$as_me:19488: \$? = $ac_status" >&5
19489   (exit $ac_status); } >/dev/null; then
19490   if test -s conftest.err; then
19491     ac_cpp_err=$ac_c_preproc_warn_flag
19492   else
19493     ac_cpp_err=
19494   fi
19495 else
19496   ac_cpp_err=yes
19497 fi
19498 if test -z "$ac_cpp_err"; then
19499   eval "$as_ac_Header=yes"
19500 else
19501   echo "$as_me: failed program was:" >&5
19502   cat conftest.$ac_ext >&5
19503   eval "$as_ac_Header=no"
19504 fi
19505 rm -f conftest.err conftest.$ac_ext
19506 fi
19507 echo "$as_me:19507: result: `eval echo '${'$as_ac_Header'}'`" >&5
19508 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19509 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19510   cat >>confdefs.h <<EOF
19511 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19512 EOF
19513
19514 fi
19515 done
19516
19517 for ac_header in unistd.h getopt.h
19518 do
19519 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19520 echo "$as_me:19520: checking for $ac_header" >&5
19521 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19522 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19523   echo $ECHO_N "(cached) $ECHO_C" >&6
19524 else
19525   cat >conftest.$ac_ext <<_ACEOF
19526 #line 19526 "configure"
19527 #include "confdefs.h"
19528 #include <$ac_header>
19529 _ACEOF
19530 if { (eval echo "$as_me:19530: \"$ac_cpp conftest.$ac_ext\"") >&5
19531   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19532   ac_status=$?
19533   egrep -v '^ *\+' conftest.er1 >conftest.err
19534   rm -f conftest.er1
19535   cat conftest.err >&5
19536   echo "$as_me:19536: \$? = $ac_status" >&5
19537   (exit $ac_status); } >/dev/null; then
19538   if test -s conftest.err; then
19539     ac_cpp_err=$ac_c_preproc_warn_flag
19540   else
19541     ac_cpp_err=
19542   fi
19543 else
19544   ac_cpp_err=yes
19545 fi
19546 if test -z "$ac_cpp_err"; then
19547   eval "$as_ac_Header=yes"
19548 else
19549   echo "$as_me: failed program was:" >&5
19550   cat conftest.$ac_ext >&5
19551   eval "$as_ac_Header=no"
19552 fi
19553 rm -f conftest.err conftest.$ac_ext
19554 fi
19555 echo "$as_me:19555: result: `eval echo '${'$as_ac_Header'}'`" >&5
19556 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19557 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19558   cat >>confdefs.h <<EOF
19559 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19560 EOF
19561
19562 fi
19563 done
19564
19565 echo "$as_me:19565: checking for header declaring getopt variables" >&5
19566 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19567 if test "${cf_cv_getopt_header+set}" = set; then
19568   echo $ECHO_N "(cached) $ECHO_C" >&6
19569 else
19570
19571 cf_cv_getopt_header=none
19572 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19573 do
19574 cat >conftest.$ac_ext <<_ACEOF
19575 #line 19575 "configure"
19576 #include "confdefs.h"
19577
19578 #include <$cf_header>
19579 int
19580 main (void)
19581 {
19582 int x = optind; char *y = optarg
19583   ;
19584   return 0;
19585 }
19586 _ACEOF
19587 rm -f conftest.$ac_objext
19588 if { (eval echo "$as_me:19588: \"$ac_compile\"") >&5
19589   (eval $ac_compile) 2>&5
19590   ac_status=$?
19591   echo "$as_me:19591: \$? = $ac_status" >&5
19592   (exit $ac_status); } &&
19593          { ac_try='test -s conftest.$ac_objext'
19594   { (eval echo "$as_me:19594: \"$ac_try\"") >&5
19595   (eval $ac_try) 2>&5
19596   ac_status=$?
19597   echo "$as_me:19597: \$? = $ac_status" >&5
19598   (exit $ac_status); }; }; then
19599   cf_cv_getopt_header=$cf_header
19600  break
19601 else
19602   echo "$as_me: failed program was:" >&5
19603 cat conftest.$ac_ext >&5
19604 fi
19605 rm -f conftest.$ac_objext conftest.$ac_ext
19606 done
19607
19608 fi
19609 echo "$as_me:19609: result: $cf_cv_getopt_header" >&5
19610 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19611 if test $cf_cv_getopt_header != none ; then
19612
19613 cat >>confdefs.h <<\EOF
19614 #define HAVE_GETOPT_HEADER 1
19615 EOF
19616
19617 fi
19618 if test $cf_cv_getopt_header = getopt.h ; then
19619
19620 cat >>confdefs.h <<\EOF
19621 #define NEED_GETOPT_H 1
19622 EOF
19623
19624 fi
19625
19626 echo "$as_me:19626: checking if external environ is declared" >&5
19627 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19628 if test "${cf_cv_dcl_environ+set}" = set; then
19629   echo $ECHO_N "(cached) $ECHO_C" >&6
19630 else
19631
19632     cat >conftest.$ac_ext <<_ACEOF
19633 #line 19633 "configure"
19634 #include "confdefs.h"
19635
19636 #ifdef HAVE_STDLIB_H
19637 #include <stdlib.h>
19638 #endif
19639 #include <unistd.h>
19640 int
19641 main (void)
19642 {
19643 int x = (int) environ
19644   ;
19645   return 0;
19646 }
19647 _ACEOF
19648 rm -f conftest.$ac_objext
19649 if { (eval echo "$as_me:19649: \"$ac_compile\"") >&5
19650   (eval $ac_compile) 2>&5
19651   ac_status=$?
19652   echo "$as_me:19652: \$? = $ac_status" >&5
19653   (exit $ac_status); } &&
19654          { ac_try='test -s conftest.$ac_objext'
19655   { (eval echo "$as_me:19655: \"$ac_try\"") >&5
19656   (eval $ac_try) 2>&5
19657   ac_status=$?
19658   echo "$as_me:19658: \$? = $ac_status" >&5
19659   (exit $ac_status); }; }; then
19660   cf_cv_dcl_environ=yes
19661 else
19662   echo "$as_me: failed program was:" >&5
19663 cat conftest.$ac_ext >&5
19664 cf_cv_dcl_environ=no
19665 fi
19666 rm -f conftest.$ac_objext conftest.$ac_ext
19667
19668 fi
19669 echo "$as_me:19669: result: $cf_cv_dcl_environ" >&5
19670 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19671
19672 if test "$cf_cv_dcl_environ" = no ; then
19673
19674 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19675
19676     cat >>confdefs.h <<EOF
19677 #define $cf_result 1
19678 EOF
19679
19680 fi
19681
19682 # It's possible (for near-UNIX clones) that the data doesn't exist
19683
19684 echo "$as_me:19684: checking if external environ exists" >&5
19685 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19686 if test "${cf_cv_have_environ+set}" = set; then
19687   echo $ECHO_N "(cached) $ECHO_C" >&6
19688 else
19689
19690         cat >conftest.$ac_ext <<_ACEOF
19691 #line 19691 "configure"
19692 #include "confdefs.h"
19693
19694 #undef environ
19695 extern int environ;
19696
19697 int
19698 main (void)
19699 {
19700 environ = 2
19701   ;
19702   return 0;
19703 }
19704 _ACEOF
19705 rm -f conftest.$ac_objext conftest$ac_exeext
19706 if { (eval echo "$as_me:19706: \"$ac_link\"") >&5
19707   (eval $ac_link) 2>&5
19708   ac_status=$?
19709   echo "$as_me:19709: \$? = $ac_status" >&5
19710   (exit $ac_status); } &&
19711          { ac_try='test -s conftest$ac_exeext'
19712   { (eval echo "$as_me:19712: \"$ac_try\"") >&5
19713   (eval $ac_try) 2>&5
19714   ac_status=$?
19715   echo "$as_me:19715: \$? = $ac_status" >&5
19716   (exit $ac_status); }; }; then
19717   cf_cv_have_environ=yes
19718 else
19719   echo "$as_me: failed program was:" >&5
19720 cat conftest.$ac_ext >&5
19721 cf_cv_have_environ=no
19722 fi
19723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19724
19725 fi
19726 echo "$as_me:19726: result: $cf_cv_have_environ" >&5
19727 echo "${ECHO_T}$cf_cv_have_environ" >&6
19728
19729 if test "$cf_cv_have_environ" = yes ; then
19730
19731 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19732
19733         cat >>confdefs.h <<EOF
19734 #define $cf_result 1
19735 EOF
19736
19737 fi
19738
19739 echo "$as_me:19739: checking for getenv" >&5
19740 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19741 if test "${ac_cv_func_getenv+set}" = set; then
19742   echo $ECHO_N "(cached) $ECHO_C" >&6
19743 else
19744   cat >conftest.$ac_ext <<_ACEOF
19745 #line 19745 "configure"
19746 #include "confdefs.h"
19747 #define getenv autoconf_temporary
19748 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19749 #undef getenv
19750
19751 #ifdef __cplusplus
19752 extern "C"
19753 #endif
19754
19755 /* We use char because int might match the return type of a gcc2
19756    builtin and then its argument prototype would still apply.  */
19757 char getenv (void);
19758
19759 int
19760 main (void)
19761 {
19762
19763 /* The GNU C library defines stubs for functions which it implements
19764     to always fail with ENOSYS.  Some functions are actually named
19765     something starting with __ and the normal name is an alias.  */
19766 #if defined (__stub_getenv) || defined (__stub___getenv)
19767 #error found stub for getenv
19768 #endif
19769
19770         return getenv ();
19771   ;
19772   return 0;
19773 }
19774 _ACEOF
19775 rm -f conftest.$ac_objext conftest$ac_exeext
19776 if { (eval echo "$as_me:19776: \"$ac_link\"") >&5
19777   (eval $ac_link) 2>&5
19778   ac_status=$?
19779   echo "$as_me:19779: \$? = $ac_status" >&5
19780   (exit $ac_status); } &&
19781          { ac_try='test -s conftest$ac_exeext'
19782   { (eval echo "$as_me:19782: \"$ac_try\"") >&5
19783   (eval $ac_try) 2>&5
19784   ac_status=$?
19785   echo "$as_me:19785: \$? = $ac_status" >&5
19786   (exit $ac_status); }; }; then
19787   ac_cv_func_getenv=yes
19788 else
19789   echo "$as_me: failed program was:" >&5
19790 cat conftest.$ac_ext >&5
19791 ac_cv_func_getenv=no
19792 fi
19793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19794 fi
19795 echo "$as_me:19795: result: $ac_cv_func_getenv" >&5
19796 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19797
19798 for ac_func in putenv setenv strdup
19799 do
19800 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19801 echo "$as_me:19801: checking for $ac_func" >&5
19802 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19803 if eval "test \"\${$as_ac_var+set}\" = set"; then
19804   echo $ECHO_N "(cached) $ECHO_C" >&6
19805 else
19806   cat >conftest.$ac_ext <<_ACEOF
19807 #line 19807 "configure"
19808 #include "confdefs.h"
19809 #define $ac_func autoconf_temporary
19810 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19811 #undef $ac_func
19812
19813 #ifdef __cplusplus
19814 extern "C"
19815 #endif
19816
19817 /* We use char because int might match the return type of a gcc2
19818    builtin and then its argument prototype would still apply.  */
19819 char $ac_func (void);
19820
19821 int
19822 main (void)
19823 {
19824
19825 /* The GNU C library defines stubs for functions which it implements
19826     to always fail with ENOSYS.  Some functions are actually named
19827     something starting with __ and the normal name is an alias.  */
19828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19829 #error found stub for $ac_func
19830 #endif
19831
19832         return $ac_func ();
19833   ;
19834   return 0;
19835 }
19836 _ACEOF
19837 rm -f conftest.$ac_objext conftest$ac_exeext
19838 if { (eval echo "$as_me:19838: \"$ac_link\"") >&5
19839   (eval $ac_link) 2>&5
19840   ac_status=$?
19841   echo "$as_me:19841: \$? = $ac_status" >&5
19842   (exit $ac_status); } &&
19843          { ac_try='test -s conftest$ac_exeext'
19844   { (eval echo "$as_me:19844: \"$ac_try\"") >&5
19845   (eval $ac_try) 2>&5
19846   ac_status=$?
19847   echo "$as_me:19847: \$? = $ac_status" >&5
19848   (exit $ac_status); }; }; then
19849   eval "$as_ac_var=yes"
19850 else
19851   echo "$as_me: failed program was:" >&5
19852 cat conftest.$ac_ext >&5
19853 eval "$as_ac_var=no"
19854 fi
19855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19856 fi
19857 echo "$as_me:19857: result: `eval echo '${'$as_ac_var'}'`" >&5
19858 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19859 if test `eval echo '${'$as_ac_var'}'` = yes; then
19860   cat >>confdefs.h <<EOF
19861 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19862 EOF
19863
19864 fi
19865 done
19866
19867 echo "$as_me:19867: checking if getenv returns consistent values" >&5
19868 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19869 if test "${cf_cv_consistent_getenv+set}" = set; then
19870   echo $ECHO_N "(cached) $ECHO_C" >&6
19871 else
19872
19873 if test "$cross_compiling" = yes; then
19874   cf_cv_consistent_getenv=unknown
19875 else
19876   cat >conftest.$ac_ext <<_ACEOF
19877 #line 19877 "configure"
19878 #include "confdefs.h"
19879
19880 #include <stdlib.h>
19881 #include <unistd.h>
19882 #include <stdio.h>
19883 #include <string.h>
19884 #include <sys/types.h>
19885
19886 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19887 extern char **environ;  /* POSIX, but some systems are not... */
19888 #endif
19889
19890 #if defined(HAVE_STRDUP)
19891 #define str_alloc(s) strdup(s)
19892 #else
19893 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19894 #endif
19895
19896 static void set_value(const char *name, const char *value)
19897 {
19898 #if defined(HAVE_SETENV)
19899         setenv(name, value, 1);
19900 #elif defined(HAVE_PUTENV)
19901         char buffer[1024];
19902         sprintf(buffer, "%s=%s", name, value);
19903         putenv(str_alloc(buffer));
19904 #else
19905 #error neither putenv/setenv found
19906 #endif
19907 }
19908 int main(void)
19909 {
19910         int pass;
19911         size_t numenv, limit, j;
19912         char **mynames;
19913         char **myvalues;
19914         char **mypointer;
19915         char *equals;
19916         for (numenv = 0; environ[numenv]; ++numenv) ;
19917         limit = numenv + 10;
19918         mynames = (char **) calloc(limit + 1, sizeof(char *));
19919         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19920         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19921 #if defined(HAVE_ENVIRON)
19922         for (j = 0; environ[j]; ++j) {
19923                 mynames[j] = str_alloc(environ[j]);
19924                 equals = strchr(mynames[j], '=');
19925                 if (equals != 0) {
19926                         *equals++ = '\0';
19927                         myvalues[j] = str_alloc(equals);
19928                 } else {
19929                         myvalues[j] = str_alloc("");
19930                 }
19931         }
19932 #endif
19933         for (j = numenv; j < limit; ++j) {
19934                 char name[80];
19935                 char value[80];
19936                 size_t found;
19937                 size_t k = 0;
19938                 do {
19939                         size_t jk;
19940                         found = 0;
19941                         sprintf(name, "TERM%lu", (unsigned long) k);
19942                         for (jk = 0; jk < j; ++jk) {
19943                                 if (!strcmp(name, mynames[jk])) {
19944                                         found = 1;
19945                                         ++k;
19946                                         break;
19947                                 }
19948                         }
19949                 } while (found);
19950                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19951                 set_value(name, value);
19952                 mynames[j] = str_alloc(name);
19953                 myvalues[j] = str_alloc(value);
19954         }
19955         for (pass = 0; pass < 3; ++pass) {
19956                 for (j = 0; j < limit; ++j) {
19957                         char *value = getenv(mynames[j]);
19958                         if (pass) {
19959                                 if (value == 0) {
19960                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19961                                         ${cf_cv_main_return:-return}(1);
19962                                 } else if (value != mypointer[j]) {
19963                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19964                                         ${cf_cv_main_return:-return}(1);
19965                                 } else if (strcmp(value, myvalues[j])) {
19966                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19967                                         ${cf_cv_main_return:-return}(1);
19968                                 }
19969                         } else {
19970                                 size_t k;
19971                                 mypointer[j] = value;
19972                                 for (k = 0; k < j; ++k) {
19973                                         if (mypointer[j] == mypointer[k]) {
19974                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19975                                                 ${cf_cv_main_return:-return}(1);
19976                                         }
19977                                 }
19978                         }
19979                 }
19980         }
19981         ${cf_cv_main_return:-return}(0);
19982 }
19983
19984 _ACEOF
19985 rm -f conftest$ac_exeext
19986 if { (eval echo "$as_me:19986: \"$ac_link\"") >&5
19987   (eval $ac_link) 2>&5
19988   ac_status=$?
19989   echo "$as_me:19989: \$? = $ac_status" >&5
19990   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19991   { (eval echo "$as_me:19991: \"$ac_try\"") >&5
19992   (eval $ac_try) 2>&5
19993   ac_status=$?
19994   echo "$as_me:19994: \$? = $ac_status" >&5
19995   (exit $ac_status); }; }; then
19996   cf_cv_consistent_getenv=yes
19997 else
19998   echo "$as_me: program exited with status $ac_status" >&5
19999 echo "$as_me: failed program was:" >&5
20000 cat conftest.$ac_ext >&5
20001 cf_cv_consistent_getenv=no
20002 fi
20003 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20004 fi
20005
20006 fi
20007 echo "$as_me:20007: result: $cf_cv_consistent_getenv" >&5
20008 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20009
20010 if test "x$cf_cv_consistent_getenv" = xno
20011 then
20012
20013 cat >>confdefs.h <<\EOF
20014 #define HAVE_CONSISTENT_GETENV 1
20015 EOF
20016
20017 fi
20018
20019 if test "x$cf_cv_consistent_getenv" = xno && \
20020         test "x$cf_with_trace" = xyes
20021 then
20022         { echo "$as_me:20022: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20023 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20024 fi
20025
20026 echo "$as_me:20026: checking if sys/time.h works with sys/select.h" >&5
20027 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20028 if test "${cf_cv_sys_time_select+set}" = set; then
20029   echo $ECHO_N "(cached) $ECHO_C" >&6
20030 else
20031
20032 cat >conftest.$ac_ext <<_ACEOF
20033 #line 20033 "configure"
20034 #include "confdefs.h"
20035
20036 #include <sys/types.h>
20037 #ifdef HAVE_SYS_TIME_H
20038 #include <sys/time.h>
20039 #endif
20040 #ifdef HAVE_SYS_SELECT_H
20041 #include <sys/select.h>
20042 #endif
20043
20044 int
20045 main (void)
20046 {
20047
20048   ;
20049   return 0;
20050 }
20051 _ACEOF
20052 rm -f conftest.$ac_objext
20053 if { (eval echo "$as_me:20053: \"$ac_compile\"") >&5
20054   (eval $ac_compile) 2>&5
20055   ac_status=$?
20056   echo "$as_me:20056: \$? = $ac_status" >&5
20057   (exit $ac_status); } &&
20058          { ac_try='test -s conftest.$ac_objext'
20059   { (eval echo "$as_me:20059: \"$ac_try\"") >&5
20060   (eval $ac_try) 2>&5
20061   ac_status=$?
20062   echo "$as_me:20062: \$? = $ac_status" >&5
20063   (exit $ac_status); }; }; then
20064   cf_cv_sys_time_select=yes
20065 else
20066   echo "$as_me: failed program was:" >&5
20067 cat conftest.$ac_ext >&5
20068 cf_cv_sys_time_select=no
20069 fi
20070 rm -f conftest.$ac_objext conftest.$ac_ext
20071
20072 fi
20073
20074 echo "$as_me:20074: result: $cf_cv_sys_time_select" >&5
20075 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20076 test "$cf_cv_sys_time_select" = yes &&
20077 cat >>confdefs.h <<\EOF
20078 #define HAVE_SYS_TIME_SELECT 1
20079 EOF
20080
20081 ###     checks for compiler characteristics
20082 ac_ext=c
20083 ac_cpp='$CPP $CPPFLAGS'
20084 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20085 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20086 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20087 ac_main_return=return
20088
20089 echo "$as_me:20089: checking for an ANSI C-conforming const" >&5
20090 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20091 if test "${ac_cv_c_const+set}" = set; then
20092   echo $ECHO_N "(cached) $ECHO_C" >&6
20093 else
20094   cat >conftest.$ac_ext <<_ACEOF
20095 #line 20095 "configure"
20096 #include "confdefs.h"
20097
20098 int
20099 main (void)
20100 {
20101 /* FIXME: Include the comments suggested by Paul. */
20102 #ifndef __cplusplus
20103   /* Ultrix mips cc rejects this.  */
20104   typedef int charset[2];
20105   const charset x;
20106   /* SunOS 4.1.1 cc rejects this.  */
20107   char const *const *ccp;
20108   char **p;
20109   /* NEC SVR4.0.2 mips cc rejects this.  */
20110   struct point {int x, y;};
20111   static struct point const zero = {0,0};
20112   /* AIX XL C 1.02.0.0 rejects this.
20113      It does not let you subtract one const X* pointer from another in
20114      an arm of an if-expression whose if-part is not a constant
20115      expression */
20116   const char *g = "string";
20117   ccp = &g + (g ? g-g : 0);
20118   /* HPUX 7.0 cc rejects these. */
20119   ++ccp;
20120   p = (char**) ccp;
20121   ccp = (char const *const *) p;
20122   { /* SCO 3.2v4 cc rejects this.  */
20123     char *t;
20124     char const *s = 0 ? (char *) 0 : (char const *) 0;
20125
20126     *t++ = 0;
20127   }
20128   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20129     int x[] = {25, 17};
20130     const int *foo = &x[0];
20131     ++foo;
20132   }
20133   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20134     typedef const int *iptr;
20135     iptr p = 0;
20136     ++p;
20137   }
20138   { /* AIX XL C 1.02.0.0 rejects this saying
20139        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20140     struct s { int j; const int *ap[3]; };
20141     struct s *b; b->j = 5;
20142   }
20143   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20144     const int foo = 10;
20145   }
20146 #endif
20147
20148   ;
20149   return 0;
20150 }
20151 _ACEOF
20152 rm -f conftest.$ac_objext
20153 if { (eval echo "$as_me:20153: \"$ac_compile\"") >&5
20154   (eval $ac_compile) 2>&5
20155   ac_status=$?
20156   echo "$as_me:20156: \$? = $ac_status" >&5
20157   (exit $ac_status); } &&
20158          { ac_try='test -s conftest.$ac_objext'
20159   { (eval echo "$as_me:20159: \"$ac_try\"") >&5
20160   (eval $ac_try) 2>&5
20161   ac_status=$?
20162   echo "$as_me:20162: \$? = $ac_status" >&5
20163   (exit $ac_status); }; }; then
20164   ac_cv_c_const=yes
20165 else
20166   echo "$as_me: failed program was:" >&5
20167 cat conftest.$ac_ext >&5
20168 ac_cv_c_const=no
20169 fi
20170 rm -f conftest.$ac_objext conftest.$ac_ext
20171 fi
20172 echo "$as_me:20172: result: $ac_cv_c_const" >&5
20173 echo "${ECHO_T}$ac_cv_c_const" >&6
20174 if test $ac_cv_c_const = no; then
20175
20176 cat >>confdefs.h <<\EOF
20177 #define const
20178 EOF
20179
20180 fi
20181
20182 echo "$as_me:20182: checking for inline" >&5
20183 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20184 if test "${ac_cv_c_inline+set}" = set; then
20185   echo $ECHO_N "(cached) $ECHO_C" >&6
20186 else
20187   ac_cv_c_inline=no
20188 for ac_kw in inline __inline__ __inline; do
20189   cat >conftest.$ac_ext <<_ACEOF
20190 #line 20190 "configure"
20191 #include "confdefs.h"
20192 #ifndef __cplusplus
20193 static $ac_kw int static_foo () {return 0; }
20194 $ac_kw int foo () {return 0; }
20195 #endif
20196
20197 _ACEOF
20198 rm -f conftest.$ac_objext
20199 if { (eval echo "$as_me:20199: \"$ac_compile\"") >&5
20200   (eval $ac_compile) 2>&5
20201   ac_status=$?
20202   echo "$as_me:20202: \$? = $ac_status" >&5
20203   (exit $ac_status); } &&
20204          { ac_try='test -s conftest.$ac_objext'
20205   { (eval echo "$as_me:20205: \"$ac_try\"") >&5
20206   (eval $ac_try) 2>&5
20207   ac_status=$?
20208   echo "$as_me:20208: \$? = $ac_status" >&5
20209   (exit $ac_status); }; }; then
20210   ac_cv_c_inline=$ac_kw; break
20211 else
20212   echo "$as_me: failed program was:" >&5
20213 cat conftest.$ac_ext >&5
20214 fi
20215 rm -f conftest.$ac_objext conftest.$ac_ext
20216 done
20217
20218 fi
20219 echo "$as_me:20219: result: $ac_cv_c_inline" >&5
20220 echo "${ECHO_T}$ac_cv_c_inline" >&6
20221 case $ac_cv_c_inline in
20222   inline | yes) ;;
20223   no)
20224 cat >>confdefs.h <<\EOF
20225 #define inline
20226 EOF
20227  ;;
20228   *)  cat >>confdefs.h <<EOF
20229 #define inline $ac_cv_c_inline
20230 EOF
20231  ;;
20232 esac
20233
20234 NCURSES_INLINE=
20235 if test "$ac_cv_c_inline" != no ; then
20236         NCURSES_INLINE=inline
20237         if test "$INTEL_COMPILER" = yes
20238         then
20239                 :
20240         elif test "$CLANG_COMPILER" = yes
20241         then
20242                 :
20243         elif test "$GCC" = yes
20244         then
20245                 echo "$as_me:20245: checking if $CC supports options to tune inlining" >&5
20246 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20247 if test "${cf_cv_gcc_inline+set}" = set; then
20248   echo $ECHO_N "(cached) $ECHO_C" >&6
20249 else
20250
20251                 cf_save_CFLAGS=$CFLAGS
20252                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20253                 cat >conftest.$ac_ext <<_ACEOF
20254 #line 20254 "configure"
20255 #include "confdefs.h"
20256 inline int foo(void) { return 1; }
20257 int
20258 main (void)
20259 {
20260 ${cf_cv_main_return:-return} foo()
20261   ;
20262   return 0;
20263 }
20264 _ACEOF
20265 rm -f conftest.$ac_objext
20266 if { (eval echo "$as_me:20266: \"$ac_compile\"") >&5
20267   (eval $ac_compile) 2>&5
20268   ac_status=$?
20269   echo "$as_me:20269: \$? = $ac_status" >&5
20270   (exit $ac_status); } &&
20271          { ac_try='test -s conftest.$ac_objext'
20272   { (eval echo "$as_me:20272: \"$ac_try\"") >&5
20273   (eval $ac_try) 2>&5
20274   ac_status=$?
20275   echo "$as_me:20275: \$? = $ac_status" >&5
20276   (exit $ac_status); }; }; then
20277   cf_cv_gcc_inline=yes
20278 else
20279   echo "$as_me: failed program was:" >&5
20280 cat conftest.$ac_ext >&5
20281 cf_cv_gcc_inline=no
20282 fi
20283 rm -f conftest.$ac_objext conftest.$ac_ext
20284                 CFLAGS=$cf_save_CFLAGS
20285
20286 fi
20287 echo "$as_me:20287: result: $cf_cv_gcc_inline" >&5
20288 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20289                 if test "$cf_cv_gcc_inline" = yes ; then
20290
20291 cf_fix_cppflags=no
20292 cf_new_cflags=
20293 cf_new_cppflags=
20294 cf_new_extra_cppflags=
20295
20296 for cf_add_cflags in --param max-inline-insns-single=1200
20297 do
20298 case $cf_fix_cppflags in
20299 (no)
20300         case $cf_add_cflags in
20301         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20302                 case $cf_add_cflags in
20303                 (-D*)
20304                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20305
20306                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20307                                 && test -z "${cf_tst_cflags}" \
20308                                 && cf_fix_cppflags=yes
20309
20310                         if test $cf_fix_cppflags = yes ; then
20311
20312         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20313         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20314
20315                                 continue
20316                         elif test "${cf_tst_cflags}" = "\"'" ; then
20317
20318         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20319         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20320
20321                                 continue
20322                         fi
20323                         ;;
20324                 esac
20325                 case "$CPPFLAGS" in
20326                 (*$cf_add_cflags)
20327                         ;;
20328                 (*)
20329                         case $cf_add_cflags in
20330                         (-D*)
20331                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20332
20333 CPPFLAGS=`echo "$CPPFLAGS" | \
20334         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20335                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20336
20337                                 ;;
20338                         esac
20339
20340         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20341         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20342
20343                         ;;
20344                 esac
20345                 ;;
20346         (*)
20347
20348         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20349         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20350
20351                 ;;
20352         esac
20353         ;;
20354 (yes)
20355
20356         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20357         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20358
20359         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20360
20361         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20362                 && test -z "${cf_tst_cflags}" \
20363                 && cf_fix_cppflags=no
20364         ;;
20365 esac
20366 done
20367
20368 if test -n "$cf_new_cflags" ; then
20369
20370         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20371         CFLAGS="${CFLAGS}$cf_new_cflags"
20372
20373 fi
20374
20375 if test -n "$cf_new_cppflags" ; then
20376
20377         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20378         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20379
20380 fi
20381
20382 if test -n "$cf_new_extra_cppflags" ; then
20383
20384         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20385         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20386
20387 fi
20388
20389                 fi
20390         fi
20391 fi
20392
20393 echo "$as_me:20393: checking for signal global datatype" >&5
20394 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20395 if test "${cf_cv_sig_atomic_t+set}" = set; then
20396   echo $ECHO_N "(cached) $ECHO_C" >&6
20397 else
20398
20399         for cf_type in \
20400                 "volatile sig_atomic_t" \
20401                 "sig_atomic_t" \
20402                 "int"
20403         do
20404         cat >conftest.$ac_ext <<_ACEOF
20405 #line 20405 "configure"
20406 #include "confdefs.h"
20407
20408 #include <sys/types.h>
20409 #include <signal.h>
20410 #include <stdio.h>
20411
20412 extern $cf_type x;
20413 $cf_type x;
20414 static void handler(int sig)
20415 {
20416         (void)sig;
20417         x = 5;
20418 }
20419 int
20420 main (void)
20421 {
20422 signal(SIGINT, handler);
20423                  x = 1
20424   ;
20425   return 0;
20426 }
20427 _ACEOF
20428 rm -f conftest.$ac_objext
20429 if { (eval echo "$as_me:20429: \"$ac_compile\"") >&5
20430   (eval $ac_compile) 2>&5
20431   ac_status=$?
20432   echo "$as_me:20432: \$? = $ac_status" >&5
20433   (exit $ac_status); } &&
20434          { ac_try='test -s conftest.$ac_objext'
20435   { (eval echo "$as_me:20435: \"$ac_try\"") >&5
20436   (eval $ac_try) 2>&5
20437   ac_status=$?
20438   echo "$as_me:20438: \$? = $ac_status" >&5
20439   (exit $ac_status); }; }; then
20440   cf_cv_sig_atomic_t=$cf_type
20441 else
20442   echo "$as_me: failed program was:" >&5
20443 cat conftest.$ac_ext >&5
20444 cf_cv_sig_atomic_t=no
20445 fi
20446 rm -f conftest.$ac_objext conftest.$ac_ext
20447                 test "$cf_cv_sig_atomic_t" != no && break
20448         done
20449
20450 fi
20451
20452 echo "$as_me:20452: result: $cf_cv_sig_atomic_t" >&5
20453 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20454 test "$cf_cv_sig_atomic_t" != no &&
20455 cat >>confdefs.h <<EOF
20456 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20457 EOF
20458
20459 if test $NCURSES_CHTYPE = auto ; then
20460
20461 echo "$as_me:20461: checking for type of chtype" >&5
20462 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20463 if test "${cf_cv_typeof_chtype+set}" = set; then
20464   echo $ECHO_N "(cached) $ECHO_C" >&6
20465 else
20466
20467                 if test "$cross_compiling" = yes; then
20468   cf_cv_typeof_chtype=long
20469 else
20470   cat >conftest.$ac_ext <<_ACEOF
20471 #line 20471 "configure"
20472 #include "confdefs.h"
20473
20474 #define WANT_BITS 31
20475 #include <stdio.h>
20476 int main(void)
20477 {
20478         FILE *fp = fopen("cf_test.out", "w");
20479         if (fp != 0) {
20480                 char *result = "long";
20481                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20482                         int n;
20483                         unsigned int x, y;
20484                         for (n = 0; n < WANT_BITS; n++) {
20485                                 x = (1 << n);
20486                                 y = (x >> n);
20487                                 if (y != 1 || x == 0) {
20488                                         x = 0;
20489                                         break;
20490                                 }
20491                         }
20492                         /*
20493                          * If x is nonzero, an int is big enough for the bits
20494                          * that we want.
20495                          */
20496                         result = (x != 0) ? "int" : "long";
20497                 }
20498                 fputs(result, fp);
20499                 fclose(fp);
20500         }
20501         ${cf_cv_main_return:-return}(0);
20502 }
20503
20504 _ACEOF
20505 rm -f conftest$ac_exeext
20506 if { (eval echo "$as_me:20506: \"$ac_link\"") >&5
20507   (eval $ac_link) 2>&5
20508   ac_status=$?
20509   echo "$as_me:20509: \$? = $ac_status" >&5
20510   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20511   { (eval echo "$as_me:20511: \"$ac_try\"") >&5
20512   (eval $ac_try) 2>&5
20513   ac_status=$?
20514   echo "$as_me:20514: \$? = $ac_status" >&5
20515   (exit $ac_status); }; }; then
20516   cf_cv_typeof_chtype=`cat cf_test.out`
20517 else
20518   echo "$as_me: program exited with status $ac_status" >&5
20519 echo "$as_me: failed program was:" >&5
20520 cat conftest.$ac_ext >&5
20521 cf_cv_typeof_chtype=long
20522 fi
20523 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20524 fi
20525                 rm -f cf_test.out
20526
20527 fi
20528
20529 echo "$as_me:20529: result: $cf_cv_typeof_chtype" >&5
20530 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20531
20532 cat >>confdefs.h <<EOF
20533 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20534 EOF
20535
20536 else
20537         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20538 fi
20539 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20540
20541 echo "$as_me:20541: checking if unsigned literals are legal" >&5
20542 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20543 if test "${cf_cv_unsigned_literals+set}" = set; then
20544   echo $ECHO_N "(cached) $ECHO_C" >&6
20545 else
20546
20547         cat >conftest.$ac_ext <<_ACEOF
20548 #line 20548 "configure"
20549 #include "confdefs.h"
20550
20551 int
20552 main (void)
20553 {
20554 long x = 1L + 1UL + 1U + 1
20555   ;
20556   return 0;
20557 }
20558 _ACEOF
20559 rm -f conftest.$ac_objext
20560 if { (eval echo "$as_me:20560: \"$ac_compile\"") >&5
20561   (eval $ac_compile) 2>&5
20562   ac_status=$?
20563   echo "$as_me:20563: \$? = $ac_status" >&5
20564   (exit $ac_status); } &&
20565          { ac_try='test -s conftest.$ac_objext'
20566   { (eval echo "$as_me:20566: \"$ac_try\"") >&5
20567   (eval $ac_try) 2>&5
20568   ac_status=$?
20569   echo "$as_me:20569: \$? = $ac_status" >&5
20570   (exit $ac_status); }; }; then
20571   cf_cv_unsigned_literals=yes
20572 else
20573   echo "$as_me: failed program was:" >&5
20574 cat conftest.$ac_ext >&5
20575 cf_cv_unsigned_literals=no
20576 fi
20577 rm -f conftest.$ac_objext conftest.$ac_ext
20578
20579 fi
20580
20581 echo "$as_me:20581: result: $cf_cv_unsigned_literals" >&5
20582 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20583
20584 cf_cv_1UL="1"
20585 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20586 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20587
20588 if test $NCURSES_MMASK_T = auto ; then
20589         cf_cv_typeof_mmask_t=long
20590 else
20591         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20592 fi
20593 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20594
20595 ###     Checks for external-data
20596
20597 echo "$as_me:20597: checking if external errno is declared" >&5
20598 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20599 if test "${cf_cv_dcl_errno+set}" = set; then
20600   echo $ECHO_N "(cached) $ECHO_C" >&6
20601 else
20602
20603         cat >conftest.$ac_ext <<_ACEOF
20604 #line 20604 "configure"
20605 #include "confdefs.h"
20606
20607 #ifdef HAVE_STDLIB_H
20608 #include <stdlib.h>
20609 #endif
20610 #include <stdio.h>
20611 #include <sys/types.h>
20612 #include <errno.h>
20613 int
20614 main (void)
20615 {
20616 int x = (int) errno; (void)x
20617   ;
20618   return 0;
20619 }
20620 _ACEOF
20621 rm -f conftest.$ac_objext
20622 if { (eval echo "$as_me:20622: \"$ac_compile\"") >&5
20623   (eval $ac_compile) 2>&5
20624   ac_status=$?
20625   echo "$as_me:20625: \$? = $ac_status" >&5
20626   (exit $ac_status); } &&
20627          { ac_try='test -s conftest.$ac_objext'
20628   { (eval echo "$as_me:20628: \"$ac_try\"") >&5
20629   (eval $ac_try) 2>&5
20630   ac_status=$?
20631   echo "$as_me:20631: \$? = $ac_status" >&5
20632   (exit $ac_status); }; }; then
20633   cf_cv_dcl_errno=yes
20634 else
20635   echo "$as_me: failed program was:" >&5
20636 cat conftest.$ac_ext >&5
20637 cf_cv_dcl_errno=no
20638 fi
20639 rm -f conftest.$ac_objext conftest.$ac_ext
20640
20641 fi
20642 echo "$as_me:20642: result: $cf_cv_dcl_errno" >&5
20643 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20644
20645 if test "$cf_cv_dcl_errno" = no ; then
20646
20647 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20648
20649         cat >>confdefs.h <<EOF
20650 #define $cf_result 1
20651 EOF
20652
20653 fi
20654
20655 # It's possible (for near-UNIX clones) that the data doesn't exist
20656
20657 echo "$as_me:20657: checking if external errno exists" >&5
20658 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20659 if test "${cf_cv_have_errno+set}" = set; then
20660   echo $ECHO_N "(cached) $ECHO_C" >&6
20661 else
20662
20663         cat >conftest.$ac_ext <<_ACEOF
20664 #line 20664 "configure"
20665 #include "confdefs.h"
20666
20667 #undef errno
20668 extern int errno;
20669
20670 int
20671 main (void)
20672 {
20673 errno = 2
20674   ;
20675   return 0;
20676 }
20677 _ACEOF
20678 rm -f conftest.$ac_objext conftest$ac_exeext
20679 if { (eval echo "$as_me:20679: \"$ac_link\"") >&5
20680   (eval $ac_link) 2>&5
20681   ac_status=$?
20682   echo "$as_me:20682: \$? = $ac_status" >&5
20683   (exit $ac_status); } &&
20684          { ac_try='test -s conftest$ac_exeext'
20685   { (eval echo "$as_me:20685: \"$ac_try\"") >&5
20686   (eval $ac_try) 2>&5
20687   ac_status=$?
20688   echo "$as_me:20688: \$? = $ac_status" >&5
20689   (exit $ac_status); }; }; then
20690   cf_cv_have_errno=yes
20691 else
20692   echo "$as_me: failed program was:" >&5
20693 cat conftest.$ac_ext >&5
20694 cf_cv_have_errno=no
20695 fi
20696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20697
20698 fi
20699 echo "$as_me:20699: result: $cf_cv_have_errno" >&5
20700 echo "${ECHO_T}$cf_cv_have_errno" >&6
20701
20702 if test "$cf_cv_have_errno" = yes ; then
20703
20704 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20705
20706         cat >>confdefs.h <<EOF
20707 #define $cf_result 1
20708 EOF
20709
20710 fi
20711
20712 echo "$as_me:20712: checking if data-only library module links" >&5
20713 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20714 if test "${cf_cv_link_dataonly+set}" = set; then
20715   echo $ECHO_N "(cached) $ECHO_C" >&6
20716 else
20717
20718         rm -f conftest.a
20719         cat >conftest.$ac_ext <<EOF
20720 #line 20720 "configure"
20721 int     testdata[3] = { 123, 456, 789 };
20722 EOF
20723         if { (eval echo "$as_me:20723: \"$ac_compile\"") >&5
20724   (eval $ac_compile) 2>&5
20725   ac_status=$?
20726   echo "$as_me:20726: \$? = $ac_status" >&5
20727   (exit $ac_status); } ; then
20728                 mv conftest.o data.o && \
20729                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20730         fi
20731         rm -f conftest.$ac_ext data.o
20732         cat >conftest.$ac_ext <<EOF
20733 #line 20733 "configure"
20734 int     testfunc(void)
20735 {
20736 #if defined(NeXT)
20737         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20738 #else
20739         extern int testdata[3];
20740         return testdata[0] == 123
20741            &&  testdata[1] == 456
20742            &&  testdata[2] == 789;
20743 #endif
20744 }
20745 EOF
20746         if { (eval echo "$as_me:20746: \"$ac_compile\"") >&5
20747   (eval $ac_compile) 2>&5
20748   ac_status=$?
20749   echo "$as_me:20749: \$? = $ac_status" >&5
20750   (exit $ac_status); }; then
20751                 mv conftest.o func.o && \
20752                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20753         fi
20754         rm -f conftest.$ac_ext func.o
20755         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20756         cf_saveLIBS="$LIBS"
20757         LIBS="conftest.a $LIBS"
20758         if test "$cross_compiling" = yes; then
20759   cf_cv_link_dataonly=unknown
20760 else
20761   cat >conftest.$ac_ext <<_ACEOF
20762 #line 20762 "configure"
20763 #include "confdefs.h"
20764
20765         int main(void)
20766         {
20767                 extern int testfunc();
20768                 ${cf_cv_main_return:-return} (!testfunc());
20769         }
20770
20771 _ACEOF
20772 rm -f conftest$ac_exeext
20773 if { (eval echo "$as_me:20773: \"$ac_link\"") >&5
20774   (eval $ac_link) 2>&5
20775   ac_status=$?
20776   echo "$as_me:20776: \$? = $ac_status" >&5
20777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20778   { (eval echo "$as_me:20778: \"$ac_try\"") >&5
20779   (eval $ac_try) 2>&5
20780   ac_status=$?
20781   echo "$as_me:20781: \$? = $ac_status" >&5
20782   (exit $ac_status); }; }; then
20783   cf_cv_link_dataonly=yes
20784 else
20785   echo "$as_me: program exited with status $ac_status" >&5
20786 echo "$as_me: failed program was:" >&5
20787 cat conftest.$ac_ext >&5
20788 cf_cv_link_dataonly=no
20789 fi
20790 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20791 fi
20792         LIBS="$cf_saveLIBS"
20793
20794 fi
20795
20796 echo "$as_me:20796: result: $cf_cv_link_dataonly" >&5
20797 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20798
20799 if test "$cf_cv_link_dataonly" = no ; then
20800
20801 cat >>confdefs.h <<\EOF
20802 #define BROKEN_LINKER 1
20803 EOF
20804
20805         BROKEN_LINKER=1
20806 fi
20807
20808 ###     Checks for library functions.
20809
20810 for ac_func in \
20811 getcwd \
20812 getegid \
20813 geteuid \
20814 getopt \
20815 getttynam \
20816 issetugid \
20817 localeconv \
20818 poll \
20819 putenv \
20820 remove \
20821 select \
20822 setbuf \
20823 setbuffer \
20824 setenv \
20825 setvbuf \
20826 sigaction \
20827 sigvec \
20828 snprintf \
20829 strdup \
20830 strstr \
20831 sysconf \
20832 tcgetpgrp \
20833 times \
20834 tsearch \
20835 vsnprintf \
20836
20837 do
20838 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20839 echo "$as_me:20839: checking for $ac_func" >&5
20840 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20841 if eval "test \"\${$as_ac_var+set}\" = set"; then
20842   echo $ECHO_N "(cached) $ECHO_C" >&6
20843 else
20844   cat >conftest.$ac_ext <<_ACEOF
20845 #line 20845 "configure"
20846 #include "confdefs.h"
20847 #define $ac_func autoconf_temporary
20848 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20849 #undef $ac_func
20850
20851 #ifdef __cplusplus
20852 extern "C"
20853 #endif
20854
20855 /* We use char because int might match the return type of a gcc2
20856    builtin and then its argument prototype would still apply.  */
20857 char $ac_func (void);
20858
20859 int
20860 main (void)
20861 {
20862
20863 /* The GNU C library defines stubs for functions which it implements
20864     to always fail with ENOSYS.  Some functions are actually named
20865     something starting with __ and the normal name is an alias.  */
20866 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20867 #error found stub for $ac_func
20868 #endif
20869
20870         return $ac_func ();
20871   ;
20872   return 0;
20873 }
20874 _ACEOF
20875 rm -f conftest.$ac_objext conftest$ac_exeext
20876 if { (eval echo "$as_me:20876: \"$ac_link\"") >&5
20877   (eval $ac_link) 2>&5
20878   ac_status=$?
20879   echo "$as_me:20879: \$? = $ac_status" >&5
20880   (exit $ac_status); } &&
20881          { ac_try='test -s conftest$ac_exeext'
20882   { (eval echo "$as_me:20882: \"$ac_try\"") >&5
20883   (eval $ac_try) 2>&5
20884   ac_status=$?
20885   echo "$as_me:20885: \$? = $ac_status" >&5
20886   (exit $ac_status); }; }; then
20887   eval "$as_ac_var=yes"
20888 else
20889   echo "$as_me: failed program was:" >&5
20890 cat conftest.$ac_ext >&5
20891 eval "$as_ac_var=no"
20892 fi
20893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20894 fi
20895 echo "$as_me:20895: result: `eval echo '${'$as_ac_var'}'`" >&5
20896 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20897 if test `eval echo '${'$as_ac_var'}'` = yes; then
20898   cat >>confdefs.h <<EOF
20899 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20900 EOF
20901
20902 fi
20903 done
20904
20905 if test "x$ac_cv_func_getopt" = xno && \
20906    test "x$cf_with_progs$cf_with_tests" != xnono; then
20907         { { echo "$as_me:20907: error: getopt is required for building programs" >&5
20908 echo "$as_me: error: getopt is required for building programs" >&2;}
20909    { (exit 1); exit 1; }; }
20910 fi
20911
20912 if test "x$with_safe_sprintf" = xyes
20913 then
20914         if test "x$ac_cv_func_vsnprintf" = xyes
20915         then
20916                 { echo "$as_me:20916: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20917 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20918         else
20919
20920 cat >>confdefs.h <<\EOF
20921 #define USE_SAFE_SPRINTF 1
20922 EOF
20923
20924         fi
20925 fi
20926
20927 if test "x$with_getcap" = "xyes" ; then
20928
20929 echo "$as_me:20929: checking for terminal-capability database functions" >&5
20930 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20931 if test "${cf_cv_cgetent+set}" = set; then
20932   echo $ECHO_N "(cached) $ECHO_C" >&6
20933 else
20934
20935 cat >conftest.$ac_ext <<_ACEOF
20936 #line 20936 "configure"
20937 #include "confdefs.h"
20938
20939 #include <stdlib.h>
20940 int
20941 main (void)
20942 {
20943
20944         char temp[128];
20945         char *buf = temp;
20946         char *db_array = temp;
20947         cgetent(&buf, &db_array, "vt100");
20948         cgetcap(buf, "tc", '=');
20949         cgetmatch(buf, "tc");
20950
20951   ;
20952   return 0;
20953 }
20954 _ACEOF
20955 rm -f conftest.$ac_objext conftest$ac_exeext
20956 if { (eval echo "$as_me:20956: \"$ac_link\"") >&5
20957   (eval $ac_link) 2>&5
20958   ac_status=$?
20959   echo "$as_me:20959: \$? = $ac_status" >&5
20960   (exit $ac_status); } &&
20961          { ac_try='test -s conftest$ac_exeext'
20962   { (eval echo "$as_me:20962: \"$ac_try\"") >&5
20963   (eval $ac_try) 2>&5
20964   ac_status=$?
20965   echo "$as_me:20965: \$? = $ac_status" >&5
20966   (exit $ac_status); }; }; then
20967   cf_cv_cgetent=yes
20968 else
20969   echo "$as_me: failed program was:" >&5
20970 cat conftest.$ac_ext >&5
20971 cf_cv_cgetent=no
20972 fi
20973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20974
20975 fi
20976 echo "$as_me:20976: result: $cf_cv_cgetent" >&5
20977 echo "${ECHO_T}$cf_cv_cgetent" >&6
20978
20979 if test "$cf_cv_cgetent" = yes
20980 then
20981
20982 cat >>confdefs.h <<\EOF
20983 #define HAVE_BSD_CGETENT 1
20984 EOF
20985
20986 echo "$as_me:20986: checking if cgetent uses const parameter" >&5
20987 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20988 if test "${cf_cv_cgetent_const+set}" = set; then
20989   echo $ECHO_N "(cached) $ECHO_C" >&6
20990 else
20991
20992 cat >conftest.$ac_ext <<_ACEOF
20993 #line 20993 "configure"
20994 #include "confdefs.h"
20995
20996 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20997 #include <stdlib.h>
20998 int
20999 main (void)
21000 {
21001
21002         char temp[128];
21003         char *buf = temp;
21004 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21005         const char *db_array = temp;
21006         cgetent(&buf, &db_array, "vt100");
21007 #endif
21008         cgetcap(buf, "tc", '=');
21009         cgetmatch(buf, "tc");
21010
21011   ;
21012   return 0;
21013 }
21014 _ACEOF
21015 rm -f conftest.$ac_objext conftest$ac_exeext
21016 if { (eval echo "$as_me:21016: \"$ac_link\"") >&5
21017   (eval $ac_link) 2>&5
21018   ac_status=$?
21019   echo "$as_me:21019: \$? = $ac_status" >&5
21020   (exit $ac_status); } &&
21021          { ac_try='test -s conftest$ac_exeext'
21022   { (eval echo "$as_me:21022: \"$ac_try\"") >&5
21023   (eval $ac_try) 2>&5
21024   ac_status=$?
21025   echo "$as_me:21025: \$? = $ac_status" >&5
21026   (exit $ac_status); }; }; then
21027   cf_cv_cgetent_const=yes
21028 else
21029   echo "$as_me: failed program was:" >&5
21030 cat conftest.$ac_ext >&5
21031 cf_cv_cgetent_const=no
21032 fi
21033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21034
21035 fi
21036 echo "$as_me:21036: result: $cf_cv_cgetent_const" >&5
21037 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21038         if test "$cf_cv_cgetent_const" = yes
21039         then
21040
21041 cat >>confdefs.h <<EOF
21042 #define CGETENT_CONST const
21043 EOF
21044
21045         fi
21046 fi
21047
21048 fi
21049
21050 echo "$as_me:21050: checking for isascii" >&5
21051 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21052 if test "${cf_cv_have_isascii+set}" = set; then
21053   echo $ECHO_N "(cached) $ECHO_C" >&6
21054 else
21055
21056         cat >conftest.$ac_ext <<_ACEOF
21057 #line 21057 "configure"
21058 #include "confdefs.h"
21059 #include <ctype.h>
21060 int
21061 main (void)
21062 {
21063 int x = isascii(' ')
21064   ;
21065   return 0;
21066 }
21067 _ACEOF
21068 rm -f conftest.$ac_objext conftest$ac_exeext
21069 if { (eval echo "$as_me:21069: \"$ac_link\"") >&5
21070   (eval $ac_link) 2>&5
21071   ac_status=$?
21072   echo "$as_me:21072: \$? = $ac_status" >&5
21073   (exit $ac_status); } &&
21074          { ac_try='test -s conftest$ac_exeext'
21075   { (eval echo "$as_me:21075: \"$ac_try\"") >&5
21076   (eval $ac_try) 2>&5
21077   ac_status=$?
21078   echo "$as_me:21078: \$? = $ac_status" >&5
21079   (exit $ac_status); }; }; then
21080   cf_cv_have_isascii=yes
21081 else
21082   echo "$as_me: failed program was:" >&5
21083 cat conftest.$ac_ext >&5
21084 cf_cv_have_isascii=no
21085 fi
21086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21087
21088 fi
21089 echo "$as_me:21089: result: $cf_cv_have_isascii" >&5
21090 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21091 test "$cf_cv_have_isascii" = yes &&
21092 cat >>confdefs.h <<\EOF
21093 #define HAVE_ISASCII 1
21094 EOF
21095
21096 if test "$ac_cv_func_sigaction" = yes; then
21097 echo "$as_me:21097: checking whether sigaction needs _POSIX_SOURCE" >&5
21098 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21099 cat >conftest.$ac_ext <<_ACEOF
21100 #line 21100 "configure"
21101 #include "confdefs.h"
21102
21103 #include <sys/types.h>
21104 #include <signal.h>
21105 int
21106 main (void)
21107 {
21108 struct sigaction act
21109   ;
21110   return 0;
21111 }
21112 _ACEOF
21113 rm -f conftest.$ac_objext
21114 if { (eval echo "$as_me:21114: \"$ac_compile\"") >&5
21115   (eval $ac_compile) 2>&5
21116   ac_status=$?
21117   echo "$as_me:21117: \$? = $ac_status" >&5
21118   (exit $ac_status); } &&
21119          { ac_try='test -s conftest.$ac_objext'
21120   { (eval echo "$as_me:21120: \"$ac_try\"") >&5
21121   (eval $ac_try) 2>&5
21122   ac_status=$?
21123   echo "$as_me:21123: \$? = $ac_status" >&5
21124   (exit $ac_status); }; }; then
21125   sigact_bad=no
21126 else
21127   echo "$as_me: failed program was:" >&5
21128 cat conftest.$ac_ext >&5
21129
21130 cat >conftest.$ac_ext <<_ACEOF
21131 #line 21131 "configure"
21132 #include "confdefs.h"
21133
21134 #define _POSIX_SOURCE
21135 #include <sys/types.h>
21136 #include <signal.h>
21137 int
21138 main (void)
21139 {
21140 struct sigaction act
21141   ;
21142   return 0;
21143 }
21144 _ACEOF
21145 rm -f conftest.$ac_objext
21146 if { (eval echo "$as_me:21146: \"$ac_compile\"") >&5
21147   (eval $ac_compile) 2>&5
21148   ac_status=$?
21149   echo "$as_me:21149: \$? = $ac_status" >&5
21150   (exit $ac_status); } &&
21151          { ac_try='test -s conftest.$ac_objext'
21152   { (eval echo "$as_me:21152: \"$ac_try\"") >&5
21153   (eval $ac_try) 2>&5
21154   ac_status=$?
21155   echo "$as_me:21155: \$? = $ac_status" >&5
21156   (exit $ac_status); }; }; then
21157   sigact_bad=yes
21158
21159 cat >>confdefs.h <<\EOF
21160 #define _POSIX_SOURCE 1
21161 EOF
21162
21163 else
21164   echo "$as_me: failed program was:" >&5
21165 cat conftest.$ac_ext >&5
21166 sigact_bad=unknown
21167 fi
21168 rm -f conftest.$ac_objext conftest.$ac_ext
21169 fi
21170 rm -f conftest.$ac_objext conftest.$ac_ext
21171 echo "$as_me:21171: result: $sigact_bad" >&5
21172 echo "${ECHO_T}$sigact_bad" >&6
21173 fi
21174
21175 echo "$as_me:21175: checking if nanosleep really works" >&5
21176 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21177 if test "${cf_cv_func_nanosleep+set}" = set; then
21178   echo $ECHO_N "(cached) $ECHO_C" >&6
21179 else
21180
21181 if test "$cross_compiling" = yes; then
21182   cf_cv_func_nanosleep=unknown
21183 else
21184   cat >conftest.$ac_ext <<_ACEOF
21185 #line 21185 "configure"
21186 #include "confdefs.h"
21187
21188 #include <stdio.h>
21189 #include <errno.h>
21190 #include <time.h>
21191
21192 #ifdef HAVE_SYS_TIME_H
21193 #include <sys/time.h>
21194 #endif
21195
21196 int main(void) {
21197         struct timespec ts1, ts2;
21198         int code;
21199         ts1.tv_sec  = 0;
21200         ts1.tv_nsec = 750000000;
21201         ts2.tv_sec  = 0;
21202         ts2.tv_nsec = 0;
21203         errno = 0;
21204         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21205         ${cf_cv_main_return:-return}(code != 0);
21206 }
21207
21208 _ACEOF
21209 rm -f conftest$ac_exeext
21210 if { (eval echo "$as_me:21210: \"$ac_link\"") >&5
21211   (eval $ac_link) 2>&5
21212   ac_status=$?
21213   echo "$as_me:21213: \$? = $ac_status" >&5
21214   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21215   { (eval echo "$as_me:21215: \"$ac_try\"") >&5
21216   (eval $ac_try) 2>&5
21217   ac_status=$?
21218   echo "$as_me:21218: \$? = $ac_status" >&5
21219   (exit $ac_status); }; }; then
21220   cf_cv_func_nanosleep=yes
21221 else
21222   echo "$as_me: program exited with status $ac_status" >&5
21223 echo "$as_me: failed program was:" >&5
21224 cat conftest.$ac_ext >&5
21225 cf_cv_func_nanosleep=no
21226 fi
21227 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21228 fi
21229 fi
21230 echo "$as_me:21230: result: $cf_cv_func_nanosleep" >&5
21231 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21232
21233 test "$cf_cv_func_nanosleep" = "yes" &&
21234 cat >>confdefs.h <<\EOF
21235 #define HAVE_NANOSLEEP 1
21236 EOF
21237
21238 for ac_header in \
21239 termio.h \
21240 termios.h \
21241 unistd.h \
21242 sys/ioctl.h \
21243 sys/termio.h \
21244
21245 do
21246 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21247 echo "$as_me:21247: checking for $ac_header" >&5
21248 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21249 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21250   echo $ECHO_N "(cached) $ECHO_C" >&6
21251 else
21252   cat >conftest.$ac_ext <<_ACEOF
21253 #line 21253 "configure"
21254 #include "confdefs.h"
21255 #include <$ac_header>
21256 _ACEOF
21257 if { (eval echo "$as_me:21257: \"$ac_cpp conftest.$ac_ext\"") >&5
21258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21259   ac_status=$?
21260   egrep -v '^ *\+' conftest.er1 >conftest.err
21261   rm -f conftest.er1
21262   cat conftest.err >&5
21263   echo "$as_me:21263: \$? = $ac_status" >&5
21264   (exit $ac_status); } >/dev/null; then
21265   if test -s conftest.err; then
21266     ac_cpp_err=$ac_c_preproc_warn_flag
21267   else
21268     ac_cpp_err=
21269   fi
21270 else
21271   ac_cpp_err=yes
21272 fi
21273 if test -z "$ac_cpp_err"; then
21274   eval "$as_ac_Header=yes"
21275 else
21276   echo "$as_me: failed program was:" >&5
21277   cat conftest.$ac_ext >&5
21278   eval "$as_ac_Header=no"
21279 fi
21280 rm -f conftest.err conftest.$ac_ext
21281 fi
21282 echo "$as_me:21282: result: `eval echo '${'$as_ac_Header'}'`" >&5
21283 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21284 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21285   cat >>confdefs.h <<EOF
21286 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21287 EOF
21288
21289 fi
21290 done
21291
21292 if test "$ac_cv_header_termios_h" = yes ; then
21293         case "$CFLAGS $CPPFLAGS" in
21294         (*-D_POSIX_SOURCE*)
21295                 termios_bad=dunno ;;
21296         (*)     termios_bad=maybe ;;
21297         esac
21298         if test "$termios_bad" = maybe ; then
21299         echo "$as_me:21299: checking whether termios.h needs _POSIX_SOURCE" >&5
21300 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21301         cat >conftest.$ac_ext <<_ACEOF
21302 #line 21302 "configure"
21303 #include "confdefs.h"
21304 #include <termios.h>
21305 int
21306 main (void)
21307 {
21308 struct termios foo; int x = foo.c_iflag = 1; (void)x
21309   ;
21310   return 0;
21311 }
21312 _ACEOF
21313 rm -f conftest.$ac_objext
21314 if { (eval echo "$as_me:21314: \"$ac_compile\"") >&5
21315   (eval $ac_compile) 2>&5
21316   ac_status=$?
21317   echo "$as_me:21317: \$? = $ac_status" >&5
21318   (exit $ac_status); } &&
21319          { ac_try='test -s conftest.$ac_objext'
21320   { (eval echo "$as_me:21320: \"$ac_try\"") >&5
21321   (eval $ac_try) 2>&5
21322   ac_status=$?
21323   echo "$as_me:21323: \$? = $ac_status" >&5
21324   (exit $ac_status); }; }; then
21325   termios_bad=no
21326 else
21327   echo "$as_me: failed program was:" >&5
21328 cat conftest.$ac_ext >&5
21329
21330                 cat >conftest.$ac_ext <<_ACEOF
21331 #line 21331 "configure"
21332 #include "confdefs.h"
21333
21334 #define _POSIX_SOURCE
21335 #include <termios.h>
21336 int
21337 main (void)
21338 {
21339 struct termios foo; int x = foo.c_iflag = 2; (void)x
21340   ;
21341   return 0;
21342 }
21343 _ACEOF
21344 rm -f conftest.$ac_objext
21345 if { (eval echo "$as_me:21345: \"$ac_compile\"") >&5
21346   (eval $ac_compile) 2>&5
21347   ac_status=$?
21348   echo "$as_me:21348: \$? = $ac_status" >&5
21349   (exit $ac_status); } &&
21350          { ac_try='test -s conftest.$ac_objext'
21351   { (eval echo "$as_me:21351: \"$ac_try\"") >&5
21352   (eval $ac_try) 2>&5
21353   ac_status=$?
21354   echo "$as_me:21354: \$? = $ac_status" >&5
21355   (exit $ac_status); }; }; then
21356   termios_bad=unknown
21357 else
21358   echo "$as_me: failed program was:" >&5
21359 cat conftest.$ac_ext >&5
21360 termios_bad=yes
21361 cat >>confdefs.h <<\EOF
21362 #define _POSIX_SOURCE 1
21363 EOF
21364
21365 fi
21366 rm -f conftest.$ac_objext conftest.$ac_ext
21367
21368 fi
21369 rm -f conftest.$ac_objext conftest.$ac_ext
21370         echo "$as_me:21370: result: $termios_bad" >&5
21371 echo "${ECHO_T}$termios_bad" >&6
21372         fi
21373 fi
21374
21375 echo "$as_me:21375: checking for tcgetattr" >&5
21376 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21377 if test "${cf_cv_have_tcgetattr+set}" = set; then
21378   echo $ECHO_N "(cached) $ECHO_C" >&6
21379 else
21380
21381 cat >conftest.$ac_ext <<_ACEOF
21382 #line 21382 "configure"
21383 #include "confdefs.h"
21384
21385 #include <sys/types.h>
21386 #ifdef HAVE_UNISTD_H
21387 #include <unistd.h>
21388 #endif
21389 #ifdef HAVE_TERMIOS_H
21390 #include <termios.h>
21391 #define TTY struct termios
21392 #else
21393 #ifdef HAVE_TERMIO_H
21394 #include <termio.h>
21395 #define TTY struct termio
21396 #endif
21397 #endif
21398
21399 int
21400 main (void)
21401 {
21402
21403 TTY foo;
21404 tcgetattr(1, &foo);
21405   ;
21406   return 0;
21407 }
21408 _ACEOF
21409 rm -f conftest.$ac_objext conftest$ac_exeext
21410 if { (eval echo "$as_me:21410: \"$ac_link\"") >&5
21411   (eval $ac_link) 2>&5
21412   ac_status=$?
21413   echo "$as_me:21413: \$? = $ac_status" >&5
21414   (exit $ac_status); } &&
21415          { ac_try='test -s conftest$ac_exeext'
21416   { (eval echo "$as_me:21416: \"$ac_try\"") >&5
21417   (eval $ac_try) 2>&5
21418   ac_status=$?
21419   echo "$as_me:21419: \$? = $ac_status" >&5
21420   (exit $ac_status); }; }; then
21421   cf_cv_have_tcgetattr=yes
21422 else
21423   echo "$as_me: failed program was:" >&5
21424 cat conftest.$ac_ext >&5
21425 cf_cv_have_tcgetattr=no
21426 fi
21427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21428 fi
21429 echo "$as_me:21429: result: $cf_cv_have_tcgetattr" >&5
21430 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21431 test "$cf_cv_have_tcgetattr" = yes &&
21432 cat >>confdefs.h <<\EOF
21433 #define HAVE_TCGETATTR 1
21434 EOF
21435
21436 echo "$as_me:21436: checking for vsscanf function or workaround" >&5
21437 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21438 if test "${cf_cv_func_vsscanf+set}" = set; then
21439   echo $ECHO_N "(cached) $ECHO_C" >&6
21440 else
21441
21442 cat >conftest.$ac_ext <<_ACEOF
21443 #line 21443 "configure"
21444 #include "confdefs.h"
21445
21446 #include <stdarg.h>
21447 #include <stdio.h>
21448 int
21449 main (void)
21450 {
21451
21452         va_list ap;
21453         vsscanf("from", "%d", ap)
21454   ;
21455   return 0;
21456 }
21457 _ACEOF
21458 rm -f conftest.$ac_objext conftest$ac_exeext
21459 if { (eval echo "$as_me:21459: \"$ac_link\"") >&5
21460   (eval $ac_link) 2>&5
21461   ac_status=$?
21462   echo "$as_me:21462: \$? = $ac_status" >&5
21463   (exit $ac_status); } &&
21464          { ac_try='test -s conftest$ac_exeext'
21465   { (eval echo "$as_me:21465: \"$ac_try\"") >&5
21466   (eval $ac_try) 2>&5
21467   ac_status=$?
21468   echo "$as_me:21468: \$? = $ac_status" >&5
21469   (exit $ac_status); }; }; then
21470   cf_cv_func_vsscanf=vsscanf
21471 else
21472   echo "$as_me: failed program was:" >&5
21473 cat conftest.$ac_ext >&5
21474
21475 cat >conftest.$ac_ext <<_ACEOF
21476 #line 21476 "configure"
21477 #include "confdefs.h"
21478
21479 #include <stdarg.h>
21480 #include <stdio.h>
21481 int
21482 main (void)
21483 {
21484
21485         FILE strbuf;
21486         char *str = "from";
21487
21488         strbuf._flag = _IOREAD;
21489         strbuf._ptr = strbuf._base = (unsigned char *) str;
21490         strbuf._cnt = strlen(str);
21491         strbuf._file = _NFILE;
21492         return (vfscanf(&strbuf, "%d", ap))
21493   ;
21494   return 0;
21495 }
21496 _ACEOF
21497 rm -f conftest.$ac_objext conftest$ac_exeext
21498 if { (eval echo "$as_me:21498: \"$ac_link\"") >&5
21499   (eval $ac_link) 2>&5
21500   ac_status=$?
21501   echo "$as_me:21501: \$? = $ac_status" >&5
21502   (exit $ac_status); } &&
21503          { ac_try='test -s conftest$ac_exeext'
21504   { (eval echo "$as_me:21504: \"$ac_try\"") >&5
21505   (eval $ac_try) 2>&5
21506   ac_status=$?
21507   echo "$as_me:21507: \$? = $ac_status" >&5
21508   (exit $ac_status); }; }; then
21509   cf_cv_func_vsscanf=vfscanf
21510 else
21511   echo "$as_me: failed program was:" >&5
21512 cat conftest.$ac_ext >&5
21513
21514 cat >conftest.$ac_ext <<_ACEOF
21515 #line 21515 "configure"
21516 #include "confdefs.h"
21517
21518 #include <stdarg.h>
21519 #include <stdio.h>
21520 int
21521 main (void)
21522 {
21523
21524         FILE strbuf;
21525         char *str = "from";
21526
21527         strbuf._flag = _IOREAD;
21528         strbuf._ptr = strbuf._base = (unsigned char *) str;
21529         strbuf._cnt = strlen(str);
21530         strbuf._file = _NFILE;
21531         return (_doscan(&strbuf, "%d", ap))
21532   ;
21533   return 0;
21534 }
21535 _ACEOF
21536 rm -f conftest.$ac_objext conftest$ac_exeext
21537 if { (eval echo "$as_me:21537: \"$ac_link\"") >&5
21538   (eval $ac_link) 2>&5
21539   ac_status=$?
21540   echo "$as_me:21540: \$? = $ac_status" >&5
21541   (exit $ac_status); } &&
21542          { ac_try='test -s conftest$ac_exeext'
21543   { (eval echo "$as_me:21543: \"$ac_try\"") >&5
21544   (eval $ac_try) 2>&5
21545   ac_status=$?
21546   echo "$as_me:21546: \$? = $ac_status" >&5
21547   (exit $ac_status); }; }; then
21548   cf_cv_func_vsscanf=_doscan
21549 else
21550   echo "$as_me: failed program was:" >&5
21551 cat conftest.$ac_ext >&5
21552
21553 cf_cv_func_vsscanf=no
21554 fi
21555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21556 fi
21557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21558 fi
21559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21560 fi
21561 echo "$as_me:21561: result: $cf_cv_func_vsscanf" >&5
21562 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21563
21564 case $cf_cv_func_vsscanf in
21565 (vsscanf)
21566 cat >>confdefs.h <<\EOF
21567 #define HAVE_VSSCANF 1
21568 EOF
21569 ;;
21570 (vfscanf)
21571 cat >>confdefs.h <<\EOF
21572 #define HAVE_VFSCANF 1
21573 EOF
21574 ;;
21575 (_doscan)
21576 cat >>confdefs.h <<\EOF
21577 #define HAVE__DOSCAN 1
21578 EOF
21579 ;;
21580 esac
21581
21582 for ac_header in \
21583 unistd.h \
21584
21585 do
21586 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21587 echo "$as_me:21587: checking for $ac_header" >&5
21588 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21589 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21590   echo $ECHO_N "(cached) $ECHO_C" >&6
21591 else
21592   cat >conftest.$ac_ext <<_ACEOF
21593 #line 21593 "configure"
21594 #include "confdefs.h"
21595 #include <$ac_header>
21596 _ACEOF
21597 if { (eval echo "$as_me:21597: \"$ac_cpp conftest.$ac_ext\"") >&5
21598   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21599   ac_status=$?
21600   egrep -v '^ *\+' conftest.er1 >conftest.err
21601   rm -f conftest.er1
21602   cat conftest.err >&5
21603   echo "$as_me:21603: \$? = $ac_status" >&5
21604   (exit $ac_status); } >/dev/null; then
21605   if test -s conftest.err; then
21606     ac_cpp_err=$ac_c_preproc_warn_flag
21607   else
21608     ac_cpp_err=
21609   fi
21610 else
21611   ac_cpp_err=yes
21612 fi
21613 if test -z "$ac_cpp_err"; then
21614   eval "$as_ac_Header=yes"
21615 else
21616   echo "$as_me: failed program was:" >&5
21617   cat conftest.$ac_ext >&5
21618   eval "$as_ac_Header=no"
21619 fi
21620 rm -f conftest.err conftest.$ac_ext
21621 fi
21622 echo "$as_me:21622: result: `eval echo '${'$as_ac_Header'}'`" >&5
21623 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21624 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21625   cat >>confdefs.h <<EOF
21626 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21627 EOF
21628
21629 fi
21630 done
21631
21632 echo "$as_me:21632: checking for working mkstemp" >&5
21633 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21634 if test "${cf_cv_func_mkstemp+set}" = set; then
21635   echo $ECHO_N "(cached) $ECHO_C" >&6
21636 else
21637
21638 rm -rf conftest*
21639 if test "$cross_compiling" = yes; then
21640   cf_cv_func_mkstemp=maybe
21641 else
21642   cat >conftest.$ac_ext <<_ACEOF
21643 #line 21643 "configure"
21644 #include "confdefs.h"
21645
21646 #include <sys/types.h>
21647 #ifdef HAVE_UNISTD_H
21648 #include <unistd.h>
21649 #endif
21650 #include <stdlib.h>
21651 #include <stdio.h>
21652 #include <string.h>
21653 #include <sys/stat.h>
21654 int main(void)
21655 {
21656         char *tmpl = "conftestXXXXXX";
21657         char name[2][80];
21658         int n;
21659         int result = 0;
21660         int fd;
21661         struct stat sb;
21662
21663         umask(077);
21664         for (n = 0; n < 2; ++n) {
21665                 strcpy(name[n], tmpl);
21666                 if ((fd = mkstemp(name[n])) >= 0) {
21667                         if (!strcmp(name[n], tmpl)
21668                          || stat(name[n], &sb) != 0
21669                          || (sb.st_mode & S_IFMT) != S_IFREG
21670                          || (sb.st_mode & 077) != 0) {
21671                                 result = 1;
21672                         }
21673                         close(fd);
21674                 }
21675         }
21676         if (result == 0
21677          && !strcmp(name[0], name[1]))
21678                 result = 1;
21679         ${cf_cv_main_return:-return}(result);
21680 }
21681
21682 _ACEOF
21683 rm -f conftest$ac_exeext
21684 if { (eval echo "$as_me:21684: \"$ac_link\"") >&5
21685   (eval $ac_link) 2>&5
21686   ac_status=$?
21687   echo "$as_me:21687: \$? = $ac_status" >&5
21688   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21689   { (eval echo "$as_me:21689: \"$ac_try\"") >&5
21690   (eval $ac_try) 2>&5
21691   ac_status=$?
21692   echo "$as_me:21692: \$? = $ac_status" >&5
21693   (exit $ac_status); }; }; then
21694   cf_cv_func_mkstemp=yes
21695
21696 else
21697   echo "$as_me: program exited with status $ac_status" >&5
21698 echo "$as_me: failed program was:" >&5
21699 cat conftest.$ac_ext >&5
21700 cf_cv_func_mkstemp=no
21701
21702 fi
21703 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21704 fi
21705
21706 fi
21707 echo "$as_me:21707: result: $cf_cv_func_mkstemp" >&5
21708 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21709 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21710         echo "$as_me:21710: checking for mkstemp" >&5
21711 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21712 if test "${ac_cv_func_mkstemp+set}" = set; then
21713   echo $ECHO_N "(cached) $ECHO_C" >&6
21714 else
21715   cat >conftest.$ac_ext <<_ACEOF
21716 #line 21716 "configure"
21717 #include "confdefs.h"
21718 #define mkstemp autoconf_temporary
21719 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21720 #undef mkstemp
21721
21722 #ifdef __cplusplus
21723 extern "C"
21724 #endif
21725
21726 /* We use char because int might match the return type of a gcc2
21727    builtin and then its argument prototype would still apply.  */
21728 char mkstemp (void);
21729
21730 int
21731 main (void)
21732 {
21733
21734 /* The GNU C library defines stubs for functions which it implements
21735     to always fail with ENOSYS.  Some functions are actually named
21736     something starting with __ and the normal name is an alias.  */
21737 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21738 #error found stub for mkstemp
21739 #endif
21740
21741         return mkstemp ();
21742   ;
21743   return 0;
21744 }
21745 _ACEOF
21746 rm -f conftest.$ac_objext conftest$ac_exeext
21747 if { (eval echo "$as_me:21747: \"$ac_link\"") >&5
21748   (eval $ac_link) 2>&5
21749   ac_status=$?
21750   echo "$as_me:21750: \$? = $ac_status" >&5
21751   (exit $ac_status); } &&
21752          { ac_try='test -s conftest$ac_exeext'
21753   { (eval echo "$as_me:21753: \"$ac_try\"") >&5
21754   (eval $ac_try) 2>&5
21755   ac_status=$?
21756   echo "$as_me:21756: \$? = $ac_status" >&5
21757   (exit $ac_status); }; }; then
21758   ac_cv_func_mkstemp=yes
21759 else
21760   echo "$as_me: failed program was:" >&5
21761 cat conftest.$ac_ext >&5
21762 ac_cv_func_mkstemp=no
21763 fi
21764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21765 fi
21766 echo "$as_me:21766: result: $ac_cv_func_mkstemp" >&5
21767 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21768
21769 fi
21770 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21771
21772 cat >>confdefs.h <<\EOF
21773 #define HAVE_MKSTEMP 1
21774 EOF
21775
21776 fi
21777
21778 # setup for prototype of fallback for vsscanf()
21779
21780 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21781         HAVE_VSSCANF=1
21782 else
21783         HAVE_VSSCANF=0
21784 fi
21785
21786 if test "x$cross_compiling" = xyes ; then
21787         { echo "$as_me:21787: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21788 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21789 else
21790         echo "$as_me:21790: checking whether setvbuf arguments are reversed" >&5
21791 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21792 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21793   echo $ECHO_N "(cached) $ECHO_C" >&6
21794 else
21795   if test "$cross_compiling" = yes; then
21796   { { echo "$as_me:21796: error: cannot run test program while cross compiling" >&5
21797 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21798    { (exit 1); exit 1; }; }
21799 else
21800   cat >conftest.$ac_ext <<_ACEOF
21801 #line 21801 "configure"
21802 #include "confdefs.h"
21803 #include <stdio.h>
21804 /* If setvbuf has the reversed format, exit 0. */
21805 int
21806 main (void)
21807 {
21808   /* This call has the arguments reversed.
21809      A reversed system may check and see that the address of main
21810      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21811   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21812     $ac_main_return(1);
21813   putc('\r', stdout);
21814   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21815 }
21816 _ACEOF
21817 rm -f conftest$ac_exeext
21818 if { (eval echo "$as_me:21818: \"$ac_link\"") >&5
21819   (eval $ac_link) 2>&5
21820   ac_status=$?
21821   echo "$as_me:21821: \$? = $ac_status" >&5
21822   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21823   { (eval echo "$as_me:21823: \"$ac_try\"") >&5
21824   (eval $ac_try) 2>&5
21825   ac_status=$?
21826   echo "$as_me:21826: \$? = $ac_status" >&5
21827   (exit $ac_status); }; }; then
21828   ac_cv_func_setvbuf_reversed=yes
21829 else
21830   echo "$as_me: program exited with status $ac_status" >&5
21831 echo "$as_me: failed program was:" >&5
21832 cat conftest.$ac_ext >&5
21833 ac_cv_func_setvbuf_reversed=no
21834 fi
21835 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21836 fi
21837 rm -f core core.* *.core
21838 fi
21839 echo "$as_me:21839: result: $ac_cv_func_setvbuf_reversed" >&5
21840 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21841 if test $ac_cv_func_setvbuf_reversed = yes; then
21842
21843 cat >>confdefs.h <<\EOF
21844 #define SETVBUF_REVERSED 1
21845 EOF
21846
21847 fi
21848
21849 fi
21850 echo "$as_me:21850: checking for intptr_t" >&5
21851 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21852 if test "${ac_cv_type_intptr_t+set}" = set; then
21853   echo $ECHO_N "(cached) $ECHO_C" >&6
21854 else
21855   cat >conftest.$ac_ext <<_ACEOF
21856 #line 21856 "configure"
21857 #include "confdefs.h"
21858 $ac_includes_default
21859 int
21860 main (void)
21861 {
21862 if ((intptr_t *) 0)
21863   return 0;
21864 if (sizeof (intptr_t))
21865   return 0;
21866   ;
21867   return 0;
21868 }
21869 _ACEOF
21870 rm -f conftest.$ac_objext
21871 if { (eval echo "$as_me:21871: \"$ac_compile\"") >&5
21872   (eval $ac_compile) 2>&5
21873   ac_status=$?
21874   echo "$as_me:21874: \$? = $ac_status" >&5
21875   (exit $ac_status); } &&
21876          { ac_try='test -s conftest.$ac_objext'
21877   { (eval echo "$as_me:21877: \"$ac_try\"") >&5
21878   (eval $ac_try) 2>&5
21879   ac_status=$?
21880   echo "$as_me:21880: \$? = $ac_status" >&5
21881   (exit $ac_status); }; }; then
21882   ac_cv_type_intptr_t=yes
21883 else
21884   echo "$as_me: failed program was:" >&5
21885 cat conftest.$ac_ext >&5
21886 ac_cv_type_intptr_t=no
21887 fi
21888 rm -f conftest.$ac_objext conftest.$ac_ext
21889 fi
21890 echo "$as_me:21890: result: $ac_cv_type_intptr_t" >&5
21891 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21892 if test $ac_cv_type_intptr_t = yes; then
21893   :
21894 else
21895
21896 cat >>confdefs.h <<EOF
21897 #define intptr_t long
21898 EOF
21899
21900 fi
21901
21902 echo "$as_me:21902: checking for ssize_t" >&5
21903 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21904 if test "${ac_cv_type_ssize_t+set}" = set; then
21905   echo $ECHO_N "(cached) $ECHO_C" >&6
21906 else
21907   cat >conftest.$ac_ext <<_ACEOF
21908 #line 21908 "configure"
21909 #include "confdefs.h"
21910 $ac_includes_default
21911 int
21912 main (void)
21913 {
21914 if ((ssize_t *) 0)
21915   return 0;
21916 if (sizeof (ssize_t))
21917   return 0;
21918   ;
21919   return 0;
21920 }
21921 _ACEOF
21922 rm -f conftest.$ac_objext
21923 if { (eval echo "$as_me:21923: \"$ac_compile\"") >&5
21924   (eval $ac_compile) 2>&5
21925   ac_status=$?
21926   echo "$as_me:21926: \$? = $ac_status" >&5
21927   (exit $ac_status); } &&
21928          { ac_try='test -s conftest.$ac_objext'
21929   { (eval echo "$as_me:21929: \"$ac_try\"") >&5
21930   (eval $ac_try) 2>&5
21931   ac_status=$?
21932   echo "$as_me:21932: \$? = $ac_status" >&5
21933   (exit $ac_status); }; }; then
21934   ac_cv_type_ssize_t=yes
21935 else
21936   echo "$as_me: failed program was:" >&5
21937 cat conftest.$ac_ext >&5
21938 ac_cv_type_ssize_t=no
21939 fi
21940 rm -f conftest.$ac_objext conftest.$ac_ext
21941 fi
21942 echo "$as_me:21942: result: $ac_cv_type_ssize_t" >&5
21943 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21944 if test $ac_cv_type_ssize_t = yes; then
21945   :
21946 else
21947
21948 cat >>confdefs.h <<EOF
21949 #define ssize_t int
21950 EOF
21951
21952 fi
21953
21954 echo "$as_me:21954: checking for type sigaction_t" >&5
21955 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21956 if test "${cf_cv_type_sigaction+set}" = set; then
21957   echo $ECHO_N "(cached) $ECHO_C" >&6
21958 else
21959
21960         cat >conftest.$ac_ext <<_ACEOF
21961 #line 21961 "configure"
21962 #include "confdefs.h"
21963
21964 #include <signal.h>
21965 int
21966 main (void)
21967 {
21968 sigaction_t x
21969   ;
21970   return 0;
21971 }
21972 _ACEOF
21973 rm -f conftest.$ac_objext
21974 if { (eval echo "$as_me:21974: \"$ac_compile\"") >&5
21975   (eval $ac_compile) 2>&5
21976   ac_status=$?
21977   echo "$as_me:21977: \$? = $ac_status" >&5
21978   (exit $ac_status); } &&
21979          { ac_try='test -s conftest.$ac_objext'
21980   { (eval echo "$as_me:21980: \"$ac_try\"") >&5
21981   (eval $ac_try) 2>&5
21982   ac_status=$?
21983   echo "$as_me:21983: \$? = $ac_status" >&5
21984   (exit $ac_status); }; }; then
21985   cf_cv_type_sigaction=yes
21986 else
21987   echo "$as_me: failed program was:" >&5
21988 cat conftest.$ac_ext >&5
21989 cf_cv_type_sigaction=no
21990 fi
21991 rm -f conftest.$ac_objext conftest.$ac_ext
21992 fi
21993
21994 echo "$as_me:21994: result: $cf_cv_type_sigaction" >&5
21995 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21996 test "$cf_cv_type_sigaction" = yes &&
21997 cat >>confdefs.h <<\EOF
21998 #define HAVE_TYPE_SIGACTION 1
21999 EOF
22000
22001 echo "$as_me:22001: checking declaration of size-change" >&5
22002 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22003 if test "${cf_cv_sizechange+set}" = set; then
22004   echo $ECHO_N "(cached) $ECHO_C" >&6
22005 else
22006
22007         cf_cv_sizechange=unknown
22008         cf_save_CPPFLAGS="$CPPFLAGS"
22009
22010 for cf_opts in "" "NEED_PTEM_H"
22011 do
22012
22013         CPPFLAGS="$cf_save_CPPFLAGS"
22014         if test -n "$cf_opts"
22015         then
22016
22017         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22018         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22019
22020         fi
22021         cat >conftest.$ac_ext <<_ACEOF
22022 #line 22022 "configure"
22023 #include "confdefs.h"
22024 #include <sys/types.h>
22025 #ifdef HAVE_TERMIOS_H
22026 #include <termios.h>
22027 #else
22028 #ifdef HAVE_TERMIO_H
22029 #include <termio.h>
22030 #endif
22031 #endif
22032
22033 #ifdef NEED_PTEM_H
22034 /* This is a workaround for SCO:  they neglected to define struct winsize in
22035  * termios.h -- it's only in termio.h and ptem.h
22036  */
22037 #include <sys/stream.h>
22038 #include <sys/ptem.h>
22039 #endif
22040
22041 #ifdef HAVE_SYS_IOCTL_H
22042 #include <sys/ioctl.h>
22043 #endif
22044
22045 int
22046 main (void)
22047 {
22048
22049 #ifdef TIOCGSIZE
22050         struct ttysize win;     /* SunOS 3.0... */
22051         int y = win.ts_lines = 2;
22052         int x = win.ts_cols = 1;
22053         (void)y;
22054         (void)x;
22055 #else
22056 #ifdef TIOCGWINSZ
22057         struct winsize win;     /* everything else */
22058         int y = win.ws_row = 2;
22059         int x = win.ws_col = 1;
22060         (void)y;
22061         (void)x;
22062 #else
22063         no TIOCGSIZE or TIOCGWINSZ
22064 #endif /* TIOCGWINSZ */
22065 #endif /* TIOCGSIZE */
22066
22067   ;
22068   return 0;
22069 }
22070 _ACEOF
22071 rm -f conftest.$ac_objext
22072 if { (eval echo "$as_me:22072: \"$ac_compile\"") >&5
22073   (eval $ac_compile) 2>&5
22074   ac_status=$?
22075   echo "$as_me:22075: \$? = $ac_status" >&5
22076   (exit $ac_status); } &&
22077          { ac_try='test -s conftest.$ac_objext'
22078   { (eval echo "$as_me:22078: \"$ac_try\"") >&5
22079   (eval $ac_try) 2>&5
22080   ac_status=$?
22081   echo "$as_me:22081: \$? = $ac_status" >&5
22082   (exit $ac_status); }; }; then
22083   cf_cv_sizechange=yes
22084 else
22085   echo "$as_me: failed program was:" >&5
22086 cat conftest.$ac_ext >&5
22087 cf_cv_sizechange=no
22088 fi
22089 rm -f conftest.$ac_objext conftest.$ac_ext
22090
22091         CPPFLAGS="$cf_save_CPPFLAGS"
22092         if test "$cf_cv_sizechange" = yes ; then
22093                 echo "size-change succeeded ($cf_opts)" >&5
22094                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22095                 break
22096         fi
22097 done
22098
22099 fi
22100 echo "$as_me:22100: result: $cf_cv_sizechange" >&5
22101 echo "${ECHO_T}$cf_cv_sizechange" >&6
22102 if test "$cf_cv_sizechange" != no ; then
22103
22104 cat >>confdefs.h <<\EOF
22105 #define HAVE_SIZECHANGE 1
22106 EOF
22107
22108         case $cf_cv_sizechange in
22109         (NEED*)
22110                 cat >>confdefs.h <<EOF
22111 #define $cf_cv_sizechange  1
22112 EOF
22113
22114                 ;;
22115         esac
22116 fi
22117
22118 echo "$as_me:22118: checking for memmove" >&5
22119 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22120 if test "${ac_cv_func_memmove+set}" = set; then
22121   echo $ECHO_N "(cached) $ECHO_C" >&6
22122 else
22123   cat >conftest.$ac_ext <<_ACEOF
22124 #line 22124 "configure"
22125 #include "confdefs.h"
22126 #define memmove autoconf_temporary
22127 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22128 #undef memmove
22129
22130 #ifdef __cplusplus
22131 extern "C"
22132 #endif
22133
22134 /* We use char because int might match the return type of a gcc2
22135    builtin and then its argument prototype would still apply.  */
22136 char memmove (void);
22137
22138 int
22139 main (void)
22140 {
22141
22142 /* The GNU C library defines stubs for functions which it implements
22143     to always fail with ENOSYS.  Some functions are actually named
22144     something starting with __ and the normal name is an alias.  */
22145 #if defined (__stub_memmove) || defined (__stub___memmove)
22146 #error found stub for memmove
22147 #endif
22148
22149         return memmove ();
22150   ;
22151   return 0;
22152 }
22153 _ACEOF
22154 rm -f conftest.$ac_objext conftest$ac_exeext
22155 if { (eval echo "$as_me:22155: \"$ac_link\"") >&5
22156   (eval $ac_link) 2>&5
22157   ac_status=$?
22158   echo "$as_me:22158: \$? = $ac_status" >&5
22159   (exit $ac_status); } &&
22160          { ac_try='test -s conftest$ac_exeext'
22161   { (eval echo "$as_me:22161: \"$ac_try\"") >&5
22162   (eval $ac_try) 2>&5
22163   ac_status=$?
22164   echo "$as_me:22164: \$? = $ac_status" >&5
22165   (exit $ac_status); }; }; then
22166   ac_cv_func_memmove=yes
22167 else
22168   echo "$as_me: failed program was:" >&5
22169 cat conftest.$ac_ext >&5
22170 ac_cv_func_memmove=no
22171 fi
22172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22173 fi
22174 echo "$as_me:22174: result: $ac_cv_func_memmove" >&5
22175 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22176 if test $ac_cv_func_memmove = yes; then
22177   :
22178 else
22179
22180 echo "$as_me:22180: checking for bcopy" >&5
22181 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22182 if test "${ac_cv_func_bcopy+set}" = set; then
22183   echo $ECHO_N "(cached) $ECHO_C" >&6
22184 else
22185   cat >conftest.$ac_ext <<_ACEOF
22186 #line 22186 "configure"
22187 #include "confdefs.h"
22188 #define bcopy autoconf_temporary
22189 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22190 #undef bcopy
22191
22192 #ifdef __cplusplus
22193 extern "C"
22194 #endif
22195
22196 /* We use char because int might match the return type of a gcc2
22197    builtin and then its argument prototype would still apply.  */
22198 char bcopy (void);
22199
22200 int
22201 main (void)
22202 {
22203
22204 /* The GNU C library defines stubs for functions which it implements
22205     to always fail with ENOSYS.  Some functions are actually named
22206     something starting with __ and the normal name is an alias.  */
22207 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22208 #error found stub for bcopy
22209 #endif
22210
22211         return bcopy ();
22212   ;
22213   return 0;
22214 }
22215 _ACEOF
22216 rm -f conftest.$ac_objext conftest$ac_exeext
22217 if { (eval echo "$as_me:22217: \"$ac_link\"") >&5
22218   (eval $ac_link) 2>&5
22219   ac_status=$?
22220   echo "$as_me:22220: \$? = $ac_status" >&5
22221   (exit $ac_status); } &&
22222          { ac_try='test -s conftest$ac_exeext'
22223   { (eval echo "$as_me:22223: \"$ac_try\"") >&5
22224   (eval $ac_try) 2>&5
22225   ac_status=$?
22226   echo "$as_me:22226: \$? = $ac_status" >&5
22227   (exit $ac_status); }; }; then
22228   ac_cv_func_bcopy=yes
22229 else
22230   echo "$as_me: failed program was:" >&5
22231 cat conftest.$ac_ext >&5
22232 ac_cv_func_bcopy=no
22233 fi
22234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22235 fi
22236 echo "$as_me:22236: result: $ac_cv_func_bcopy" >&5
22237 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22238 if test $ac_cv_func_bcopy = yes; then
22239
22240         echo "$as_me:22240: checking if bcopy does overlapping moves" >&5
22241 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22242 if test "${cf_cv_good_bcopy+set}" = set; then
22243   echo $ECHO_N "(cached) $ECHO_C" >&6
22244 else
22245
22246                 if test "$cross_compiling" = yes; then
22247   cf_cv_good_bcopy=unknown
22248 else
22249   cat >conftest.$ac_ext <<_ACEOF
22250 #line 22250 "configure"
22251 #include "confdefs.h"
22252
22253 int main(void) {
22254         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22255         char temp[40];
22256         bcopy(data, temp, sizeof(data));
22257         bcopy(temp+10, temp, 15);
22258         bcopy(temp+5, temp+15, 10);
22259         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22260 }
22261
22262 _ACEOF
22263 rm -f conftest$ac_exeext
22264 if { (eval echo "$as_me:22264: \"$ac_link\"") >&5
22265   (eval $ac_link) 2>&5
22266   ac_status=$?
22267   echo "$as_me:22267: \$? = $ac_status" >&5
22268   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22269   { (eval echo "$as_me:22269: \"$ac_try\"") >&5
22270   (eval $ac_try) 2>&5
22271   ac_status=$?
22272   echo "$as_me:22272: \$? = $ac_status" >&5
22273   (exit $ac_status); }; }; then
22274   cf_cv_good_bcopy=yes
22275 else
22276   echo "$as_me: program exited with status $ac_status" >&5
22277 echo "$as_me: failed program was:" >&5
22278 cat conftest.$ac_ext >&5
22279 cf_cv_good_bcopy=no
22280 fi
22281 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22282 fi
22283
22284 fi
22285 echo "$as_me:22285: result: $cf_cv_good_bcopy" >&5
22286 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22287
22288 else
22289   cf_cv_good_bcopy=no
22290 fi
22291
22292         if test "$cf_cv_good_bcopy" = yes ; then
22293
22294 cat >>confdefs.h <<\EOF
22295 #define USE_OK_BCOPY 1
22296 EOF
22297
22298         else
22299
22300 cat >>confdefs.h <<\EOF
22301 #define USE_MY_MEMMOVE 1
22302 EOF
22303
22304         fi
22305
22306 fi
22307
22308 tty 2>&1 >/dev/null || {
22309 for ac_func in posix_openpt
22310 do
22311 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22312 echo "$as_me:22312: checking for $ac_func" >&5
22313 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22314 if eval "test \"\${$as_ac_var+set}\" = set"; then
22315   echo $ECHO_N "(cached) $ECHO_C" >&6
22316 else
22317   cat >conftest.$ac_ext <<_ACEOF
22318 #line 22318 "configure"
22319 #include "confdefs.h"
22320 #define $ac_func autoconf_temporary
22321 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22322 #undef $ac_func
22323
22324 #ifdef __cplusplus
22325 extern "C"
22326 #endif
22327
22328 /* We use char because int might match the return type of a gcc2
22329    builtin and then its argument prototype would still apply.  */
22330 char $ac_func (void);
22331
22332 int
22333 main (void)
22334 {
22335
22336 /* The GNU C library defines stubs for functions which it implements
22337     to always fail with ENOSYS.  Some functions are actually named
22338     something starting with __ and the normal name is an alias.  */
22339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22340 #error found stub for $ac_func
22341 #endif
22342
22343         return $ac_func ();
22344   ;
22345   return 0;
22346 }
22347 _ACEOF
22348 rm -f conftest.$ac_objext conftest$ac_exeext
22349 if { (eval echo "$as_me:22349: \"$ac_link\"") >&5
22350   (eval $ac_link) 2>&5
22351   ac_status=$?
22352   echo "$as_me:22352: \$? = $ac_status" >&5
22353   (exit $ac_status); } &&
22354          { ac_try='test -s conftest$ac_exeext'
22355   { (eval echo "$as_me:22355: \"$ac_try\"") >&5
22356   (eval $ac_try) 2>&5
22357   ac_status=$?
22358   echo "$as_me:22358: \$? = $ac_status" >&5
22359   (exit $ac_status); }; }; then
22360   eval "$as_ac_var=yes"
22361 else
22362   echo "$as_me: failed program was:" >&5
22363 cat conftest.$ac_ext >&5
22364 eval "$as_ac_var=no"
22365 fi
22366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22367 fi
22368 echo "$as_me:22368: result: `eval echo '${'$as_ac_var'}'`" >&5
22369 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22370 if test `eval echo '${'$as_ac_var'}'` = yes; then
22371   cat >>confdefs.h <<EOF
22372 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22373 EOF
22374
22375 fi
22376 done
22377  }
22378 echo "$as_me:22378: checking if poll really works" >&5
22379 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22380 if test "${cf_cv_working_poll+set}" = set; then
22381   echo $ECHO_N "(cached) $ECHO_C" >&6
22382 else
22383
22384 if test "$cross_compiling" = yes; then
22385   cf_cv_working_poll=unknown
22386 else
22387   cat >conftest.$ac_ext <<_ACEOF
22388 #line 22388 "configure"
22389 #include "confdefs.h"
22390
22391 #include <stdlib.h>
22392 #include <stdio.h>
22393 #include <unistd.h>
22394 #include <fcntl.h>
22395 #ifdef HAVE_POLL_H
22396 #include <poll.h>
22397 #else
22398 #include <sys/poll.h>
22399 #endif
22400 int main(void) {
22401         struct pollfd myfds;
22402         int ret;
22403
22404         /* check for Darwin bug with respect to "devices" */
22405         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22406         if (myfds.fd < 0)
22407                 myfds.fd = 0;
22408         myfds.events = POLLIN;
22409         myfds.revents = 0;
22410
22411         ret = poll(&myfds, 1, 100);
22412
22413         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22414                 ret = -1;
22415         } else {
22416                 int fd = 0;
22417                 if (!isatty(fd)) {
22418                         fd = open("/dev/tty", 2);       /* O_RDWR */
22419                 }
22420 #ifdef HAVE_POSIX_OPENPT
22421                 if (fd < 0) {
22422                         fd = posix_openpt(O_RDWR);
22423                 }
22424 #endif
22425
22426                 if (fd >= 0) {
22427                         /* also check with standard input */
22428                         myfds.fd = fd;
22429                         myfds.events = POLLIN;
22430                         myfds.revents = 0;
22431                         ret = poll(&myfds, 1, 100);
22432                 } else {
22433                         ret = -1;
22434                 }
22435         }
22436         ${cf_cv_main_return:-return}(ret < 0);
22437 }
22438 _ACEOF
22439 rm -f conftest$ac_exeext
22440 if { (eval echo "$as_me:22440: \"$ac_link\"") >&5
22441   (eval $ac_link) 2>&5
22442   ac_status=$?
22443   echo "$as_me:22443: \$? = $ac_status" >&5
22444   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22445   { (eval echo "$as_me:22445: \"$ac_try\"") >&5
22446   (eval $ac_try) 2>&5
22447   ac_status=$?
22448   echo "$as_me:22448: \$? = $ac_status" >&5
22449   (exit $ac_status); }; }; then
22450   cf_cv_working_poll=yes
22451 else
22452   echo "$as_me: program exited with status $ac_status" >&5
22453 echo "$as_me: failed program was:" >&5
22454 cat conftest.$ac_ext >&5
22455 cf_cv_working_poll=no
22456 fi
22457 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22458 fi
22459 fi
22460 echo "$as_me:22460: result: $cf_cv_working_poll" >&5
22461 echo "${ECHO_T}$cf_cv_working_poll" >&6
22462 test "$cf_cv_working_poll" = "yes" &&
22463 cat >>confdefs.h <<\EOF
22464 #define HAVE_WORKING_POLL 1
22465 EOF
22466
22467 echo "$as_me:22467: checking for va_copy" >&5
22468 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22469 if test "${cf_cv_have_va_copy+set}" = set; then
22470   echo $ECHO_N "(cached) $ECHO_C" >&6
22471 else
22472
22473 cat >conftest.$ac_ext <<_ACEOF
22474 #line 22474 "configure"
22475 #include "confdefs.h"
22476
22477 #include <stdarg.h>
22478
22479 int
22480 main (void)
22481 {
22482
22483         static va_list dst;
22484         static va_list src;
22485         va_copy(dst, src)
22486   ;
22487   return 0;
22488 }
22489 _ACEOF
22490 rm -f conftest.$ac_objext conftest$ac_exeext
22491 if { (eval echo "$as_me:22491: \"$ac_link\"") >&5
22492   (eval $ac_link) 2>&5
22493   ac_status=$?
22494   echo "$as_me:22494: \$? = $ac_status" >&5
22495   (exit $ac_status); } &&
22496          { ac_try='test -s conftest$ac_exeext'
22497   { (eval echo "$as_me:22497: \"$ac_try\"") >&5
22498   (eval $ac_try) 2>&5
22499   ac_status=$?
22500   echo "$as_me:22500: \$? = $ac_status" >&5
22501   (exit $ac_status); }; }; then
22502   cf_cv_have_va_copy=yes
22503 else
22504   echo "$as_me: failed program was:" >&5
22505 cat conftest.$ac_ext >&5
22506 cf_cv_have_va_copy=no
22507 fi
22508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22509 fi
22510 echo "$as_me:22510: result: $cf_cv_have_va_copy" >&5
22511 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22512
22513 if test "$cf_cv_have_va_copy" = yes;
22514 then
22515
22516 cat >>confdefs.h <<\EOF
22517 #define HAVE_VA_COPY 1
22518 EOF
22519
22520 else # !cf_cv_have_va_copy
22521
22522 echo "$as_me:22522: checking for __va_copy" >&5
22523 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22524 if test "${cf_cv_have___va_copy+set}" = set; then
22525   echo $ECHO_N "(cached) $ECHO_C" >&6
22526 else
22527
22528 cat >conftest.$ac_ext <<_ACEOF
22529 #line 22529 "configure"
22530 #include "confdefs.h"
22531
22532 #include <stdarg.h>
22533
22534 int
22535 main (void)
22536 {
22537
22538         static va_list dst;
22539         static va_list src;
22540         __va_copy(dst, src)
22541   ;
22542   return 0;
22543 }
22544 _ACEOF
22545 rm -f conftest.$ac_objext conftest$ac_exeext
22546 if { (eval echo "$as_me:22546: \"$ac_link\"") >&5
22547   (eval $ac_link) 2>&5
22548   ac_status=$?
22549   echo "$as_me:22549: \$? = $ac_status" >&5
22550   (exit $ac_status); } &&
22551          { ac_try='test -s conftest$ac_exeext'
22552   { (eval echo "$as_me:22552: \"$ac_try\"") >&5
22553   (eval $ac_try) 2>&5
22554   ac_status=$?
22555   echo "$as_me:22555: \$? = $ac_status" >&5
22556   (exit $ac_status); }; }; then
22557   cf_cv_have___va_copy=yes
22558 else
22559   echo "$as_me: failed program was:" >&5
22560 cat conftest.$ac_ext >&5
22561 cf_cv_have___va_copy=no
22562 fi
22563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22564 fi
22565 echo "$as_me:22565: result: $cf_cv_have___va_copy" >&5
22566 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22567
22568 if test "$cf_cv_have___va_copy" = yes
22569 then
22570
22571 cat >>confdefs.h <<\EOF
22572 #define HAVE___VA_COPY 1
22573 EOF
22574
22575 else # !cf_cv_have___va_copy
22576
22577 echo "$as_me:22577: checking for __builtin_va_copy" >&5
22578 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22579 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22580   echo $ECHO_N "(cached) $ECHO_C" >&6
22581 else
22582
22583 cat >conftest.$ac_ext <<_ACEOF
22584 #line 22584 "configure"
22585 #include "confdefs.h"
22586
22587 #include <stdarg.h>
22588
22589 int
22590 main (void)
22591 {
22592
22593         static va_list dst;
22594         static va_list src;
22595         __builtin_va_copy(dst, src)
22596   ;
22597   return 0;
22598 }
22599 _ACEOF
22600 rm -f conftest.$ac_objext conftest$ac_exeext
22601 if { (eval echo "$as_me:22601: \"$ac_link\"") >&5
22602   (eval $ac_link) 2>&5
22603   ac_status=$?
22604   echo "$as_me:22604: \$? = $ac_status" >&5
22605   (exit $ac_status); } &&
22606          { ac_try='test -s conftest$ac_exeext'
22607   { (eval echo "$as_me:22607: \"$ac_try\"") >&5
22608   (eval $ac_try) 2>&5
22609   ac_status=$?
22610   echo "$as_me:22610: \$? = $ac_status" >&5
22611   (exit $ac_status); }; }; then
22612   cf_cv_have___builtin_va_copy=yes
22613 else
22614   echo "$as_me: failed program was:" >&5
22615 cat conftest.$ac_ext >&5
22616 cf_cv_have___builtin_va_copy=no
22617 fi
22618 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22619 fi
22620 echo "$as_me:22620: result: $cf_cv_have___builtin_va_copy" >&5
22621 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22622
22623 test "$cf_cv_have___builtin_va_copy" = yes &&
22624
22625 cat >>confdefs.h <<\EOF
22626 #define HAVE___BUILTIN_VA_COPY 1
22627 EOF
22628
22629 fi # cf_cv_have___va_copy
22630
22631 fi # cf_cv_have_va_copy
22632
22633 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22634 (*yes*)
22635         ;;
22636
22637 (*)
22638         echo "$as_me:22638: checking if we can simply copy va_list" >&5
22639 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22640 if test "${cf_cv_pointer_va_list+set}" = set; then
22641   echo $ECHO_N "(cached) $ECHO_C" >&6
22642 else
22643
22644 cat >conftest.$ac_ext <<_ACEOF
22645 #line 22645 "configure"
22646 #include "confdefs.h"
22647
22648 #include <stdarg.h>
22649
22650 int
22651 main (void)
22652 {
22653
22654         va_list dst;
22655         va_list src;
22656         dst = src
22657   ;
22658   return 0;
22659 }
22660 _ACEOF
22661 rm -f conftest.$ac_objext conftest$ac_exeext
22662 if { (eval echo "$as_me:22662: \"$ac_link\"") >&5
22663   (eval $ac_link) 2>&5
22664   ac_status=$?
22665   echo "$as_me:22665: \$? = $ac_status" >&5
22666   (exit $ac_status); } &&
22667          { ac_try='test -s conftest$ac_exeext'
22668   { (eval echo "$as_me:22668: \"$ac_try\"") >&5
22669   (eval $ac_try) 2>&5
22670   ac_status=$?
22671   echo "$as_me:22671: \$? = $ac_status" >&5
22672   (exit $ac_status); }; }; then
22673   cf_cv_pointer_va_list=yes
22674 else
22675   echo "$as_me: failed program was:" >&5
22676 cat conftest.$ac_ext >&5
22677 cf_cv_pointer_va_list=no
22678 fi
22679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22680 fi
22681 echo "$as_me:22681: result: $cf_cv_pointer_va_list" >&5
22682 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22683
22684         if test "$cf_cv_pointer_va_list" = no
22685         then
22686                 echo "$as_me:22686: checking if we can copy va_list indirectly" >&5
22687 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22688 if test "${cf_cv_array_va_list+set}" = set; then
22689   echo $ECHO_N "(cached) $ECHO_C" >&6
22690 else
22691
22692 cat >conftest.$ac_ext <<_ACEOF
22693 #line 22693 "configure"
22694 #include "confdefs.h"
22695
22696 #include <stdarg.h>
22697
22698 int
22699 main (void)
22700 {
22701
22702         va_list dst;
22703         va_list src;
22704         *dst = *src
22705   ;
22706   return 0;
22707 }
22708 _ACEOF
22709 rm -f conftest.$ac_objext conftest$ac_exeext
22710 if { (eval echo "$as_me:22710: \"$ac_link\"") >&5
22711   (eval $ac_link) 2>&5
22712   ac_status=$?
22713   echo "$as_me:22713: \$? = $ac_status" >&5
22714   (exit $ac_status); } &&
22715          { ac_try='test -s conftest$ac_exeext'
22716   { (eval echo "$as_me:22716: \"$ac_try\"") >&5
22717   (eval $ac_try) 2>&5
22718   ac_status=$?
22719   echo "$as_me:22719: \$? = $ac_status" >&5
22720   (exit $ac_status); }; }; then
22721   cf_cv_array_va_list=yes
22722 else
22723   echo "$as_me: failed program was:" >&5
22724 cat conftest.$ac_ext >&5
22725 cf_cv_array_va_list=no
22726 fi
22727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22728 fi
22729 echo "$as_me:22729: result: $cf_cv_array_va_list" >&5
22730 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22731                 test "$cf_cv_array_va_list" = yes &&
22732 cat >>confdefs.h <<\EOF
22733 #define ARRAY_VA_LIST 1
22734 EOF
22735
22736         fi
22737         ;;
22738 esac
22739
22740 echo "$as_me:22740: checking for pid_t" >&5
22741 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22742 if test "${ac_cv_type_pid_t+set}" = set; then
22743   echo $ECHO_N "(cached) $ECHO_C" >&6
22744 else
22745   cat >conftest.$ac_ext <<_ACEOF
22746 #line 22746 "configure"
22747 #include "confdefs.h"
22748 $ac_includes_default
22749 int
22750 main (void)
22751 {
22752 if ((pid_t *) 0)
22753   return 0;
22754 if (sizeof (pid_t))
22755   return 0;
22756   ;
22757   return 0;
22758 }
22759 _ACEOF
22760 rm -f conftest.$ac_objext
22761 if { (eval echo "$as_me:22761: \"$ac_compile\"") >&5
22762   (eval $ac_compile) 2>&5
22763   ac_status=$?
22764   echo "$as_me:22764: \$? = $ac_status" >&5
22765   (exit $ac_status); } &&
22766          { ac_try='test -s conftest.$ac_objext'
22767   { (eval echo "$as_me:22767: \"$ac_try\"") >&5
22768   (eval $ac_try) 2>&5
22769   ac_status=$?
22770   echo "$as_me:22770: \$? = $ac_status" >&5
22771   (exit $ac_status); }; }; then
22772   ac_cv_type_pid_t=yes
22773 else
22774   echo "$as_me: failed program was:" >&5
22775 cat conftest.$ac_ext >&5
22776 ac_cv_type_pid_t=no
22777 fi
22778 rm -f conftest.$ac_objext conftest.$ac_ext
22779 fi
22780 echo "$as_me:22780: result: $ac_cv_type_pid_t" >&5
22781 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22782 if test $ac_cv_type_pid_t = yes; then
22783   :
22784 else
22785
22786 cat >>confdefs.h <<EOF
22787 #define pid_t int
22788 EOF
22789
22790 fi
22791
22792 for ac_header in unistd.h vfork.h
22793 do
22794 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22795 echo "$as_me:22795: checking for $ac_header" >&5
22796 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22797 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22798   echo $ECHO_N "(cached) $ECHO_C" >&6
22799 else
22800   cat >conftest.$ac_ext <<_ACEOF
22801 #line 22801 "configure"
22802 #include "confdefs.h"
22803 #include <$ac_header>
22804 _ACEOF
22805 if { (eval echo "$as_me:22805: \"$ac_cpp conftest.$ac_ext\"") >&5
22806   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22807   ac_status=$?
22808   egrep -v '^ *\+' conftest.er1 >conftest.err
22809   rm -f conftest.er1
22810   cat conftest.err >&5
22811   echo "$as_me:22811: \$? = $ac_status" >&5
22812   (exit $ac_status); } >/dev/null; then
22813   if test -s conftest.err; then
22814     ac_cpp_err=$ac_c_preproc_warn_flag
22815   else
22816     ac_cpp_err=
22817   fi
22818 else
22819   ac_cpp_err=yes
22820 fi
22821 if test -z "$ac_cpp_err"; then
22822   eval "$as_ac_Header=yes"
22823 else
22824   echo "$as_me: failed program was:" >&5
22825   cat conftest.$ac_ext >&5
22826   eval "$as_ac_Header=no"
22827 fi
22828 rm -f conftest.err conftest.$ac_ext
22829 fi
22830 echo "$as_me:22830: result: `eval echo '${'$as_ac_Header'}'`" >&5
22831 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22832 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22833   cat >>confdefs.h <<EOF
22834 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22835 EOF
22836
22837 fi
22838 done
22839
22840 for ac_func in fork vfork
22841 do
22842 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22843 echo "$as_me:22843: checking for $ac_func" >&5
22844 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22845 if eval "test \"\${$as_ac_var+set}\" = set"; then
22846   echo $ECHO_N "(cached) $ECHO_C" >&6
22847 else
22848   cat >conftest.$ac_ext <<_ACEOF
22849 #line 22849 "configure"
22850 #include "confdefs.h"
22851 #define $ac_func autoconf_temporary
22852 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22853 #undef $ac_func
22854
22855 #ifdef __cplusplus
22856 extern "C"
22857 #endif
22858
22859 /* We use char because int might match the return type of a gcc2
22860    builtin and then its argument prototype would still apply.  */
22861 char $ac_func (void);
22862
22863 int
22864 main (void)
22865 {
22866
22867 /* The GNU C library defines stubs for functions which it implements
22868     to always fail with ENOSYS.  Some functions are actually named
22869     something starting with __ and the normal name is an alias.  */
22870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22871 #error found stub for $ac_func
22872 #endif
22873
22874         return $ac_func ();
22875   ;
22876   return 0;
22877 }
22878 _ACEOF
22879 rm -f conftest.$ac_objext conftest$ac_exeext
22880 if { (eval echo "$as_me:22880: \"$ac_link\"") >&5
22881   (eval $ac_link) 2>&5
22882   ac_status=$?
22883   echo "$as_me:22883: \$? = $ac_status" >&5
22884   (exit $ac_status); } &&
22885          { ac_try='test -s conftest$ac_exeext'
22886   { (eval echo "$as_me:22886: \"$ac_try\"") >&5
22887   (eval $ac_try) 2>&5
22888   ac_status=$?
22889   echo "$as_me:22889: \$? = $ac_status" >&5
22890   (exit $ac_status); }; }; then
22891   eval "$as_ac_var=yes"
22892 else
22893   echo "$as_me: failed program was:" >&5
22894 cat conftest.$ac_ext >&5
22895 eval "$as_ac_var=no"
22896 fi
22897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22898 fi
22899 echo "$as_me:22899: result: `eval echo '${'$as_ac_var'}'`" >&5
22900 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22901 if test `eval echo '${'$as_ac_var'}'` = yes; then
22902   cat >>confdefs.h <<EOF
22903 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22904 EOF
22905
22906 fi
22907 done
22908
22909 ac_cv_func_fork_works=$ac_cv_func_fork
22910 if test "x$ac_cv_func_fork" = xyes; then
22911   echo "$as_me:22911: checking for working fork" >&5
22912 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22913 if test "${ac_cv_func_fork_works+set}" = set; then
22914   echo $ECHO_N "(cached) $ECHO_C" >&6
22915 else
22916   if test "$cross_compiling" = yes; then
22917   ac_cv_func_fork_works=cross
22918 else
22919   cat >conftest.$ac_ext <<_ACEOF
22920 /* By Rüdiger Kuhlmann. */
22921       #include <sys/types.h>
22922       #if HAVE_UNISTD_H
22923       # include <unistd.h>
22924       #endif
22925       /* Some systems only have a dummy stub for fork() */
22926       int main (void)
22927       {
22928         if (fork() < 0)
22929           $ac_main_return (1);
22930         $ac_main_return (0);
22931       }
22932 _ACEOF
22933 rm -f conftest$ac_exeext
22934 if { (eval echo "$as_me:22934: \"$ac_link\"") >&5
22935   (eval $ac_link) 2>&5
22936   ac_status=$?
22937   echo "$as_me:22937: \$? = $ac_status" >&5
22938   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22939   { (eval echo "$as_me:22939: \"$ac_try\"") >&5
22940   (eval $ac_try) 2>&5
22941   ac_status=$?
22942   echo "$as_me:22942: \$? = $ac_status" >&5
22943   (exit $ac_status); }; }; then
22944   ac_cv_func_fork_works=yes
22945 else
22946   echo "$as_me: program exited with status $ac_status" >&5
22947 echo "$as_me: failed program was:" >&5
22948 cat conftest.$ac_ext >&5
22949 ac_cv_func_fork_works=no
22950 fi
22951 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22952 fi
22953 fi
22954 echo "$as_me:22954: result: $ac_cv_func_fork_works" >&5
22955 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22956
22957 fi
22958 if test "x$ac_cv_func_fork_works" = xcross; then
22959   case $host in
22960     *-*-amigaos* | *-*-msdosdjgpp*)
22961       # Override, as these systems have only a dummy fork() stub
22962       ac_cv_func_fork_works=no
22963       ;;
22964     *)
22965       ac_cv_func_fork_works=yes
22966       ;;
22967   esac
22968   { echo "$as_me:22968: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22969 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22970 fi
22971 ac_cv_func_vfork_works=$ac_cv_func_vfork
22972 if test "x$ac_cv_func_vfork" = xyes; then
22973   echo "$as_me:22973: checking for working vfork" >&5
22974 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22975 if test "${ac_cv_func_vfork_works+set}" = set; then
22976   echo $ECHO_N "(cached) $ECHO_C" >&6
22977 else
22978   if test "$cross_compiling" = yes; then
22979   ac_cv_func_vfork_works=cross
22980 else
22981   cat >conftest.$ac_ext <<_ACEOF
22982 #line 22982 "configure"
22983 #include "confdefs.h"
22984 /* Thanks to Paul Eggert for this test.  */
22985 #include <stdio.h>
22986 #include <sys/types.h>
22987 #include <sys/stat.h>
22988 #if HAVE_UNISTD_H
22989 # include <unistd.h>
22990 #endif
22991 #if HAVE_VFORK_H
22992 # include <vfork.h>
22993 #endif
22994 /* On some sparc systems, changes by the child to local and incoming
22995    argument registers are propagated back to the parent.  The compiler
22996    is told about this with #include <vfork.h>, but some compilers
22997    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22998    static variable whose address is put into a register that is
22999    clobbered by the vfork.  */
23000 static
23001 #ifdef __cplusplus
23002 sparc_address_test (int arg)
23003 # else
23004 sparc_address_test (arg) int arg;
23005 #endif
23006 {
23007   static pid_t child;
23008   if (!child) {
23009     child = vfork ();
23010     if (child < 0) {
23011       perror ("vfork");
23012       _exit(2);
23013     }
23014     if (!child) {
23015       arg = getpid();
23016       write(-1, "", 0);
23017       _exit (arg);
23018     }
23019   }
23020 }
23021
23022 int
23023 main (void)
23024 {
23025   pid_t parent = getpid ();
23026   pid_t child;
23027
23028   sparc_address_test ();
23029
23030   child = vfork ();
23031
23032   if (child == 0) {
23033     /* Here is another test for sparc vfork register problems.  This
23034        test uses lots of local variables, at least as many local
23035        variables as main has allocated so far including compiler
23036        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23037        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23038        reuse the register of parent for one of the local variables,
23039        since it will think that parent can't possibly be used any more
23040        in this routine.  Assigning to the local variable will thus
23041        munge parent in the parent process.  */
23042     pid_t
23043       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23044       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23045     /* Convince the compiler that p..p7 are live; otherwise, it might
23046        use the same hardware register for all 8 local variables.  */
23047     if (p != p1 || p != p2 || p != p3 || p != p4
23048         || p != p5 || p != p6 || p != p7)
23049       _exit(1);
23050
23051     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23052        from child file descriptors.  If the child closes a descriptor
23053        before it execs or exits, this munges the parent's descriptor
23054        as well.  Test for this by closing stdout in the child.  */
23055     _exit(close(fileno(stdout)) != 0);
23056   } else {
23057     int status;
23058     struct stat st;
23059
23060     while (wait(&status) != child)
23061       ;
23062     $ac_main_return(
23063          /* Was there some problem with vforking?  */
23064          child < 0
23065
23066          /* Did the child fail?  (This shouldn't happen.)  */
23067          || status
23068
23069          /* Did the vfork/compiler bug occur?  */
23070          || parent != getpid()
23071
23072          /* Did the file descriptor bug occur?  */
23073          || fstat(fileno(stdout), &st) != 0
23074          );
23075   }
23076 }
23077 _ACEOF
23078 rm -f conftest$ac_exeext
23079 if { (eval echo "$as_me:23079: \"$ac_link\"") >&5
23080   (eval $ac_link) 2>&5
23081   ac_status=$?
23082   echo "$as_me:23082: \$? = $ac_status" >&5
23083   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23084   { (eval echo "$as_me:23084: \"$ac_try\"") >&5
23085   (eval $ac_try) 2>&5
23086   ac_status=$?
23087   echo "$as_me:23087: \$? = $ac_status" >&5
23088   (exit $ac_status); }; }; then
23089   ac_cv_func_vfork_works=yes
23090 else
23091   echo "$as_me: program exited with status $ac_status" >&5
23092 echo "$as_me: failed program was:" >&5
23093 cat conftest.$ac_ext >&5
23094 ac_cv_func_vfork_works=no
23095 fi
23096 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23097 fi
23098 fi
23099 echo "$as_me:23099: result: $ac_cv_func_vfork_works" >&5
23100 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23101
23102 fi;
23103 if test "x$ac_cv_func_fork_works" = xcross; then
23104   ac_cv_func_vfork_works=ac_cv_func_vfork
23105   { echo "$as_me:23105: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23106 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23107 fi
23108
23109 if test "x$ac_cv_func_vfork_works" = xyes; then
23110
23111 cat >>confdefs.h <<\EOF
23112 #define HAVE_WORKING_VFORK 1
23113 EOF
23114
23115 else
23116
23117 cat >>confdefs.h <<\EOF
23118 #define vfork fork
23119 EOF
23120
23121 fi
23122 if test "x$ac_cv_func_fork_works" = xyes; then
23123
23124 cat >>confdefs.h <<\EOF
23125 #define HAVE_WORKING_FORK 1
23126 EOF
23127
23128 fi
23129
23130 echo "$as_me:23130: checking if fopen accepts explicit binary mode" >&5
23131 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23132 if test "${cf_cv_fopen_bin_r+set}" = set; then
23133   echo $ECHO_N "(cached) $ECHO_C" >&6
23134 else
23135
23136         if test "$cross_compiling" = yes; then
23137   cf_cv_fopen_bin_r=unknown
23138 else
23139   cat >conftest.$ac_ext <<_ACEOF
23140 #line 23140 "configure"
23141 #include "confdefs.h"
23142
23143 #include <stdio.h>
23144 int main(void) {
23145         FILE *fp = fopen("conftest.tmp", "wb");
23146         int rc = 0;
23147         if (fp != 0) {
23148                 int p, q;
23149                 for (p = 0; p < 256; ++p) {
23150                         fputc(p, fp);
23151                 }
23152                 fclose(fp);
23153                 fp = fopen("conftest.tmp", "rb");
23154                 if (fp != 0) {
23155                         for (p = 0; p < 256; ++p) {
23156                                 q = fgetc(fp);
23157                                 if (q != p) {
23158                                         rc = 1;
23159                                         break;
23160                                 }
23161                         }
23162                 } else {
23163                         rc = 1;
23164                 }
23165         } else {
23166                 rc = 1;
23167         }
23168         ${cf_cv_main_return:-return} (rc);
23169 }
23170
23171 _ACEOF
23172 rm -f conftest$ac_exeext
23173 if { (eval echo "$as_me:23173: \"$ac_link\"") >&5
23174   (eval $ac_link) 2>&5
23175   ac_status=$?
23176   echo "$as_me:23176: \$? = $ac_status" >&5
23177   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23178   { (eval echo "$as_me:23178: \"$ac_try\"") >&5
23179   (eval $ac_try) 2>&5
23180   ac_status=$?
23181   echo "$as_me:23181: \$? = $ac_status" >&5
23182   (exit $ac_status); }; }; then
23183   cf_cv_fopen_bin_r=yes
23184 else
23185   echo "$as_me: program exited with status $ac_status" >&5
23186 echo "$as_me: failed program was:" >&5
23187 cat conftest.$ac_ext >&5
23188 cf_cv_fopen_bin_r=no
23189 fi
23190 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23191 fi
23192
23193 fi
23194 echo "$as_me:23194: result: $cf_cv_fopen_bin_r" >&5
23195 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23196 test "x$cf_cv_fopen_bin_r" != xno &&
23197 cat >>confdefs.h <<\EOF
23198 #define USE_FOPEN_BIN_R 1
23199 EOF
23200
23201 # special check for test/ditto.c
23202
23203 echo "$as_me:23203: checking for openpty in -lutil" >&5
23204 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23205 if test "${ac_cv_lib_util_openpty+set}" = set; then
23206   echo $ECHO_N "(cached) $ECHO_C" >&6
23207 else
23208   ac_check_lib_save_LIBS=$LIBS
23209 LIBS="-lutil  $LIBS"
23210 cat >conftest.$ac_ext <<_ACEOF
23211 #line 23211 "configure"
23212 #include "confdefs.h"
23213
23214 /* Override any gcc2 internal prototype to avoid an error.  */
23215 #ifdef __cplusplus
23216 extern "C"
23217 #endif
23218 /* We use char because int might match the return type of a gcc2
23219    builtin and then its argument prototype would still apply.  */
23220 char openpty ();
23221 int
23222 main (void)
23223 {
23224 openpty ();
23225   ;
23226   return 0;
23227 }
23228 _ACEOF
23229 rm -f conftest.$ac_objext conftest$ac_exeext
23230 if { (eval echo "$as_me:23230: \"$ac_link\"") >&5
23231   (eval $ac_link) 2>&5
23232   ac_status=$?
23233   echo "$as_me:23233: \$? = $ac_status" >&5
23234   (exit $ac_status); } &&
23235          { ac_try='test -s conftest$ac_exeext'
23236   { (eval echo "$as_me:23236: \"$ac_try\"") >&5
23237   (eval $ac_try) 2>&5
23238   ac_status=$?
23239   echo "$as_me:23239: \$? = $ac_status" >&5
23240   (exit $ac_status); }; }; then
23241   ac_cv_lib_util_openpty=yes
23242 else
23243   echo "$as_me: failed program was:" >&5
23244 cat conftest.$ac_ext >&5
23245 ac_cv_lib_util_openpty=no
23246 fi
23247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23248 LIBS=$ac_check_lib_save_LIBS
23249 fi
23250 echo "$as_me:23250: result: $ac_cv_lib_util_openpty" >&5
23251 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23252 if test $ac_cv_lib_util_openpty = yes; then
23253   cf_cv_lib_util=yes
23254 else
23255   cf_cv_lib_util=no
23256 fi
23257
23258 echo "$as_me:23258: checking for openpty header" >&5
23259 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23260 if test "${cf_cv_func_openpty+set}" = set; then
23261   echo $ECHO_N "(cached) $ECHO_C" >&6
23262 else
23263
23264         cf_save_LIBS="$LIBS"
23265         test $cf_cv_lib_util = yes && {
23266 cf_add_libs="$LIBS"
23267 # reverse order
23268 cf_add_0lib=
23269 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23270 # filter duplicates
23271 for cf_add_1lib in $cf_add_0lib; do
23272         for cf_add_2lib in $cf_add_libs; do
23273                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23274                         cf_add_1lib=
23275                         break
23276                 fi
23277         done
23278         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23279 done
23280 LIBS="$cf_add_libs"
23281  }
23282         for cf_header in pty.h libutil.h util.h
23283         do
23284         cat >conftest.$ac_ext <<_ACEOF
23285 #line 23285 "configure"
23286 #include "confdefs.h"
23287
23288 #include <$cf_header>
23289
23290 int
23291 main (void)
23292 {
23293
23294         int x = openpty((int *)0, (int *)0, (char *)0,
23295                                    (struct termios *)0, (struct winsize *)0);
23296
23297   ;
23298   return 0;
23299 }
23300 _ACEOF
23301 rm -f conftest.$ac_objext conftest$ac_exeext
23302 if { (eval echo "$as_me:23302: \"$ac_link\"") >&5
23303   (eval $ac_link) 2>&5
23304   ac_status=$?
23305   echo "$as_me:23305: \$? = $ac_status" >&5
23306   (exit $ac_status); } &&
23307          { ac_try='test -s conftest$ac_exeext'
23308   { (eval echo "$as_me:23308: \"$ac_try\"") >&5
23309   (eval $ac_try) 2>&5
23310   ac_status=$?
23311   echo "$as_me:23311: \$? = $ac_status" >&5
23312   (exit $ac_status); }; }; then
23313
23314                 cf_cv_func_openpty=$cf_header
23315                 break
23316
23317 else
23318   echo "$as_me: failed program was:" >&5
23319 cat conftest.$ac_ext >&5
23320
23321                 cf_cv_func_openpty=no
23322
23323 fi
23324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23325         done
23326         LIBS="$cf_save_LIBS"
23327
23328 fi
23329 echo "$as_me:23329: result: $cf_cv_func_openpty" >&5
23330 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23331
23332 if test "$cf_cv_func_openpty" != no ; then
23333
23334 cat >>confdefs.h <<EOF
23335 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23336 EOF
23337
23338 cat >>confdefs.h <<\EOF
23339 #define USE_XTERM_PTY 1
23340 EOF
23341
23342         if test "x$cf_cv_lib_util" = xyes ; then
23343
23344 cf_add_libs="$TEST_LIBS"
23345 # reverse order
23346 cf_add_0lib=
23347 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23348 # filter duplicates
23349 for cf_add_1lib in $cf_add_0lib; do
23350         for cf_add_2lib in $cf_add_libs; do
23351                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23352                         cf_add_1lib=
23353                         break
23354                 fi
23355         done
23356         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23357 done
23358 TEST_LIBS="$cf_add_libs"
23359
23360         fi
23361 fi
23362
23363 if test "$with_hashed_db" != no ; then
23364
23365 cat >>confdefs.h <<\EOF
23366 #define USE_HASHED_DB 1
23367 EOF
23368
23369 case $with_hashed_db in
23370 (yes|*able*)
23371         ;;
23372 (*)
23373         if test -d "$with_hashed_db" ; then
23374
23375 if test -n "$with_hashed_db/include" ; then
23376   for cf_add_incdir in $with_hashed_db/include
23377   do
23378         while test $cf_add_incdir != /usr/include
23379         do
23380           if test -d $cf_add_incdir
23381           then
23382                 cf_have_incdir=no
23383                 if test -n "$CFLAGS$CPPFLAGS" ; then
23384                   # a loop is needed to ensure we can add subdirs of existing dirs
23385                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23386                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23387                           cf_have_incdir=yes; break
23388                         fi
23389                   done
23390                 fi
23391
23392                 if test "$cf_have_incdir" = no ; then
23393                   if test "$cf_add_incdir" = /usr/local/include ; then
23394                         if test "$GCC" = yes
23395                         then
23396                           cf_save_CPPFLAGS=$CPPFLAGS
23397
23398         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23399         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23400
23401                           cat >conftest.$ac_ext <<_ACEOF
23402 #line 23402 "configure"
23403 #include "confdefs.h"
23404 #include <stdio.h>
23405 int
23406 main (void)
23407 {
23408 printf("Hello")
23409   ;
23410   return 0;
23411 }
23412 _ACEOF
23413 rm -f conftest.$ac_objext
23414 if { (eval echo "$as_me:23414: \"$ac_compile\"") >&5
23415   (eval $ac_compile) 2>&5
23416   ac_status=$?
23417   echo "$as_me:23417: \$? = $ac_status" >&5
23418   (exit $ac_status); } &&
23419          { ac_try='test -s conftest.$ac_objext'
23420   { (eval echo "$as_me:23420: \"$ac_try\"") >&5
23421   (eval $ac_try) 2>&5
23422   ac_status=$?
23423   echo "$as_me:23423: \$? = $ac_status" >&5
23424   (exit $ac_status); }; }; then
23425   :
23426 else
23427   echo "$as_me: failed program was:" >&5
23428 cat conftest.$ac_ext >&5
23429 cf_have_incdir=yes
23430 fi
23431 rm -f conftest.$ac_objext conftest.$ac_ext
23432                           CPPFLAGS=$cf_save_CPPFLAGS
23433                         fi
23434                   fi
23435                 fi
23436
23437                 if test "$cf_have_incdir" = no ; then
23438                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23439
23440 echo "${as_me:-configure}:23440: testing adding $cf_add_incdir to include-path ..." 1>&5
23441
23442                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23443
23444                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
23445                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23446                   cf_add_incdir="$cf_top_incdir"
23447                 else
23448                   break
23449                 fi
23450           else
23451                 break
23452           fi
23453         done
23454   done
23455 fi
23456
23457 if test -n "$with_hashed_db/lib" ; then
23458         for cf_add_libdir in $with_hashed_db/lib
23459         do
23460                 if test $cf_add_libdir = /usr/lib ; then
23461                         :
23462                 elif test -d $cf_add_libdir
23463                 then
23464                         cf_have_libdir=no
23465                         if test -n "$LDFLAGS$LIBS" ; then
23466                                 # a loop is needed to ensure we can add subdirs of existing dirs
23467                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23468                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23469                                                 cf_have_libdir=yes; break
23470                                         fi
23471                                 done
23472                         fi
23473                         if test "$cf_have_libdir" = no ; then
23474                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23475
23476 echo "${as_me:-configure}:23476: testing adding $cf_add_libdir to library-path ..." 1>&5
23477
23478                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23479                         fi
23480                 fi
23481         done
23482 fi
23483
23484         else
23485                 case "$with_hashed_db" in
23486                 (./*|../*|/*)
23487                         { echo "$as_me:23487: WARNING: no such directory $with_hashed_db" >&5
23488 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23489                         ;;
23490                 (*)
23491
23492 cf_search=
23493
23494 test "x$prefix" != "xNONE" && \
23495 test -d "$prefix" && \
23496  {
23497         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23498         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
23499         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23500         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23501         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23502         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23503 }
23504
23505 for cf_subdir_prefix in \
23506         /usr \
23507         /usr/local \
23508         /usr/pkg \
23509         /opt \
23510         /opt/local \
23511         $HOME
23512 do
23513
23514 test "x$cf_subdir_prefix" != "x$prefix" && \
23515 test -d "$cf_subdir_prefix" && \
23516 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
23517         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23518         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
23519         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23520         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23521         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23522         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"
23523 }
23524
23525 done
23526
23527         for cf_item in $cf_search
23528         do
23529                 case $cf_item in
23530                 (*/$with_hashed_db)
23531
23532 if test -n "$cf_item" ; then
23533   for cf_add_incdir in $cf_item
23534   do
23535         while test $cf_add_incdir != /usr/include
23536         do
23537           if test -d $cf_add_incdir
23538           then
23539                 cf_have_incdir=no
23540                 if test -n "$CFLAGS$CPPFLAGS" ; then
23541                   # a loop is needed to ensure we can add subdirs of existing dirs
23542                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23543                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23544                           cf_have_incdir=yes; break
23545                         fi
23546                   done
23547                 fi
23548
23549                 if test "$cf_have_incdir" = no ; then
23550                   if test "$cf_add_incdir" = /usr/local/include ; then
23551                         if test "$GCC" = yes
23552                         then
23553                           cf_save_CPPFLAGS=$CPPFLAGS
23554
23555         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23556         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23557
23558                           cat >conftest.$ac_ext <<_ACEOF
23559 #line 23559 "configure"
23560 #include "confdefs.h"
23561 #include <stdio.h>
23562 int
23563 main (void)
23564 {
23565 printf("Hello")
23566   ;
23567   return 0;
23568 }
23569 _ACEOF
23570 rm -f conftest.$ac_objext
23571 if { (eval echo "$as_me:23571: \"$ac_compile\"") >&5
23572   (eval $ac_compile) 2>&5
23573   ac_status=$?
23574   echo "$as_me:23574: \$? = $ac_status" >&5
23575   (exit $ac_status); } &&
23576          { ac_try='test -s conftest.$ac_objext'
23577   { (eval echo "$as_me:23577: \"$ac_try\"") >&5
23578   (eval $ac_try) 2>&5
23579   ac_status=$?
23580   echo "$as_me:23580: \$? = $ac_status" >&5
23581   (exit $ac_status); }; }; then
23582   :
23583 else
23584   echo "$as_me: failed program was:" >&5
23585 cat conftest.$ac_ext >&5
23586 cf_have_incdir=yes
23587 fi
23588 rm -f conftest.$ac_objext conftest.$ac_ext
23589                           CPPFLAGS=$cf_save_CPPFLAGS
23590                         fi
23591                   fi
23592                 fi
23593
23594                 if test "$cf_have_incdir" = no ; then
23595                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23596
23597 echo "${as_me:-configure}:23597: testing adding $cf_add_incdir to include-path ..." 1>&5
23598
23599                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23600
23601                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
23602                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23603                   cf_add_incdir="$cf_top_incdir"
23604                 else
23605                   break
23606                 fi
23607           else
23608                 break
23609           fi
23610         done
23611   done
23612 fi
23613
23614                         ;;
23615                 esac
23616         done
23617
23618 cf_search=
23619
23620 test "x$prefix" != "xNONE" && \
23621 test -d "$prefix" && \
23622  {
23623         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23624         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
23625         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23626         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23627         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23628         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23629 }
23630
23631 for cf_subdir_prefix in \
23632         /usr \
23633         /usr/local \
23634         /usr/pkg \
23635         /opt \
23636         /opt/local \
23637         $HOME
23638 do
23639
23640 test "x$cf_subdir_prefix" != "x$prefix" && \
23641 test -d "$cf_subdir_prefix" && \
23642 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
23643         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23644         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23645         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23646         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23647         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23648         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"
23649 }
23650
23651 done
23652
23653         for cf_item in $cf_search
23654         do
23655                 case $cf_item in
23656                 (*/$with_hashed_db)
23657
23658 if test -n "$cf_item" ; then
23659         for cf_add_libdir in $cf_item
23660         do
23661                 if test $cf_add_libdir = /usr/lib ; then
23662                         :
23663                 elif test -d $cf_add_libdir
23664                 then
23665                         cf_have_libdir=no
23666                         if test -n "$LDFLAGS$LIBS" ; then
23667                                 # a loop is needed to ensure we can add subdirs of existing dirs
23668                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23669                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23670                                                 cf_have_libdir=yes; break
23671                                         fi
23672                                 done
23673                         fi
23674                         if test "$cf_have_libdir" = no ; then
23675                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23676
23677 echo "${as_me:-configure}:23677: testing adding $cf_add_libdir to library-path ..." 1>&5
23678
23679                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23680                         fi
23681                 fi
23682         done
23683 fi
23684
23685                         ;;
23686                 esac
23687         done
23688
23689                         ;;
23690                 esac
23691         fi
23692 esac
23693
23694 echo "$as_me:23694: checking for db.h" >&5
23695 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23696 if test "${ac_cv_header_db_h+set}" = set; then
23697   echo $ECHO_N "(cached) $ECHO_C" >&6
23698 else
23699   cat >conftest.$ac_ext <<_ACEOF
23700 #line 23700 "configure"
23701 #include "confdefs.h"
23702 #include <db.h>
23703 _ACEOF
23704 if { (eval echo "$as_me:23704: \"$ac_cpp conftest.$ac_ext\"") >&5
23705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23706   ac_status=$?
23707   egrep -v '^ *\+' conftest.er1 >conftest.err
23708   rm -f conftest.er1
23709   cat conftest.err >&5
23710   echo "$as_me:23710: \$? = $ac_status" >&5
23711   (exit $ac_status); } >/dev/null; then
23712   if test -s conftest.err; then
23713     ac_cpp_err=$ac_c_preproc_warn_flag
23714   else
23715     ac_cpp_err=
23716   fi
23717 else
23718   ac_cpp_err=yes
23719 fi
23720 if test -z "$ac_cpp_err"; then
23721   ac_cv_header_db_h=yes
23722 else
23723   echo "$as_me: failed program was:" >&5
23724   cat conftest.$ac_ext >&5
23725   ac_cv_header_db_h=no
23726 fi
23727 rm -f conftest.err conftest.$ac_ext
23728 fi
23729 echo "$as_me:23729: result: $ac_cv_header_db_h" >&5
23730 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23731 if test $ac_cv_header_db_h = yes; then
23732
23733 echo "$as_me:23733: checking for version of db" >&5
23734 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23735 if test "${cf_cv_hashed_db_version+set}" = set; then
23736   echo $ECHO_N "(cached) $ECHO_C" >&6
23737 else
23738
23739 cf_cv_hashed_db_version=unknown
23740
23741 for cf_db_version in 1 2 3 4 5 6
23742 do
23743
23744 echo "${as_me:-configure}:23744: testing checking for db version $cf_db_version ..." 1>&5
23745
23746         cat >conftest.$ac_ext <<_ACEOF
23747 #line 23747 "configure"
23748 #include "confdefs.h"
23749
23750 $ac_includes_default
23751 #include <db.h>
23752
23753 #ifdef DB_VERSION_MAJOR
23754         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23755 #if $cf_db_version == DB_VERSION_MAJOR
23756         /* ok */
23757 #else
23758         make an error
23759 #endif
23760 #else
23761 #if $cf_db_version == 1
23762         /* ok: assuming this is DB 1.8.5 */
23763 #else
23764         make an error
23765 #endif
23766 #endif
23767
23768 int
23769 main (void)
23770 {
23771 DBT *foo = 0
23772   ;
23773   return 0;
23774 }
23775 _ACEOF
23776 rm -f conftest.$ac_objext
23777 if { (eval echo "$as_me:23777: \"$ac_compile\"") >&5
23778   (eval $ac_compile) 2>&5
23779   ac_status=$?
23780   echo "$as_me:23780: \$? = $ac_status" >&5
23781   (exit $ac_status); } &&
23782          { ac_try='test -s conftest.$ac_objext'
23783   { (eval echo "$as_me:23783: \"$ac_try\"") >&5
23784   (eval $ac_try) 2>&5
23785   ac_status=$?
23786   echo "$as_me:23786: \$? = $ac_status" >&5
23787   (exit $ac_status); }; }; then
23788
23789         cf_cv_hashed_db_version=$cf_db_version
23790         break
23791
23792 else
23793   echo "$as_me: failed program was:" >&5
23794 cat conftest.$ac_ext >&5
23795 fi
23796 rm -f conftest.$ac_objext conftest.$ac_ext
23797 done
23798
23799 fi
23800 echo "$as_me:23800: result: $cf_cv_hashed_db_version" >&5
23801 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23802
23803 if test "$cf_cv_hashed_db_version" = unknown ; then
23804         { { echo "$as_me:23804: error: Cannot determine version of db" >&5
23805 echo "$as_me: error: Cannot determine version of db" >&2;}
23806    { (exit 1); exit 1; }; }
23807 else
23808
23809 echo "$as_me:23809: checking for db libraries" >&5
23810 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23811 if test "${cf_cv_hashed_db_libs+set}" = set; then
23812   echo $ECHO_N "(cached) $ECHO_C" >&6
23813 else
23814
23815 cf_cv_hashed_db_libs=unknown
23816 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23817 do
23818         cf_save_libs="$LIBS"
23819         if test -n "$cf_db_libs"; then
23820
23821 cf_add_libs="$LIBS"
23822 # reverse order
23823 cf_add_0lib=
23824 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23825 # filter duplicates
23826 for cf_add_1lib in $cf_add_0lib; do
23827         for cf_add_2lib in $cf_add_libs; do
23828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23829                         cf_add_1lib=
23830                         break
23831                 fi
23832         done
23833         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23834 done
23835 LIBS="$cf_add_libs"
23836
23837         fi
23838
23839 echo "${as_me:-configure}:23839: testing checking for library "$cf_db_libs" ..." 1>&5
23840
23841         cat >conftest.$ac_ext <<_ACEOF
23842 #line 23842 "configure"
23843 #include "confdefs.h"
23844
23845 $ac_includes_default
23846 #include <db.h>
23847
23848 int
23849 main (void)
23850 {
23851
23852         char *path = "/tmp/foo";
23853 #ifdef DB_VERSION_MAJOR
23854 #if DB_VERSION_MAJOR >= 4
23855         DB *result = 0;
23856         db_create(&result, NULL, 0);
23857         result->open(result,
23858                 NULL,
23859                 path,
23860                 path,
23861                 DB_HASH,
23862                 DB_CREATE,
23863                 0644);
23864 #elif DB_VERSION_MAJOR >= 3
23865         DB *result = 0;
23866         db_create(&result, NULL, 0);
23867         result->open(result,
23868                 path,
23869                 path,
23870                 DB_HASH,
23871                 DB_CREATE,
23872                 0644);
23873 #elif DB_VERSION_MAJOR >= 2
23874         DB *result = 0;
23875         db_open(path,
23876                 DB_HASH,
23877                 DB_CREATE,
23878                 0644,
23879                 (DB_ENV *) 0,
23880                 (DB_INFO *) 0,
23881                 &result);
23882 #endif /* DB_VERSION_MAJOR */
23883 #else
23884         DB *result = dbopen(path,
23885                      2,
23886                      0644,
23887                      DB_HASH,
23888                      0);
23889 #endif
23890         ${cf_cv_main_return:-return}(result != 0)
23891
23892   ;
23893   return 0;
23894 }
23895 _ACEOF
23896 rm -f conftest.$ac_objext conftest$ac_exeext
23897 if { (eval echo "$as_me:23897: \"$ac_link\"") >&5
23898   (eval $ac_link) 2>&5
23899   ac_status=$?
23900   echo "$as_me:23900: \$? = $ac_status" >&5
23901   (exit $ac_status); } &&
23902          { ac_try='test -s conftest$ac_exeext'
23903   { (eval echo "$as_me:23903: \"$ac_try\"") >&5
23904   (eval $ac_try) 2>&5
23905   ac_status=$?
23906   echo "$as_me:23906: \$? = $ac_status" >&5
23907   (exit $ac_status); }; }; then
23908
23909         if test -n "$cf_db_libs" ; then
23910                 cf_cv_hashed_db_libs=$cf_db_libs
23911         else
23912                 cf_cv_hashed_db_libs=default
23913         fi
23914         LIBS="$cf_save_libs"
23915         break
23916
23917 else
23918   echo "$as_me: failed program was:" >&5
23919 cat conftest.$ac_ext >&5
23920 fi
23921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23922         LIBS="$cf_save_libs"
23923 done
23924
23925 fi
23926 echo "$as_me:23926: result: $cf_cv_hashed_db_libs" >&5
23927 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23928
23929         if test "$cf_cv_hashed_db_libs" = unknown ; then
23930                 { { echo "$as_me:23930: error: Cannot determine library for db" >&5
23931 echo "$as_me: error: Cannot determine library for db" >&2;}
23932    { (exit 1); exit 1; }; }
23933         elif test "$cf_cv_hashed_db_libs" != default ; then
23934
23935 cf_add_libs="$LIBS"
23936 # reverse order
23937 cf_add_0lib=
23938 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23939 # filter duplicates
23940 for cf_add_1lib in $cf_add_0lib; do
23941         for cf_add_2lib in $cf_add_libs; do
23942                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23943                         cf_add_1lib=
23944                         break
23945                 fi
23946         done
23947         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23948 done
23949 LIBS="$cf_add_libs"
23950
23951         fi
23952 fi
23953
23954 else
23955
23956         { { echo "$as_me:23956: error: Cannot find db.h" >&5
23957 echo "$as_me: error: Cannot find db.h" >&2;}
23958    { (exit 1); exit 1; }; }
23959
23960 fi
23961
23962 fi
23963
23964 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23965         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23966         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23967 fi
23968
23969 # Just in case, check if the C compiler has a bool type.
23970
23971 echo "$as_me:23971: checking if we should include stdbool.h" >&5
23972 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23973
23974 if test "${cf_cv_header_stdbool_h+set}" = set; then
23975   echo $ECHO_N "(cached) $ECHO_C" >&6
23976 else
23977
23978         cat >conftest.$ac_ext <<_ACEOF
23979 #line 23979 "configure"
23980 #include "confdefs.h"
23981
23982 int
23983 main (void)
23984 {
23985 bool foo = false
23986   ;
23987   return 0;
23988 }
23989 _ACEOF
23990 rm -f conftest.$ac_objext
23991 if { (eval echo "$as_me:23991: \"$ac_compile\"") >&5
23992   (eval $ac_compile) 2>&5
23993   ac_status=$?
23994   echo "$as_me:23994: \$? = $ac_status" >&5
23995   (exit $ac_status); } &&
23996          { ac_try='test -s conftest.$ac_objext'
23997   { (eval echo "$as_me:23997: \"$ac_try\"") >&5
23998   (eval $ac_try) 2>&5
23999   ac_status=$?
24000   echo "$as_me:24000: \$? = $ac_status" >&5
24001   (exit $ac_status); }; }; then
24002   cf_cv_header_stdbool_h=0
24003 else
24004   echo "$as_me: failed program was:" >&5
24005 cat conftest.$ac_ext >&5
24006 cat >conftest.$ac_ext <<_ACEOF
24007 #line 24007 "configure"
24008 #include "confdefs.h"
24009
24010 #ifndef __BEOS__
24011 #include <stdbool.h>
24012 #endif
24013
24014 int
24015 main (void)
24016 {
24017 bool foo = false
24018   ;
24019   return 0;
24020 }
24021 _ACEOF
24022 rm -f conftest.$ac_objext
24023 if { (eval echo "$as_me:24023: \"$ac_compile\"") >&5
24024   (eval $ac_compile) 2>&5
24025   ac_status=$?
24026   echo "$as_me:24026: \$? = $ac_status" >&5
24027   (exit $ac_status); } &&
24028          { ac_try='test -s conftest.$ac_objext'
24029   { (eval echo "$as_me:24029: \"$ac_try\"") >&5
24030   (eval $ac_try) 2>&5
24031   ac_status=$?
24032   echo "$as_me:24032: \$? = $ac_status" >&5
24033   (exit $ac_status); }; }; then
24034   cf_cv_header_stdbool_h=1
24035 else
24036   echo "$as_me: failed program was:" >&5
24037 cat conftest.$ac_ext >&5
24038 cf_cv_header_stdbool_h=0
24039 fi
24040 rm -f conftest.$ac_objext conftest.$ac_ext
24041 fi
24042 rm -f conftest.$ac_objext conftest.$ac_ext
24043 fi
24044
24045 if test "$cf_cv_header_stdbool_h" = 1
24046 then    echo "$as_me:24046: result: yes" >&5
24047 echo "${ECHO_T}yes" >&6
24048 else    echo "$as_me:24048: result: no" >&5
24049 echo "${ECHO_T}no" >&6
24050 fi
24051
24052 echo "$as_me:24052: checking for builtin bool type" >&5
24053 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24054
24055 if test "${cf_cv_cc_bool_type+set}" = set; then
24056   echo $ECHO_N "(cached) $ECHO_C" >&6
24057 else
24058
24059         cat >conftest.$ac_ext <<_ACEOF
24060 #line 24060 "configure"
24061 #include "confdefs.h"
24062
24063 #include <stdio.h>
24064 #include <sys/types.h>
24065
24066 int
24067 main (void)
24068 {
24069 bool x = false
24070   ;
24071   return 0;
24072 }
24073 _ACEOF
24074 rm -f conftest.$ac_objext
24075 if { (eval echo "$as_me:24075: \"$ac_compile\"") >&5
24076   (eval $ac_compile) 2>&5
24077   ac_status=$?
24078   echo "$as_me:24078: \$? = $ac_status" >&5
24079   (exit $ac_status); } &&
24080          { ac_try='test -s conftest.$ac_objext'
24081   { (eval echo "$as_me:24081: \"$ac_try\"") >&5
24082   (eval $ac_try) 2>&5
24083   ac_status=$?
24084   echo "$as_me:24084: \$? = $ac_status" >&5
24085   (exit $ac_status); }; }; then
24086   cf_cv_cc_bool_type=1
24087 else
24088   echo "$as_me: failed program was:" >&5
24089 cat conftest.$ac_ext >&5
24090 cf_cv_cc_bool_type=0
24091 fi
24092 rm -f conftest.$ac_objext conftest.$ac_ext
24093
24094 fi
24095
24096 if test "$cf_cv_cc_bool_type" = 1
24097 then    echo "$as_me:24097: result: yes" >&5
24098 echo "${ECHO_T}yes" >&6
24099 else    echo "$as_me:24099: result: no" >&5
24100 echo "${ECHO_T}no" >&6
24101 fi
24102
24103 # Check for C++ compiler characteristics (and ensure that it's there!)
24104 if test -n "$CXX" ; then
24105         ac_ext=cc
24106 ac_cpp='$CXXCPP $CPPFLAGS'
24107 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24108 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24109 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24110 ac_main_return=return
24111
24112 if test -n "$GXX" ; then
24113
24114         cf_save="$LIBS"
24115         LIBS="$LIBS $CXXLIBS"
24116         echo "$as_me:24116: checking if we already have C++ library" >&5
24117 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24118         cat >conftest.$ac_ext <<_ACEOF
24119 #line 24119 "configure"
24120 #include "confdefs.h"
24121
24122                         #include <iostream>
24123 int
24124 main (void)
24125 {
24126
24127                         std::cout << "Hello World!" << std::endl;
24128   ;
24129   return 0;
24130 }
24131 _ACEOF
24132 rm -f conftest.$ac_objext conftest$ac_exeext
24133 if { (eval echo "$as_me:24133: \"$ac_link\"") >&5
24134   (eval $ac_link) 2>&5
24135   ac_status=$?
24136   echo "$as_me:24136: \$? = $ac_status" >&5
24137   (exit $ac_status); } &&
24138          { ac_try='test -s conftest$ac_exeext'
24139   { (eval echo "$as_me:24139: \"$ac_try\"") >&5
24140   (eval $ac_try) 2>&5
24141   ac_status=$?
24142   echo "$as_me:24142: \$? = $ac_status" >&5
24143   (exit $ac_status); }; }; then
24144   cf_have_libstdcpp=yes
24145 else
24146   echo "$as_me: failed program was:" >&5
24147 cat conftest.$ac_ext >&5
24148 cf_have_libstdcpp=no
24149 fi
24150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24151         echo "$as_me:24151: result: $cf_have_libstdcpp" >&5
24152 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24153         LIBS="$cf_save"
24154
24155         if test $cf_have_libstdcpp != yes
24156         then
24157                 case $cf_cv_system_name in
24158                 (os2*)
24159                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24160                                 cf_stdcpp_libname=stdcpp
24161                         else
24162                                 cf_stdcpp_libname=stdc++
24163                         fi
24164                         ;;
24165                 (*)
24166                         cf_stdcpp_libname=stdc++
24167                         ;;
24168                 esac
24169
24170                 echo "$as_me:24170: checking for library $cf_stdcpp_libname" >&5
24171 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24172 if test "${cf_cv_libstdcpp+set}" = set; then
24173   echo $ECHO_N "(cached) $ECHO_C" >&6
24174 else
24175
24176                         cf_save="$LIBS"
24177                         LIBS="$LIBS $CXXLIBS"
24178
24179 cf_add_libs="$LIBS"
24180 # reverse order
24181 cf_add_0lib=
24182 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24183 # filter duplicates
24184 for cf_add_1lib in $cf_add_0lib; do
24185         for cf_add_2lib in $cf_add_libs; do
24186                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24187                         cf_add_1lib=
24188                         break
24189                 fi
24190         done
24191         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24192 done
24193 LIBS="$cf_add_libs"
24194
24195                 cat >conftest.$ac_ext <<_ACEOF
24196 #line 24196 "configure"
24197 #include "confdefs.h"
24198
24199                                 #include <iostream>
24200 int
24201 main (void)
24202 {
24203
24204                                 std::cout << "Hello World!" << std::endl;
24205   ;
24206   return 0;
24207 }
24208 _ACEOF
24209 rm -f conftest.$ac_objext conftest$ac_exeext
24210 if { (eval echo "$as_me:24210: \"$ac_link\"") >&5
24211   (eval $ac_link) 2>&5
24212   ac_status=$?
24213   echo "$as_me:24213: \$? = $ac_status" >&5
24214   (exit $ac_status); } &&
24215          { ac_try='test -s conftest$ac_exeext'
24216   { (eval echo "$as_me:24216: \"$ac_try\"") >&5
24217   (eval $ac_try) 2>&5
24218   ac_status=$?
24219   echo "$as_me:24219: \$? = $ac_status" >&5
24220   (exit $ac_status); }; }; then
24221   cf_cv_libstdcpp=yes
24222 else
24223   echo "$as_me: failed program was:" >&5
24224 cat conftest.$ac_ext >&5
24225 cf_cv_libstdcpp=no
24226 fi
24227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24228                         LIBS="$cf_save"
24229
24230 fi
24231 echo "$as_me:24231: result: $cf_cv_libstdcpp" >&5
24232 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24233                 test "$cf_cv_libstdcpp" = yes && {
24234 cf_add_libs="$CXXLIBS"
24235 # reverse order
24236 cf_add_0lib=
24237 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24238 # filter duplicates
24239 for cf_add_1lib in $cf_add_0lib; do
24240         for cf_add_2lib in $cf_add_libs; do
24241                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24242                         cf_add_1lib=
24243                         break
24244                 fi
24245         done
24246         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24247 done
24248 CXXLIBS="$cf_add_libs"
24249  }
24250         fi
24251 fi
24252
24253         echo "$as_me:24253: checking whether $CXX understands -c and -o together" >&5
24254 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24255 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24256   echo $ECHO_N "(cached) $ECHO_C" >&6
24257 else
24258
24259 cat > conftest.$ac_ext <<CF_EOF
24260 int main(void)
24261 {
24262         ${cf_cv_main_return:-return}(0);
24263 }
24264 CF_EOF
24265 # We do the test twice because some compilers refuse to overwrite an
24266 # existing .o file with -o, though they will create one.
24267 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24268 if { (eval echo "$as_me:24268: \"$ac_try\"") >&5
24269   (eval $ac_try) 2>&5
24270   ac_status=$?
24271   echo "$as_me:24271: \$? = $ac_status" >&5
24272   (exit $ac_status); } &&
24273   test -f conftest2.$ac_objext && { (eval echo "$as_me:24273: \"$ac_try\"") >&5
24274   (eval $ac_try) 2>&5
24275   ac_status=$?
24276   echo "$as_me:24276: \$? = $ac_status" >&5
24277   (exit $ac_status); };
24278 then
24279   eval cf_cv_prog_CXX_c_o=yes
24280 else
24281   eval cf_cv_prog_CXX_c_o=no
24282 fi
24283 rm -rf conftest*
24284
24285 fi
24286 if test $cf_cv_prog_CXX_c_o = yes; then
24287   echo "$as_me:24287: result: yes" >&5
24288 echo "${ECHO_T}yes" >&6
24289 else
24290   echo "$as_me:24290: result: no" >&5
24291 echo "${ECHO_T}no" >&6
24292 fi
24293
24294         case $GXX_VERSION in
24295         (1.*|2.[0-6]*|[1-9][0-9].*)
24296                 cf_cxx_library=yes
24297                 ;;
24298         (*-2.7*|2.7*)
24299
24300 cf_cxx_library=unknown
24301 case $cf_cv_system_name in
24302 (os2*)
24303         cf_gpp_libname=gpp
24304         ;;
24305 (*)
24306         cf_gpp_libname=g++
24307         ;;
24308 esac
24309 if test "$GXX" = yes; then
24310         echo "$as_me:24310: checking for lib$cf_gpp_libname" >&5
24311 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24312         cf_save="$LIBS"
24313
24314 cf_add_libs="$LIBS"
24315 # reverse order
24316 cf_add_0lib=
24317 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24318 # filter duplicates
24319 for cf_add_1lib in $cf_add_0lib; do
24320         for cf_add_2lib in $cf_add_libs; do
24321                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24322                         cf_add_1lib=
24323                         break
24324                 fi
24325         done
24326         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24327 done
24328 LIBS="$cf_add_libs"
24329
24330         cat >conftest.$ac_ext <<_ACEOF
24331 #line 24331 "configure"
24332 #include "confdefs.h"
24333
24334 #include <$cf_gpp_libname/builtin.h>
24335
24336 int
24337 main (void)
24338 {
24339 two_arg_error_handler_t foo2 = lib_error_handler
24340   ;
24341   return 0;
24342 }
24343 _ACEOF
24344 rm -f conftest.$ac_objext conftest$ac_exeext
24345 if { (eval echo "$as_me:24345: \"$ac_link\"") >&5
24346   (eval $ac_link) 2>&5
24347   ac_status=$?
24348   echo "$as_me:24348: \$? = $ac_status" >&5
24349   (exit $ac_status); } &&
24350          { ac_try='test -s conftest$ac_exeext'
24351   { (eval echo "$as_me:24351: \"$ac_try\"") >&5
24352   (eval $ac_try) 2>&5
24353   ac_status=$?
24354   echo "$as_me:24354: \$? = $ac_status" >&5
24355   (exit $ac_status); }; }; then
24356   cf_cxx_library=yes
24357
24358 cf_add_libs="$CXXLIBS"
24359 # reverse order
24360 cf_add_0lib=
24361 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24362 # filter duplicates
24363 for cf_add_1lib in $cf_add_0lib; do
24364         for cf_add_2lib in $cf_add_libs; do
24365                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24366                         cf_add_1lib=
24367                         break
24368                 fi
24369         done
24370         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24371 done
24372 CXXLIBS="$cf_add_libs"
24373
24374          if test "$cf_gpp_libname" = cpp ; then
24375
24376 cat >>confdefs.h <<\EOF
24377 #define HAVE_GPP_BUILTIN_H 1
24378 EOF
24379
24380          else
24381
24382 cat >>confdefs.h <<\EOF
24383 #define HAVE_GXX_BUILTIN_H 1
24384 EOF
24385
24386          fi
24387 else
24388   echo "$as_me: failed program was:" >&5
24389 cat conftest.$ac_ext >&5
24390 cat >conftest.$ac_ext <<_ACEOF
24391 #line 24391 "configure"
24392 #include "confdefs.h"
24393
24394 #include <builtin.h>
24395
24396 int
24397 main (void)
24398 {
24399 two_arg_error_handler_t foo2 = lib_error_handler
24400   ;
24401   return 0;
24402 }
24403 _ACEOF
24404 rm -f conftest.$ac_objext conftest$ac_exeext
24405 if { (eval echo "$as_me:24405: \"$ac_link\"") >&5
24406   (eval $ac_link) 2>&5
24407   ac_status=$?
24408   echo "$as_me:24408: \$? = $ac_status" >&5
24409   (exit $ac_status); } &&
24410          { ac_try='test -s conftest$ac_exeext'
24411   { (eval echo "$as_me:24411: \"$ac_try\"") >&5
24412   (eval $ac_try) 2>&5
24413   ac_status=$?
24414   echo "$as_me:24414: \$? = $ac_status" >&5
24415   (exit $ac_status); }; }; then
24416   cf_cxx_library=yes
24417
24418 cf_add_libs="$CXXLIBS"
24419 # reverse order
24420 cf_add_0lib=
24421 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24422 # filter duplicates
24423 for cf_add_1lib in $cf_add_0lib; do
24424         for cf_add_2lib in $cf_add_libs; do
24425                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24426                         cf_add_1lib=
24427                         break
24428                 fi
24429         done
24430         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24431 done
24432 CXXLIBS="$cf_add_libs"
24433
24434 cat >>confdefs.h <<\EOF
24435 #define HAVE_BUILTIN_H 1
24436 EOF
24437
24438 else
24439   echo "$as_me: failed program was:" >&5
24440 cat conftest.$ac_ext >&5
24441 cf_cxx_library=no
24442 fi
24443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24444 fi
24445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24446         LIBS="$cf_save"
24447         echo "$as_me:24447: result: $cf_cxx_library" >&5
24448 echo "${ECHO_T}$cf_cxx_library" >&6
24449 fi
24450
24451                 ;;
24452         (*)
24453                 cf_cxx_library=no
24454                 ;;
24455         esac
24456
24457         ac_ext=cc
24458 ac_cpp='$CXXCPP $CPPFLAGS'
24459 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24460 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24461 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24462 ac_main_return=return
24463 echo "$as_me:24463: checking how to run the C++ preprocessor" >&5
24464 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24465 if test -z "$CXXCPP"; then
24466   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24467   echo $ECHO_N "(cached) $ECHO_C" >&6
24468 else
24469       # Double quotes because CXXCPP needs to be expanded
24470     for CXXCPP in "$CXX -E" "/lib/cpp"
24471     do
24472       ac_preproc_ok=false
24473 for ac_cxx_preproc_warn_flag in '' yes
24474 do
24475   # Use a header file that comes with gcc, so configuring glibc
24476   # with a fresh cross-compiler works.
24477   # On the NeXT, cc -E runs the code through the compiler's parser,
24478   # not just through cpp. "Syntax error" is here to catch this case.
24479   cat >conftest.$ac_ext <<_ACEOF
24480 #line 24480 "configure"
24481 #include "confdefs.h"
24482 #include <assert.h>
24483                      Syntax error
24484 _ACEOF
24485 if { (eval echo "$as_me:24485: \"$ac_cpp conftest.$ac_ext\"") >&5
24486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24487   ac_status=$?
24488   egrep -v '^ *\+' conftest.er1 >conftest.err
24489   rm -f conftest.er1
24490   cat conftest.err >&5
24491   echo "$as_me:24491: \$? = $ac_status" >&5
24492   (exit $ac_status); } >/dev/null; then
24493   if test -s conftest.err; then
24494     ac_cpp_err=$ac_cxx_preproc_warn_flag
24495   else
24496     ac_cpp_err=
24497   fi
24498 else
24499   ac_cpp_err=yes
24500 fi
24501 if test -z "$ac_cpp_err"; then
24502   :
24503 else
24504   echo "$as_me: failed program was:" >&5
24505   cat conftest.$ac_ext >&5
24506   # Broken: fails on valid input.
24507 continue
24508 fi
24509 rm -f conftest.err conftest.$ac_ext
24510
24511   # OK, works on sane cases.  Now check whether non-existent headers
24512   # can be detected and how.
24513   cat >conftest.$ac_ext <<_ACEOF
24514 #line 24514 "configure"
24515 #include "confdefs.h"
24516 #include <ac_nonexistent.h>
24517 _ACEOF
24518 if { (eval echo "$as_me:24518: \"$ac_cpp conftest.$ac_ext\"") >&5
24519   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24520   ac_status=$?
24521   egrep -v '^ *\+' conftest.er1 >conftest.err
24522   rm -f conftest.er1
24523   cat conftest.err >&5
24524   echo "$as_me:24524: \$? = $ac_status" >&5
24525   (exit $ac_status); } >/dev/null; then
24526   if test -s conftest.err; then
24527     ac_cpp_err=$ac_cxx_preproc_warn_flag
24528   else
24529     ac_cpp_err=
24530   fi
24531 else
24532   ac_cpp_err=yes
24533 fi
24534 if test -z "$ac_cpp_err"; then
24535   # Broken: success on invalid input.
24536 continue
24537 else
24538   echo "$as_me: failed program was:" >&5
24539   cat conftest.$ac_ext >&5
24540   # Passes both tests.
24541 ac_preproc_ok=:
24542 break
24543 fi
24544 rm -f conftest.err conftest.$ac_ext
24545
24546 done
24547 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24548 rm -f conftest.err conftest.$ac_ext
24549 if $ac_preproc_ok; then
24550   break
24551 fi
24552
24553     done
24554     ac_cv_prog_CXXCPP=$CXXCPP
24555
24556 fi
24557   CXXCPP=$ac_cv_prog_CXXCPP
24558 else
24559   ac_cv_prog_CXXCPP=$CXXCPP
24560 fi
24561 echo "$as_me:24561: result: $CXXCPP" >&5
24562 echo "${ECHO_T}$CXXCPP" >&6
24563 ac_preproc_ok=false
24564 for ac_cxx_preproc_warn_flag in '' yes
24565 do
24566   # Use a header file that comes with gcc, so configuring glibc
24567   # with a fresh cross-compiler works.
24568   # On the NeXT, cc -E runs the code through the compiler's parser,
24569   # not just through cpp. "Syntax error" is here to catch this case.
24570   cat >conftest.$ac_ext <<_ACEOF
24571 #line 24571 "configure"
24572 #include "confdefs.h"
24573 #include <assert.h>
24574                      Syntax error
24575 _ACEOF
24576 if { (eval echo "$as_me:24576: \"$ac_cpp conftest.$ac_ext\"") >&5
24577   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24578   ac_status=$?
24579   egrep -v '^ *\+' conftest.er1 >conftest.err
24580   rm -f conftest.er1
24581   cat conftest.err >&5
24582   echo "$as_me:24582: \$? = $ac_status" >&5
24583   (exit $ac_status); } >/dev/null; then
24584   if test -s conftest.err; then
24585     ac_cpp_err=$ac_cxx_preproc_warn_flag
24586   else
24587     ac_cpp_err=
24588   fi
24589 else
24590   ac_cpp_err=yes
24591 fi
24592 if test -z "$ac_cpp_err"; then
24593   :
24594 else
24595   echo "$as_me: failed program was:" >&5
24596   cat conftest.$ac_ext >&5
24597   # Broken: fails on valid input.
24598 continue
24599 fi
24600 rm -f conftest.err conftest.$ac_ext
24601
24602   # OK, works on sane cases.  Now check whether non-existent headers
24603   # can be detected and how.
24604   cat >conftest.$ac_ext <<_ACEOF
24605 #line 24605 "configure"
24606 #include "confdefs.h"
24607 #include <ac_nonexistent.h>
24608 _ACEOF
24609 if { (eval echo "$as_me:24609: \"$ac_cpp conftest.$ac_ext\"") >&5
24610   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24611   ac_status=$?
24612   egrep -v '^ *\+' conftest.er1 >conftest.err
24613   rm -f conftest.er1
24614   cat conftest.err >&5
24615   echo "$as_me:24615: \$? = $ac_status" >&5
24616   (exit $ac_status); } >/dev/null; then
24617   if test -s conftest.err; then
24618     ac_cpp_err=$ac_cxx_preproc_warn_flag
24619   else
24620     ac_cpp_err=
24621   fi
24622 else
24623   ac_cpp_err=yes
24624 fi
24625 if test -z "$ac_cpp_err"; then
24626   # Broken: success on invalid input.
24627 continue
24628 else
24629   echo "$as_me: failed program was:" >&5
24630   cat conftest.$ac_ext >&5
24631   # Passes both tests.
24632 ac_preproc_ok=:
24633 break
24634 fi
24635 rm -f conftest.err conftest.$ac_ext
24636
24637 done
24638 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24639 rm -f conftest.err conftest.$ac_ext
24640 if $ac_preproc_ok; then
24641   :
24642 else
24643   { { echo "$as_me:24643: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24644 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24645    { (exit 1); exit 1; }; }
24646 fi
24647
24648 ac_ext=cc
24649 ac_cpp='$CXXCPP $CPPFLAGS'
24650 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24651 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24652 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24653 ac_main_return=return
24654
24655 for ac_header in typeinfo
24656 do
24657 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24658 echo "$as_me:24658: checking for $ac_header" >&5
24659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24661   echo $ECHO_N "(cached) $ECHO_C" >&6
24662 else
24663   cat >conftest.$ac_ext <<_ACEOF
24664 #line 24664 "configure"
24665 #include "confdefs.h"
24666 #include <$ac_header>
24667 _ACEOF
24668 if { (eval echo "$as_me:24668: \"$ac_cpp conftest.$ac_ext\"") >&5
24669   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24670   ac_status=$?
24671   egrep -v '^ *\+' conftest.er1 >conftest.err
24672   rm -f conftest.er1
24673   cat conftest.err >&5
24674   echo "$as_me:24674: \$? = $ac_status" >&5
24675   (exit $ac_status); } >/dev/null; then
24676   if test -s conftest.err; then
24677     ac_cpp_err=$ac_cxx_preproc_warn_flag
24678   else
24679     ac_cpp_err=
24680   fi
24681 else
24682   ac_cpp_err=yes
24683 fi
24684 if test -z "$ac_cpp_err"; then
24685   eval "$as_ac_Header=yes"
24686 else
24687   echo "$as_me: failed program was:" >&5
24688   cat conftest.$ac_ext >&5
24689   eval "$as_ac_Header=no"
24690 fi
24691 rm -f conftest.err conftest.$ac_ext
24692 fi
24693 echo "$as_me:24693: result: `eval echo '${'$as_ac_Header'}'`" >&5
24694 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24695 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24696   cat >>confdefs.h <<EOF
24697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24698 EOF
24699
24700 fi
24701 done
24702
24703 for ac_header in iostream
24704 do
24705 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24706 echo "$as_me:24706: checking for $ac_header" >&5
24707 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24708 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24709   echo $ECHO_N "(cached) $ECHO_C" >&6
24710 else
24711   cat >conftest.$ac_ext <<_ACEOF
24712 #line 24712 "configure"
24713 #include "confdefs.h"
24714 #include <$ac_header>
24715 _ACEOF
24716 if { (eval echo "$as_me:24716: \"$ac_cpp conftest.$ac_ext\"") >&5
24717   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24718   ac_status=$?
24719   egrep -v '^ *\+' conftest.er1 >conftest.err
24720   rm -f conftest.er1
24721   cat conftest.err >&5
24722   echo "$as_me:24722: \$? = $ac_status" >&5
24723   (exit $ac_status); } >/dev/null; then
24724   if test -s conftest.err; then
24725     ac_cpp_err=$ac_cxx_preproc_warn_flag
24726   else
24727     ac_cpp_err=
24728   fi
24729 else
24730   ac_cpp_err=yes
24731 fi
24732 if test -z "$ac_cpp_err"; then
24733   eval "$as_ac_Header=yes"
24734 else
24735   echo "$as_me: failed program was:" >&5
24736   cat conftest.$ac_ext >&5
24737   eval "$as_ac_Header=no"
24738 fi
24739 rm -f conftest.err conftest.$ac_ext
24740 fi
24741 echo "$as_me:24741: result: `eval echo '${'$as_ac_Header'}'`" >&5
24742 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24743 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24744   cat >>confdefs.h <<EOF
24745 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24746 EOF
24747
24748 fi
24749 done
24750
24751 if test x"$ac_cv_header_iostream" = xyes ; then
24752         echo "$as_me:24752: checking if iostream uses std-namespace" >&5
24753 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24754         cat >conftest.$ac_ext <<_ACEOF
24755 #line 24755 "configure"
24756 #include "confdefs.h"
24757
24758 #include <iostream>
24759 using std::endl;
24760 using std::cerr;
24761 int
24762 main (void)
24763 {
24764
24765 cerr << "testing" << endl;
24766
24767   ;
24768   return 0;
24769 }
24770 _ACEOF
24771 rm -f conftest.$ac_objext
24772 if { (eval echo "$as_me:24772: \"$ac_compile\"") >&5
24773   (eval $ac_compile) 2>&5
24774   ac_status=$?
24775   echo "$as_me:24775: \$? = $ac_status" >&5
24776   (exit $ac_status); } &&
24777          { ac_try='test -s conftest.$ac_objext'
24778   { (eval echo "$as_me:24778: \"$ac_try\"") >&5
24779   (eval $ac_try) 2>&5
24780   ac_status=$?
24781   echo "$as_me:24781: \$? = $ac_status" >&5
24782   (exit $ac_status); }; }; then
24783   cf_iostream_namespace=yes
24784 else
24785   echo "$as_me: failed program was:" >&5
24786 cat conftest.$ac_ext >&5
24787 cf_iostream_namespace=no
24788 fi
24789 rm -f conftest.$ac_objext conftest.$ac_ext
24790         echo "$as_me:24790: result: $cf_iostream_namespace" >&5
24791 echo "${ECHO_T}$cf_iostream_namespace" >&6
24792         if test "$cf_iostream_namespace" = yes ; then
24793
24794 cat >>confdefs.h <<\EOF
24795 #define IOSTREAM_NAMESPACE 1
24796 EOF
24797
24798         fi
24799 fi
24800
24801 echo "$as_me:24801: checking if we should include stdbool.h" >&5
24802 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24803
24804 if test "${cf_cv_header_stdbool_h+set}" = set; then
24805   echo $ECHO_N "(cached) $ECHO_C" >&6
24806 else
24807
24808         cat >conftest.$ac_ext <<_ACEOF
24809 #line 24809 "configure"
24810 #include "confdefs.h"
24811
24812 int
24813 main (void)
24814 {
24815 bool foo = false
24816   ;
24817   return 0;
24818 }
24819 _ACEOF
24820 rm -f conftest.$ac_objext
24821 if { (eval echo "$as_me:24821: \"$ac_compile\"") >&5
24822   (eval $ac_compile) 2>&5
24823   ac_status=$?
24824   echo "$as_me:24824: \$? = $ac_status" >&5
24825   (exit $ac_status); } &&
24826          { ac_try='test -s conftest.$ac_objext'
24827   { (eval echo "$as_me:24827: \"$ac_try\"") >&5
24828   (eval $ac_try) 2>&5
24829   ac_status=$?
24830   echo "$as_me:24830: \$? = $ac_status" >&5
24831   (exit $ac_status); }; }; then
24832   cf_cv_header_stdbool_h=0
24833 else
24834   echo "$as_me: failed program was:" >&5
24835 cat conftest.$ac_ext >&5
24836 cat >conftest.$ac_ext <<_ACEOF
24837 #line 24837 "configure"
24838 #include "confdefs.h"
24839
24840 #ifndef __BEOS__
24841 #include <stdbool.h>
24842 #endif
24843
24844 int
24845 main (void)
24846 {
24847 bool foo = false
24848   ;
24849   return 0;
24850 }
24851 _ACEOF
24852 rm -f conftest.$ac_objext
24853 if { (eval echo "$as_me:24853: \"$ac_compile\"") >&5
24854   (eval $ac_compile) 2>&5
24855   ac_status=$?
24856   echo "$as_me:24856: \$? = $ac_status" >&5
24857   (exit $ac_status); } &&
24858          { ac_try='test -s conftest.$ac_objext'
24859   { (eval echo "$as_me:24859: \"$ac_try\"") >&5
24860   (eval $ac_try) 2>&5
24861   ac_status=$?
24862   echo "$as_me:24862: \$? = $ac_status" >&5
24863   (exit $ac_status); }; }; then
24864   cf_cv_header_stdbool_h=1
24865 else
24866   echo "$as_me: failed program was:" >&5
24867 cat conftest.$ac_ext >&5
24868 cf_cv_header_stdbool_h=0
24869 fi
24870 rm -f conftest.$ac_objext conftest.$ac_ext
24871 fi
24872 rm -f conftest.$ac_objext conftest.$ac_ext
24873 fi
24874
24875 if test "$cf_cv_header_stdbool_h" = 1
24876 then    echo "$as_me:24876: result: yes" >&5
24877 echo "${ECHO_T}yes" >&6
24878 else    echo "$as_me:24878: result: no" >&5
24879 echo "${ECHO_T}no" >&6
24880 fi
24881
24882 echo "$as_me:24882: checking for builtin bool type" >&5
24883 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24884
24885 if test "${cf_cv_builtin_bool+set}" = set; then
24886   echo $ECHO_N "(cached) $ECHO_C" >&6
24887 else
24888
24889         cat >conftest.$ac_ext <<_ACEOF
24890 #line 24890 "configure"
24891 #include "confdefs.h"
24892
24893 #include <stdio.h>
24894 #include <sys/types.h>
24895
24896 int
24897 main (void)
24898 {
24899 bool x = false
24900   ;
24901   return 0;
24902 }
24903 _ACEOF
24904 rm -f conftest.$ac_objext
24905 if { (eval echo "$as_me:24905: \"$ac_compile\"") >&5
24906   (eval $ac_compile) 2>&5
24907   ac_status=$?
24908   echo "$as_me:24908: \$? = $ac_status" >&5
24909   (exit $ac_status); } &&
24910          { ac_try='test -s conftest.$ac_objext'
24911   { (eval echo "$as_me:24911: \"$ac_try\"") >&5
24912   (eval $ac_try) 2>&5
24913   ac_status=$?
24914   echo "$as_me:24914: \$? = $ac_status" >&5
24915   (exit $ac_status); }; }; then
24916   cf_cv_builtin_bool=1
24917 else
24918   echo "$as_me: failed program was:" >&5
24919 cat conftest.$ac_ext >&5
24920 cf_cv_builtin_bool=0
24921 fi
24922 rm -f conftest.$ac_objext conftest.$ac_ext
24923
24924 fi
24925
24926 if test "$cf_cv_builtin_bool" = 1
24927 then    echo "$as_me:24927: result: yes" >&5
24928 echo "${ECHO_T}yes" >&6
24929 else    echo "$as_me:24929: result: no" >&5
24930 echo "${ECHO_T}no" >&6
24931 fi
24932
24933 echo "$as_me:24933: checking for bool" >&5
24934 echo $ECHO_N "checking for bool... $ECHO_C" >&6
24935 if test "${ac_cv_type_bool+set}" = set; then
24936   echo $ECHO_N "(cached) $ECHO_C" >&6
24937 else
24938   cat >conftest.$ac_ext <<_ACEOF
24939 #line 24939 "configure"
24940 #include "confdefs.h"
24941
24942 #include <stdlib.h>
24943 #include <stdio.h>
24944
24945 #if defined(__cplusplus)
24946
24947 #ifdef HAVE_GXX_BUILTIN_H
24948 #include <g++/builtin.h>
24949 #elif HAVE_GPP_BUILTIN_H
24950 #include <gpp/builtin.h>
24951 #elif HAVE_BUILTIN_H
24952 #include <builtin.h>
24953 #endif
24954
24955 #else
24956
24957 #if $cf_cv_header_stdbool_h
24958 #include <stdbool.h>
24959 #endif
24960
24961 #endif
24962
24963 int
24964 main (void)
24965 {
24966 if ((bool *) 0)
24967   return 0;
24968 if (sizeof (bool))
24969   return 0;
24970   ;
24971   return 0;
24972 }
24973 _ACEOF
24974 rm -f conftest.$ac_objext
24975 if { (eval echo "$as_me:24975: \"$ac_compile\"") >&5
24976   (eval $ac_compile) 2>&5
24977   ac_status=$?
24978   echo "$as_me:24978: \$? = $ac_status" >&5
24979   (exit $ac_status); } &&
24980          { ac_try='test -s conftest.$ac_objext'
24981   { (eval echo "$as_me:24981: \"$ac_try\"") >&5
24982   (eval $ac_try) 2>&5
24983   ac_status=$?
24984   echo "$as_me:24984: \$? = $ac_status" >&5
24985   (exit $ac_status); }; }; then
24986   ac_cv_type_bool=yes
24987 else
24988   echo "$as_me: failed program was:" >&5
24989 cat conftest.$ac_ext >&5
24990 ac_cv_type_bool=no
24991 fi
24992 rm -f conftest.$ac_objext conftest.$ac_ext
24993 fi
24994 echo "$as_me:24994: result: $ac_cv_type_bool" >&5
24995 echo "${ECHO_T}$ac_cv_type_bool" >&6
24996
24997 echo "$as_me:24997: checking size of bool" >&5
24998 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
24999 if test "${ac_cv_sizeof_bool+set}" = set; then
25000   echo $ECHO_N "(cached) $ECHO_C" >&6
25001 else
25002   if test "$ac_cv_type_bool" = yes; then
25003   if test "$cross_compiling" = yes; then
25004   # Depending upon the size, compute the lo and hi bounds.
25005 cat >conftest.$ac_ext <<_ACEOF
25006 #line 25006 "configure"
25007 #include "confdefs.h"
25008
25009 #include <stdlib.h>
25010 #include <stdio.h>
25011
25012 #if defined(__cplusplus)
25013
25014 #ifdef HAVE_GXX_BUILTIN_H
25015 #include <g++/builtin.h>
25016 #elif HAVE_GPP_BUILTIN_H
25017 #include <gpp/builtin.h>
25018 #elif HAVE_BUILTIN_H
25019 #include <builtin.h>
25020 #endif
25021
25022 #else
25023
25024 #if $cf_cv_header_stdbool_h
25025 #include <stdbool.h>
25026 #endif
25027
25028 #endif
25029
25030 int
25031 main (void)
25032 {
25033 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25034   ;
25035   return 0;
25036 }
25037 _ACEOF
25038 rm -f conftest.$ac_objext
25039 if { (eval echo "$as_me:25039: \"$ac_compile\"") >&5
25040   (eval $ac_compile) 2>&5
25041   ac_status=$?
25042   echo "$as_me:25042: \$? = $ac_status" >&5
25043   (exit $ac_status); } &&
25044          { ac_try='test -s conftest.$ac_objext'
25045   { (eval echo "$as_me:25045: \"$ac_try\"") >&5
25046   (eval $ac_try) 2>&5
25047   ac_status=$?
25048   echo "$as_me:25048: \$? = $ac_status" >&5
25049   (exit $ac_status); }; }; then
25050   ac_lo=0 ac_mid=0
25051   while :; do
25052     cat >conftest.$ac_ext <<_ACEOF
25053 #line 25053 "configure"
25054 #include "confdefs.h"
25055
25056 #include <stdlib.h>
25057 #include <stdio.h>
25058
25059 #if defined(__cplusplus)
25060
25061 #ifdef HAVE_GXX_BUILTIN_H
25062 #include <g++/builtin.h>
25063 #elif HAVE_GPP_BUILTIN_H
25064 #include <gpp/builtin.h>
25065 #elif HAVE_BUILTIN_H
25066 #include <builtin.h>
25067 #endif
25068
25069 #else
25070
25071 #if $cf_cv_header_stdbool_h
25072 #include <stdbool.h>
25073 #endif
25074
25075 #endif
25076
25077 int
25078 main (void)
25079 {
25080 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25081   ;
25082   return 0;
25083 }
25084 _ACEOF
25085 rm -f conftest.$ac_objext
25086 if { (eval echo "$as_me:25086: \"$ac_compile\"") >&5
25087   (eval $ac_compile) 2>&5
25088   ac_status=$?
25089   echo "$as_me:25089: \$? = $ac_status" >&5
25090   (exit $ac_status); } &&
25091          { ac_try='test -s conftest.$ac_objext'
25092   { (eval echo "$as_me:25092: \"$ac_try\"") >&5
25093   (eval $ac_try) 2>&5
25094   ac_status=$?
25095   echo "$as_me:25095: \$? = $ac_status" >&5
25096   (exit $ac_status); }; }; then
25097   ac_hi=$ac_mid; break
25098 else
25099   echo "$as_me: failed program was:" >&5
25100 cat conftest.$ac_ext >&5
25101 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25102 fi
25103 rm -f conftest.$ac_objext conftest.$ac_ext
25104   done
25105 else
25106   echo "$as_me: failed program was:" >&5
25107 cat conftest.$ac_ext >&5
25108 ac_hi=-1 ac_mid=-1
25109   while :; do
25110     cat >conftest.$ac_ext <<_ACEOF
25111 #line 25111 "configure"
25112 #include "confdefs.h"
25113
25114 #include <stdlib.h>
25115 #include <stdio.h>
25116
25117 #if defined(__cplusplus)
25118
25119 #ifdef HAVE_GXX_BUILTIN_H
25120 #include <g++/builtin.h>
25121 #elif HAVE_GPP_BUILTIN_H
25122 #include <gpp/builtin.h>
25123 #elif HAVE_BUILTIN_H
25124 #include <builtin.h>
25125 #endif
25126
25127 #else
25128
25129 #if $cf_cv_header_stdbool_h
25130 #include <stdbool.h>
25131 #endif
25132
25133 #endif
25134
25135 int
25136 main (void)
25137 {
25138 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25139   ;
25140   return 0;
25141 }
25142 _ACEOF
25143 rm -f conftest.$ac_objext
25144 if { (eval echo "$as_me:25144: \"$ac_compile\"") >&5
25145   (eval $ac_compile) 2>&5
25146   ac_status=$?
25147   echo "$as_me:25147: \$? = $ac_status" >&5
25148   (exit $ac_status); } &&
25149          { ac_try='test -s conftest.$ac_objext'
25150   { (eval echo "$as_me:25150: \"$ac_try\"") >&5
25151   (eval $ac_try) 2>&5
25152   ac_status=$?
25153   echo "$as_me:25153: \$? = $ac_status" >&5
25154   (exit $ac_status); }; }; then
25155   ac_lo=$ac_mid; break
25156 else
25157   echo "$as_me: failed program was:" >&5
25158 cat conftest.$ac_ext >&5
25159 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25160 fi
25161 rm -f conftest.$ac_objext conftest.$ac_ext
25162   done
25163 fi
25164 rm -f conftest.$ac_objext conftest.$ac_ext
25165 # Binary search between lo and hi bounds.
25166 while test "x$ac_lo" != "x$ac_hi"; do
25167   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25168   cat >conftest.$ac_ext <<_ACEOF
25169 #line 25169 "configure"
25170 #include "confdefs.h"
25171
25172 #include <stdlib.h>
25173 #include <stdio.h>
25174
25175 #if defined(__cplusplus)
25176
25177 #ifdef HAVE_GXX_BUILTIN_H
25178 #include <g++/builtin.h>
25179 #elif HAVE_GPP_BUILTIN_H
25180 #include <gpp/builtin.h>
25181 #elif HAVE_BUILTIN_H
25182 #include <builtin.h>
25183 #endif
25184
25185 #else
25186
25187 #if $cf_cv_header_stdbool_h
25188 #include <stdbool.h>
25189 #endif
25190
25191 #endif
25192
25193 int
25194 main (void)
25195 {
25196 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25197   ;
25198   return 0;
25199 }
25200 _ACEOF
25201 rm -f conftest.$ac_objext
25202 if { (eval echo "$as_me:25202: \"$ac_compile\"") >&5
25203   (eval $ac_compile) 2>&5
25204   ac_status=$?
25205   echo "$as_me:25205: \$? = $ac_status" >&5
25206   (exit $ac_status); } &&
25207          { ac_try='test -s conftest.$ac_objext'
25208   { (eval echo "$as_me:25208: \"$ac_try\"") >&5
25209   (eval $ac_try) 2>&5
25210   ac_status=$?
25211   echo "$as_me:25211: \$? = $ac_status" >&5
25212   (exit $ac_status); }; }; then
25213   ac_hi=$ac_mid
25214 else
25215   echo "$as_me: failed program was:" >&5
25216 cat conftest.$ac_ext >&5
25217 ac_lo=`expr $ac_mid + 1`
25218 fi
25219 rm -f conftest.$ac_objext conftest.$ac_ext
25220 done
25221 ac_cv_sizeof_bool=$ac_lo
25222 else
25223   if test "$cross_compiling" = yes; then
25224   { { echo "$as_me:25224: error: cannot run test program while cross compiling" >&5
25225 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25226    { (exit 1); exit 1; }; }
25227 else
25228   cat >conftest.$ac_ext <<_ACEOF
25229 #line 25229 "configure"
25230 #include "confdefs.h"
25231
25232 #include <stdlib.h>
25233 #include <stdio.h>
25234
25235 #if defined(__cplusplus)
25236
25237 #ifdef HAVE_GXX_BUILTIN_H
25238 #include <g++/builtin.h>
25239 #elif HAVE_GPP_BUILTIN_H
25240 #include <gpp/builtin.h>
25241 #elif HAVE_BUILTIN_H
25242 #include <builtin.h>
25243 #endif
25244
25245 #else
25246
25247 #if $cf_cv_header_stdbool_h
25248 #include <stdbool.h>
25249 #endif
25250
25251 #endif
25252
25253 int
25254 main (void)
25255 {
25256 FILE *f = fopen ("conftest.val", "w");
25257 if (!f)
25258   $ac_main_return (1);
25259 fprintf (f, "%d", (sizeof (bool)));
25260 fclose (f);
25261   ;
25262   return 0;
25263 }
25264 _ACEOF
25265 rm -f conftest$ac_exeext
25266 if { (eval echo "$as_me:25266: \"$ac_link\"") >&5
25267   (eval $ac_link) 2>&5
25268   ac_status=$?
25269   echo "$as_me:25269: \$? = $ac_status" >&5
25270   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25271   { (eval echo "$as_me:25271: \"$ac_try\"") >&5
25272   (eval $ac_try) 2>&5
25273   ac_status=$?
25274   echo "$as_me:25274: \$? = $ac_status" >&5
25275   (exit $ac_status); }; }; then
25276   ac_cv_sizeof_bool=`cat conftest.val`
25277 else
25278   echo "$as_me: program exited with status $ac_status" >&5
25279 echo "$as_me: failed program was:" >&5
25280 cat conftest.$ac_ext >&5
25281 fi
25282 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25283 fi
25284 fi
25285 rm -f conftest.val
25286 else
25287   ac_cv_sizeof_bool=0
25288 fi
25289 fi
25290 echo "$as_me:25290: result: $ac_cv_sizeof_bool" >&5
25291 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25292 cat >>confdefs.h <<EOF
25293 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25294 EOF
25295
25296 echo "$as_me:25296: checking for type of bool" >&5
25297 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25298 if test "${cf_cv_type_of_bool+set}" = set; then
25299   echo $ECHO_N "(cached) $ECHO_C" >&6
25300 else
25301
25302         rm -f cf_test.out
25303         if test "$cross_compiling" = yes; then
25304
25305                 case x$ac_cv_sizeof_bool in
25306                 (x1) cf_cv_type_of_bool="unsigned char";;
25307                 (x2) cf_cv_type_of_bool="unsigned short";;
25308                 (x4) cf_cv_type_of_bool="unsigned int";;
25309                 (x8) cf_cv_type_of_bool="unsigned long";;
25310                 (*)  cf_cv_type_of_bool=unknown;;
25311                 esac
25312
25313 else
25314   cat >conftest.$ac_ext <<_ACEOF
25315 #line 25315 "configure"
25316 #include "confdefs.h"
25317
25318 #include <stdlib.h>
25319 #include <stdio.h>
25320
25321 #if defined(__cplusplus)
25322
25323 #ifdef HAVE_GXX_BUILTIN_H
25324 #include <g++/builtin.h>
25325 #elif HAVE_GPP_BUILTIN_H
25326 #include <gpp/builtin.h>
25327 #elif HAVE_BUILTIN_H
25328 #include <builtin.h>
25329 #endif
25330
25331 #else
25332
25333 #if $cf_cv_header_stdbool_h
25334 #include <stdbool.h>
25335 #endif
25336
25337 #endif
25338
25339 int main(void)
25340 {
25341         FILE *fp = fopen("cf_test.out", "w");
25342         if (fp != 0) {
25343                 bool x = true;
25344                 if ((bool)(-x) >= 0)
25345                         fputs("unsigned ", fp);
25346                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25347                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25348                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25349                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25350                 fclose(fp);
25351         }
25352         ${cf_cv_main_return:-return}(0);
25353 }
25354
25355 _ACEOF
25356 rm -f conftest$ac_exeext
25357 if { (eval echo "$as_me:25357: \"$ac_link\"") >&5
25358   (eval $ac_link) 2>&5
25359   ac_status=$?
25360   echo "$as_me:25360: \$? = $ac_status" >&5
25361   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25362   { (eval echo "$as_me:25362: \"$ac_try\"") >&5
25363   (eval $ac_try) 2>&5
25364   ac_status=$?
25365   echo "$as_me:25365: \$? = $ac_status" >&5
25366   (exit $ac_status); }; }; then
25367   cf_cv_type_of_bool=`cat cf_test.out`
25368                  if test -z "$cf_cv_type_of_bool"; then
25369                    cf_cv_type_of_bool=unknown
25370                  fi
25371 else
25372   echo "$as_me: program exited with status $ac_status" >&5
25373 echo "$as_me: failed program was:" >&5
25374 cat conftest.$ac_ext >&5
25375 cf_cv_type_of_bool=unknown
25376 fi
25377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25378 fi
25379         rm -f cf_test.out
25380
25381 fi
25382 echo "$as_me:25382: result: $cf_cv_type_of_bool" >&5
25383 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25384
25385 if test "$cf_cv_type_of_bool" = unknown ; then
25386         case .$NCURSES_BOOL in
25387         (.auto|.) NCURSES_BOOL=unsigned;;
25388         esac
25389         { echo "$as_me:25389: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25390 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25391         cf_cv_type_of_bool=$NCURSES_BOOL
25392 fi
25393
25394 echo "$as_me:25394: checking for special defines needed for etip.h" >&5
25395 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25396 cf_save_CXXFLAGS="$CXXFLAGS"
25397 cf_result="none"
25398
25399 # etip.h includes ncurses.h which includes ncurses_dll.h
25400 # But ncurses_dll.h is generated - fix here.
25401 test -d include || mkdir include
25402 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
25403
25404 for cf_math in "" MATH_H
25405 do
25406 for cf_excp in "" MATH_EXCEPTION
25407 do
25408         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25409         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25410         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25411 cat >conftest.$ac_ext <<_ACEOF
25412 #line 25412 "configure"
25413 #include "confdefs.h"
25414
25415 #include <etip.h.in>
25416
25417 int
25418 main (void)
25419 {
25420
25421   ;
25422   return 0;
25423 }
25424 _ACEOF
25425 rm -f conftest.$ac_objext
25426 if { (eval echo "$as_me:25426: \"$ac_compile\"") >&5
25427   (eval $ac_compile) 2>&5
25428   ac_status=$?
25429   echo "$as_me:25429: \$? = $ac_status" >&5
25430   (exit $ac_status); } &&
25431          { ac_try='test -s conftest.$ac_objext'
25432   { (eval echo "$as_me:25432: \"$ac_try\"") >&5
25433   (eval $ac_try) 2>&5
25434   ac_status=$?
25435   echo "$as_me:25435: \$? = $ac_status" >&5
25436   (exit $ac_status); }; }; then
25437
25438         test -n "$cf_math" && cat >>confdefs.h <<EOF
25439 #define ETIP_NEEDS_${cf_math} 1
25440 EOF
25441
25442         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25443 #define ETIP_NEEDS_${cf_excp} 1
25444 EOF
25445
25446         cf_result="$cf_math $cf_excp"
25447         break 2
25448
25449 else
25450   echo "$as_me: failed program was:" >&5
25451 cat conftest.$ac_ext >&5
25452 fi
25453 rm -f conftest.$ac_objext conftest.$ac_ext
25454 done
25455 done
25456 echo "$as_me:25456: result: $cf_result" >&5
25457 echo "${ECHO_T}$cf_result" >&6
25458 CXXFLAGS="$cf_save_CXXFLAGS"
25459
25460 if test -n "$CXX"; then
25461 echo "$as_me:25461: checking if $CXX accepts parameter initialization" >&5
25462 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25463 if test "${cf_cv_cpp_param_init+set}" = set; then
25464   echo $ECHO_N "(cached) $ECHO_C" >&6
25465 else
25466
25467         ac_ext=cc
25468 ac_cpp='$CXXCPP $CPPFLAGS'
25469 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25470 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25471 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25472 ac_main_return=return
25473
25474         if test "$cross_compiling" = yes; then
25475   cf_cv_cpp_param_init=unknown
25476 else
25477   cat >conftest.$ac_ext <<_ACEOF
25478 #line 25478 "configure"
25479 #include "confdefs.h"
25480
25481 class TEST {
25482 private:
25483         int value;
25484 public:
25485         TEST(int x = 1);
25486         ~TEST();
25487 };
25488
25489 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25490 {
25491         value = x;
25492 }
25493 int main(void) { }
25494
25495 _ACEOF
25496 rm -f conftest$ac_exeext
25497 if { (eval echo "$as_me:25497: \"$ac_link\"") >&5
25498   (eval $ac_link) 2>&5
25499   ac_status=$?
25500   echo "$as_me:25500: \$? = $ac_status" >&5
25501   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25502   { (eval echo "$as_me:25502: \"$ac_try\"") >&5
25503   (eval $ac_try) 2>&5
25504   ac_status=$?
25505   echo "$as_me:25505: \$? = $ac_status" >&5
25506   (exit $ac_status); }; }; then
25507   cf_cv_cpp_param_init=yes
25508 else
25509   echo "$as_me: program exited with status $ac_status" >&5
25510 echo "$as_me: failed program was:" >&5
25511 cat conftest.$ac_ext >&5
25512 cf_cv_cpp_param_init=no
25513 fi
25514 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25515 fi
25516         ac_ext=cc
25517 ac_cpp='$CXXCPP $CPPFLAGS'
25518 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25519 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25520 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25521 ac_main_return=return
25522
25523 fi
25524 echo "$as_me:25524: result: $cf_cv_cpp_param_init" >&5
25525 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25526 fi
25527 test "$cf_cv_cpp_param_init" = yes &&
25528 cat >>confdefs.h <<\EOF
25529 #define CPP_HAS_PARAM_INIT 1
25530 EOF
25531
25532 if test -n "$CXX"; then
25533
25534 echo "$as_me:25534: checking if $CXX accepts static_cast" >&5
25535 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25536 if test "${cf_cv_cpp_static_cast+set}" = set; then
25537   echo $ECHO_N "(cached) $ECHO_C" >&6
25538 else
25539
25540         ac_ext=cc
25541 ac_cpp='$CXXCPP $CPPFLAGS'
25542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25545 ac_main_return=return
25546
25547         cat >conftest.$ac_ext <<_ACEOF
25548 #line 25548 "configure"
25549 #include "confdefs.h"
25550
25551 class NCursesPanel
25552 {
25553 public:
25554   NCursesPanel(int nlines,
25555                int ncols,
25556                int begin_y = 0,
25557                int begin_x = 0)
25558   {
25559   }
25560   NCursesPanel();
25561   ~NCursesPanel();
25562 };
25563
25564 template<class T> class NCursesUserPanel : public NCursesPanel
25565 {
25566 public:
25567   NCursesUserPanel (int nlines,
25568                     int ncols,
25569                     int begin_y = 0,
25570                     int begin_x = 0,
25571                     const T* p_UserData = static_cast<T*>(0))
25572     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25573   {
25574   };
25575   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25576   {
25577   };
25578
25579   virtual ~NCursesUserPanel() {};
25580 };
25581
25582 int
25583 main (void)
25584 {
25585
25586         const char* p_UserData = static_cast<char*>(0)
25587   ;
25588   return 0;
25589 }
25590 _ACEOF
25591 rm -f conftest.$ac_objext
25592 if { (eval echo "$as_me:25592: \"$ac_compile\"") >&5
25593   (eval $ac_compile) 2>&5
25594   ac_status=$?
25595   echo "$as_me:25595: \$? = $ac_status" >&5
25596   (exit $ac_status); } &&
25597          { ac_try='test -s conftest.$ac_objext'
25598   { (eval echo "$as_me:25598: \"$ac_try\"") >&5
25599   (eval $ac_try) 2>&5
25600   ac_status=$?
25601   echo "$as_me:25601: \$? = $ac_status" >&5
25602   (exit $ac_status); }; }; then
25603   cf_cv_cpp_static_cast=yes
25604 else
25605   echo "$as_me: failed program was:" >&5
25606 cat conftest.$ac_ext >&5
25607 cf_cv_cpp_static_cast=no
25608 fi
25609 rm -f conftest.$ac_objext conftest.$ac_ext
25610
25611         ac_ext=cc
25612 ac_cpp='$CXXCPP $CPPFLAGS'
25613 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25614 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25615 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25616 ac_main_return=return
25617
25618 fi
25619 echo "$as_me:25619: result: $cf_cv_cpp_static_cast" >&5
25620 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25621
25622 fi
25623
25624 test "$cf_cv_cpp_static_cast" = yes &&
25625 cat >>confdefs.h <<\EOF
25626 #define CPP_HAS_STATIC_CAST 1
25627 EOF
25628
25629         CXX_AR='$(AR)'
25630         CXX_ARFLAGS='$(ARFLAGS)'
25631         case $cf_cv_system_name in
25632         (irix*)
25633             if test "$GXX" != yes ; then
25634                 CXX_AR='$(CXX)'
25635                 CXX_ARFLAGS='-ar -o'
25636             fi
25637             ;;
25638         (sco3.2v5*)
25639             CXXLDFLAGS="-u main"
25640             ;;
25641         (solaris2*)
25642             if test "$GXX" != yes ; then
25643                 CXX_AR='$(CXX)'
25644                 CXX_ARFLAGS='-xar -o'
25645             fi
25646             ;;
25647         esac
25648
25649 else
25650         cf_cxx_library=no
25651         cf_cv_builtin_bool=1
25652
25653         # Just because we are not configuring against C++ right now does not
25654         # mean that a user will not want to use C++.  Some distributors disable
25655         # the C++ portion of this configuration as a shortcut (or just to avoid
25656         # compiling the demo in the c++ directory).  So we need a reasonable
25657         # default for the 'bool' type.
25658         #
25659         # Caveat: since the storage of the bool type is not standardized, it
25660         # may change.
25661
25662         if test "$NCURSES_BOOL" != auto ; then
25663                 cf_cv_type_of_bool=$NCURSES_BOOL
25664                 cf_cv_header_stdbool_h=0
25665         else
25666                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25667
25668 echo "$as_me:25668: checking for bool" >&5
25669 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25670 if test "${ac_cv_type_bool+set}" = set; then
25671   echo $ECHO_N "(cached) $ECHO_C" >&6
25672 else
25673   cat >conftest.$ac_ext <<_ACEOF
25674 #line 25674 "configure"
25675 #include "confdefs.h"
25676
25677 #include <stdlib.h>
25678 #include <stdio.h>
25679
25680 #if defined(__cplusplus)
25681
25682 #ifdef HAVE_GXX_BUILTIN_H
25683 #include <g++/builtin.h>
25684 #elif HAVE_GPP_BUILTIN_H
25685 #include <gpp/builtin.h>
25686 #elif HAVE_BUILTIN_H
25687 #include <builtin.h>
25688 #endif
25689
25690 #else
25691
25692 #if $cf_cv_header_stdbool_h
25693 #include <stdbool.h>
25694 #endif
25695
25696 #endif
25697
25698 int
25699 main (void)
25700 {
25701 if ((bool *) 0)
25702   return 0;
25703 if (sizeof (bool))
25704   return 0;
25705   ;
25706   return 0;
25707 }
25708 _ACEOF
25709 rm -f conftest.$ac_objext
25710 if { (eval echo "$as_me:25710: \"$ac_compile\"") >&5
25711   (eval $ac_compile) 2>&5
25712   ac_status=$?
25713   echo "$as_me:25713: \$? = $ac_status" >&5
25714   (exit $ac_status); } &&
25715          { ac_try='test -s conftest.$ac_objext'
25716   { (eval echo "$as_me:25716: \"$ac_try\"") >&5
25717   (eval $ac_try) 2>&5
25718   ac_status=$?
25719   echo "$as_me:25719: \$? = $ac_status" >&5
25720   (exit $ac_status); }; }; then
25721   ac_cv_type_bool=yes
25722 else
25723   echo "$as_me: failed program was:" >&5
25724 cat conftest.$ac_ext >&5
25725 ac_cv_type_bool=no
25726 fi
25727 rm -f conftest.$ac_objext conftest.$ac_ext
25728 fi
25729 echo "$as_me:25729: result: $ac_cv_type_bool" >&5
25730 echo "${ECHO_T}$ac_cv_type_bool" >&6
25731
25732 echo "$as_me:25732: checking size of bool" >&5
25733 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25734 if test "${ac_cv_sizeof_bool+set}" = set; then
25735   echo $ECHO_N "(cached) $ECHO_C" >&6
25736 else
25737   if test "$ac_cv_type_bool" = yes; then
25738   if test "$cross_compiling" = yes; then
25739   # Depending upon the size, compute the lo and hi bounds.
25740 cat >conftest.$ac_ext <<_ACEOF
25741 #line 25741 "configure"
25742 #include "confdefs.h"
25743
25744 #include <stdlib.h>
25745 #include <stdio.h>
25746
25747 #if defined(__cplusplus)
25748
25749 #ifdef HAVE_GXX_BUILTIN_H
25750 #include <g++/builtin.h>
25751 #elif HAVE_GPP_BUILTIN_H
25752 #include <gpp/builtin.h>
25753 #elif HAVE_BUILTIN_H
25754 #include <builtin.h>
25755 #endif
25756
25757 #else
25758
25759 #if $cf_cv_header_stdbool_h
25760 #include <stdbool.h>
25761 #endif
25762
25763 #endif
25764
25765 int
25766 main (void)
25767 {
25768 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25769   ;
25770   return 0;
25771 }
25772 _ACEOF
25773 rm -f conftest.$ac_objext
25774 if { (eval echo "$as_me:25774: \"$ac_compile\"") >&5
25775   (eval $ac_compile) 2>&5
25776   ac_status=$?
25777   echo "$as_me:25777: \$? = $ac_status" >&5
25778   (exit $ac_status); } &&
25779          { ac_try='test -s conftest.$ac_objext'
25780   { (eval echo "$as_me:25780: \"$ac_try\"") >&5
25781   (eval $ac_try) 2>&5
25782   ac_status=$?
25783   echo "$as_me:25783: \$? = $ac_status" >&5
25784   (exit $ac_status); }; }; then
25785   ac_lo=0 ac_mid=0
25786   while :; do
25787     cat >conftest.$ac_ext <<_ACEOF
25788 #line 25788 "configure"
25789 #include "confdefs.h"
25790
25791 #include <stdlib.h>
25792 #include <stdio.h>
25793
25794 #if defined(__cplusplus)
25795
25796 #ifdef HAVE_GXX_BUILTIN_H
25797 #include <g++/builtin.h>
25798 #elif HAVE_GPP_BUILTIN_H
25799 #include <gpp/builtin.h>
25800 #elif HAVE_BUILTIN_H
25801 #include <builtin.h>
25802 #endif
25803
25804 #else
25805
25806 #if $cf_cv_header_stdbool_h
25807 #include <stdbool.h>
25808 #endif
25809
25810 #endif
25811
25812 int
25813 main (void)
25814 {
25815 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25816   ;
25817   return 0;
25818 }
25819 _ACEOF
25820 rm -f conftest.$ac_objext
25821 if { (eval echo "$as_me:25821: \"$ac_compile\"") >&5
25822   (eval $ac_compile) 2>&5
25823   ac_status=$?
25824   echo "$as_me:25824: \$? = $ac_status" >&5
25825   (exit $ac_status); } &&
25826          { ac_try='test -s conftest.$ac_objext'
25827   { (eval echo "$as_me:25827: \"$ac_try\"") >&5
25828   (eval $ac_try) 2>&5
25829   ac_status=$?
25830   echo "$as_me:25830: \$? = $ac_status" >&5
25831   (exit $ac_status); }; }; then
25832   ac_hi=$ac_mid; break
25833 else
25834   echo "$as_me: failed program was:" >&5
25835 cat conftest.$ac_ext >&5
25836 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25837 fi
25838 rm -f conftest.$ac_objext conftest.$ac_ext
25839   done
25840 else
25841   echo "$as_me: failed program was:" >&5
25842 cat conftest.$ac_ext >&5
25843 ac_hi=-1 ac_mid=-1
25844   while :; do
25845     cat >conftest.$ac_ext <<_ACEOF
25846 #line 25846 "configure"
25847 #include "confdefs.h"
25848
25849 #include <stdlib.h>
25850 #include <stdio.h>
25851
25852 #if defined(__cplusplus)
25853
25854 #ifdef HAVE_GXX_BUILTIN_H
25855 #include <g++/builtin.h>
25856 #elif HAVE_GPP_BUILTIN_H
25857 #include <gpp/builtin.h>
25858 #elif HAVE_BUILTIN_H
25859 #include <builtin.h>
25860 #endif
25861
25862 #else
25863
25864 #if $cf_cv_header_stdbool_h
25865 #include <stdbool.h>
25866 #endif
25867
25868 #endif
25869
25870 int
25871 main (void)
25872 {
25873 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25874   ;
25875   return 0;
25876 }
25877 _ACEOF
25878 rm -f conftest.$ac_objext
25879 if { (eval echo "$as_me:25879: \"$ac_compile\"") >&5
25880   (eval $ac_compile) 2>&5
25881   ac_status=$?
25882   echo "$as_me:25882: \$? = $ac_status" >&5
25883   (exit $ac_status); } &&
25884          { ac_try='test -s conftest.$ac_objext'
25885   { (eval echo "$as_me:25885: \"$ac_try\"") >&5
25886   (eval $ac_try) 2>&5
25887   ac_status=$?
25888   echo "$as_me:25888: \$? = $ac_status" >&5
25889   (exit $ac_status); }; }; then
25890   ac_lo=$ac_mid; break
25891 else
25892   echo "$as_me: failed program was:" >&5
25893 cat conftest.$ac_ext >&5
25894 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25895 fi
25896 rm -f conftest.$ac_objext conftest.$ac_ext
25897   done
25898 fi
25899 rm -f conftest.$ac_objext conftest.$ac_ext
25900 # Binary search between lo and hi bounds.
25901 while test "x$ac_lo" != "x$ac_hi"; do
25902   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25903   cat >conftest.$ac_ext <<_ACEOF
25904 #line 25904 "configure"
25905 #include "confdefs.h"
25906
25907 #include <stdlib.h>
25908 #include <stdio.h>
25909
25910 #if defined(__cplusplus)
25911
25912 #ifdef HAVE_GXX_BUILTIN_H
25913 #include <g++/builtin.h>
25914 #elif HAVE_GPP_BUILTIN_H
25915 #include <gpp/builtin.h>
25916 #elif HAVE_BUILTIN_H
25917 #include <builtin.h>
25918 #endif
25919
25920 #else
25921
25922 #if $cf_cv_header_stdbool_h
25923 #include <stdbool.h>
25924 #endif
25925
25926 #endif
25927
25928 int
25929 main (void)
25930 {
25931 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25932   ;
25933   return 0;
25934 }
25935 _ACEOF
25936 rm -f conftest.$ac_objext
25937 if { (eval echo "$as_me:25937: \"$ac_compile\"") >&5
25938   (eval $ac_compile) 2>&5
25939   ac_status=$?
25940   echo "$as_me:25940: \$? = $ac_status" >&5
25941   (exit $ac_status); } &&
25942          { ac_try='test -s conftest.$ac_objext'
25943   { (eval echo "$as_me:25943: \"$ac_try\"") >&5
25944   (eval $ac_try) 2>&5
25945   ac_status=$?
25946   echo "$as_me:25946: \$? = $ac_status" >&5
25947   (exit $ac_status); }; }; then
25948   ac_hi=$ac_mid
25949 else
25950   echo "$as_me: failed program was:" >&5
25951 cat conftest.$ac_ext >&5
25952 ac_lo=`expr $ac_mid + 1`
25953 fi
25954 rm -f conftest.$ac_objext conftest.$ac_ext
25955 done
25956 ac_cv_sizeof_bool=$ac_lo
25957 else
25958   if test "$cross_compiling" = yes; then
25959   { { echo "$as_me:25959: error: cannot run test program while cross compiling" >&5
25960 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25961    { (exit 1); exit 1; }; }
25962 else
25963   cat >conftest.$ac_ext <<_ACEOF
25964 #line 25964 "configure"
25965 #include "confdefs.h"
25966
25967 #include <stdlib.h>
25968 #include <stdio.h>
25969
25970 #if defined(__cplusplus)
25971
25972 #ifdef HAVE_GXX_BUILTIN_H
25973 #include <g++/builtin.h>
25974 #elif HAVE_GPP_BUILTIN_H
25975 #include <gpp/builtin.h>
25976 #elif HAVE_BUILTIN_H
25977 #include <builtin.h>
25978 #endif
25979
25980 #else
25981
25982 #if $cf_cv_header_stdbool_h
25983 #include <stdbool.h>
25984 #endif
25985
25986 #endif
25987
25988 int
25989 main (void)
25990 {
25991 FILE *f = fopen ("conftest.val", "w");
25992 if (!f)
25993   $ac_main_return (1);
25994 fprintf (f, "%d", (sizeof (bool)));
25995 fclose (f);
25996   ;
25997   return 0;
25998 }
25999 _ACEOF
26000 rm -f conftest$ac_exeext
26001 if { (eval echo "$as_me:26001: \"$ac_link\"") >&5
26002   (eval $ac_link) 2>&5
26003   ac_status=$?
26004   echo "$as_me:26004: \$? = $ac_status" >&5
26005   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26006   { (eval echo "$as_me:26006: \"$ac_try\"") >&5
26007   (eval $ac_try) 2>&5
26008   ac_status=$?
26009   echo "$as_me:26009: \$? = $ac_status" >&5
26010   (exit $ac_status); }; }; then
26011   ac_cv_sizeof_bool=`cat conftest.val`
26012 else
26013   echo "$as_me: program exited with status $ac_status" >&5
26014 echo "$as_me: failed program was:" >&5
26015 cat conftest.$ac_ext >&5
26016 fi
26017 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26018 fi
26019 fi
26020 rm -f conftest.val
26021 else
26022   ac_cv_sizeof_bool=0
26023 fi
26024 fi
26025 echo "$as_me:26025: result: $ac_cv_sizeof_bool" >&5
26026 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26027 cat >>confdefs.h <<EOF
26028 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26029 EOF
26030
26031 echo "$as_me:26031: checking for type of bool" >&5
26032 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26033 if test "${cf_cv_type_of_bool+set}" = set; then
26034   echo $ECHO_N "(cached) $ECHO_C" >&6
26035 else
26036
26037         rm -f cf_test.out
26038         if test "$cross_compiling" = yes; then
26039
26040                 case x$ac_cv_sizeof_bool in
26041                 (x1) cf_cv_type_of_bool="unsigned char";;
26042                 (x2) cf_cv_type_of_bool="unsigned short";;
26043                 (x4) cf_cv_type_of_bool="unsigned int";;
26044                 (x8) cf_cv_type_of_bool="unsigned long";;
26045                 (*)  cf_cv_type_of_bool=unknown;;
26046                 esac
26047
26048 else
26049   cat >conftest.$ac_ext <<_ACEOF
26050 #line 26050 "configure"
26051 #include "confdefs.h"
26052
26053 #include <stdlib.h>
26054 #include <stdio.h>
26055
26056 #if defined(__cplusplus)
26057
26058 #ifdef HAVE_GXX_BUILTIN_H
26059 #include <g++/builtin.h>
26060 #elif HAVE_GPP_BUILTIN_H
26061 #include <gpp/builtin.h>
26062 #elif HAVE_BUILTIN_H
26063 #include <builtin.h>
26064 #endif
26065
26066 #else
26067
26068 #if $cf_cv_header_stdbool_h
26069 #include <stdbool.h>
26070 #endif
26071
26072 #endif
26073
26074 int main(void)
26075 {
26076         FILE *fp = fopen("cf_test.out", "w");
26077         if (fp != 0) {
26078                 bool x = true;
26079                 if ((bool)(-x) >= 0)
26080                         fputs("unsigned ", fp);
26081                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26082                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26083                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26084                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26085                 fclose(fp);
26086         }
26087         ${cf_cv_main_return:-return}(0);
26088 }
26089
26090 _ACEOF
26091 rm -f conftest$ac_exeext
26092 if { (eval echo "$as_me:26092: \"$ac_link\"") >&5
26093   (eval $ac_link) 2>&5
26094   ac_status=$?
26095   echo "$as_me:26095: \$? = $ac_status" >&5
26096   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26097   { (eval echo "$as_me:26097: \"$ac_try\"") >&5
26098   (eval $ac_try) 2>&5
26099   ac_status=$?
26100   echo "$as_me:26100: \$? = $ac_status" >&5
26101   (exit $ac_status); }; }; then
26102   cf_cv_type_of_bool=`cat cf_test.out`
26103                  if test -z "$cf_cv_type_of_bool"; then
26104                    cf_cv_type_of_bool=unknown
26105                  fi
26106 else
26107   echo "$as_me: program exited with status $ac_status" >&5
26108 echo "$as_me: failed program was:" >&5
26109 cat conftest.$ac_ext >&5
26110 cf_cv_type_of_bool=unknown
26111 fi
26112 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26113 fi
26114         rm -f cf_test.out
26115
26116 fi
26117 echo "$as_me:26117: result: $cf_cv_type_of_bool" >&5
26118 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26119
26120 if test "$cf_cv_type_of_bool" = unknown ; then
26121         case .$NCURSES_BOOL in
26122         (.auto|.) NCURSES_BOOL=unsigned;;
26123         esac
26124         { echo "$as_me:26124: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26125 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26126         cf_cv_type_of_bool=$NCURSES_BOOL
26127 fi
26128
26129                 else
26130                         echo "$as_me:26130: checking for fallback type of bool" >&5
26131 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26132                         case "$host_cpu" in
26133                         (i?86)  cf_cv_type_of_bool=char ;;
26134                         (*)     cf_cv_type_of_bool=int  ;;
26135                         esac
26136                         echo "$as_me:26136: result: $cf_cv_type_of_bool" >&5
26137 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26138                 fi
26139         fi
26140 fi
26141
26142 # If the C compiler did not declare bool, and we did not determine that the C++
26143 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26144 # ncurses library use the same type as C++ bool.  Note that this allows one to
26145 # specify the type of bool in a configure-script option and postpone
26146 # integration with the C++ compiler provided that the types are compatible.
26147 USE_CXX_BOOL=1
26148 if test $cf_cv_cc_bool_type = 1
26149 then
26150         # oops: C has a bool.  Unlikely, but C++ could differ.
26151         USE_CXX_BOOL=0
26152 elif test $cf_cv_builtin_bool = 0
26153 then
26154         # C++ has no bool
26155         USE_CXX_BOOL=0
26156 else
26157         # this is the normal case
26158         USE_CXX_BOOL='defined(__cplusplus)'
26159 fi
26160
26161 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26162
26163         if test "$cf_with_ada" != "no" ; then
26164                 if test "$with_libtool" != "no"; then
26165                         { echo "$as_me:26165: WARNING: libtool does not support Ada - disabling feature" >&5
26166 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26167                         cf_with_ada=no
26168                 fi
26169         fi
26170
26171         if test "$cf_with_ada" != "no" ; then
26172
26173 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26174 do
26175
26176 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26177
26178         unset ac_cv_path_cf_TEMP_gnat
26179         unset cf_TEMP_gnat
26180         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26181 set dummy $cf_prog_gnat; ac_word=$2
26182 echo "$as_me:26182: checking for $ac_word" >&5
26183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26184 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26185   echo $ECHO_N "(cached) $ECHO_C" >&6
26186 else
26187   case $cf_TEMP_gnat in
26188   [\\/]* | ?:[\\/]*)
26189   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26190   ;;
26191   *)
26192   ac_save_IFS=$IFS; IFS=$ac_path_separator
26193 ac_dummy="$PATH"
26194 for ac_dir in $ac_dummy; do
26195   IFS=$ac_save_IFS
26196   test -z "$ac_dir" && ac_dir=.
26197   if $as_executable_p "$ac_dir/$ac_word"; then
26198    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26199    echo "$as_me:26199: found $ac_dir/$ac_word" >&5
26200    break
26201 fi
26202 done
26203
26204   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26205   ;;
26206 esac
26207 fi
26208 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26209
26210 if test -n "$cf_TEMP_gnat"; then
26211   echo "$as_me:26211: result: $cf_TEMP_gnat" >&5
26212 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26213 else
26214   echo "$as_me:26214: result: no" >&5
26215 echo "${ECHO_T}no" >&6
26216 fi
26217
26218         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
26219
26220         if test "x$cf_TEMP_gnat" != xno; then
26221                 unset cf_cv_gnat_version
26222                 unset cf_TEMP_gnat
26223
26224 echo "$as_me:26224: checking for $cf_prog_gnat version" >&5
26225 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26226 if test "${cf_cv_gnat_version+set}" = set; then
26227   echo $ECHO_N "(cached) $ECHO_C" >&6
26228 else
26229
26230 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26231         grep '[0-9].[0-9][0-9]*' |\
26232         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26233
26234 fi
26235 echo "$as_me:26235: result: $cf_cv_gnat_version" >&5
26236 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26237 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26238 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26239
26240         fi
26241         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
26242
26243         unset cf_TEMP_gnat
26244         unset cf_cv_gnat_version
26245         unset ac_cv_path_cf_TEMP_gnat
26246 done
26247
26248 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26249         cf_ada_make=
26250         cf_cv_prog_gnat_correct=no
26251 else
26252         cf_ada_make=gnatmake
26253         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26254                 # gprconfig is newer than gnatmake; we can continue...
26255                 cf_ada_config="##"
26256         else
26257                 rm -rf conftest* *~conftest*
26258                 if mkdir conftest.src
26259                 then
26260                         cf_ada_config=""
26261                         cd conftest.src
26262                         for cf_gprconfig in Ada C
26263                         do
26264                                 echo "$as_me:26264: checking for gprconfig name for $cf_gprconfig" >&5
26265 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26266                                 if test $cf_gprconfig = C
26267                                 then
26268                                         for cf_gprconfig_param in \
26269                                                 $cf_gprconfig,,,,GNATGCC \
26270                                                 $cf_gprconfig,,,,GCC \
26271                                                 $cf_gprconfig
26272                                         do
26273                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26274                                                 test -n "$cf_gprconfig_value" && break
26275                                         done
26276                                 else
26277                                         cf_gprconfig_param=$cf_gprconfig
26278                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26279                                 fi
26280                                 if test -n "$cf_gprconfig_value"
26281                                 then
26282                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
26283                                         echo "$as_me:26283: result: $cf_gprconfig_value" >&5
26284 echo "${ECHO_T}$cf_gprconfig_value" >&6
26285                                 else
26286                                         echo "$as_me:26286: result: missing" >&5
26287 echo "${ECHO_T}missing" >&6
26288                                         cf_ada_config="#"
26289                                         break
26290                                 fi
26291                         done
26292                         cd ..
26293                         rm -rf conftest* *~conftest*
26294                 fi
26295         fi
26296         if test "x$cf_ada_config" != "x#"
26297         then
26298
26299 echo "$as_me:26299: checking for gnat version" >&5
26300 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26301 if test "${cf_cv_gnat_version+set}" = set; then
26302   echo $ECHO_N "(cached) $ECHO_C" >&6
26303 else
26304
26305 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26306         grep '[0-9].[0-9][0-9]*' |\
26307         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26308
26309 fi
26310 echo "$as_me:26310: result: $cf_cv_gnat_version" >&5
26311 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26312 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26313
26314 case $cf_cv_gnat_version in
26315 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26316         cf_cv_prog_gnat_correct=yes
26317         ;;
26318 (*)
26319         { echo "$as_me:26319: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26320 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26321         cf_cv_prog_gnat_correct=no
26322         ;;
26323 esac
26324
26325                 # Extract the first word of "m4", so it can be a program name with args.
26326 set dummy m4; ac_word=$2
26327 echo "$as_me:26327: checking for $ac_word" >&5
26328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26329 if test "${ac_cv_prog_M4_exists+set}" = set; then
26330   echo $ECHO_N "(cached) $ECHO_C" >&6
26331 else
26332   if test -n "$M4_exists"; then
26333   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26334 else
26335   ac_save_IFS=$IFS; IFS=$ac_path_separator
26336 ac_dummy="$PATH"
26337 for ac_dir in $ac_dummy; do
26338   IFS=$ac_save_IFS
26339   test -z "$ac_dir" && ac_dir=.
26340   $as_executable_p "$ac_dir/$ac_word" || continue
26341 ac_cv_prog_M4_exists="yes"
26342 echo "$as_me:26342: found $ac_dir/$ac_word" >&5
26343 break
26344 done
26345
26346   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26347 fi
26348 fi
26349 M4_exists=$ac_cv_prog_M4_exists
26350 if test -n "$M4_exists"; then
26351   echo "$as_me:26351: result: $M4_exists" >&5
26352 echo "${ECHO_T}$M4_exists" >&6
26353 else
26354   echo "$as_me:26354: result: no" >&5
26355 echo "${ECHO_T}no" >&6
26356 fi
26357
26358                 if test "$ac_cv_prog_M4_exists" = no; then
26359                         cf_cv_prog_gnat_correct=no
26360                         { echo "$as_me:26360: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26361 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26362                 fi
26363                 if test "$cf_cv_prog_gnat_correct" = yes; then
26364                         echo "$as_me:26364: checking if GNAT works" >&5
26365 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26366
26367 rm -rf conftest* *~conftest*
26368 cat >>conftest.ads <<CF_EOF
26369 procedure conftest;
26370 CF_EOF
26371 cat >>conftest.adb <<CF_EOF
26372 with Text_IO;
26373 with GNAT.OS_Lib;
26374 procedure conftest is
26375 begin
26376    Text_IO.Put ("Hello World");
26377    Text_IO.New_Line;
26378    GNAT.OS_Lib.OS_Exit (0);
26379 end conftest;
26380 CF_EOF
26381 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26382    if ( ./conftest 1>&5 2>&1 ) ; then
26383       cf_cv_prog_gnat_correct=yes
26384    else
26385       cf_cv_prog_gnat_correct=no
26386    fi
26387 else
26388    cf_cv_prog_gnat_correct=no
26389 fi
26390 rm -rf conftest* *~conftest*
26391
26392                         echo "$as_me:26392: result: $cf_cv_prog_gnat_correct" >&5
26393 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26394                 fi
26395         else
26396                 cf_cv_prog_gnat_correct=no
26397         fi
26398 fi
26399
26400                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26401
26402         ADAFLAGS="$ADAFLAGS -gnatpn"
26403
26404         echo "$as_me:26404: checking optimization options for ADAFLAGS" >&5
26405 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26406         case "$CFLAGS" in
26407         (*-g*)
26408
26409         ADAFLAGS="$ADAFLAGS -g"
26410
26411                 ;;
26412         esac
26413         case "$CFLAGS" in
26414         (*-O*)
26415                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26416
26417         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26418
26419                 ;;
26420         esac
26421         echo "$as_me:26421: result: $ADAFLAGS" >&5
26422 echo "${ECHO_T}$ADAFLAGS" >&6
26423
26424 echo "$as_me:26424: checking if GNATPREP supports -T option" >&5
26425 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26426 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26427   echo $ECHO_N "(cached) $ECHO_C" >&6
26428 else
26429
26430 cf_cv_gnatprep_opt_t=no
26431 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26432
26433 fi
26434 echo "$as_me:26434: result: $cf_cv_gnatprep_opt_t" >&5
26435 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26436 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26437
26438 echo "$as_me:26438: checking if GNAT supports generics" >&5
26439 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26440 case $cf_cv_gnat_version in
26441 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26442         cf_gnat_generics=yes
26443         ;;
26444 (*)
26445         cf_gnat_generics=no
26446         ;;
26447 esac
26448 echo "$as_me:26448: result: $cf_gnat_generics" >&5
26449 echo "${ECHO_T}$cf_gnat_generics" >&6
26450
26451 if test "$cf_gnat_generics" = yes
26452 then
26453         cf_compile_generics=generics
26454         cf_generic_objects="\${GENOBJS}"
26455 else
26456         cf_compile_generics=
26457         cf_generic_objects=
26458 fi
26459
26460 echo "$as_me:26460: checking if GNAT supports SIGINT" >&5
26461 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26462 if test "${cf_cv_gnat_sigint+set}" = set; then
26463   echo $ECHO_N "(cached) $ECHO_C" >&6
26464 else
26465
26466 rm -rf conftest* *~conftest*
26467 cat >>conftest.ads <<CF_EOF
26468 with Ada.Interrupts.Names;
26469
26470 package ConfTest is
26471
26472    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26473    pragma Unreserve_All_Interrupts;
26474    pragma Warnings (On);
26475
26476    protected Process is
26477       procedure Stop;
26478       function Continue return Boolean;
26479       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26480    private
26481       Done : Boolean := False;
26482    end Process;
26483
26484 end ConfTest;
26485 CF_EOF
26486 cat >>conftest.adb <<CF_EOF
26487 package body ConfTest is
26488    protected body Process is
26489       procedure Stop is
26490       begin
26491          Done := True;
26492       end Stop;
26493       function Continue return Boolean is
26494       begin
26495          return not Done;
26496       end Continue;
26497    end Process;
26498 end ConfTest;
26499 CF_EOF
26500 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26501       cf_cv_gnat_sigint=yes
26502 else
26503    cf_cv_gnat_sigint=no
26504 fi
26505 rm -rf conftest* *~conftest*
26506
26507 fi
26508 echo "$as_me:26508: result: $cf_cv_gnat_sigint" >&5
26509 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26510
26511 if test $cf_cv_gnat_sigint = yes ; then
26512         USE_GNAT_SIGINT=""
26513 else
26514         USE_GNAT_SIGINT="#"
26515 fi
26516
26517 cf_gnat_libraries=no
26518 cf_gnat_projects=no
26519
26520 if test "$enable_gnat_projects" != no ; then
26521 echo "$as_me:26521: checking if GNAT supports project files" >&5
26522 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26523 case $cf_cv_gnat_version in
26524 (3.[0-9]*)
26525         ;;
26526 (*)
26527         case $cf_cv_system_name in
26528         (cygwin*|msys*)
26529                 ;;
26530         (*)
26531                 rm -rf conftest* *~conftest*
26532                 if mkdir conftest.src conftest.bin conftest.lib
26533                 then
26534                         cd conftest.src
26535                         rm -rf conftest* *~conftest*
26536                         cat >>library.gpr <<CF_EOF
26537 project Library is
26538   Kind := External ("LIB_KIND");
26539   for Library_Name use "ConfTest";
26540   for Object_Dir use ".";
26541   for Library_ALI_Dir use External("LIBRARY_DIR");
26542   for Library_Version use External ("SONAME");
26543   for Library_Kind use Kind;
26544   for Library_Dir use External("BUILD_DIR");
26545   Source_Dir := External ("SOURCE_DIR");
26546   for Source_Dirs use (Source_Dir);
26547 end Library;
26548 CF_EOF
26549                         cat >>confpackage.ads <<CF_EOF
26550 package ConfPackage is
26551    procedure conftest;
26552 end ConfPackage;
26553 CF_EOF
26554                         cat >>confpackage.adb <<CF_EOF
26555 with Text_IO;
26556 package body ConfPackage is
26557    procedure conftest is
26558    begin
26559       Text_IO.Put ("Hello World");
26560       Text_IO.New_Line;
26561    end conftest;
26562 end ConfPackage;
26563 CF_EOF
26564                         if ( $cf_ada_make $ADAFLAGS \
26565                                         -Plibrary.gpr \
26566                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
26567                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
26568                                         -XSOURCE_DIR=`pwd` \
26569                                         -XSONAME=libConfTest.so.1 \
26570                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26571                                 cf_gnat_projects=yes
26572                         fi
26573                         cd ..
26574                 fi
26575                 if test -f conftest.lib/confpackage.ali
26576                 then
26577                         cf_gnat_libraries=yes
26578                 fi
26579                 rm -rf conftest* *~conftest*
26580                 ;;
26581         esac
26582         ;;
26583 esac
26584 echo "$as_me:26584: result: $cf_gnat_projects" >&5
26585 echo "${ECHO_T}$cf_gnat_projects" >&6
26586 fi # enable_gnat_projects
26587
26588 if test $cf_gnat_projects = yes
26589 then
26590         echo "$as_me:26590: checking if GNAT supports libraries" >&5
26591 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26592         echo "$as_me:26592: result: $cf_gnat_libraries" >&5
26593 echo "${ECHO_T}$cf_gnat_libraries" >&6
26594 fi
26595
26596 USE_OLD_MAKERULES=""
26597 USE_GNAT_PROJECTS="#"
26598 USE_GNAT_MAKE_GPR="#"
26599 USE_GNAT_GPRBUILD="#"
26600
26601 if test "$cf_gnat_projects" = yes
26602 then
26603         USE_OLD_MAKERULES="#"
26604         USE_GNAT_PROJECTS=""
26605         if test "$cf_cv_VERSION_GPRBUILD" != no
26606         then
26607                 USE_GNAT_GPRBUILD=""
26608         elif test "$cf_cv_VERSION_GNATMAKE" != no
26609         then
26610                 USE_GNAT_MAKE_GPR=""
26611         else
26612                 { echo "$as_me:26612: WARNING: use old makefile rules since tools are missing" >&5
26613 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26614         fi
26615 fi
26616
26617 if test "$cf_gnat_libraries" = yes
26618 then
26619         USE_GNAT_LIBRARIES=""
26620 else
26621         USE_GNAT_LIBRARIES="#"
26622 fi
26623
26624 echo "$as_me:26624: checking for ada-compiler" >&5
26625 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26626
26627 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26628 if test "${with_ada_compiler+set}" = set; then
26629   withval="$with_ada_compiler"
26630   cf_ada_compiler=$withval
26631 else
26632   cf_ada_compiler=gnatmake
26633 fi;
26634
26635 echo "$as_me:26635: result: $cf_ada_compiler" >&5
26636 echo "${ECHO_T}$cf_ada_compiler" >&6
26637
26638                         cf_ada_package=terminal_interface
26639
26640 echo "$as_me:26640: checking for ada-include" >&5
26641 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26642
26643 # Check whether --with-ada-include or --without-ada-include was given.
26644 if test "${with_ada_include+set}" = set; then
26645   withval="$with_ada_include"
26646
26647 else
26648   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26649 fi; if test -n "$prefix/share/ada/adainclude" ; then
26650
26651 if test "x$prefix" != xNONE; then
26652         cf_path_syntax="$prefix"
26653 else
26654         cf_path_syntax="$ac_default_prefix"
26655 fi
26656
26657 case ".$withval" in
26658 (.\$\(*\)*|.\'*\'*)
26659         ;;
26660 (..|./*|.\\*)
26661         ;;
26662 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26663         ;;
26664 (.\${*prefix}*|.\${*dir}*)
26665         eval withval="$withval"
26666         case ".$withval" in
26667         (.NONE/*)
26668                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26669                 ;;
26670         esac
26671         ;;
26672 (.no|.NONE/*)
26673         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26674         ;;
26675 (*)
26676         { { echo "$as_me:26676: error: expected a pathname, not \"$withval\"" >&5
26677 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26678    { (exit 1); exit 1; }; }
26679         ;;
26680 esac
26681
26682 fi
26683 eval ADA_INCLUDE="$withval"
26684
26685 echo "$as_me:26685: result: $ADA_INCLUDE" >&5
26686 echo "${ECHO_T}$ADA_INCLUDE" >&6
26687
26688 echo "$as_me:26688: checking for ada-objects" >&5
26689 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26690
26691 # Check whether --with-ada-objects or --without-ada-objects was given.
26692 if test "${with_ada_objects+set}" = set; then
26693   withval="$with_ada_objects"
26694
26695 else
26696   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26697 fi; if test -n "$prefix/lib/ada/adalib" ; then
26698
26699 if test "x$prefix" != xNONE; then
26700         cf_path_syntax="$prefix"
26701 else
26702         cf_path_syntax="$ac_default_prefix"
26703 fi
26704
26705 case ".$withval" in
26706 (.\$\(*\)*|.\'*\'*)
26707         ;;
26708 (..|./*|.\\*)
26709         ;;
26710 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26711         ;;
26712 (.\${*prefix}*|.\${*dir}*)
26713         eval withval="$withval"
26714         case ".$withval" in
26715         (.NONE/*)
26716                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26717                 ;;
26718         esac
26719         ;;
26720 (.no|.NONE/*)
26721         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26722         ;;
26723 (*)
26724         { { echo "$as_me:26724: error: expected a pathname, not \"$withval\"" >&5
26725 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26726    { (exit 1); exit 1; }; }
26727         ;;
26728 esac
26729
26730 fi
26731 eval ADA_OBJECTS="$withval"
26732
26733 echo "$as_me:26733: result: $ADA_OBJECTS" >&5
26734 echo "${ECHO_T}$ADA_OBJECTS" >&6
26735
26736 echo "$as_me:26736: checking if an Ada95 shared-library should be built" >&5
26737 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26738
26739 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26740 if test "${with_ada_sharedlib+set}" = set; then
26741   withval="$with_ada_sharedlib"
26742   with_ada_sharedlib=$withval
26743 else
26744   with_ada_sharedlib=no
26745 fi;
26746 echo "$as_me:26746: result: $with_ada_sharedlib" >&5
26747 echo "${ECHO_T}$with_ada_sharedlib" >&6
26748
26749 if test "x$with_ada_sharedlib" != xno
26750 then
26751         if test "x$cf_gnat_projects" != xyes
26752         then
26753                 { echo "$as_me:26753: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26754 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26755                 with_ada_sharedlib=no
26756         fi
26757 fi
26758
26759 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26760 MAKE_ADA_SHAREDLIB="#"
26761
26762 if test "x$with_ada_sharedlib" != xno
26763 then
26764         MAKE_ADA_SHAREDLIB=
26765         if test "x$with_ada_sharedlib" != xyes
26766         then
26767                 ADA_SHAREDLIB="$with_ada_sharedlib"
26768         fi
26769 fi
26770
26771                         # allow the Ada binding to be renamed
26772
26773 echo "$as_me:26773: checking for ada-libname" >&5
26774 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26775
26776 # Check whether --with-ada-libname or --without-ada-libname was given.
26777 if test "${with_ada_libname+set}" = set; then
26778   withval="$with_ada_libname"
26779   ADA_LIBNAME=$withval
26780 else
26781   ADA_LIBNAME=AdaCurses
26782 fi;
26783 case "x$ADA_LIBNAME" in
26784 (x|xyes|xno)
26785         ADA_LIBNAME=AdaCurses
26786         ;;
26787 esac
26788
26789 echo "$as_me:26789: result: $ADA_LIBNAME" >&5
26790 echo "${ECHO_T}$ADA_LIBNAME" >&6
26791
26792                 fi
26793         fi
26794 else
26795         cf_with_ada=no
26796 fi
26797
26798 # do this "late" to avoid conflict with header-checks
26799 if test "x$with_widec" = xyes ; then
26800         echo "$as_me:26800: checking for wchar_t" >&5
26801 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26802 if test "${ac_cv_type_wchar_t+set}" = set; then
26803   echo $ECHO_N "(cached) $ECHO_C" >&6
26804 else
26805   cat >conftest.$ac_ext <<_ACEOF
26806 #line 26806 "configure"
26807 #include "confdefs.h"
26808 $ac_includes_default
26809 int
26810 main (void)
26811 {
26812 if ((wchar_t *) 0)
26813   return 0;
26814 if (sizeof (wchar_t))
26815   return 0;
26816   ;
26817   return 0;
26818 }
26819 _ACEOF
26820 rm -f conftest.$ac_objext
26821 if { (eval echo "$as_me:26821: \"$ac_compile\"") >&5
26822   (eval $ac_compile) 2>&5
26823   ac_status=$?
26824   echo "$as_me:26824: \$? = $ac_status" >&5
26825   (exit $ac_status); } &&
26826          { ac_try='test -s conftest.$ac_objext'
26827   { (eval echo "$as_me:26827: \"$ac_try\"") >&5
26828   (eval $ac_try) 2>&5
26829   ac_status=$?
26830   echo "$as_me:26830: \$? = $ac_status" >&5
26831   (exit $ac_status); }; }; then
26832   ac_cv_type_wchar_t=yes
26833 else
26834   echo "$as_me: failed program was:" >&5
26835 cat conftest.$ac_ext >&5
26836 ac_cv_type_wchar_t=no
26837 fi
26838 rm -f conftest.$ac_objext conftest.$ac_ext
26839 fi
26840 echo "$as_me:26840: result: $ac_cv_type_wchar_t" >&5
26841 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26842
26843 echo "$as_me:26843: checking size of wchar_t" >&5
26844 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26845 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26846   echo $ECHO_N "(cached) $ECHO_C" >&6
26847 else
26848   if test "$ac_cv_type_wchar_t" = yes; then
26849   if test "$cross_compiling" = yes; then
26850   # Depending upon the size, compute the lo and hi bounds.
26851 cat >conftest.$ac_ext <<_ACEOF
26852 #line 26852 "configure"
26853 #include "confdefs.h"
26854 $ac_includes_default
26855 int
26856 main (void)
26857 {
26858 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26859   ;
26860   return 0;
26861 }
26862 _ACEOF
26863 rm -f conftest.$ac_objext
26864 if { (eval echo "$as_me:26864: \"$ac_compile\"") >&5
26865   (eval $ac_compile) 2>&5
26866   ac_status=$?
26867   echo "$as_me:26867: \$? = $ac_status" >&5
26868   (exit $ac_status); } &&
26869          { ac_try='test -s conftest.$ac_objext'
26870   { (eval echo "$as_me:26870: \"$ac_try\"") >&5
26871   (eval $ac_try) 2>&5
26872   ac_status=$?
26873   echo "$as_me:26873: \$? = $ac_status" >&5
26874   (exit $ac_status); }; }; then
26875   ac_lo=0 ac_mid=0
26876   while :; do
26877     cat >conftest.$ac_ext <<_ACEOF
26878 #line 26878 "configure"
26879 #include "confdefs.h"
26880 $ac_includes_default
26881 int
26882 main (void)
26883 {
26884 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26885   ;
26886   return 0;
26887 }
26888 _ACEOF
26889 rm -f conftest.$ac_objext
26890 if { (eval echo "$as_me:26890: \"$ac_compile\"") >&5
26891   (eval $ac_compile) 2>&5
26892   ac_status=$?
26893   echo "$as_me:26893: \$? = $ac_status" >&5
26894   (exit $ac_status); } &&
26895          { ac_try='test -s conftest.$ac_objext'
26896   { (eval echo "$as_me:26896: \"$ac_try\"") >&5
26897   (eval $ac_try) 2>&5
26898   ac_status=$?
26899   echo "$as_me:26899: \$? = $ac_status" >&5
26900   (exit $ac_status); }; }; then
26901   ac_hi=$ac_mid; break
26902 else
26903   echo "$as_me: failed program was:" >&5
26904 cat conftest.$ac_ext >&5
26905 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
26906 fi
26907 rm -f conftest.$ac_objext conftest.$ac_ext
26908   done
26909 else
26910   echo "$as_me: failed program was:" >&5
26911 cat conftest.$ac_ext >&5
26912 ac_hi=-1 ac_mid=-1
26913   while :; do
26914     cat >conftest.$ac_ext <<_ACEOF
26915 #line 26915 "configure"
26916 #include "confdefs.h"
26917 $ac_includes_default
26918 int
26919 main (void)
26920 {
26921 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
26922   ;
26923   return 0;
26924 }
26925 _ACEOF
26926 rm -f conftest.$ac_objext
26927 if { (eval echo "$as_me:26927: \"$ac_compile\"") >&5
26928   (eval $ac_compile) 2>&5
26929   ac_status=$?
26930   echo "$as_me:26930: \$? = $ac_status" >&5
26931   (exit $ac_status); } &&
26932          { ac_try='test -s conftest.$ac_objext'
26933   { (eval echo "$as_me:26933: \"$ac_try\"") >&5
26934   (eval $ac_try) 2>&5
26935   ac_status=$?
26936   echo "$as_me:26936: \$? = $ac_status" >&5
26937   (exit $ac_status); }; }; then
26938   ac_lo=$ac_mid; break
26939 else
26940   echo "$as_me: failed program was:" >&5
26941 cat conftest.$ac_ext >&5
26942 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
26943 fi
26944 rm -f conftest.$ac_objext conftest.$ac_ext
26945   done
26946 fi
26947 rm -f conftest.$ac_objext conftest.$ac_ext
26948 # Binary search between lo and hi bounds.
26949 while test "x$ac_lo" != "x$ac_hi"; do
26950   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26951   cat >conftest.$ac_ext <<_ACEOF
26952 #line 26952 "configure"
26953 #include "confdefs.h"
26954 $ac_includes_default
26955 int
26956 main (void)
26957 {
26958 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26959   ;
26960   return 0;
26961 }
26962 _ACEOF
26963 rm -f conftest.$ac_objext
26964 if { (eval echo "$as_me:26964: \"$ac_compile\"") >&5
26965   (eval $ac_compile) 2>&5
26966   ac_status=$?
26967   echo "$as_me:26967: \$? = $ac_status" >&5
26968   (exit $ac_status); } &&
26969          { ac_try='test -s conftest.$ac_objext'
26970   { (eval echo "$as_me:26970: \"$ac_try\"") >&5
26971   (eval $ac_try) 2>&5
26972   ac_status=$?
26973   echo "$as_me:26973: \$? = $ac_status" >&5
26974   (exit $ac_status); }; }; then
26975   ac_hi=$ac_mid
26976 else
26977   echo "$as_me: failed program was:" >&5
26978 cat conftest.$ac_ext >&5
26979 ac_lo=`expr $ac_mid + 1`
26980 fi
26981 rm -f conftest.$ac_objext conftest.$ac_ext
26982 done
26983 ac_cv_sizeof_wchar_t=$ac_lo
26984 else
26985   if test "$cross_compiling" = yes; then
26986   { { echo "$as_me:26986: error: cannot run test program while cross compiling" >&5
26987 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26988    { (exit 1); exit 1; }; }
26989 else
26990   cat >conftest.$ac_ext <<_ACEOF
26991 #line 26991 "configure"
26992 #include "confdefs.h"
26993 $ac_includes_default
26994 int
26995 main (void)
26996 {
26997 FILE *f = fopen ("conftest.val", "w");
26998 if (!f)
26999   $ac_main_return (1);
27000 fprintf (f, "%d", (sizeof (wchar_t)));
27001 fclose (f);
27002   ;
27003   return 0;
27004 }
27005 _ACEOF
27006 rm -f conftest$ac_exeext
27007 if { (eval echo "$as_me:27007: \"$ac_link\"") >&5
27008   (eval $ac_link) 2>&5
27009   ac_status=$?
27010   echo "$as_me:27010: \$? = $ac_status" >&5
27011   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27012   { (eval echo "$as_me:27012: \"$ac_try\"") >&5
27013   (eval $ac_try) 2>&5
27014   ac_status=$?
27015   echo "$as_me:27015: \$? = $ac_status" >&5
27016   (exit $ac_status); }; }; then
27017   ac_cv_sizeof_wchar_t=`cat conftest.val`
27018 else
27019   echo "$as_me: program exited with status $ac_status" >&5
27020 echo "$as_me: failed program was:" >&5
27021 cat conftest.$ac_ext >&5
27022 fi
27023 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27024 fi
27025 fi
27026 rm -f conftest.val
27027 else
27028   ac_cv_sizeof_wchar_t=0
27029 fi
27030 fi
27031 echo "$as_me:27031: result: $ac_cv_sizeof_wchar_t" >&5
27032 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27033 cat >>confdefs.h <<EOF
27034 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27035 EOF
27036
27037         # cross-compiling to mingw can run into the problem that attempting to
27038         # link with the regex library fails, causing the test to not set this to
27039         # a number.  "recent" autoconf does not address this problem either -TD
27040         if test -z "$ac_cv_sizeof_wchar_t"
27041         then
27042                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27043
27044 echo "${as_me:-configure}:27044: testing test failed (assume 2) ..." 1>&5
27045
27046                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27047                 mv confdefs.tmp confdefs.h
27048                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27049         fi
27050 fi
27051
27052 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27053 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27054 ###
27055 ### ticlib modules may be a separate library, otherwise contained in termlib.
27056 ### termlib modules may be a separate library, otherwise contained in ncurses.
27057 ###
27058 ### The of "+" or " " between the tokens controls the way the script
27059 ### chooses to split module lists into libraries.
27060 ###
27061 ### (see CF_LIB_RULES).
27062 echo "$as_me:27062: checking for library subsets" >&5
27063 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27064 LIB_SUBSETS=
27065
27066 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27067         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27068         if test "$with_ticlib" != no ; then
27069                 LIB_SUBSETS="${LIB_SUBSETS} "
27070         else
27071                 LIB_SUBSETS="${LIB_SUBSETS}+"
27072         fi
27073 fi
27074
27075 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27076 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27077
27078 if test "$with_termlib" != no ; then
27079         LIB_SUBSETS="${LIB_SUBSETS} "
27080 else
27081         LIB_SUBSETS="${LIB_SUBSETS}+"
27082 fi
27083
27084 LIB_SUBSETS="${LIB_SUBSETS}base"
27085
27086 # Most term-driver calls are to tinfo, but some like init_pair are to the
27087 # base library (so it resides in base).
27088 if test "$with_term_driver" != no ; then
27089         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27090         case $cf_cv_system_name in
27091         (*mingw32*|*mingw64*)
27092                 if test "x$with_exp_win32" = xyes ; then
27093                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27094                 else
27095                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27096                 fi
27097                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27098                 ;;
27099         (*)
27100                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27101                 ;;
27102         esac
27103 elif test "x$with_exp_win32" = xyes ; then
27104         case $cf_cv_system_name in
27105         (*mingw32*|*mingw64*)
27106                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27107                 ;;
27108         (*)
27109                 ;;
27110         esac
27111 fi
27112
27113 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27114 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27115
27116 echo "$as_me:27116: result: $LIB_SUBSETS" >&5
27117 echo "${ECHO_T}$LIB_SUBSETS" >&6
27118
27119 ### Construct the list of include-directories to be generated
27120
27121 if test "$srcdir" != "."; then
27122         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27123 fi
27124 CPPFLAGS="-I../include $CPPFLAGS"
27125 if test "$srcdir" != "."; then
27126         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27127 fi
27128 CPPFLAGS="-I. $CPPFLAGS"
27129
27130 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27131 if test "$srcdir" != "."; then
27132         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27133 fi
27134 if test "$GCC" != yes; then
27135         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27136 elif test "$includedir" != "/usr/include"; then
27137         if test "$includedir" = '${prefix}/include' ; then
27138                 if test x$prefix != x/usr ; then
27139                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27140                 fi
27141         else
27142                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27143         fi
27144 fi
27145
27146 ### Build up pieces for makefile rules
27147 echo "$as_me:27147: checking default library suffix" >&5
27148 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27149
27150         case $DFT_LWR_MODEL in
27151         (libtool) DFT_ARG_SUFFIX=''   ;;
27152         (normal)  DFT_ARG_SUFFIX=''   ;;
27153         (debug)   DFT_ARG_SUFFIX='_g' ;;
27154         (profile) DFT_ARG_SUFFIX='_p' ;;
27155         (shared)  DFT_ARG_SUFFIX=''   ;;
27156         esac
27157         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27158 echo "$as_me:27158: result: $DFT_ARG_SUFFIX" >&5
27159 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27160
27161 echo "$as_me:27161: checking default library-dependency suffix" >&5
27162 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27163
27164         case X$DFT_LWR_MODEL in
27165         (Xlibtool)
27166                 DFT_LIB_SUFFIX='.la'
27167                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27168                 ;;
27169         (Xdebug)
27170                 case $cf_cv_system_name in
27171                 (*-msvc*)
27172                         DFT_LIB_SUFFIX='_g.lib'
27173                         ;;
27174                 (*)
27175                         DFT_LIB_SUFFIX='_g.a'
27176                         ;;
27177                 esac
27178                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27179                 ;;
27180         (Xprofile)
27181                 case $cf_cv_system_name in
27182                 (*-msvc*)
27183                         DFT_LIB_SUFFIX='_p.lib'
27184                         ;;
27185                 (*)
27186                         DFT_LIB_SUFFIX='_p.a'
27187                         ;;
27188                 esac
27189                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27190                 ;;
27191         (Xshared)
27192                 case $cf_cv_system_name in
27193                 (aix[5-7]*)
27194                         DFT_LIB_SUFFIX='.so'
27195                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27196                         ;;
27197                 (*-msvc*)
27198                         DFT_LIB_SUFFIX='.dll'
27199                         DFT_DEP_SUFFIX='.dll.lib'
27200                         ;;
27201                 (cygwin*|msys*|mingw*)
27202                         DFT_LIB_SUFFIX='.dll'
27203                         DFT_DEP_SUFFIX='.dll.a'
27204                         ;;
27205                 (darwin*)
27206                         DFT_LIB_SUFFIX='.dylib'
27207                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27208                         ;;
27209                 (hpux*)
27210                         case $target in
27211                         (ia64*)
27212                                 DFT_LIB_SUFFIX='.so'
27213                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27214                                 ;;
27215                         (*)
27216                                 DFT_LIB_SUFFIX='.sl'
27217                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27218                                 ;;
27219                         esac
27220                         ;;
27221                 (*)
27222                         DFT_LIB_SUFFIX='.so'
27223                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27224                         ;;
27225                 esac
27226                 ;;
27227         (*)
27228                 case $target in
27229                 (*-msvc*)
27230                         DFT_LIB_SUFFIX='.lib'
27231                         ;;
27232                 (*)
27233                         DFT_LIB_SUFFIX='.a'
27234                         ;;
27235                 esac
27236                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27237                 ;;
27238         esac
27239         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27240         then
27241                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27242                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27243         fi
27244 echo "$as_me:27244: result: $DFT_DEP_SUFFIX" >&5
27245 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27246
27247 echo "$as_me:27247: checking default object directory" >&5
27248 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27249
27250         case $DFT_LWR_MODEL in
27251         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27252         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27253         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27254         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27255         (shared)
27256                 case $cf_cv_system_name in
27257                 (cygwin|msys)
27258                         DFT_OBJ_SUBDIR='objects' ;;
27259                 (*)
27260                         DFT_OBJ_SUBDIR='obj_s' ;;
27261                 esac
27262         esac
27263 echo "$as_me:27263: result: $DFT_OBJ_SUBDIR" >&5
27264 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27265
27266 if test "x$cf_with_cxx" = xyes ; then
27267 echo "$as_me:27267: checking c++ library-dependency suffix" >&5
27268 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27269 if test "$with_libtool" != "no"; then
27270         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27271         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27272 elif test "$with_shared_cxx" != "no"; then
27273         # also for g++ users...
27274         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27275 else
27276         # we normally make a static library because C/C++ library rules differ
27277
27278         case Xnormal in
27279         (Xlibtool)
27280                 CXX_LIB_SUFFIX='.la'
27281                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27282                 ;;
27283         (Xdebug)
27284                 case $cf_cv_system_name in
27285                 (*-msvc*)
27286                         CXX_LIB_SUFFIX='_g.lib'
27287                         ;;
27288                 (*)
27289                         CXX_LIB_SUFFIX='_g.a'
27290                         ;;
27291                 esac
27292                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27293                 ;;
27294         (Xprofile)
27295                 case $cf_cv_system_name in
27296                 (*-msvc*)
27297                         CXX_LIB_SUFFIX='_p.lib'
27298                         ;;
27299                 (*)
27300                         CXX_LIB_SUFFIX='_p.a'
27301                         ;;
27302                 esac
27303                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27304                 ;;
27305         (Xshared)
27306                 case $cf_cv_system_name in
27307                 (aix[5-7]*)
27308                         CXX_LIB_SUFFIX='.so'
27309                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27310                         ;;
27311                 (*-msvc*)
27312                         CXX_LIB_SUFFIX='.dll'
27313                         CXX_DEP_SUFFIX='.dll.lib'
27314                         ;;
27315                 (cygwin*|msys*|mingw*)
27316                         CXX_LIB_SUFFIX='.dll'
27317                         CXX_DEP_SUFFIX='.dll.a'
27318                         ;;
27319                 (darwin*)
27320                         CXX_LIB_SUFFIX='.dylib'
27321                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27322                         ;;
27323                 (hpux*)
27324                         case $target in
27325                         (ia64*)
27326                                 CXX_LIB_SUFFIX='.so'
27327                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27328                                 ;;
27329                         (*)
27330                                 CXX_LIB_SUFFIX='.sl'
27331                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27332                                 ;;
27333                         esac
27334                         ;;
27335                 (*)
27336                         CXX_LIB_SUFFIX='.so'
27337                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27338                         ;;
27339                 esac
27340                 ;;
27341         (*)
27342                 case $target in
27343                 (*-msvc*)
27344                         CXX_LIB_SUFFIX='.lib'
27345                         ;;
27346                 (*)
27347                         CXX_LIB_SUFFIX='.a'
27348                         ;;
27349                 esac
27350                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27351                 ;;
27352         esac
27353         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27354         then
27355                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27356                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27357         fi
27358
27359 fi
27360 echo "$as_me:27360: result: $CXX_LIB_SUFFIX" >&5
27361 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27362
27363 fi
27364
27365 # do not want -ldl in build except as needed for -lncurses dependency
27366 if test "x$with_dlsym" = xyes ; then
27367 if test $DFT_LWR_MODEL = shared || \
27368    test $DFT_LWR_MODEL = libtool ; then
27369
27370 # remove dl library from $LIBS
27371 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27372
27373 fi
27374 fi
27375 ### Set up low-level terminfo dependencies for makefiles.
27376
27377 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27378 # do not need libdl
27379 TICS_LIST=
27380 if test "x$with_dlsym" = xyes ; then
27381
27382 # remove dl library from $SHLIB_LIST
27383 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27384
27385 fi
27386
27387 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27388 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27389 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27390 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27391 then
27392         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27393 fi
27394
27395 if test "$with_ticlib" != no ; then
27396
27397         if test "x$with_ticlib" != xyes ; then
27398                 TICS_NAME=$with_ticlib
27399                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
27400                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27401                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27402                 TICS_LIB_SUFFIX="${with_ticlib}"
27403         else
27404                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27405                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27406                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27407                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27408         fi
27409         TICS_LDFLAGS="-L${LIB_DIR}"
27410         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27411 else
27412         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27413         TICS_LDFLAGS="-L${LIB_DIR}"
27414         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27415 fi
27416
27417 if test "$with_termlib" != no ; then
27418
27419         if test "x$with_termlib" != xyes ; then
27420                 TINFO_NAME=$with_termlib
27421                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
27422                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27423                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27424                 TINFO_LIB_SUFFIX="${with_termlib}"
27425         else
27426                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27427                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27428                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27429                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27430         fi
27431
27432         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27433         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27434         if test "$DFT_LWR_MODEL" = "libtool"; then
27435                 TEST_ARGS="${TEST_DEPS}"
27436                 TEST_ARG2="${TEST_DEP2}"
27437                 TINFO_LDFLAGS="-L${LIB_DIR}"
27438                 TINFO_LIBS="$TEST_ARGS"
27439                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27440                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27441         else
27442                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27443                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27444                 if test "x$with_term_driver" != xno ; then
27445                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27446                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27447                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27448                 else
27449                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27450                         TINFO_LIBS="$TEST_ARGS"
27451                 fi
27452                 TINFO_LDFLAGS="-L${LIB_DIR}"
27453                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27454         fi
27455 else
27456         # the next lines are needed for linking libtic over libncurses
27457         TINFO_NAME=${LIB_NAME}
27458         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27459         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27460         if test "x$with_tic_depends" = xyes ; then
27461                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27462         else
27463                 TICS_LIST="$SHLIB_LIST"
27464         fi
27465
27466         TINFO_LDFLAGS="-L${LIB_DIR}"
27467         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27468 fi
27469
27470 if test "$DFT_LWR_MODEL" = shared ; then
27471         case $cf_cv_system_name in
27472         (cygwin*|msys*)
27473                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27474                 TINFO_SUFFIX=.dll
27475                 ;;
27476         esac
27477 fi
27478
27479 if test "x$with_dlsym" = xyes ; then
27480
27481 # remove dl library from $TICS_LIST
27482 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27483
27484 fi
27485
27486 if test "$DFT_LWR_MODEL" = "libtool"; then
27487         OBJEXT=lo
27488 fi
27489
27490 # needed for Ada95
27491 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27492
27493 case $DFT_LWR_MODEL in
27494 (normal|debug|profile)
27495
27496 if test "$GCC" = yes ; then
27497         case $cf_cv_system_name in
27498         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27499                 LDFLAGS_STATIC=
27500                 LDFLAGS_SHARED=
27501                 ;;
27502         (*)     # normally, except when broken
27503                 LDFLAGS_STATIC=-static
27504                 LDFLAGS_SHARED=-dynamic
27505                 ;;
27506         esac
27507 else
27508         case $cf_cv_system_name in
27509         (aix[4-7]*)     # from ld manpage
27510                 LDFLAGS_STATIC=-bstatic
27511                 LDFLAGS_SHARED=-bdynamic
27512                 ;;
27513         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27514                 # We could also use just "archive" and "shared".
27515                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27516                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27517                 ;;
27518         (irix*)         # from ld manpage IRIX64
27519                 LDFLAGS_STATIC=-Bstatic
27520                 LDFLAGS_SHARED=-Bdynamic
27521                 ;;
27522         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27523                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27524                 LDFLAGS_STATIC=-noso
27525                 LDFLAGS_SHARED=-so_archive
27526                 ;;
27527         (solaris2*)
27528                 LDFLAGS_STATIC=-Bstatic
27529                 LDFLAGS_SHARED=-Bdynamic
27530                 ;;
27531         esac
27532 fi
27533
27534 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27535 then
27536         echo "$as_me:27536: checking if linker supports switching between static/dynamic" >&5
27537 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27538
27539         rm -f libconftest.a
27540         cat >conftest.$ac_ext <<EOF
27541 #line 27541 "configure"
27542 #include <stdio.h>
27543 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27544 EOF
27545         if { (eval echo "$as_me:27545: \"$ac_compile\"") >&5
27546   (eval $ac_compile) 2>&5
27547   ac_status=$?
27548   echo "$as_me:27548: \$? = $ac_status" >&5
27549   (exit $ac_status); } ; then
27550                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27551                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27552         fi
27553         rm -f conftest.*
27554
27555         cf_save_LIBS="$LIBS"
27556
27557         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27558         cat >conftest.$ac_ext <<_ACEOF
27559 #line 27559 "configure"
27560 #include "confdefs.h"
27561
27562 #line 27562 "configure"
27563 #include <stdio.h>
27564 int cf_ldflags_static(FILE *fp);
27565
27566 int
27567 main (void)
27568 {
27569
27570         return cf_ldflags_static(stdin);
27571
27572   ;
27573   return 0;
27574 }
27575 _ACEOF
27576 rm -f conftest.$ac_objext conftest$ac_exeext
27577 if { (eval echo "$as_me:27577: \"$ac_link\"") >&5
27578   (eval $ac_link) 2>&5
27579   ac_status=$?
27580   echo "$as_me:27580: \$? = $ac_status" >&5
27581   (exit $ac_status); } &&
27582          { ac_try='test -s conftest$ac_exeext'
27583   { (eval echo "$as_me:27583: \"$ac_try\"") >&5
27584   (eval $ac_try) 2>&5
27585   ac_status=$?
27586   echo "$as_me:27586: \$? = $ac_status" >&5
27587   (exit $ac_status); }; }; then
27588
27589         # some linkers simply ignore the -dynamic
27590         case x`file conftest$ac_exeext 2>/dev/null` in
27591         (*static*)
27592                 cf_ldflags_static=no
27593                 ;;
27594         (*)
27595                 cf_ldflags_static=yes
27596                 ;;
27597         esac
27598
27599 else
27600   echo "$as_me: failed program was:" >&5
27601 cat conftest.$ac_ext >&5
27602 cf_ldflags_static=no
27603 fi
27604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27605
27606         rm -f libconftest.*
27607         LIBS="$cf_save_LIBS"
27608
27609         echo "$as_me:27609: result: $cf_ldflags_static" >&5
27610 echo "${ECHO_T}$cf_ldflags_static" >&6
27611
27612         if test $cf_ldflags_static != yes
27613         then
27614                 LDFLAGS_STATIC=
27615                 LDFLAGS_SHARED=
27616         fi
27617 else
27618         LDFLAGS_STATIC=
27619         LDFLAGS_SHARED=
27620 fi
27621
27622         ;;
27623 esac
27624
27625 echo "$as_me:27625: checking where we will install curses.h" >&5
27626 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27627
27628 includesubdir=
27629 if test "$with_overwrite" = no && \
27630  ( test "x$includedir" = 'x${prefix}/include' || \
27631    test "x$includedir" = "x${prefix}/include" )
27632 then
27633         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27634 fi
27635 echo "$as_me:27635: result: ${includedir}${includesubdir}" >&5
27636 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27637
27638 ### Resolve a conflict between normal and wide-curses by forcing applications
27639 ### that will need libutf8 to add it to their configure script.
27640 if test "$with_overwrite" != no ; then
27641 if test "$NCURSES_LIBUTF8" = 1 ; then
27642         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27643         { echo "$as_me:27643: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27644 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27645 fi
27646 fi
27647 WITH_OVERWRITE=$with_overwrite
27648
27649 ### At least on MinGW a shared library build without libtool
27650 ### requires adding the additional libs to the link list.
27651 case $cf_cv_system_name in
27652 (*mingw32*|*mingw64*)
27653         if test "$DFT_LWR_MODEL" != "libtool"; then
27654            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27655         fi
27656         ;;
27657 *)      ;;
27658 esac
27659
27660 # used to separate tack out of the tree
27661 NCURSES_TREE=
27662
27663 ### predefined stuff for the test programs
27664
27665 cat >>confdefs.h <<\EOF
27666 #define HAVE_SLK_COLOR 1
27667 EOF
27668
27669 # pkgsrc uses these
27670
27671 echo "$as_me:27671: checking for desired basename for form library" >&5
27672 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27673
27674 # Check whether --with-form-libname or --without-form-libname was given.
27675 if test "${with_form_libname+set}" = set; then
27676   withval="$with_form_libname"
27677   with_lib_basename=$withval
27678 else
27679   with_lib_basename=form
27680 fi;
27681 FORM_NAME="$with_lib_basename"
27682
27683 case "x$FORM_NAME" in
27684 (x|xno|xnone|xyes)
27685         FORM_NAME=form
27686         ;;
27687 (*)
27688         ;;
27689 esac
27690
27691 echo "$as_me:27691: result: $FORM_NAME" >&5
27692 echo "${ECHO_T}$FORM_NAME" >&6
27693
27694 echo "$as_me:27694: checking for desired basename for menu library" >&5
27695 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27696
27697 # Check whether --with-menu-libname or --without-menu-libname was given.
27698 if test "${with_menu_libname+set}" = set; then
27699   withval="$with_menu_libname"
27700   with_lib_basename=$withval
27701 else
27702   with_lib_basename=menu
27703 fi;
27704 MENU_NAME="$with_lib_basename"
27705
27706 case "x$MENU_NAME" in
27707 (x|xno|xnone|xyes)
27708         MENU_NAME=menu
27709         ;;
27710 (*)
27711         ;;
27712 esac
27713
27714 echo "$as_me:27714: result: $MENU_NAME" >&5
27715 echo "${ECHO_T}$MENU_NAME" >&6
27716
27717 echo "$as_me:27717: checking for desired basename for panel library" >&5
27718 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27719
27720 # Check whether --with-panel-libname or --without-panel-libname was given.
27721 if test "${with_panel_libname+set}" = set; then
27722   withval="$with_panel_libname"
27723   with_lib_basename=$withval
27724 else
27725   with_lib_basename=panel
27726 fi;
27727 PANEL_NAME="$with_lib_basename"
27728
27729 case "x$PANEL_NAME" in
27730 (x|xno|xnone|xyes)
27731         PANEL_NAME=panel
27732         ;;
27733 (*)
27734         ;;
27735 esac
27736
27737 echo "$as_me:27737: result: $PANEL_NAME" >&5
27738 echo "${ECHO_T}$PANEL_NAME" >&6
27739
27740 echo "$as_me:27740: checking for desired basename for cxx library" >&5
27741 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27742
27743 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27744 if test "${with_cxx_libname+set}" = set; then
27745   withval="$with_cxx_libname"
27746   with_lib_basename=$withval
27747 else
27748   with_lib_basename=ncurses++
27749 fi;
27750 CXX_NAME="$with_lib_basename"
27751
27752 case "x$CXX_NAME" in
27753 (x|xno|xnone|xyes)
27754         CXX_NAME=ncurses++
27755         ;;
27756 (*)
27757         ;;
27758 esac
27759
27760 echo "$as_me:27760: result: $CXX_NAME" >&5
27761 echo "${ECHO_T}$CXX_NAME" >&6
27762
27763 ### Construct the list of subdirectories for which we'll customize makefiles
27764 ### with the appropriate compile-rules.
27765
27766 echo "$as_me:27766: checking for src modules" >&5
27767 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27768
27769 # dependencies and linker-arguments for test-programs
27770 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27771 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27772 if test "$DFT_LWR_MODEL" = "libtool"; then
27773         TEST_ARGS="${TEST_DEPS}"
27774         TEST_ARG2="${TEST_DEP2}"
27775 else
27776         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27777         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27778 fi
27779
27780 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27781 cf_cv_src_modules=
27782 for cf_dir in $modules_to_build
27783 do
27784         if test -f $srcdir/$cf_dir/modules; then
27785
27786                 # We may/may not have tack in the distribution, though the
27787                 # makefile is.
27788                 if test $cf_dir = tack ; then
27789                         if test "x$cf_with_tack" != "xyes"; then
27790                                 continue
27791                         fi
27792                 fi
27793
27794                 if test -z "$cf_cv_src_modules"; then
27795                         cf_cv_src_modules=$cf_dir
27796                 else
27797                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27798                 fi
27799
27800                 # Make the ncurses_cfg.h file record the library interface files as
27801                 # well.  These are header files that are the same name as their
27802                 # directory.  Ncurses is the only library that does not follow
27803                 # that pattern.
27804                 if test $cf_dir = tack ; then
27805                         continue
27806                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
27807
27808 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27809
27810                         cat >>confdefs.h <<EOF
27811 #define HAVE_${cf_have_include}_H 1
27812 EOF
27813
27814                         cat >>confdefs.h <<EOF
27815 #define HAVE_LIB${cf_have_include} 1
27816 EOF
27817
27818 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27819
27820 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
27821
27822                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27823                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27824                         if test "$DFT_LWR_MODEL" = "libtool"; then
27825                                 TEST_ARGS="${TEST_DEPS}"
27826                                 TEST_ARG2="${TEST_DEP2}"
27827                         else
27828                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27829                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27830                         fi
27831                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27832                 fi
27833         fi
27834 done
27835 echo "$as_me:27835: result: $cf_cv_src_modules" >&5
27836 echo "${ECHO_T}$cf_cv_src_modules" >&6
27837
27838 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27839 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27840
27841 SRC_SUBDIRS=
27842 if test "x$cf_with_manpages" != xno ; then
27843         SRC_SUBDIRS="$SRC_SUBDIRS man"
27844 fi
27845 SRC_SUBDIRS="$SRC_SUBDIRS include"
27846 for cf_dir in $cf_cv_src_modules
27847 do
27848         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27849 done
27850 if test "x$cf_with_tests" != "xno" ; then
27851         SRC_SUBDIRS="$SRC_SUBDIRS test"
27852 fi
27853 # always make this, to install the ncurses-config script
27854 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27855 if test "$cf_with_cxx_binding" != no; then
27856         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27857         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27858 fi
27859
27860 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27861 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27862
27863 ADA_SUBDIRS=
27864 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
27865         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
27866         ADA_SUBDIRS="gen src"
27867         if test "x$cf_with_tests" != "xno" ; then
27868                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
27869         fi
27870 fi
27871
27872 SUB_MAKEFILES=
27873 for cf_dir in $SRC_SUBDIRS
27874 do
27875         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
27876 done
27877
27878 if test -n "$ADA_SUBDIRS"; then
27879         for cf_dir in $ADA_SUBDIRS
27880         do
27881                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
27882         done
27883
27884 fi
27885
27886 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27887    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
27888    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
27889    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
27890 fi
27891
27892 DIRS_TO_MAKE="lib"
27893 for cf_item in $cf_list_models
27894 do
27895
27896         case $cf_item in
27897         (libtool) cf_subdir='obj_lo'  ;;
27898         (normal)  cf_subdir='objects' ;;
27899         (debug)   cf_subdir='obj_g' ;;
27900         (profile) cf_subdir='obj_p' ;;
27901         (shared)
27902                 case $cf_cv_system_name in
27903                 (cygwin|msys)
27904                         cf_subdir='objects' ;;
27905                 (*)
27906                         cf_subdir='obj_s' ;;
27907                 esac
27908         esac
27909
27910         for cf_item2 in $DIRS_TO_MAKE
27911         do
27912                 test $cf_item2 = $cf_subdir && break
27913         done
27914         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
27915 done
27916 for cf_dir in $DIRS_TO_MAKE
27917 do
27918         test ! -d $cf_dir && mkdir $cf_dir
27919 done
27920
27921 # symbols that differ when compiling Ada95 by itself.
27922 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
27923
27924 # values to use as strings
27925
27926 cat >>confdefs.h <<EOF
27927 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
27928 EOF
27929
27930 cat >>confdefs.h <<EOF
27931 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
27932 EOF
27933
27934 ### Define substitutions for header files to avoid name-pollution
27935
27936 if test "x$cf_cv_have_tcgetattr" = xyes ; then
27937         HAVE_TCGETATTR=1
27938 else
27939         HAVE_TCGETATTR=0
27940 fi
27941
27942 if test "x$ac_cv_header_stdint_h" = xyes ; then
27943         HAVE_STDINT_H=1
27944 else
27945         HAVE_STDINT_H=0
27946 fi
27947
27948 if test "x$ac_cv_header_termio_h" = xyes ; then
27949         HAVE_TERMIO_H=1
27950 else
27951         HAVE_TERMIO_H=0
27952 fi
27953
27954 if test "x$ac_cv_header_termios_h" = xyes ; then
27955         HAVE_TERMIOS_H=1
27956 else
27957         HAVE_TERMIOS_H=0
27958 fi
27959
27960 ################################################################################
27961 test "x$use_database" = xyes && \
27962 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
27963
27964 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
27965 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
27966
27967 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
27968 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
27969 fi
27970
27971 if test "x$cf_with_tests" != xno ; then
27972         MAKE_TESTS=
27973 else
27974         MAKE_TESTS="#"
27975 fi
27976
27977 ADAHTML_DIR=../../doc/html/ada
27978
27979 # workaround for OS/2 (20151017)
27980 case $cf_cv_system_name in
27981 (os2*)
27982         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
27983         ;;
27984 (*)
27985         LIBTOOL_OPTS_CXX=
27986         ;;
27987 esac
27988
27989 # workaround for g++ versus Solaris (20131116)
27990 case $cf_cv_system_name in
27991 (solaris2*)
27992         case "x$CPPFLAGS" in
27993         (*-D_XOPEN_SOURCE_EXTENDED*)
27994                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
27995
27996 echo "${as_me:-configure}:27996: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
27997
27998                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
27999                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28000                 ;;
28001         esac
28002         ;;
28003 esac
28004
28005 # Help to automatically enable the extended curses features when using either
28006 # the *-config or the ".pc" files by adding defines.
28007 echo "$as_me:28007: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28008 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28009 PKG_CFLAGS=
28010 for cf_loop1 in $CPPFLAGS_after_XOPEN
28011 do
28012         cf_found=no
28013         for cf_loop2 in $CPPFLAGS_before_XOPEN
28014         do
28015                 if test "x$cf_loop1" = "x$cf_loop2"
28016                 then
28017                         cf_found=yes
28018                         break
28019                 fi
28020         done
28021         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28022 done
28023 echo "$as_me:28023: result: $PKG_CFLAGS" >&5
28024 echo "${ECHO_T}$PKG_CFLAGS" >&6
28025
28026 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28027 case "x$NCURSES_OSPEED" in
28028 (*short*)
28029         cf_compatible=1
28030         ;;
28031 (*)
28032         cf_compatible=0
28033         ;;
28034 esac
28035
28036 cat >>confdefs.h <<EOF
28037 #define NCURSES_OSPEED_COMPAT $cf_compatible
28038 EOF
28039
28040 case "x$cf_cv_typeof_chtype" in
28041 (xshort|xint|xlong)
28042         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28043         ;;
28044 esac
28045
28046 case "x$cf_cv_typeof_mmask_t" in
28047 (xshort|xint|xlong)
28048         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28049         ;;
28050 esac
28051
28052 # substitute into misc/Makefile to suppress
28053 # (un)install.data from the
28054 # (un)install rules.
28055 if test "x$cf_with_db_install" = "xno"; then
28056         MISC_INSTALL_DATA=
28057         MISC_UNINSTALL_DATA=
28058 else
28059         MISC_INSTALL_DATA=install.data
28060         MISC_UNINSTALL_DATA=uninstall.data
28061 fi
28062
28063 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28064         MAKE_DATABASE="#"
28065 else
28066         MAKE_DATABASE="$MAKE_TERMINFO"
28067 fi
28068
28069 if test -n "$PACKAGE"
28070 then
28071         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28072         export PACKAGE
28073         echo "package: $PACKAGE"
28074 fi
28075
28076 UNALTERED_SYMS=
28077 cf_filter_syms=no
28078
28079 if test -n "$RESULTING_SYMS"
28080 then
28081         cf_filter_syms=$cf_dft_filter_syms
28082         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28083
28084 echo "${as_me:-configure}:28084: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28085
28086 fi
28087
28088 if test "x$WILDCARD_SYMS" = xno
28089 then
28090         cf_filter_syms=yes
28091 fi
28092
28093 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28094
28095 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28096 if test $cf_filter_syms = yes
28097 then
28098         RESULTING_SYMS=resulting.map
28099 fi
28100
28101 if test "x$cross_compiling" = xyes ; then
28102         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28103         CHECK_BUILD="#"
28104 else
28105         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28106         CHECK_BUILD=
28107 fi
28108
28109 # This is used for the *-config script and *.pc data files.
28110
28111 echo "$as_me:28111: checking for linker search path" >&5
28112 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28113 if test "${cf_cv_ld_searchpath+set}" = set; then
28114   echo $ECHO_N "(cached) $ECHO_C" >&6
28115 else
28116
28117 if test "$cross_compiling" != yes ; then
28118
28119 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28120 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28121
28122 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28123 # update the cache, which makes it run faster.
28124 test -z "$cf_pathlist" && \
28125         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
28126
28127 test -z "$cf_pathlist" &&
28128         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
28129
28130 # This works with OpenBSD 6.5, which lists only filenames
28131 test -z "$cf_pathlist" &&
28132         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28133
28134 if test -z "$cf_pathlist"
28135 then
28136         # dyld default path with MacOS
28137         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28138         then
28139                 # do this to bypass check
28140                 cf_cv_ld_searchpath='$HOME/lib'
28141                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28142         fi
28143 fi
28144
28145 if test -z "$cf_pathlist"
28146 then
28147         # Solaris is hardcoded
28148         if test -d /opt/SUNWspro/lib
28149         then
28150                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
28151         elif test -d /usr/ccs/lib
28152         then
28153                 cf_pathlist="/usr/ccs/lib /usr/lib"
28154         fi
28155 fi
28156
28157 fi
28158
28159 # If nothing else, assume it is conventional
28160 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28161
28162 # Finally, check that this is only directories
28163 for cf_path in $0 $cf_pathlist
28164 do
28165         if test -d "$cf_path"; then
28166                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28167                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28168         fi
28169 done
28170
28171 # Ensure that it is nonempty
28172 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28173
28174 fi
28175 echo "$as_me:28175: result: $cf_cv_ld_searchpath" >&5
28176 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28177
28178 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28179
28180 cat >>confdefs.h <<\EOF
28181 #define HAVE_CURSES_DATA_BOOLNAMES 1
28182 EOF
28183
28184 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"
28185 ac_config_commands="$ac_config_commands default"
28186 cat >confcache <<\_ACEOF
28187 # This file is a shell script that caches the results of configure
28188 # tests run on this system so they can be shared between configure
28189 # scripts and configure runs, see configure's option --config-cache.
28190 # It is not useful on other systems.  If it contains results you don't
28191 # want to keep, you may remove or edit it.
28192 #
28193 # config.status only pays attention to the cache file if you give it
28194 # the --recheck option to rerun configure.
28195 #
28196 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28197 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28198 # following values.
28199
28200 _ACEOF
28201
28202 # The following way of writing the cache mishandles newlines in values,
28203 # but we know of no workaround that is simple, portable, and efficient.
28204 # So, don't put newlines in cache variables' values.
28205 # Ultrix sh set writes to stderr and can't be redirected directly,
28206 # and sets the high bit in the cache file unless we assign to the vars.
28207 {
28208   (set) 2>&1 |
28209     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28210     *ac_space=\ *)
28211       # `set' does not quote correctly, so add quotes (double-quote
28212       # substitution turns \\\\ into \\, and sed turns \\ into \).
28213       sed -n \
28214         "s/'/'\\\\''/g;
28215           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28216       ;;
28217     *)
28218       # `set' quotes correctly as required by POSIX, so do not add quotes.
28219       sed -n \
28220         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28221       ;;
28222     esac;
28223 } |
28224   sed '
28225      t clear
28226      : clear
28227      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28228      t end
28229      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28230      : end' >>confcache
28231 if cmp -s $cache_file confcache; then :; else
28232   if test -w $cache_file; then
28233     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28234     cat confcache >$cache_file
28235   else
28236     echo "not updating unwritable cache $cache_file"
28237   fi
28238 fi
28239 rm -f confcache
28240
28241 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28242 # Let make expand exec_prefix.
28243 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28244
28245 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28246 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28247 # trailing colons and then remove the whole line if VPATH becomes empty
28248 # (actually we leave an empty line to preserve line numbers).
28249 if test "x$srcdir" = x.; then
28250   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28251 s/:*\$(srcdir):*/:/;
28252 s/:*\${srcdir}:*/:/;
28253 s/:*@srcdir@:*/:/;
28254 s/^\([^=]*=[    ]*\):*/\1/;
28255 s/:*$//;
28256 s/^[^=]*=[      ]*$//;
28257 }'
28258 fi
28259
28260 DEFS=-DHAVE_CONFIG_H
28261
28262 : ${CONFIG_STATUS=./config.status}
28263 ac_clean_files_save=$ac_clean_files
28264 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28265 { echo "$as_me:28265: creating $CONFIG_STATUS" >&5
28266 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28267 cat >$CONFIG_STATUS <<_ACEOF
28268 #! $SHELL
28269 # Generated automatically by configure.
28270 # Run this file to recreate the current configuration.
28271 # Compiler output produced by configure, useful for debugging
28272 # configure, is in config.log if it exists.
28273
28274 debug=false
28275 SHELL=\${CONFIG_SHELL-$SHELL}
28276 ac_cs_invocation="\$0 \$@"
28277
28278 CLICOLOR_FORCE= GREP_OPTIONS=
28279 unset CLICOLOR_FORCE GREP_OPTIONS
28280 _ACEOF
28281
28282 cat >>$CONFIG_STATUS <<\_ACEOF
28283 # Be Bourne compatible
28284 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28285   emulate sh
28286   NULLCMD=:
28287 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28288   set -o posix
28289 fi
28290
28291 # Name of the executable.
28292 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28293
28294 if expr a : '\(a\)' >/dev/null 2>&1; then
28295   as_expr=expr
28296 else
28297   as_expr=false
28298 fi
28299
28300 rm -f conf$$ conf$$.exe conf$$.file
28301 echo >conf$$.file
28302 if ln -s conf$$.file conf$$ 2>/dev/null; then
28303   # We could just check for DJGPP; but this test a) works b) is more generic
28304   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28305   if test -f conf$$.exe; then
28306     # Don't use ln at all; we don't have any links
28307     as_ln_s='cp -p'
28308   else
28309     as_ln_s='ln -s'
28310   fi
28311 elif ln conf$$.file conf$$ 2>/dev/null; then
28312   as_ln_s=ln
28313 else
28314   as_ln_s='cp -p'
28315 fi
28316 rm -f conf$$ conf$$.exe conf$$.file
28317
28318 as_executable_p="test -f"
28319
28320 # Support unset when possible.
28321 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28322   as_unset=unset
28323 else
28324   as_unset=false
28325 fi
28326
28327 # NLS nuisances.
28328 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28329 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28330 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28331 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28332 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28333 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28334 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28335 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28336
28337 # IFS
28338 # We need space, tab and new line, in precisely that order.
28339 as_nl='
28340 '
28341 IFS="   $as_nl"
28342
28343 # CDPATH.
28344 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28345
28346 exec 6>&1
28347
28348 _ACEOF
28349
28350 # Files that config.status was made for.
28351 if test -n "$ac_config_files"; then
28352   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
28353 fi
28354
28355 if test -n "$ac_config_headers"; then
28356   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
28357 fi
28358
28359 if test -n "$ac_config_links"; then
28360   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
28361 fi
28362
28363 if test -n "$ac_config_commands"; then
28364   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
28365 fi
28366
28367 cat >>$CONFIG_STATUS <<\EOF
28368
28369 ac_cs_usage="\
28370 \`$as_me' instantiates files from templates according to the
28371 current configuration.
28372
28373 Usage: $0 [OPTIONS] [FILE]...
28374
28375   -h, --help       print this help, then exit
28376   -V, --version    print version number, then exit
28377   -d, --debug      don't remove temporary files
28378       --recheck    update $as_me by reconfiguring in the same conditions
28379   --file=FILE[:TEMPLATE]
28380                    instantiate the configuration file FILE
28381   --header=FILE[:TEMPLATE]
28382                    instantiate the configuration header FILE
28383
28384 Configuration files:
28385 $config_files
28386
28387 Configuration headers:
28388 $config_headers
28389
28390 Configuration commands:
28391 $config_commands
28392
28393 Report bugs to <dickey@invisible-island.net>."
28394 EOF
28395
28396 cat >>$CONFIG_STATUS <<EOF
28397 ac_cs_version="\\
28398 config.status
28399 configured by $0, generated by GNU Autoconf 2.52.20200802,
28400   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28401
28402 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28403 Free Software Foundation, Inc.
28404 This config.status script is free software; the Free Software Foundation
28405 gives unlimited permission to copy, distribute and modify it."
28406 srcdir=$srcdir
28407 INSTALL="$INSTALL"
28408 EOF
28409
28410 cat >>$CONFIG_STATUS <<\EOF
28411 # If no file are specified by the user, then we need to provide default
28412 # value.  By we need to know if files were specified by the user.
28413 ac_need_defaults=:
28414 while test $# != 0
28415 do
28416   case $1 in
28417   --*=*)
28418     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28419     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28420     shift
28421     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28422     shift
28423     ;;
28424   -*);;
28425   *) # This is not an option, so the user has probably given explicit
28426      # arguments.
28427      ac_need_defaults=false;;
28428   esac
28429
28430   case $1 in
28431   # Handling of the options.
28432 EOF
28433 cat >>$CONFIG_STATUS <<EOF
28434   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28435     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28436     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28437 EOF
28438 cat >>$CONFIG_STATUS <<\EOF
28439   --version | --vers* | -V )
28440     echo "$ac_cs_version"; exit 0 ;;
28441   --he | --h)
28442     # Conflict between --help and --header
28443     { { echo "$as_me:28443: error: ambiguous option: $1
28444 Try \`$0 --help' for more information." >&5
28445 echo "$as_me: error: ambiguous option: $1
28446 Try \`$0 --help' for more information." >&2;}
28447    { (exit 1); exit 1; }; };;
28448   --help | --hel | -h )
28449     echo "$ac_cs_usage"; exit 0 ;;
28450   --debug | --d* | -d )
28451     debug=: ;;
28452   --file | --fil | --fi | --f )
28453     shift
28454     CONFIG_FILES="$CONFIG_FILES $1"
28455     ac_need_defaults=false;;
28456   --header | --heade | --head | --hea )
28457     shift
28458     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28459     ac_need_defaults=false;;
28460
28461   # This is an error.
28462   -*) { { echo "$as_me:28462: error: unrecognized option: $1
28463 Try \`$0 --help' for more information." >&5
28464 echo "$as_me: error: unrecognized option: $1
28465 Try \`$0 --help' for more information." >&2;}
28466    { (exit 1); exit 1; }; } ;;
28467
28468   *) ac_config_targets="$ac_config_targets $1" ;;
28469
28470   esac
28471   shift
28472 done
28473
28474 exec 5>>config.log
28475 cat >&5 << _ACEOF
28476
28477 ## ----------------------- ##
28478 ## Running config.status.  ##
28479 ## ----------------------- ##
28480
28481 This file was extended by $as_me 2.52.20200802, executed with
28482   CONFIG_FILES    = $CONFIG_FILES
28483   CONFIG_HEADERS  = $CONFIG_HEADERS
28484   CONFIG_LINKS    = $CONFIG_LINKS
28485   CONFIG_COMMANDS = $CONFIG_COMMANDS
28486   > $ac_cs_invocation
28487 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28488
28489 _ACEOF
28490 EOF
28491
28492 cat >>$CONFIG_STATUS <<EOF
28493 #
28494 # INIT-COMMANDS section.
28495 #
28496
28497 ### Special initialization commands, used to pass information from the
28498 ### configuration-run into config.status
28499
28500 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28501 AWK="$AWK"
28502 CXX_NAME="$CXX_NAME"
28503 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28504 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28505 ECHO_LD="$ECHO_LD"
28506 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28507 FORM_NAME="$FORM_NAME"
28508 LDCONFIG="$LDCONFIG"
28509 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28510 LIB_NAME="$LIB_NAME"
28511 LIB_PREFIX="$LIB_PREFIX"
28512 LIB_SUBSETS="$LIB_SUBSETS"
28513 LIB_SUFFIX="$LIB_SUFFIX"
28514 LIB_TRACING="$LIB_TRACING"
28515 LN_S="$LN_S"
28516 MAKE_TERMINFO="$MAKE_TERMINFO"
28517 MENU_NAME="$MENU_NAME"
28518 NCURSES_MAJOR="$NCURSES_MAJOR"
28519 NCURSES_MINOR="$NCURSES_MINOR"
28520 NCURSES_OSPEED="$NCURSES_OSPEED"
28521 NCURSES_PATCH="$NCURSES_PATCH"
28522 PANEL_NAME="$PANEL_NAME"
28523 SRC_SUBDIRS="$SRC_SUBDIRS"
28524 TERMINFO="$TERMINFO"
28525 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28526 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28527 TICS_NAME="$TICS_NAME"
28528 TICS_SUFFIX="$TICS_SUFFIX"
28529 TIC_PATH="$TIC_PATH"
28530 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28531 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28532 TINFO_NAME="$TINFO_NAME"
28533 TINFO_SUFFIX="$TINFO_SUFFIX"
28534 UNALTERED_SYMS="$UNALTERED_SYMS"
28535 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28536 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28537 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28538 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28539 WILDCARD_SYMS="$WILDCARD_SYMS"
28540 WITH_CURSES_H="$with_curses_h"
28541 WITH_ECHO="${enable_echo:=yes}"
28542 WITH_OVERWRITE="$with_overwrite"
28543 cf_LIST_MODELS="$cf_list_models"
28544 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28545 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28546 cf_cv_abi_version="$cf_cv_abi_version"
28547 cf_cv_do_relink="$cf_cv_do_relink"
28548 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28549 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28550 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28551 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28552 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28553 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28554 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28555 cf_cv_rel_version="$cf_cv_rel_version"
28556 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28557 cf_cv_shared_soname='$cf_cv_shared_soname'
28558 cf_cv_shlib_version="$cf_cv_shlib_version"
28559 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28560 cf_cv_system_name="$cf_cv_system_name"
28561 cf_cv_term_driver="$with_term_driver"
28562 cf_with_ada="$cf_with_ada"
28563 cf_with_cxx_binding="$cf_with_cxx_binding"
28564 cf_with_db_install="$cf_with_db_install"
28565 cf_with_manpages="$cf_with_manpages"
28566 cf_with_tests="$cf_with_tests"
28567 host="$host"
28568 target="$target"
28569 with_shared_cxx="$with_shared_cxx"
28570
28571 EOF
28572
28573 cat >>$CONFIG_STATUS <<\EOF
28574 for ac_config_target in $ac_config_targets
28575 do
28576   case "$ac_config_target" in
28577   # Handling of arguments.
28578   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28579   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28580   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28581   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28582   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28583   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28584   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28585   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28586   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28587   *) { { echo "$as_me:28587: error: invalid argument: $ac_config_target" >&5
28588 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28589    { (exit 1); exit 1; }; };;
28590   esac
28591 done
28592
28593 # If the user did not use the arguments to specify the items to instantiate,
28594 # then the envvar interface is used.  Set only those that are not.
28595 # We use the long form for the default assignment because of an extremely
28596 # bizarre bug on SunOS 4.1.3.
28597 if $ac_need_defaults; then
28598   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28599   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28600   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28601 fi
28602
28603 # Create a temporary directory, and hook for its removal unless debugging.
28604 $debug ||
28605 {
28606   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28607   trap '{ (exit 1); exit 1; }' 1 2 13 15
28608 }
28609
28610 # Create a (secure) tmp directory for tmp files.
28611 : ${TMPDIR=/tmp}
28612 {
28613   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28614   test -n "$tmp" && test -d "$tmp"
28615 }  ||
28616 {
28617   tmp=$TMPDIR/cs$$-$RANDOM
28618   (umask 077 && mkdir $tmp)
28619 } ||
28620 {
28621    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28622    { (exit 1); exit 1; }
28623 }
28624
28625 EOF
28626
28627 cat >>$CONFIG_STATUS <<EOF
28628
28629 #
28630 # CONFIG_FILES section.
28631 #
28632
28633 # No need to generate the scripts if there are no CONFIG_FILES.
28634 # This happens for instance when ./config.status config.h
28635 if test -n "\$CONFIG_FILES"; then
28636   # Protect against being on the right side of a sed subst in config.status.
28637   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28638    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28639 s,@SHELL@,$SHELL,;t t
28640 s,@exec_prefix@,$exec_prefix,;t t
28641 s,@prefix@,$prefix,;t t
28642 s,@program_transform_name@,$program_transform_name,;t t
28643 s,@bindir@,$bindir,;t t
28644 s,@sbindir@,$sbindir,;t t
28645 s,@libexecdir@,$libexecdir,;t t
28646 s,@datarootdir@,$datarootdir,;t t
28647 s,@datadir@,$datadir,;t t
28648 s,@sysconfdir@,$sysconfdir,;t t
28649 s,@sharedstatedir@,$sharedstatedir,;t t
28650 s,@localstatedir@,$localstatedir,;t t
28651 s,@runstatedir@,$runstatedir,;t t
28652 s,@libdir@,$libdir,;t t
28653 s,@includedir@,$includedir,;t t
28654 s,@oldincludedir@,$oldincludedir,;t t
28655 s,@infodir@,$infodir,;t t
28656 s,@mandir@,$mandir,;t t
28657 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28658 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28659 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28660 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28661 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28662 s,@build_alias@,$build_alias,;t t
28663 s,@host_alias@,$host_alias,;t t
28664 s,@target_alias@,$target_alias,;t t
28665 s,@ECHO_C@,$ECHO_C,;t t
28666 s,@ECHO_N@,$ECHO_N,;t t
28667 s,@ECHO_T@,$ECHO_T,;t t
28668 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28669 s,@DEFS@,$DEFS,;t t
28670 s,@LIBS@,$LIBS,;t t
28671 s,@top_builddir@,$top_builddir,;t t
28672 s,@EGREP@,$EGREP,;t t
28673 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28674 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28675 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28676 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28677 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28678 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28679 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28680 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28681 s,@VERSION@,$VERSION,;t t
28682 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28683 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28684 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28685 s,@PACKAGE@,$PACKAGE,;t t
28686 s,@build@,$build,;t t
28687 s,@build_cpu@,$build_cpu,;t t
28688 s,@build_vendor@,$build_vendor,;t t
28689 s,@build_os@,$build_os,;t t
28690 s,@host@,$host,;t t
28691 s,@host_cpu@,$host_cpu,;t t
28692 s,@host_vendor@,$host_vendor,;t t
28693 s,@host_os@,$host_os,;t t
28694 s,@target@,$target,;t t
28695 s,@target_cpu@,$target_cpu,;t t
28696 s,@target_vendor@,$target_vendor,;t t
28697 s,@target_os@,$target_os,;t t
28698 s,@CC@,$CC,;t t
28699 s,@CFLAGS@,$CFLAGS,;t t
28700 s,@LDFLAGS@,$LDFLAGS,;t t
28701 s,@CPPFLAGS@,$CPPFLAGS,;t t
28702 s,@ac_ct_CC@,$ac_ct_CC,;t t
28703 s,@EXEEXT@,$EXEEXT,;t t
28704 s,@OBJEXT@,$OBJEXT,;t t
28705 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28706 s,@CPP@,$CPP,;t t
28707 s,@LDCONFIG@,$LDCONFIG,;t t
28708 s,@CXX@,$CXX,;t t
28709 s,@CXXFLAGS@,$CXXFLAGS,;t t
28710 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28711 s,@AWK@,$AWK,;t t
28712 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28713 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28714 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28715 s,@LINT@,$LINT,;t t
28716 s,@LINT_OPTS@,$LINT_OPTS,;t t
28717 s,@LN_S@,$LN_S,;t t
28718 s,@cf_config_suffix@,$cf_config_suffix,;t t
28719 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28720 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28721 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28722 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28723 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28724 s,@SET_MAKE@,$SET_MAKE,;t t
28725 s,@CTAGS@,$CTAGS,;t t
28726 s,@ETAGS@,$ETAGS,;t t
28727 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28728 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28729 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28730 s,@RANLIB@,$RANLIB,;t t
28731 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28732 s,@LD@,$LD,;t t
28733 s,@ac_ct_LD@,$ac_ct_LD,;t t
28734 s,@AR@,$AR,;t t
28735 s,@ac_ct_AR@,$ac_ct_AR,;t t
28736 s,@NM@,$NM,;t t
28737 s,@ac_ct_NM@,$ac_ct_NM,;t t
28738 s,@ARFLAGS@,$ARFLAGS,;t t
28739 s,@DESTDIR@,$DESTDIR,;t t
28740 s,@BUILD_CC@,$BUILD_CC,;t t
28741 s,@BUILD_CPP@,$BUILD_CPP,;t t
28742 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28743 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28744 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28745 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28746 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28747 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28748 s,@cf_list_models@,$cf_list_models,;t t
28749 s,@ABI_VERSION@,$ABI_VERSION,;t t
28750 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28751 s,@LIBTOOL@,$LIBTOOL,;t t
28752 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28753 s,@LT_UNDEF@,$LT_UNDEF,;t t
28754 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28755 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28756 s,@LIB_CREATE@,$LIB_CREATE,;t t
28757 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28758 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28759 s,@LIB_PREP@,$LIB_PREP,;t t
28760 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28761 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28762 s,@LIB_LINK@,$LIB_LINK,;t t
28763 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28764 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28765 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28766 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28767 s,@TICS_NAME@,$TICS_NAME,;t t
28768 s,@TINFO_NAME@,$TINFO_NAME,;t t
28769 s,@LIB_NAME@,$LIB_NAME,;t t
28770 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28771 s,@CC_G_OPT@,$CC_G_OPT,;t t
28772 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28773 s,@LD_MODEL@,$LD_MODEL,;t t
28774 s,@shlibdir@,$shlibdir,;t t
28775 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28776 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28777 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28778 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28779 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28780 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28781 s,@LINK_PROGS@,$LINK_PROGS,;t t
28782 s,@LINK_TESTS@,$LINK_TESTS,;t t
28783 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28784 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28785 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28786 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28787 s,@RPATH_LIST@,$RPATH_LIST,;t t
28788 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28789 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28790 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28791 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28792 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28793 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28794 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28795 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28796 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28797 s,@TIC@,$TIC,;t t
28798 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28799 s,@INFOCMP@,$INFOCMP,;t t
28800 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28801 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28802 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28803 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28804 s,@XTERM_KBS@,$XTERM_KBS,;t t
28805 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28806 s,@TERMINFO@,$TERMINFO,;t t
28807 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28808 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28809 s,@TERMPATH@,$TERMPATH,;t t
28810 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28811 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28812 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28813 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28814 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28815 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28816 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28817 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28818 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28819 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28820 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28821 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28822 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28823 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28824 s,@RGB_PATH@,$RGB_PATH,;t t
28825 s,@no_x11_rgb@,$no_x11_rgb,;t t
28826 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28827 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28828 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28829 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28830 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28831 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28832 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28833 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28834 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28835 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28836 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28837 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28838 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28839 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28840 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28841 s,@PTHREAD@,$PTHREAD,;t t
28842 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28843 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28844 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28845 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28846 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28847 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28848 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28849 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28850 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28851 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28852 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
28853 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
28854 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
28855 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
28856 s,@ECHO_LT@,$ECHO_LT,;t t
28857 s,@ECHO_LD@,$ECHO_LD,;t t
28858 s,@RULE_CC@,$RULE_CC,;t t
28859 s,@SHOW_CC@,$SHOW_CC,;t t
28860 s,@ECHO_CC@,$ECHO_CC,;t t
28861 s,@ECHO_LINK@,$ECHO_LINK,;t t
28862 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
28863 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
28864 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
28865 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
28866 s,@ADAFLAGS@,$ADAFLAGS,;t t
28867 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
28868 s,@ADA_TRACE@,$ADA_TRACE,;t t
28869 s,@MATH_LIB@,$MATH_LIB,;t t
28870 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
28871 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
28872 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
28873 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
28874 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
28875 s,@TEST_LIBS@,$TEST_LIBS,;t t
28876 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
28877 s,@CXXCPP@,$CXXCPP,;t t
28878 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
28879 s,@CXX_AR@,$CXX_AR,;t t
28880 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
28881 s,@CXXLIBS@,$CXXLIBS,;t t
28882 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
28883 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
28884 s,@M4_exists@,$M4_exists,;t t
28885 s,@cf_ada_make@,$cf_ada_make,;t t
28886 s,@cf_ada_config@,$cf_ada_config,;t t
28887 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
28888 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
28889 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
28890 s,@cf_compile_generics@,$cf_compile_generics,;t t
28891 s,@cf_generic_objects@,$cf_generic_objects,;t t
28892 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
28893 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
28894 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
28895 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
28896 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
28897 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
28898 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
28899 s,@cf_ada_package@,$cf_ada_package,;t t
28900 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
28901 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
28902 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
28903 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
28904 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
28905 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
28906 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
28907 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
28908 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
28909 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
28910 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
28911 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
28912 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
28913 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
28914 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
28915 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
28916 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
28917 s,@TICS_LIBS@,$TICS_LIBS,;t t
28918 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
28919 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
28920 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
28921 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
28922 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
28923 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
28924 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
28925 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
28926 s,@includesubdir@,$includesubdir,;t t
28927 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
28928 s,@TICS_LIST@,$TICS_LIST,;t t
28929 s,@TINFO_LIST@,$TINFO_LIST,;t t
28930 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
28931 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
28932 s,@FORM_NAME@,$FORM_NAME,;t t
28933 s,@MENU_NAME@,$MENU_NAME,;t t
28934 s,@PANEL_NAME@,$PANEL_NAME,;t t
28935 s,@CXX_NAME@,$CXX_NAME,;t t
28936 s,@TEST_ARGS@,$TEST_ARGS,;t t
28937 s,@TEST_DEPS@,$TEST_DEPS,;t t
28938 s,@TEST_ARG2@,$TEST_ARG2,;t t
28939 s,@TEST_DEP2@,$TEST_DEP2,;t t
28940 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
28941 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
28942 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
28943 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
28944 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
28945 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
28946 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
28947 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
28948 s,@cross_compiling@,$cross_compiling,;t t
28949 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
28950 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
28951 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
28952 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
28953 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
28954 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
28955 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
28956 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
28957 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
28958 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
28959 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
28960 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
28961 CEOF
28962
28963 EOF
28964
28965   cat >>$CONFIG_STATUS <<\EOF
28966   # Split the substitutions into bite-sized pieces for seds with
28967   # small command number limits, like on Digital OSF/1 and HP-UX.
28968   ac_max_sed_lines=48
28969   ac_sed_frag=1 # Number of current file.
28970   ac_beg=1 # First line for current file.
28971   ac_end=$ac_max_sed_lines # Line after last line for current file.
28972   ac_more_lines=:
28973   ac_sed_cmds=
28974   while $ac_more_lines; do
28975     if test $ac_beg -gt 1; then
28976       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
28977     else
28978       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
28979     fi
28980     if test ! -s $tmp/subs.frag; then
28981       ac_more_lines=false
28982     else
28983       # The purpose of the label and of the branching condition is to
28984       # speed up the sed processing (if there are no `@' at all, there
28985       # is no need to browse any of the substitutions).
28986       # These are the two extra sed commands mentioned above.
28987       (echo ':t
28988   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
28989       # It is possible to make a multiline substitution using escaped newlines.
28990       # Ensure that we do not split the substitution between script fragments.
28991       ac_BEG=$ac_end
28992       ac_END=`expr $ac_end + $ac_max_sed_lines`
28993       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
28994       if test -s $tmp/subs.next; then
28995         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
28996         if test ! -s $tmp/subs.edit; then
28997           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
28998           if test ! -s $tmp/subs.edit; then
28999             if test $ac_beg -gt 1; then
29000               ac_end=`expr $ac_end - 1`
29001               continue
29002             fi
29003           fi
29004         fi
29005       fi
29006
29007       if test -z "$ac_sed_cmds"; then
29008         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29009       else
29010         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29011       fi
29012       ac_sed_frag=`expr $ac_sed_frag + 1`
29013       ac_beg=$ac_end
29014       ac_end=`expr $ac_end + $ac_max_sed_lines`
29015     fi
29016   done
29017   if test -z "$ac_sed_cmds"; then
29018     ac_sed_cmds=cat
29019   fi
29020 fi # test -n "$CONFIG_FILES"
29021
29022 EOF
29023 cat >>$CONFIG_STATUS <<\EOF
29024 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29025   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29026   case $ac_file in
29027   - | *:- | *:-:* ) # input from stdin
29028         cat >$tmp/stdin
29029         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29030         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29031   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29032         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29033   * )   ac_file_in=$ac_file.in ;;
29034   esac
29035
29036   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29037   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29038          X"$ac_file" : 'X\(//\)[^/]' \| \
29039          X"$ac_file" : 'X\(//\)$' \| \
29040          X"$ac_file" : 'X\(/\)' \| \
29041          .     : '\(.\)' 2>/dev/null ||
29042 echo X"$ac_file" |
29043     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29044           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29045           /^X\(\/\/\)$/{ s//\1/; q; }
29046           /^X\(\/\).*/{ s//\1/; q; }
29047           s/.*/./; q'`
29048   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29049     { case "$ac_dir" in
29050   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29051   *)                      as_incr_dir=.;;
29052 esac
29053 as_dummy="$ac_dir"
29054 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29055   case $as_mkdir_dir in
29056     # Skip DOS drivespec
29057     ?:) as_incr_dir=$as_mkdir_dir ;;
29058     *)
29059       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29060       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29061     ;;
29062   esac
29063 done; }
29064
29065     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29066     # A "../" for each directory in $ac_dir_suffix.
29067     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29068   else
29069     ac_dir_suffix= ac_dots=
29070   fi
29071
29072   case $srcdir in
29073   .)  ac_srcdir=.
29074       if test -z "$ac_dots"; then
29075          ac_top_srcdir=.
29076       else
29077          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
29078       fi ;;
29079   [\\/]* | ?:[\\/]* )
29080       ac_srcdir=$srcdir$ac_dir_suffix;
29081       ac_top_srcdir=$srcdir ;;
29082   *) # Relative path.
29083     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
29084     ac_top_srcdir=$ac_dots$srcdir ;;
29085   esac
29086
29087   case $INSTALL in
29088   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29089   *) ac_INSTALL=$ac_dots$INSTALL ;;
29090   esac
29091
29092   if test x"$ac_file" != x-; then
29093     { echo "$as_me:29093: creating $ac_file" >&5
29094 echo "$as_me: creating $ac_file" >&6;}
29095     rm -f "$ac_file"
29096   fi
29097   # Let's still pretend it is `configure' which instantiates (i.e., don't
29098   # use $as_me), people would be surprised to read:
29099   #    /* config.h.  Generated automatically by config.status.  */
29100   configure_input="Generated automatically from `echo $ac_file_in |
29101                                                  sed 's,.*/,,'` by configure."
29102
29103   # First look for the input files in the build tree, otherwise in the
29104   # src tree.
29105   ac_file_inputs=`IFS=:
29106     for f in $ac_file_in; do
29107       case $f in
29108       -) echo $tmp/stdin ;;
29109       [\\/$]*)
29110          # Absolute (can't be DOS-style, as IFS=:)
29111          test -f "$f" || { { echo "$as_me:29111: error: cannot find input file: $f" >&5
29112 echo "$as_me: error: cannot find input file: $f" >&2;}
29113    { (exit 1); exit 1; }; }
29114          echo $f;;
29115       *) # Relative
29116          if test -f "$f"; then
29117            # Build tree
29118            echo $f
29119          elif test -f "$srcdir/$f"; then
29120            # Source tree
29121            echo $srcdir/$f
29122          else
29123            # /dev/null tree
29124            { { echo "$as_me:29124: error: cannot find input file: $f" >&5
29125 echo "$as_me: error: cannot find input file: $f" >&2;}
29126    { (exit 1); exit 1; }; }
29127          fi;;
29128       esac
29129     done` || { (exit 1); exit 1; }
29130 EOF
29131 cat >>$CONFIG_STATUS <<\EOF
29132   ac_warn_datarootdir=no
29133   if test x"$ac_file" != x-; then
29134     for ac_item in $ac_file_inputs
29135     do
29136       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
29137       if test -n "$ac_seen"; then
29138         ac_used=`grep '@datarootdir@' $ac_item`
29139         if test -z "$ac_used"; then
29140           { echo "$as_me:29140: WARNING: datarootdir was used implicitly but not set:
29141 $ac_seen" >&5
29142 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29143 $ac_seen" >&2;}
29144           ac_warn_datarootdir=yes
29145         fi
29146       fi
29147       ac_seen=`grep '${datarootdir}' $ac_item`
29148       if test -n "$ac_seen"; then
29149         { echo "$as_me:29149: WARNING: datarootdir was used explicitly but not set:
29150 $ac_seen" >&5
29151 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29152 $ac_seen" >&2;}
29153         ac_warn_datarootdir=yes
29154       fi
29155     done
29156   fi
29157
29158 if test "x$ac_warn_datarootdir" = xyes; then
29159   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29160 fi
29161
29162 EOF
29163 cat >>$CONFIG_STATUS <<EOF
29164   sed "$ac_vpsub
29165 $extrasub
29166 EOF
29167 cat >>$CONFIG_STATUS <<\EOF
29168 :t
29169 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29170 s,@configure_input@,$configure_input,;t t
29171 s,@srcdir@,$ac_srcdir,;t t
29172 s,@top_srcdir@,$ac_top_srcdir,;t t
29173 s,@INSTALL@,$ac_INSTALL,;t t
29174 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29175   rm -f $tmp/stdin
29176   if test x"$ac_file" != x-; then
29177     cp $tmp/out $ac_file
29178
29179     for ac_name in prefix exec_prefix datarootdir
29180     do
29181         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
29182         if test -n "$ac_seen"; then
29183             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
29184             if test -z "$ac_init"; then
29185               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29186               { echo "$as_me:29186: WARNING: Variable $ac_name is used but was not set:
29187 $ac_seen" >&5
29188 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29189 $ac_seen" >&2;}
29190             fi
29191         fi
29192     done
29193     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
29194     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
29195     if test -s $tmp/out; then
29196       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29197       { echo "$as_me:29197: WARNING: Some variables may not be substituted:
29198 $ac_seen" >&5
29199 echo "$as_me: WARNING: Some variables may not be substituted:
29200 $ac_seen" >&2;}
29201     fi
29202   else
29203     cat $tmp/out
29204   fi
29205   rm -f $tmp/out
29206
29207 done
29208 EOF
29209 cat >>$CONFIG_STATUS <<\EOF
29210
29211 #
29212 # CONFIG_HEADER section.
29213 #
29214
29215 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29216 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29217 #
29218 # ac_d sets the value in "#define NAME VALUE" lines.
29219 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29220 ac_dB='[        ].*$,\1#\2'
29221 ac_dC=' '
29222 ac_dD=',;t'
29223 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29224 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29225 ac_iB='\([      ]\),\1#\2define\3'
29226 ac_iC=' '
29227 ac_iD='\4,;t'
29228 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29229 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29230 ac_uB='$,\1#\2define\3'
29231 ac_uC=' '
29232 ac_uD=',;t'
29233
29234 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29235   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29236   case $ac_file in
29237   - | *:- | *:-:* ) # input from stdin
29238         cat >$tmp/stdin
29239         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29240         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29241   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29242         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29243   * )   ac_file_in=$ac_file.in ;;
29244   esac
29245
29246   test x"$ac_file" != x- && { echo "$as_me:29246: creating $ac_file" >&5
29247 echo "$as_me: creating $ac_file" >&6;}
29248
29249   # First look for the input files in the build tree, otherwise in the
29250   # src tree.
29251   ac_file_inputs=`IFS=:
29252     for f in $ac_file_in; do
29253       case $f in
29254       -) echo $tmp/stdin ;;
29255       [\\/$]*)
29256          # Absolute (can't be DOS-style, as IFS=:)
29257          test -f "$f" || { { echo "$as_me:29257: error: cannot find input file: $f" >&5
29258 echo "$as_me: error: cannot find input file: $f" >&2;}
29259    { (exit 1); exit 1; }; }
29260          echo $f;;
29261       *) # Relative
29262          if test -f "$f"; then
29263            # Build tree
29264            echo $f
29265          elif test -f "$srcdir/$f"; then
29266            # Source tree
29267            echo $srcdir/$f
29268          else
29269            # /dev/null tree
29270            { { echo "$as_me:29270: error: cannot find input file: $f" >&5
29271 echo "$as_me: error: cannot find input file: $f" >&2;}
29272    { (exit 1); exit 1; }; }
29273          fi;;
29274       esac
29275     done` || { (exit 1); exit 1; }
29276   # Remove the trailing spaces.
29277   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29278
29279 EOF
29280
29281 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29282 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29283 # be either 'cat' or 'sort'.
29284 cat confdefs.h | uniq >conftest.vals
29285
29286 # Break up conftest.vals because some shells have a limit on
29287 # the size of here documents, and old seds have small limits too.
29288
29289 rm -f conftest.tail
29290 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
29291 while grep . conftest.vals >/dev/null
29292 do
29293   # Write chunks of a limited-size here document to conftest.frag.
29294   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
29295   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
29296   echo 'CEOF' >> $CONFIG_STATUS
29297   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
29298   rm -f conftest.vals
29299   mv conftest.tail conftest.vals
29300 done
29301 rm -f conftest.vals
29302
29303 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29304 # marker @DEFS@.
29305 echo '  cat >> conftest.edit <<CEOF
29306 /@DEFS@/r conftest.frag
29307 /@DEFS@/d
29308 CEOF
29309 sed -f conftest.edit $tmp/in > $tmp/out
29310 rm -f $tmp/in
29311 mv $tmp/out $tmp/in
29312 rm -f conftest.edit conftest.frag
29313 ' >> $CONFIG_STATUS
29314
29315 cat >>$CONFIG_STATUS <<\EOF
29316   # Let's still pretend it is `configure' which instantiates (i.e., don't
29317   # use $as_me), people would be surprised to read:
29318   #    /* config.h.  Generated automatically by config.status.  */
29319   if test x"$ac_file" = x-; then
29320     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29321   else
29322     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29323   fi
29324   cat $tmp/in >>$tmp/config.h
29325   rm -f $tmp/in
29326   if test x"$ac_file" != x-; then
29327     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
29328       { echo "$as_me:29328: $ac_file is unchanged" >&5
29329 echo "$as_me: $ac_file is unchanged" >&6;}
29330     else
29331       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29332          X"$ac_file" : 'X\(//\)[^/]' \| \
29333          X"$ac_file" : 'X\(//\)$' \| \
29334          X"$ac_file" : 'X\(/\)' \| \
29335          .     : '\(.\)' 2>/dev/null ||
29336 echo X"$ac_file" |
29337     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29338           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29339           /^X\(\/\/\)$/{ s//\1/; q; }
29340           /^X\(\/\).*/{ s//\1/; q; }
29341           s/.*/./; q'`
29342       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29343         { case "$ac_dir" in
29344   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29345   *)                      as_incr_dir=.;;
29346 esac
29347 as_dummy="$ac_dir"
29348 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29349   case $as_mkdir_dir in
29350     # Skip DOS drivespec
29351     ?:) as_incr_dir=$as_mkdir_dir ;;
29352     *)
29353       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29354       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29355     ;;
29356   esac
29357 done; }
29358
29359       fi
29360       rm -f $ac_file
29361       mv $tmp/config.h $ac_file
29362     fi
29363   else
29364     cat $tmp/config.h
29365     rm -f $tmp/config.h
29366   fi
29367 done
29368 EOF
29369 cat >>$CONFIG_STATUS <<\EOF
29370 #
29371 # CONFIG_COMMANDS section.
29372 #
29373 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29374   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29375   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29376
29377   case $ac_dest in
29378     default )
29379 if test "x$cf_with_tests" != xno ; then
29380
29381 for cf_dir in test
29382 do
29383         if test ! -d $srcdir/$cf_dir; then
29384                 continue
29385         elif test -f $srcdir/$cf_dir/programs; then
29386                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
29387         fi
29388 done
29389
29390 fi
29391
29392 cf_prefix=$LIB_PREFIX
29393
29394 case $cf_cv_shlib_version in
29395 (cygdll|msysdll|mingw|msvcdll)
29396         TINFO_NAME=$TINFO_ARG_SUFFIX
29397         TINFO_SUFFIX=.dll
29398         ;;
29399 esac
29400
29401 if test -n "$TINFO_SUFFIX" ; then
29402         case $TINFO_SUFFIX in
29403         (tw*)
29404                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29405                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
29406                 ;;
29407         (t*)
29408                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29409                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
29410                 ;;
29411         (w*)
29412                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29413                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
29414                 ;;
29415         esac
29416 fi
29417
29418 for cf_dir in $SRC_SUBDIRS
29419 do
29420         if test ! -d $srcdir/$cf_dir ; then
29421                 continue
29422         elif test -f $srcdir/$cf_dir/modules; then
29423
29424                 SHARED_LIB=
29425                 Libs_To_Make=
29426                 cf_awk_program=
29427                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29428                 then
29429                         cf_awk_program="$cf_awk_program\
29430 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29431 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29432 "
29433                 fi
29434
29435                 if test "x$WILDCARD_SYMS" = xno
29436                 then
29437                         cf_awk_program="$cf_awk_program\
29438 /[      ]_\\*;/ { skip=1; next; }\
29439 "
29440                 fi
29441
29442                 if test "x$cf_awk_program" != "x"
29443                 then
29444                         cat >>$cf_dir/Makefile <<CF_EOF
29445
29446 # Generated by CF_LIB_RULES
29447 resulting.map: $UNALTERED_SYMS
29448         $AWK 'BEGIN { skip = 1; last=""; } \
29449 $cf_awk_program \
29450 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29451  skip = 0; last = \$\$0; } \
29452 END { print last; }' < $UNALTERED_SYMS >\$@
29453
29454 distclean::
29455         rm -f resulting.map
29456 CF_EOF
29457                 fi
29458
29459                 for cf_item in $cf_LIST_MODELS
29460                 do
29461
29462         case X$cf_item in
29463         (Xlibtool)
29464                 cf_suffix='.la'
29465                 cf_depsuf=$cf_suffix
29466                 ;;
29467         (Xdebug)
29468                 case $cf_cv_system_name in
29469                 (*-msvc*)
29470                         cf_suffix='_g.lib'
29471                         ;;
29472                 (*)
29473                         cf_suffix='_g.a'
29474                         ;;
29475                 esac
29476                 cf_depsuf=$cf_suffix
29477                 ;;
29478         (Xprofile)
29479                 case $cf_cv_system_name in
29480                 (*-msvc*)
29481                         cf_suffix='_p.lib'
29482                         ;;
29483                 (*)
29484                         cf_suffix='_p.a'
29485                         ;;
29486                 esac
29487                 cf_depsuf=$cf_suffix
29488                 ;;
29489         (Xshared)
29490                 case $cf_cv_system_name in
29491                 (aix[5-7]*)
29492                         cf_suffix='.so'
29493                         cf_depsuf=$cf_suffix
29494                         ;;
29495                 (*-msvc*)
29496                         cf_suffix='.dll'
29497                         cf_depsuf='.dll.lib'
29498                         ;;
29499                 (cygwin*|msys*|mingw*)
29500                         cf_suffix='.dll'
29501                         cf_depsuf='.dll.a'
29502                         ;;
29503                 (darwin*)
29504                         cf_suffix='.dylib'
29505                         cf_depsuf=$cf_suffix
29506                         ;;
29507                 (hpux*)
29508                         case $target in
29509                         (ia64*)
29510                                 cf_suffix='.so'
29511                                 cf_depsuf=$cf_suffix
29512                                 ;;
29513                         (*)
29514                                 cf_suffix='.sl'
29515                                 cf_depsuf=$cf_suffix
29516                                 ;;
29517                         esac
29518                         ;;
29519                 (*)
29520                         cf_suffix='.so'
29521                         cf_depsuf=$cf_suffix
29522                         ;;
29523                 esac
29524                 ;;
29525         (*)
29526                 case $target in
29527                 (*-msvc*)
29528                         cf_suffix='.lib'
29529                         ;;
29530                 (*)
29531                         cf_suffix='.a'
29532                         ;;
29533                 esac
29534                 cf_depsuf=$cf_suffix
29535                 ;;
29536         esac
29537         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29538         then
29539                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29540                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29541         fi
29542
29543                         if test "$cf_dir" = "c++"
29544                         then
29545
29546 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29547
29548 eval cf_libname=\$${cf_map_lib_basename}_NAME
29549
29550                         else
29551
29552 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29553
29554 eval cf_libname=\$${cf_map_lib_basename}_NAME
29555
29556                         fi
29557                         test -z "$cf_libname" && cf_libname="$cf_dir"
29558                         if test $cf_item = shared ; then
29559                                 if test -n "${LIB_SUFFIX}"
29560                                 then
29561                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29562                                 else
29563                                         cf_shared_suffix="$cf_suffix"
29564                                 fi
29565                                 if test "$cf_cv_do_symlinks" = yes ; then
29566                                         cf_version_name=
29567
29568                                         case "$cf_cv_shlib_version" in
29569                                         (rel)
29570                                                 cf_version_name=REL_VERSION
29571                                                 ;;
29572                                         (abi)
29573                                                 cf_version_name=ABI_VERSION
29574                                                 ;;
29575                                         esac
29576
29577                                         if test -n "$cf_version_name"
29578                                         then
29579                                                 case "$cf_cv_system_name" in
29580                                                 (darwin*)
29581                                                         # "w", etc?
29582                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29583                                                         ;;
29584                                                 (*)
29585                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29586                                                         ;;
29587                                                 esac
29588                                         fi
29589                                         if test -n "${USE_LIB_SUFFIX}"
29590                                         then
29591                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29592                                         else
29593                                                 cf_shared_suffix="$cf_suffix"
29594                                         fi
29595                                 fi
29596                                 # cygwin needs import library, and has unique naming convention
29597                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29598                                 # use 'cyg' prefix for shared lib.
29599                                 case $cf_cv_shlib_version in
29600                                 (cygdll)
29601                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29602                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29603                                         ;;
29604                                 (msysdll)
29605                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29606                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29607                                         ;;
29608                                 (mingw)
29609                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29610                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29611                                         ;;
29612                                 (msvcdll)
29613                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29614                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29615                                         ;;
29616                                 (*)
29617                                         cf_add_lib=
29618                                         ;;
29619                                 esac
29620                                 if test -n "$cf_add_lib"
29621                                 then
29622                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29623                                         continue
29624                                 fi
29625                         fi
29626                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29627                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29628                 done
29629
29630                 if test $cf_dir = ncurses ; then
29631                         cf_subsets="$LIB_SUBSETS"
29632                         cf_r_parts="$cf_subsets"
29633                         cf_liblist="$Libs_To_Make"
29634
29635                         while test -n "$cf_r_parts"
29636                         do
29637                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29638                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29639                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29640                                         cf_add_lib=
29641                                         case $cf_l_parts in
29642                                         (*termlib*)
29643                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29644                                                 ;;
29645                                         (*ticlib*)
29646                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29647                                                 ;;
29648                                         (*)
29649                                                 break
29650                                                 ;;
29651                                         esac
29652                                         if test -n "$cf_add_lib"; then
29653                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29654                                         fi
29655                                 else
29656                                         break
29657                                 fi
29658                         done
29659                 else
29660                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29661                 fi
29662
29663                 if test $cf_dir = c++; then
29664                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29665                                 cf_list=
29666                                 for cf_item in $Libs_To_Make
29667                                 do
29668                                         case $cf_item in
29669                                         (*.a)
29670                                                 ;;
29671                                         (*)
29672                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29673                                                 ;;
29674                                         esac
29675                                         for cf_test in $cf_list
29676                                         do
29677                                                 if test "$cf_test" = "$cf_item"
29678                                                 then
29679                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29680                                                         cf_item=
29681                                                         break
29682                                                 fi
29683                                         done
29684                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29685                                 done
29686                                 Libs_To_Make="$cf_list"
29687                         fi
29688                 fi
29689
29690                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29691                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29692                         $cf_dir/Makefile >$cf_dir/Makefile.out
29693                 mv $cf_dir/Makefile.out $cf_dir/Makefile
29694
29695                 $AWK -f $srcdir/mk-0th.awk \
29696                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29697                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29698
29699                 for cf_subset in $cf_subsets
29700                 do
29701                         cf_subdirs=
29702                         for cf_item in $cf_LIST_MODELS
29703                         do
29704
29705                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29706
29707 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29708
29709                         CXX_MODEL=$cf_ITEM
29710                         if test "$CXX_MODEL" = SHARED; then
29711                                 case $cf_cv_shlib_version in
29712                                 (cygdll|msysdll|mingw|msvcdll)
29713                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29714
29715 echo "${as_me:-configure}:29715: testing overriding CXX_MODEL to SHARED ..." 1>&5
29716
29717                                         with_shared_cxx=yes
29718                                         ;;
29719                                 (*)
29720                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29721                                         ;;
29722                                 esac
29723                         fi
29724
29725         case X$cf_item in
29726         (Xlibtool)
29727                 cf_suffix='.la'
29728                 cf_depsuf=$cf_suffix
29729                 ;;
29730         (Xdebug)
29731                 case $cf_cv_system_name in
29732                 (*-msvc*)
29733                         cf_suffix='_g.lib'
29734                         ;;
29735                 (*)
29736                         cf_suffix='_g.a'
29737                         ;;
29738                 esac
29739                 cf_depsuf=$cf_suffix
29740                 ;;
29741         (Xprofile)
29742                 case $cf_cv_system_name in
29743                 (*-msvc*)
29744                         cf_suffix='_p.lib'
29745                         ;;
29746                 (*)
29747                         cf_suffix='_p.a'
29748                         ;;
29749                 esac
29750                 cf_depsuf=$cf_suffix
29751                 ;;
29752         (Xshared)
29753                 case $cf_cv_system_name in
29754                 (aix[5-7]*)
29755                         cf_suffix='.so'
29756                         cf_depsuf=$cf_suffix
29757                         ;;
29758                 (*-msvc*)
29759                         cf_suffix='.dll'
29760                         cf_depsuf='.dll.lib'
29761                         ;;
29762                 (cygwin*|msys*|mingw*)
29763                         cf_suffix='.dll'
29764                         cf_depsuf='.dll.a'
29765                         ;;
29766                 (darwin*)
29767                         cf_suffix='.dylib'
29768                         cf_depsuf=$cf_suffix
29769                         ;;
29770                 (hpux*)
29771                         case $target in
29772                         (ia64*)
29773                                 cf_suffix='.so'
29774                                 cf_depsuf=$cf_suffix
29775                                 ;;
29776                         (*)
29777                                 cf_suffix='.sl'
29778                                 cf_depsuf=$cf_suffix
29779                                 ;;
29780                         esac
29781                         ;;
29782                 (*)
29783                         cf_suffix='.so'
29784                         cf_depsuf=$cf_suffix
29785                         ;;
29786                 esac
29787                 ;;
29788         (*)
29789                 case $target in
29790                 (*-msvc*)
29791                         cf_suffix='.lib'
29792                         ;;
29793                 (*)
29794                         cf_suffix='.a'
29795                         ;;
29796                 esac
29797                 cf_depsuf=$cf_suffix
29798                 ;;
29799         esac
29800         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29801         then
29802                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29803                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29804         fi
29805
29806         case $cf_item in
29807         (libtool) cf_subdir='obj_lo'  ;;
29808         (normal)  cf_subdir='objects' ;;
29809         (debug)   cf_subdir='obj_g' ;;
29810         (profile) cf_subdir='obj_p' ;;
29811         (shared)
29812                 case $cf_cv_system_name in
29813                 (cygwin|msys)
29814                         cf_subdir='objects' ;;
29815                 (*)
29816                         cf_subdir='obj_s' ;;
29817                 esac
29818         esac
29819
29820                         # Test for case where we build libtinfo with a different name.
29821                         cf_libname=$cf_dir
29822                         if test $cf_dir = ncurses ; then
29823                                 case $cf_subset in
29824                                 (*base*)
29825                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29826                                         ;;
29827                                 (*termlib*)
29828                                         cf_libname=$TINFO_LIB_SUFFIX
29829                                         ;;
29830                                 (ticlib*)
29831                                         cf_libname=$TICS_LIB_SUFFIX
29832                                         ;;
29833                                 esac
29834                         elif test $cf_dir = c++ ; then
29835
29836 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29837
29838 eval cf_libname=\$${cf_map_lib_basename}_NAME
29839
29840                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29841                         else
29842
29843 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29844
29845 eval cf_libname=\$${cf_map_lib_basename}_NAME
29846
29847                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29848                         fi
29849                         if test -n "${USE_ARG_SUFFIX}" ; then
29850                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
29851                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
29852                         fi
29853
29854                         # These dependencies really are for development, not
29855                         # builds, but they are useful in porting, too.
29856                         cf_depend="../include/ncurses_cfg.h"
29857                         if test "$srcdir" = "."; then
29858                                 cf_reldir="."
29859                         else
29860                                 cf_reldir="\${srcdir}"
29861                         fi
29862
29863                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
29864                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
29865                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
29866                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
29867                         fi
29868
29869                         cf_dir_suffix=
29870                         old_cf_suffix="$cf_suffix"
29871                         if test "$cf_cv_shlib_version_infix" = yes ; then
29872                         if test -n "$USE_LIB_SUFFIX" ; then
29873                                 case $USE_LIB_SUFFIX in
29874                                 (tw*)
29875                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
29876                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
29877                                         cf_dir_suffix=tw$EXTRA_SUFFIX
29878                                         ;;
29879                                 (t*)
29880                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
29881                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
29882                                         cf_dir_suffix=t$EXTRA_SUFFIX
29883                                         ;;
29884                                 (w*)
29885                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
29886                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
29887                                         cf_dir_suffix=w$EXTRA_SUFFIX
29888                                         ;;
29889                                 (*)
29890                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
29891                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
29892                                         cf_dir_suffix=$EXTRA_SUFFIX
29893                                         ;;
29894                                 esac
29895                         fi
29896                         fi
29897
29898                         $AWK -f $srcdir/mk-1st.awk \
29899                                 name=${cf_libname}${cf_dir_suffix} \
29900                                 traces=$LIB_TRACING \
29901                                 MODEL=$cf_ITEM \
29902                                 CXX_MODEL=$CXX_MODEL \
29903                                 model=$cf_subdir \
29904                                 prefix=$cf_prefix \
29905                                 suffix=$cf_suffix \
29906                                 subset=$cf_subset \
29907                                 driver=$cf_cv_term_driver \
29908                                 SymLink="$LN_S" \
29909                                 TermlibRoot=$TINFO_NAME \
29910                                 TermlibSuffix=$TINFO_SUFFIX \
29911                                 ShlibVer=$cf_cv_shlib_version \
29912                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
29913                                 ReLink=${cf_cv_do_relink:-no} \
29914                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
29915                                 DoLinks=$cf_cv_do_symlinks \
29916                                 rmSoLocs=$cf_cv_rm_so_locs \
29917                                 ldconfig="$LDCONFIG" \
29918                                 overwrite=$WITH_OVERWRITE \
29919                                 depend="$cf_depend" \
29920                                 host="$host" \
29921                                 libtool_version="$LIBTOOL_VERSION" \
29922                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29923
29924                         cf_suffix="$old_cf_suffix"
29925
29926                         for cf_subdir2 in $cf_subdirs lib
29927                         do
29928                                 test $cf_subdir = $cf_subdir2 && break
29929                         done
29930                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
29931                         $AWK -f $srcdir/mk-2nd.awk \
29932                                 name=$cf_dir \
29933                                 traces=$LIB_TRACING \
29934                                 MODEL=$cf_ITEM \
29935                                 model=$cf_subdir \
29936                                 subset=$cf_subset \
29937                                 srcdir=$srcdir \
29938                                 echo=$WITH_ECHO \
29939                                 crenames=$cf_cv_prog_CC_c_o \
29940                                 cxxrenames=$cf_cv_prog_CXX_c_o \
29941                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29942                         cf_subdirs="$cf_subdirs $cf_subdir"
29943                         done
29944                 done
29945         fi
29946
29947         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
29948 done
29949
29950 for cf_dir in $SRC_SUBDIRS
29951 do
29952         if test ! -d $srcdir/$cf_dir ; then
29953                 continue
29954         fi
29955
29956         if test -f $cf_dir/Makefile ; then
29957                 case "$cf_dir" in
29958                 (Ada95)
29959                         echo 'libs \' >> Makefile
29960                         echo 'install.libs \' >> Makefile
29961                         echo 'uninstall.libs ::' >> Makefile
29962                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
29963                         ;;
29964                 esac
29965         fi
29966
29967         if test -f $srcdir/$cf_dir/modules; then
29968                 echo >> Makefile
29969                 if test -f $srcdir/$cf_dir/headers; then
29970 cat >> Makefile <<CF_EOF
29971 install.includes \\
29972 uninstall.includes \\
29973 CF_EOF
29974                 fi
29975 if test "$cf_dir" != "c++" ; then
29976 echo 'lint \' >> Makefile
29977 fi
29978 cat >> Makefile <<CF_EOF
29979 libs \\
29980 lintlib \\
29981 install.libs \\
29982 uninstall.libs \\
29983 install.$cf_dir \\
29984 uninstall.$cf_dir ::
29985         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
29986 CF_EOF
29987         elif test -f $srcdir/$cf_dir/headers; then
29988 cat >> Makefile <<CF_EOF
29989
29990 libs \\
29991 install.libs \\
29992 uninstall.libs \\
29993 install.includes \\
29994 uninstall.includes ::
29995         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
29996 CF_EOF
29997 fi
29998 done
29999
30000 if test "x$cf_with_db_install" = xyes; then
30001 cat >> Makefile <<CF_EOF
30002
30003 install.libs uninstall.libs \\
30004 install.data uninstall.data ::
30005 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
30006 CF_EOF
30007 else
30008 cat >> Makefile <<CF_EOF
30009
30010 install.libs uninstall.libs ::
30011         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
30012 CF_EOF
30013 fi
30014
30015 if test "x$cf_with_manpages" = xyes; then
30016 cat >> Makefile <<CF_EOF
30017
30018 install.man \\
30019 uninstall.man ::
30020         cd man && \${MAKE} \${TOP_MFLAGS} \$@
30021 CF_EOF
30022 fi
30023
30024 cat >> Makefile <<CF_EOF
30025
30026 distclean ::
30027         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30028         rm -f headers.sh headers.sed mk_shared_lib.sh
30029         rm -f edit_man.* man_alias.*
30030         rm -rf \${DIRS_TO_MAKE}
30031 CF_EOF
30032
30033 # Special case: tack's manpage lives in its own directory.
30034 if test "x$cf_with_manpages" = xyes; then
30035 if test "x$cf_with_tack" = "xyes"; then
30036 cat >> Makefile <<CF_EOF
30037
30038 install.man \\
30039 uninstall.man ::
30040         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
30041 CF_EOF
30042 fi
30043 fi
30044
30045 rm -f headers.sed headers.sh
30046
30047 echo creating headers.sh
30048 cat >headers.sh <<CF_EOF
30049 #! $SHELL
30050 # This shell script is generated by the 'configure' script.  It is invoked in a
30051 # subdirectory of the build tree.  It generates a sed-script in the parent
30052 # directory that is used to adjust includes for header files that reside in a
30053 # subdirectory of /usr/include, etc.
30054 PRG=""
30055 while test \$# != 3
30056 do
30057 PRG="\$PRG \$1"; shift
30058 done
30059 DST=\$1
30060 REF=\$2
30061 SRC=\$3
30062 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30063 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30064 echo installing \$SRC in \$DST
30065 CF_EOF
30066
30067 if test $WITH_CURSES_H = yes; then
30068         cat >>headers.sh <<CF_EOF
30069 case \$DST in
30070 (/*/include/*)
30071         END=\`basename \$DST\`
30072         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
30073         do
30074                 NAME=\`basename \$i\`
30075                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30076         done
30077         ;;
30078 (*)
30079         echo "" >> \$TMPSED
30080         ;;
30081 esac
30082 CF_EOF
30083
30084 else
30085         cat >>headers.sh <<CF_EOF
30086 case \$DST in
30087 (/*/include/*)
30088         END=\`basename \$DST\`
30089         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
30090         do
30091                 NAME=\`basename \$i\`
30092                 if test "\$NAME" = "curses.h"
30093                 then
30094                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30095                         NAME=ncurses.h
30096                 fi
30097                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30098         done
30099         ;;
30100 (*)
30101         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30102         ;;
30103 esac
30104 CF_EOF
30105 fi
30106 cat >>headers.sh <<CF_EOF
30107 rm -f \$TMPSRC
30108 sed -f \$TMPSED \$SRC > \$TMPSRC
30109 NAME=\`basename \$SRC\`
30110 CF_EOF
30111 if test $WITH_CURSES_H != yes; then
30112         cat >>headers.sh <<CF_EOF
30113 test "\$NAME" = "curses.h" && NAME=ncurses.h
30114 CF_EOF
30115 fi
30116 cat >>headers.sh <<CF_EOF
30117 # Just in case someone gzip'd manpages, remove the conflicting copy.
30118 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30119
30120 eval \$PRG \$TMPSRC \$DST/\$NAME
30121 rm -f \$TMPSRC \$TMPSED
30122 CF_EOF
30123
30124 chmod 0755 headers.sh
30125
30126 for cf_dir in $SRC_SUBDIRS
30127 do
30128         if test ! -d $srcdir/$cf_dir ; then
30129                 continue
30130         fi
30131
30132         if test -f $srcdir/$cf_dir/headers; then
30133                 $AWK -f $srcdir/mk-hdr.awk \
30134                         subset="$LIB_SUBSETS" \
30135                         compat="$WITH_CURSES_H" \
30136                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
30137         fi
30138
30139         if test -f $srcdir/$cf_dir/modules; then
30140                 if test "$cf_dir" != "c++" ; then
30141                         cat >>$cf_dir/Makefile <<"CF_EOF"
30142 depend : ${AUTO_SRC}
30143         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30144
30145 # DO NOT DELETE THIS LINE -- make depend depends on it.
30146 CF_EOF
30147                 fi
30148         fi
30149 done
30150
30151 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30152 if test -z "$USE_OLD_MAKERULES" ; then
30153         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
30154 fi
30155 fi
30156  ;;
30157   esac
30158 done
30159 EOF
30160
30161 cat >>$CONFIG_STATUS <<\EOF
30162
30163 { (exit 0); exit 0; }
30164 EOF
30165 chmod +x $CONFIG_STATUS
30166 ac_clean_files=$ac_clean_files_save
30167
30168 # configure is writing to config.log, and then calls config.status.
30169 # config.status does its own redirection, appending to config.log.
30170 # Unfortunately, on DOS this fails, as config.log is still kept open
30171 # by configure, so config.status won't be able to write to it; its
30172 # output is simply discarded.  So we exec the FD to /dev/null,
30173 # effectively closing config.log, so it can be properly (re)opened and
30174 # appended to by config.status.  When coming back to configure, we
30175 # need to make the FD available again.
30176 if test "$no_create" != yes; then
30177   ac_cs_success=:
30178   exec 5>/dev/null
30179   $SHELL $CONFIG_STATUS || ac_cs_success=false
30180   exec 5>>config.log
30181   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30182   # would make configure fail if this is the last instruction.
30183   $ac_cs_success || { (exit 1); exit 1; }
30184 fi
30185 ${MAKE:-make} preinstall