]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20201114
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.725 .
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 if test "x$CLANG_COMPILER" = "xyes" ; then
2222         for cf_clang_opt in \
2223                 -Qunused-arguments \
2224                 -Wno-error=implicit-function-declaration
2225         do
2226                 echo "$as_me:2226: checking if option $cf_clang_opt works" >&5
2227 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2228                 cat >conftest.$ac_ext <<_ACEOF
2229 #line 2229 "configure"
2230 #include "confdefs.h"
2231
2232                         #include <stdio.h>
2233 int
2234 main (void)
2235 {
2236
2237                         printf("hello!\n");
2238   ;
2239   return 0;
2240 }
2241 _ACEOF
2242 rm -f conftest.$ac_objext conftest$ac_exeext
2243 if { (eval echo "$as_me:2243: \"$ac_link\"") >&5
2244   (eval $ac_link) 2>&5
2245   ac_status=$?
2246   echo "$as_me:2246: \$? = $ac_status" >&5
2247   (exit $ac_status); } &&
2248          { ac_try='test -s conftest$ac_exeext'
2249   { (eval echo "$as_me:2249: \"$ac_try\"") >&5
2250   (eval $ac_try) 2>&5
2251   ac_status=$?
2252   echo "$as_me:2252: \$? = $ac_status" >&5
2253   (exit $ac_status); }; }; then
2254
2255                         cf_clang_optok=yes
2256 else
2257   echo "$as_me: failed program was:" >&5
2258 cat conftest.$ac_ext >&5
2259
2260                         cf_clang_optok=no
2261 fi
2262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2263                 echo "$as_me:2263: result: $cf_clang_optok" >&5
2264 echo "${ECHO_T}$cf_clang_optok" >&6
2265                 if test $cf_clang_optok = yes; then
2266                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2267
2268 echo "${as_me:-configure}:2268: testing adding option $cf_clang_opt ..." 1>&5
2269
2270         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2271         CFLAGS="${CFLAGS}$cf_clang_opt"
2272
2273                 fi
2274         done
2275 fi
2276
2277 echo "$as_me:2277: checking for $CC option to accept ANSI C" >&5
2278 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2279 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2280   echo $ECHO_N "(cached) $ECHO_C" >&6
2281 else
2282   ac_cv_prog_cc_stdc=no
2283 ac_save_CC=$CC
2284 cat >conftest.$ac_ext <<_ACEOF
2285 #line 2285 "configure"
2286 #include "confdefs.h"
2287 #include <stdarg.h>
2288 #include <stdio.h>
2289 #include <sys/types.h>
2290 #include <sys/stat.h>
2291 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2292 struct buf { int x; };
2293 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2294 static char *e (p, i)
2295      char **p;
2296      int i;
2297 {
2298   return p[i];
2299 }
2300 static char *f (char * (*g) (char **, int), char **p, ...)
2301 {
2302   char *s;
2303   va_list v;
2304   va_start (v,p);
2305   s = g (p, va_arg (v,int));
2306   va_end (v);
2307   return s;
2308 }
2309 int test (int i, double x);
2310 struct s1 {int (*f) (int a);};
2311 struct s2 {int (*f) (double a);};
2312 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2313 int argc;
2314 char **argv;
2315 int
2316 main (void)
2317 {
2318 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2319   ;
2320   return 0;
2321 }
2322 _ACEOF
2323 # Don't try gcc -ansi; that turns off useful extensions and
2324 # breaks some systems' header files.
2325 # AIX                   -qlanglvl=ansi
2326 # Ultrix and OSF/1      -std1
2327 # HP-UX 10.20 and later -Ae
2328 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2329 # SVR4                  -Xc -D__EXTENSIONS__
2330 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2331 do
2332   CC="$ac_save_CC $ac_arg"
2333   rm -f conftest.$ac_objext
2334 if { (eval echo "$as_me:2334: \"$ac_compile\"") >&5
2335   (eval $ac_compile) 2>&5
2336   ac_status=$?
2337   echo "$as_me:2337: \$? = $ac_status" >&5
2338   (exit $ac_status); } &&
2339          { ac_try='test -s conftest.$ac_objext'
2340   { (eval echo "$as_me:2340: \"$ac_try\"") >&5
2341   (eval $ac_try) 2>&5
2342   ac_status=$?
2343   echo "$as_me:2343: \$? = $ac_status" >&5
2344   (exit $ac_status); }; }; then
2345   ac_cv_prog_cc_stdc=$ac_arg
2346 break
2347 else
2348   echo "$as_me: failed program was:" >&5
2349 cat conftest.$ac_ext >&5
2350 fi
2351 rm -f conftest.$ac_objext
2352 done
2353 rm -f conftest.$ac_ext conftest.$ac_objext
2354 CC=$ac_save_CC
2355
2356 fi
2357
2358 case "x$ac_cv_prog_cc_stdc" in
2359   x|xno)
2360     echo "$as_me:2360: result: none needed" >&5
2361 echo "${ECHO_T}none needed" >&6 ;;
2362   *)
2363     echo "$as_me:2363: result: $ac_cv_prog_cc_stdc" >&5
2364 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2365     CC="$CC $ac_cv_prog_cc_stdc" ;;
2366 esac
2367
2368 # This should have been defined by AC_PROG_CC
2369 : ${CC:=cc}
2370
2371 echo "$as_me:2371: checking \$CFLAGS variable" >&5
2372 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2373 case "x$CFLAGS" in
2374 (*-[IUD]*)
2375         echo "$as_me:2375: result: broken" >&5
2376 echo "${ECHO_T}broken" >&6
2377         { echo "$as_me:2377: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2378 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2379         cf_flags="$CFLAGS"
2380         CFLAGS=
2381         for cf_arg in $cf_flags
2382         do
2383
2384 cf_fix_cppflags=no
2385 cf_new_cflags=
2386 cf_new_cppflags=
2387 cf_new_extra_cppflags=
2388
2389 for cf_add_cflags in $cf_arg
2390 do
2391 case $cf_fix_cppflags in
2392 (no)
2393         case $cf_add_cflags in
2394         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2395                 case $cf_add_cflags in
2396                 (-D*)
2397                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2398
2399                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2400                                 && test -z "${cf_tst_cflags}" \
2401                                 && cf_fix_cppflags=yes
2402
2403                         if test $cf_fix_cppflags = yes ; then
2404
2405         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2406         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2407
2408                                 continue
2409                         elif test "${cf_tst_cflags}" = "\"'" ; then
2410
2411         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2412         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2413
2414                                 continue
2415                         fi
2416                         ;;
2417                 esac
2418                 case "$CPPFLAGS" in
2419                 (*$cf_add_cflags)
2420                         ;;
2421                 (*)
2422                         case $cf_add_cflags in
2423                         (-D*)
2424                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2425
2426 CPPFLAGS=`echo "$CPPFLAGS" | \
2427         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2428                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2429
2430                                 ;;
2431                         esac
2432
2433         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2434         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2435
2436                         ;;
2437                 esac
2438                 ;;
2439         (*)
2440
2441         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2442         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2443
2444                 ;;
2445         esac
2446         ;;
2447 (yes)
2448
2449         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2450         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2451
2452         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2453
2454         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2455                 && test -z "${cf_tst_cflags}" \
2456                 && cf_fix_cppflags=no
2457         ;;
2458 esac
2459 done
2460
2461 if test -n "$cf_new_cflags" ; then
2462
2463         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2464         CFLAGS="${CFLAGS}$cf_new_cflags"
2465
2466 fi
2467
2468 if test -n "$cf_new_cppflags" ; then
2469
2470         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2471         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2472
2473 fi
2474
2475 if test -n "$cf_new_extra_cppflags" ; then
2476
2477         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2478         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2479
2480 fi
2481
2482         done
2483         ;;
2484 (*)
2485         echo "$as_me:2485: result: ok" >&5
2486 echo "${ECHO_T}ok" >&6
2487         ;;
2488 esac
2489
2490 echo "$as_me:2490: checking \$CC variable" >&5
2491 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2492 case "$CC" in
2493 (*[\ \  ]-*)
2494         echo "$as_me:2494: result: broken" >&5
2495 echo "${ECHO_T}broken" >&6
2496         { echo "$as_me:2496: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2497 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2498         # humor him...
2499         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2500         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2501         CC="$cf_prog"
2502         for cf_arg in $cf_flags
2503         do
2504                 case "x$cf_arg" in
2505                 (x-[IUDfgOW]*)
2506
2507 cf_fix_cppflags=no
2508 cf_new_cflags=
2509 cf_new_cppflags=
2510 cf_new_extra_cppflags=
2511
2512 for cf_add_cflags in $cf_arg
2513 do
2514 case $cf_fix_cppflags in
2515 (no)
2516         case $cf_add_cflags in
2517         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2518                 case $cf_add_cflags in
2519                 (-D*)
2520                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2521
2522                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2523                                 && test -z "${cf_tst_cflags}" \
2524                                 && cf_fix_cppflags=yes
2525
2526                         if test $cf_fix_cppflags = yes ; then
2527
2528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2530
2531                                 continue
2532                         elif test "${cf_tst_cflags}" = "\"'" ; then
2533
2534         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2535         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2536
2537                                 continue
2538                         fi
2539                         ;;
2540                 esac
2541                 case "$CPPFLAGS" in
2542                 (*$cf_add_cflags)
2543                         ;;
2544                 (*)
2545                         case $cf_add_cflags in
2546                         (-D*)
2547                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2548
2549 CPPFLAGS=`echo "$CPPFLAGS" | \
2550         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2551                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2552
2553                                 ;;
2554                         esac
2555
2556         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2557         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2558
2559                         ;;
2560                 esac
2561                 ;;
2562         (*)
2563
2564         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2565         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2566
2567                 ;;
2568         esac
2569         ;;
2570 (yes)
2571
2572         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2573         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2574
2575         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2576
2577         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2578                 && test -z "${cf_tst_cflags}" \
2579                 && cf_fix_cppflags=no
2580         ;;
2581 esac
2582 done
2583
2584 if test -n "$cf_new_cflags" ; then
2585
2586         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2587         CFLAGS="${CFLAGS}$cf_new_cflags"
2588
2589 fi
2590
2591 if test -n "$cf_new_cppflags" ; then
2592
2593         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2594         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2595
2596 fi
2597
2598 if test -n "$cf_new_extra_cppflags" ; then
2599
2600         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2601         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2602
2603 fi
2604
2605                         ;;
2606                 (*)
2607                         CC="$CC $cf_arg"
2608                         ;;
2609                 esac
2610         done
2611         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2612
2613 echo "${as_me:-configure}:2613: testing resulting CC: '$CC' ..." 1>&5
2614
2615         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2616
2617 echo "${as_me:-configure}:2617: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2618
2619         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2620
2621 echo "${as_me:-configure}:2621: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2622
2623         ;;
2624 (*)
2625         echo "$as_me:2625: result: ok" >&5
2626 echo "${ECHO_T}ok" >&6
2627         ;;
2628 esac
2629
2630 ac_ext=c
2631 ac_cpp='$CPP $CPPFLAGS'
2632 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2633 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2634 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2635 ac_main_return=return
2636 echo "$as_me:2636: checking how to run the C preprocessor" >&5
2637 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2638 # On Suns, sometimes $CPP names a directory.
2639 if test -n "$CPP" && test -d "$CPP"; then
2640   CPP=
2641 fi
2642 if test -z "$CPP"; then
2643   if test "${ac_cv_prog_CPP+set}" = set; then
2644   echo $ECHO_N "(cached) $ECHO_C" >&6
2645 else
2646       # Double quotes because CPP needs to be expanded
2647     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2648     do
2649       ac_preproc_ok=false
2650 for ac_c_preproc_warn_flag in '' yes
2651 do
2652   # Use a header file that comes with gcc, so configuring glibc
2653   # with a fresh cross-compiler works.
2654   # On the NeXT, cc -E runs the code through the compiler's parser,
2655   # not just through cpp. "Syntax error" is here to catch this case.
2656   cat >conftest.$ac_ext <<_ACEOF
2657 #line 2657 "configure"
2658 #include "confdefs.h"
2659 #include <assert.h>
2660                      Syntax error
2661 _ACEOF
2662 if { (eval echo "$as_me:2662: \"$ac_cpp conftest.$ac_ext\"") >&5
2663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2664   ac_status=$?
2665   egrep -v '^ *\+' conftest.er1 >conftest.err
2666   rm -f conftest.er1
2667   cat conftest.err >&5
2668   echo "$as_me:2668: \$? = $ac_status" >&5
2669   (exit $ac_status); } >/dev/null; then
2670   if test -s conftest.err; then
2671     ac_cpp_err=$ac_c_preproc_warn_flag
2672   else
2673     ac_cpp_err=
2674   fi
2675 else
2676   ac_cpp_err=yes
2677 fi
2678 if test -z "$ac_cpp_err"; then
2679   :
2680 else
2681   echo "$as_me: failed program was:" >&5
2682   cat conftest.$ac_ext >&5
2683   # Broken: fails on valid input.
2684 continue
2685 fi
2686 rm -f conftest.err conftest.$ac_ext
2687
2688   # OK, works on sane cases.  Now check whether non-existent headers
2689   # can be detected and how.
2690   cat >conftest.$ac_ext <<_ACEOF
2691 #line 2691 "configure"
2692 #include "confdefs.h"
2693 #include <ac_nonexistent.h>
2694 _ACEOF
2695 if { (eval echo "$as_me:2695: \"$ac_cpp conftest.$ac_ext\"") >&5
2696   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2697   ac_status=$?
2698   egrep -v '^ *\+' conftest.er1 >conftest.err
2699   rm -f conftest.er1
2700   cat conftest.err >&5
2701   echo "$as_me:2701: \$? = $ac_status" >&5
2702   (exit $ac_status); } >/dev/null; then
2703   if test -s conftest.err; then
2704     ac_cpp_err=$ac_c_preproc_warn_flag
2705   else
2706     ac_cpp_err=
2707   fi
2708 else
2709   ac_cpp_err=yes
2710 fi
2711 if test -z "$ac_cpp_err"; then
2712   # Broken: success on invalid input.
2713 continue
2714 else
2715   echo "$as_me: failed program was:" >&5
2716   cat conftest.$ac_ext >&5
2717   # Passes both tests.
2718 ac_preproc_ok=:
2719 break
2720 fi
2721 rm -f conftest.err conftest.$ac_ext
2722
2723 done
2724 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2725 rm -f conftest.err conftest.$ac_ext
2726 if $ac_preproc_ok; then
2727   break
2728 fi
2729
2730     done
2731     ac_cv_prog_CPP=$CPP
2732
2733 fi
2734   CPP=$ac_cv_prog_CPP
2735 else
2736   ac_cv_prog_CPP=$CPP
2737 fi
2738 echo "$as_me:2738: result: $CPP" >&5
2739 echo "${ECHO_T}$CPP" >&6
2740 ac_preproc_ok=false
2741 for ac_c_preproc_warn_flag in '' yes
2742 do
2743   # Use a header file that comes with gcc, so configuring glibc
2744   # with a fresh cross-compiler works.
2745   # On the NeXT, cc -E runs the code through the compiler's parser,
2746   # not just through cpp. "Syntax error" is here to catch this case.
2747   cat >conftest.$ac_ext <<_ACEOF
2748 #line 2748 "configure"
2749 #include "confdefs.h"
2750 #include <assert.h>
2751                      Syntax error
2752 _ACEOF
2753 if { (eval echo "$as_me:2753: \"$ac_cpp conftest.$ac_ext\"") >&5
2754   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2755   ac_status=$?
2756   egrep -v '^ *\+' conftest.er1 >conftest.err
2757   rm -f conftest.er1
2758   cat conftest.err >&5
2759   echo "$as_me:2759: \$? = $ac_status" >&5
2760   (exit $ac_status); } >/dev/null; then
2761   if test -s conftest.err; then
2762     ac_cpp_err=$ac_c_preproc_warn_flag
2763   else
2764     ac_cpp_err=
2765   fi
2766 else
2767   ac_cpp_err=yes
2768 fi
2769 if test -z "$ac_cpp_err"; then
2770   :
2771 else
2772   echo "$as_me: failed program was:" >&5
2773   cat conftest.$ac_ext >&5
2774   # Broken: fails on valid input.
2775 continue
2776 fi
2777 rm -f conftest.err conftest.$ac_ext
2778
2779   # OK, works on sane cases.  Now check whether non-existent headers
2780   # can be detected and how.
2781   cat >conftest.$ac_ext <<_ACEOF
2782 #line 2782 "configure"
2783 #include "confdefs.h"
2784 #include <ac_nonexistent.h>
2785 _ACEOF
2786 if { (eval echo "$as_me:2786: \"$ac_cpp conftest.$ac_ext\"") >&5
2787   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2788   ac_status=$?
2789   egrep -v '^ *\+' conftest.er1 >conftest.err
2790   rm -f conftest.er1
2791   cat conftest.err >&5
2792   echo "$as_me:2792: \$? = $ac_status" >&5
2793   (exit $ac_status); } >/dev/null; then
2794   if test -s conftest.err; then
2795     ac_cpp_err=$ac_c_preproc_warn_flag
2796   else
2797     ac_cpp_err=
2798   fi
2799 else
2800   ac_cpp_err=yes
2801 fi
2802 if test -z "$ac_cpp_err"; then
2803   # Broken: success on invalid input.
2804 continue
2805 else
2806   echo "$as_me: failed program was:" >&5
2807   cat conftest.$ac_ext >&5
2808   # Passes both tests.
2809 ac_preproc_ok=:
2810 break
2811 fi
2812 rm -f conftest.err conftest.$ac_ext
2813
2814 done
2815 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2816 rm -f conftest.err conftest.$ac_ext
2817 if $ac_preproc_ok; then
2818   :
2819 else
2820   { { echo "$as_me:2820: error: C preprocessor \"$CPP\" fails sanity check" >&5
2821 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2822    { (exit 1); exit 1; }; }
2823 fi
2824
2825 ac_ext=c
2826 ac_cpp='$CPP $CPPFLAGS'
2827 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2828 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2830 ac_main_return=return
2831
2832 if test $ac_cv_c_compiler_gnu = yes; then
2833     echo "$as_me:2833: checking whether $CC needs -traditional" >&5
2834 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2835 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2836   echo $ECHO_N "(cached) $ECHO_C" >&6
2837 else
2838     ac_pattern="Autoconf.*'x'"
2839   cat >conftest.$ac_ext <<_ACEOF
2840 #line 2840 "configure"
2841 #include "confdefs.h"
2842 #include <sgtty.h>
2843 int Autoconf = TIOCGETP;
2844 _ACEOF
2845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2846   egrep "$ac_pattern" >/dev/null 2>&1; then
2847   ac_cv_prog_gcc_traditional=yes
2848 else
2849   ac_cv_prog_gcc_traditional=no
2850 fi
2851 rm -rf conftest*
2852
2853   if test $ac_cv_prog_gcc_traditional = no; then
2854     cat >conftest.$ac_ext <<_ACEOF
2855 #line 2855 "configure"
2856 #include "confdefs.h"
2857 #include <termio.h>
2858 int Autoconf = TCGETA;
2859 _ACEOF
2860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2861   egrep "$ac_pattern" >/dev/null 2>&1; then
2862   ac_cv_prog_gcc_traditional=yes
2863 fi
2864 rm -rf conftest*
2865
2866   fi
2867 fi
2868 echo "$as_me:2868: result: $ac_cv_prog_gcc_traditional" >&5
2869 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2870   if test $ac_cv_prog_gcc_traditional = yes; then
2871     CC="$CC -traditional"
2872   fi
2873 fi
2874
2875 echo "$as_me:2875: checking whether $CC understands -c and -o together" >&5
2876 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2877 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2878   echo $ECHO_N "(cached) $ECHO_C" >&6
2879 else
2880
2881 cat > conftest.$ac_ext <<CF_EOF
2882 int main(void)
2883 {
2884         ${cf_cv_main_return:-return}(0);
2885 }
2886 CF_EOF
2887 # We do the test twice because some compilers refuse to overwrite an
2888 # existing .o file with -o, though they will create one.
2889 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2890 if { (eval echo "$as_me:2890: \"$ac_try\"") >&5
2891   (eval $ac_try) 2>&5
2892   ac_status=$?
2893   echo "$as_me:2893: \$? = $ac_status" >&5
2894   (exit $ac_status); } &&
2895   test -f conftest2.$ac_objext && { (eval echo "$as_me:2895: \"$ac_try\"") >&5
2896   (eval $ac_try) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); };
2900 then
2901   eval cf_cv_prog_CC_c_o=yes
2902 else
2903   eval cf_cv_prog_CC_c_o=no
2904 fi
2905 rm -rf conftest*
2906
2907 fi
2908 if test $cf_cv_prog_CC_c_o = yes; then
2909   echo "$as_me:2909: result: yes" >&5
2910 echo "${ECHO_T}yes" >&6
2911 else
2912   echo "$as_me:2912: result: no" >&5
2913 echo "${ECHO_T}no" >&6
2914 fi
2915
2916 if test "$cross_compiling" = yes ; then
2917         LDCONFIG=:
2918 else
2919         case "$cf_cv_system_name" in
2920         (dragonfly*|mirbsd*|freebsd*)
2921                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2922                 ;;
2923         (*) LDPATH=$PATH:/sbin:/usr/sbin
2924                 # Extract the first word of "ldconfig", so it can be a program name with args.
2925 set dummy ldconfig; ac_word=$2
2926 echo "$as_me:2926: checking for $ac_word" >&5
2927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2928 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2929   echo $ECHO_N "(cached) $ECHO_C" >&6
2930 else
2931   case $LDCONFIG in
2932   [\\/]* | ?:[\\/]*)
2933   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2934   ;;
2935   *)
2936   ac_save_IFS=$IFS; IFS=$ac_path_separator
2937 ac_dummy="$LDPATH"
2938 for ac_dir in $ac_dummy; do
2939   IFS=$ac_save_IFS
2940   test -z "$ac_dir" && ac_dir=.
2941   if $as_executable_p "$ac_dir/$ac_word"; then
2942    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2943    echo "$as_me:2943: found $ac_dir/$ac_word" >&5
2944    break
2945 fi
2946 done
2947
2948   ;;
2949 esac
2950 fi
2951 LDCONFIG=$ac_cv_path_LDCONFIG
2952
2953 if test -n "$LDCONFIG"; then
2954   echo "$as_me:2954: result: $LDCONFIG" >&5
2955 echo "${ECHO_T}$LDCONFIG" >&6
2956 else
2957   echo "$as_me:2957: result: no" >&5
2958 echo "${ECHO_T}no" >&6
2959 fi
2960
2961                 ;;
2962         esac
2963 fi
2964
2965 echo "$as_me:2965: checking if you want to ensure bool is consistent with C++" >&5
2966 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2967
2968 # Check whether --with-cxx or --without-cxx was given.
2969 if test "${with_cxx+set}" = set; then
2970   withval="$with_cxx"
2971   cf_with_cxx=$withval
2972 else
2973   cf_with_cxx=yes
2974 fi;
2975 echo "$as_me:2975: result: $cf_with_cxx" >&5
2976 echo "${ECHO_T}$cf_with_cxx" >&6
2977 if test "X$cf_with_cxx" = Xno ; then
2978         CXX=""
2979         GXX=""
2980 else
2981         # with autoconf 2.13, we can change the error to a warning:
2982                 ac_ext=cc
2983 ac_cpp='$CXXCPP $CPPFLAGS'
2984 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2985 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2986 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2987 ac_main_return=return
2988 if test -n "$ac_tool_prefix"; then
2989   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2990   do
2991     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2992 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2993 echo "$as_me:2993: checking for $ac_word" >&5
2994 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2995 if test "${ac_cv_prog_CXX+set}" = set; then
2996   echo $ECHO_N "(cached) $ECHO_C" >&6
2997 else
2998   if test -n "$CXX"; then
2999   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3000 else
3001   ac_save_IFS=$IFS; IFS=$ac_path_separator
3002 ac_dummy="$PATH"
3003 for ac_dir in $ac_dummy; do
3004   IFS=$ac_save_IFS
3005   test -z "$ac_dir" && ac_dir=.
3006   $as_executable_p "$ac_dir/$ac_word" || continue
3007 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3008 echo "$as_me:3008: found $ac_dir/$ac_word" >&5
3009 break
3010 done
3011
3012 fi
3013 fi
3014 CXX=$ac_cv_prog_CXX
3015 if test -n "$CXX"; then
3016   echo "$as_me:3016: result: $CXX" >&5
3017 echo "${ECHO_T}$CXX" >&6
3018 else
3019   echo "$as_me:3019: result: no" >&5
3020 echo "${ECHO_T}no" >&6
3021 fi
3022
3023     test -n "$CXX" && break
3024   done
3025 fi
3026 if test -z "$CXX"; then
3027   ac_ct_CXX=$CXX
3028   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3029 do
3030   # Extract the first word of "$ac_prog", so it can be a program name with args.
3031 set dummy $ac_prog; ac_word=$2
3032 echo "$as_me:3032: checking for $ac_word" >&5
3033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3034 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3035   echo $ECHO_N "(cached) $ECHO_C" >&6
3036 else
3037   if test -n "$ac_ct_CXX"; then
3038   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3039 else
3040   ac_save_IFS=$IFS; IFS=$ac_path_separator
3041 ac_dummy="$PATH"
3042 for ac_dir in $ac_dummy; do
3043   IFS=$ac_save_IFS
3044   test -z "$ac_dir" && ac_dir=.
3045   $as_executable_p "$ac_dir/$ac_word" || continue
3046 ac_cv_prog_ac_ct_CXX="$ac_prog"
3047 echo "$as_me:3047: found $ac_dir/$ac_word" >&5
3048 break
3049 done
3050
3051 fi
3052 fi
3053 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3054 if test -n "$ac_ct_CXX"; then
3055   echo "$as_me:3055: result: $ac_ct_CXX" >&5
3056 echo "${ECHO_T}$ac_ct_CXX" >&6
3057 else
3058   echo "$as_me:3058: result: no" >&5
3059 echo "${ECHO_T}no" >&6
3060 fi
3061
3062   test -n "$ac_ct_CXX" && break
3063 done
3064 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3065
3066   CXX=$ac_ct_CXX
3067 fi
3068
3069 # Provide some information about the compiler.
3070 echo "$as_me:3070:" \
3071      "checking for C++ compiler version" >&5
3072 ac_compiler=`set X $ac_compile; echo $2`
3073 { (eval echo "$as_me:3073: \"$ac_compiler --version </dev/null >&5\"") >&5
3074   (eval $ac_compiler --version </dev/null >&5) 2>&5
3075   ac_status=$?
3076   echo "$as_me:3076: \$? = $ac_status" >&5
3077   (exit $ac_status); }
3078 { (eval echo "$as_me:3078: \"$ac_compiler -v </dev/null >&5\"") >&5
3079   (eval $ac_compiler -v </dev/null >&5) 2>&5
3080   ac_status=$?
3081   echo "$as_me:3081: \$? = $ac_status" >&5
3082   (exit $ac_status); }
3083 { (eval echo "$as_me:3083: \"$ac_compiler -V </dev/null >&5\"") >&5
3084   (eval $ac_compiler -V </dev/null >&5) 2>&5
3085   ac_status=$?
3086   echo "$as_me:3086: \$? = $ac_status" >&5
3087   (exit $ac_status); }
3088
3089 echo "$as_me:3089: checking whether we are using the GNU C++ compiler" >&5
3090 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3091 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3092   echo $ECHO_N "(cached) $ECHO_C" >&6
3093 else
3094   cat >conftest.$ac_ext <<_ACEOF
3095 #line 3095 "configure"
3096 #include "confdefs.h"
3097
3098 int
3099 main (void)
3100 {
3101 #ifndef __GNUC__
3102        choke me
3103 #endif
3104
3105   ;
3106   return 0;
3107 }
3108 _ACEOF
3109 rm -f conftest.$ac_objext
3110 if { (eval echo "$as_me:3110: \"$ac_compile\"") >&5
3111   (eval $ac_compile) 2>&5
3112   ac_status=$?
3113   echo "$as_me:3113: \$? = $ac_status" >&5
3114   (exit $ac_status); } &&
3115          { ac_try='test -s conftest.$ac_objext'
3116   { (eval echo "$as_me:3116: \"$ac_try\"") >&5
3117   (eval $ac_try) 2>&5
3118   ac_status=$?
3119   echo "$as_me:3119: \$? = $ac_status" >&5
3120   (exit $ac_status); }; }; then
3121   ac_compiler_gnu=yes
3122 else
3123   echo "$as_me: failed program was:" >&5
3124 cat conftest.$ac_ext >&5
3125 ac_compiler_gnu=no
3126 fi
3127 rm -f conftest.$ac_objext conftest.$ac_ext
3128 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3129
3130 fi
3131 echo "$as_me:3131: result: $ac_cv_cxx_compiler_gnu" >&5
3132 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3133 GXX=`test $ac_compiler_gnu = yes && echo yes`
3134 ac_test_CXXFLAGS=${CXXFLAGS+set}
3135 ac_save_CXXFLAGS=$CXXFLAGS
3136 CXXFLAGS="-g"
3137 echo "$as_me:3137: checking whether $CXX accepts -g" >&5
3138 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3139 if test "${ac_cv_prog_cxx_g+set}" = set; then
3140   echo $ECHO_N "(cached) $ECHO_C" >&6
3141 else
3142   cat >conftest.$ac_ext <<_ACEOF
3143 #line 3143 "configure"
3144 #include "confdefs.h"
3145
3146 int
3147 main (void)
3148 {
3149
3150   ;
3151   return 0;
3152 }
3153 _ACEOF
3154 rm -f conftest.$ac_objext
3155 if { (eval echo "$as_me:3155: \"$ac_compile\"") >&5
3156   (eval $ac_compile) 2>&5
3157   ac_status=$?
3158   echo "$as_me:3158: \$? = $ac_status" >&5
3159   (exit $ac_status); } &&
3160          { ac_try='test -s conftest.$ac_objext'
3161   { (eval echo "$as_me:3161: \"$ac_try\"") >&5
3162   (eval $ac_try) 2>&5
3163   ac_status=$?
3164   echo "$as_me:3164: \$? = $ac_status" >&5
3165   (exit $ac_status); }; }; then
3166   ac_cv_prog_cxx_g=yes
3167 else
3168   echo "$as_me: failed program was:" >&5
3169 cat conftest.$ac_ext >&5
3170 ac_cv_prog_cxx_g=no
3171 fi
3172 rm -f conftest.$ac_objext conftest.$ac_ext
3173 fi
3174 echo "$as_me:3174: result: $ac_cv_prog_cxx_g" >&5
3175 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3176 if test "$ac_test_CXXFLAGS" = set; then
3177   CXXFLAGS=$ac_save_CXXFLAGS
3178 elif test $ac_cv_prog_cxx_g = yes; then
3179   if test "$GXX" = yes; then
3180     CXXFLAGS="-g -O2"
3181   else
3182     CXXFLAGS="-g"
3183   fi
3184 else
3185   if test "$GXX" = yes; then
3186     CXXFLAGS="-O2"
3187   else
3188     CXXFLAGS=
3189   fi
3190 fi
3191 for ac_declaration in \
3192    ''\
3193    '#include <stdlib.h>' \
3194    'extern "C" void std::exit (int) throw (); using std::exit;' \
3195    'extern "C" void std::exit (int); using std::exit;' \
3196    'extern "C" void exit (int) throw ();' \
3197    'extern "C" void exit (int);' \
3198    'void exit (int);'
3199 do
3200   cat >conftest.$ac_ext <<_ACEOF
3201 #line 3201 "configure"
3202 #include "confdefs.h"
3203 #include <stdlib.h>
3204 $ac_declaration
3205 int
3206 main (void)
3207 {
3208 exit (42);
3209   ;
3210   return 0;
3211 }
3212 _ACEOF
3213 rm -f conftest.$ac_objext
3214 if { (eval echo "$as_me:3214: \"$ac_compile\"") >&5
3215   (eval $ac_compile) 2>&5
3216   ac_status=$?
3217   echo "$as_me:3217: \$? = $ac_status" >&5
3218   (exit $ac_status); } &&
3219          { ac_try='test -s conftest.$ac_objext'
3220   { (eval echo "$as_me:3220: \"$ac_try\"") >&5
3221   (eval $ac_try) 2>&5
3222   ac_status=$?
3223   echo "$as_me:3223: \$? = $ac_status" >&5
3224   (exit $ac_status); }; }; then
3225   :
3226 else
3227   echo "$as_me: failed program was:" >&5
3228 cat conftest.$ac_ext >&5
3229 continue
3230 fi
3231 rm -f conftest.$ac_objext conftest.$ac_ext
3232   cat >conftest.$ac_ext <<_ACEOF
3233 #line 3233 "configure"
3234 #include "confdefs.h"
3235 $ac_declaration
3236 int
3237 main (void)
3238 {
3239 exit (42);
3240   ;
3241   return 0;
3242 }
3243 _ACEOF
3244 rm -f conftest.$ac_objext
3245 if { (eval echo "$as_me:3245: \"$ac_compile\"") >&5
3246   (eval $ac_compile) 2>&5
3247   ac_status=$?
3248   echo "$as_me:3248: \$? = $ac_status" >&5
3249   (exit $ac_status); } &&
3250          { ac_try='test -s conftest.$ac_objext'
3251   { (eval echo "$as_me:3251: \"$ac_try\"") >&5
3252   (eval $ac_try) 2>&5
3253   ac_status=$?
3254   echo "$as_me:3254: \$? = $ac_status" >&5
3255   (exit $ac_status); }; }; then
3256   break
3257 else
3258   echo "$as_me: failed program was:" >&5
3259 cat conftest.$ac_ext >&5
3260 fi
3261 rm -f conftest.$ac_objext conftest.$ac_ext
3262 done
3263 rm -rf conftest*
3264 if test -n "$ac_declaration"; then
3265   echo '#ifdef __cplusplus' >>confdefs.h
3266   echo $ac_declaration      >>confdefs.h
3267   echo '#endif'             >>confdefs.h
3268 fi
3269
3270 ac_ext=c
3271 ac_cpp='$CPP $CPPFLAGS'
3272 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3273 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3274 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3275 ac_main_return=return
3276
3277         ac_ext=cc
3278 ac_cpp='$CXXCPP $CPPFLAGS'
3279 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3280 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3281 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3282 ac_main_return=return
3283
3284         if test "x$cf_with_cxx" != xno
3285         then
3286                 # Several of the C++ configurations do not work, particularly when
3287                 # cross-compiling (20140913 -TD)
3288                 echo "$as_me:3288: checking if $CXX works" >&5
3289 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3290
3291                 save_CPPFLAGS="$CPPFLAGS"
3292                 eval cf_includedir=${includedir}
3293                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3294
3295 cat >conftest.$ac_ext <<_ACEOF
3296 #line 3296 "configure"
3297 #include "confdefs.h"
3298
3299 #include <stdlib.h>
3300 #include <stdio.h>
3301
3302 int
3303 main (void)
3304 {
3305
3306                 printf("Hello world!\n")
3307
3308   ;
3309   return 0;
3310 }
3311 _ACEOF
3312 rm -f conftest.$ac_objext
3313 if { (eval echo "$as_me:3313: \"$ac_compile\"") >&5
3314   (eval $ac_compile) 2>&5
3315   ac_status=$?
3316   echo "$as_me:3316: \$? = $ac_status" >&5
3317   (exit $ac_status); } &&
3318          { ac_try='test -s conftest.$ac_objext'
3319   { (eval echo "$as_me:3319: \"$ac_try\"") >&5
3320   (eval $ac_try) 2>&5
3321   ac_status=$?
3322   echo "$as_me:3322: \$? = $ac_status" >&5
3323   (exit $ac_status); }; }; then
3324   cf_cxx_works=yes
3325 else
3326   echo "$as_me: failed program was:" >&5
3327 cat conftest.$ac_ext >&5
3328 cf_cxx_works=no
3329 fi
3330 rm -f conftest.$ac_objext conftest.$ac_ext
3331                 CPPFLAGS="$save_CPPFLAGS"
3332
3333                 echo "$as_me:3333: result: $cf_cxx_works" >&5
3334 echo "${ECHO_T}$cf_cxx_works" >&6
3335                 if test "x$cf_cxx_works" = xno
3336                 then
3337                         { echo "$as_me:3337: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3338 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3339                         cf_with_cxx=no; CXX=""; GXX="";
3340                 fi
3341         fi
3342         ac_ext=c
3343 ac_cpp='$CPP $CPPFLAGS'
3344 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3345 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3346 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3347 ac_main_return=return
3348
3349         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3350         if test "$CXX" = "g++" ; then
3351                 # Extract the first word of "g++", so it can be a program name with args.
3352 set dummy g++; ac_word=$2
3353 echo "$as_me:3353: checking for $ac_word" >&5
3354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3355 if test "${ac_cv_path_CXX+set}" = set; then
3356   echo $ECHO_N "(cached) $ECHO_C" >&6
3357 else
3358   case $CXX in
3359   [\\/]* | ?:[\\/]*)
3360   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3361   ;;
3362   *)
3363   ac_save_IFS=$IFS; IFS=$ac_path_separator
3364 ac_dummy="$PATH"
3365 for ac_dir in $ac_dummy; do
3366   IFS=$ac_save_IFS
3367   test -z "$ac_dir" && ac_dir=.
3368   if $as_executable_p "$ac_dir/$ac_word"; then
3369    ac_cv_path_CXX="$ac_dir/$ac_word"
3370    echo "$as_me:3370: found $ac_dir/$ac_word" >&5
3371    break
3372 fi
3373 done
3374
3375   ;;
3376 esac
3377 fi
3378 CXX=$ac_cv_path_CXX
3379
3380 if test -n "$CXX"; then
3381   echo "$as_me:3381: result: $CXX" >&5
3382 echo "${ECHO_T}$CXX" >&6
3383 else
3384   echo "$as_me:3384: result: no" >&5
3385 echo "${ECHO_T}no" >&6
3386 fi
3387
3388         fi
3389         case "x$CXX" in
3390         (x|xg++)
3391                 { echo "$as_me:3391: WARNING: You don't have any C++ compiler, too bad" >&5
3392 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3393                 cf_with_cxx=no; CXX=""; GXX="";
3394                 ;;
3395         esac
3396 fi
3397
3398 GXX_VERSION=none
3399 if test "$GXX" = yes; then
3400         echo "$as_me:3400: checking version of ${CXX:-g++}" >&5
3401 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3402         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3403         if test -z "$GXX_VERSION"
3404         then
3405                 GXX_VERSION=unknown
3406                 GXX=no
3407         fi
3408         echo "$as_me:3408: result: $GXX_VERSION" >&5
3409 echo "${ECHO_T}$GXX_VERSION" >&6
3410 fi
3411
3412 case $GXX_VERSION in
3413 ([1-9][0-9].*)
3414         ;;
3415 (1.*|2.[0-6]*)
3416         { echo "$as_me:3416: WARNING: templates do not work" >&5
3417 echo "$as_me: WARNING: templates do not work" >&2;}
3418         ;;
3419 esac
3420
3421 echo "$as_me:3421: checking if you want to build C++ binding and demo" >&5
3422 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3423
3424 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3425 if test "${with_cxx_binding+set}" = set; then
3426   withval="$with_cxx_binding"
3427   cf_with_cxx_binding=$withval
3428 else
3429   cf_with_cxx_binding=$cf_with_cxx
3430 fi;
3431 echo "$as_me:3431: result: $cf_with_cxx_binding" >&5
3432 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3433
3434 echo "$as_me:3434: checking if you want to build with Ada" >&5
3435 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3436 echo "$as_me:3436: result: $cf_with_ada" >&5
3437 echo "${ECHO_T}$cf_with_ada" >&6
3438
3439 echo "$as_me:3439: checking if you want to install terminal database" >&5
3440 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3441
3442 # Check whether --enable-db-install or --disable-db-install was given.
3443 if test "${enable_db_install+set}" = set; then
3444   enableval="$enable_db_install"
3445   cf_with_db_install=$enableval
3446 else
3447   cf_with_db_install=yes
3448 fi;
3449 echo "$as_me:3449: result: $cf_with_db_install" >&5
3450 echo "${ECHO_T}$cf_with_db_install" >&6
3451
3452 echo "$as_me:3452: checking if you want to install manpages" >&5
3453 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3454
3455 # Check whether --with-manpages or --without-manpages was given.
3456 if test "${with_manpages+set}" = set; then
3457   withval="$with_manpages"
3458   cf_with_manpages=$withval
3459 else
3460   cf_with_manpages=yes
3461 fi;
3462 echo "$as_me:3462: result: $cf_with_manpages" >&5
3463 echo "${ECHO_T}$cf_with_manpages" >&6
3464
3465 echo "$as_me:3465: checking if you want to build programs such as tic" >&5
3466 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3467
3468 # Check whether --with-progs or --without-progs was given.
3469 if test "${with_progs+set}" = set; then
3470   withval="$with_progs"
3471   cf_with_progs=$withval
3472 else
3473   cf_with_progs=yes
3474 fi;
3475 echo "$as_me:3475: result: $cf_with_progs" >&5
3476 echo "${ECHO_T}$cf_with_progs" >&6
3477
3478 if test -f $srcdir/tack/tack.h; then
3479         if test "x$cross_compiling" = xyes ; then
3480                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3481
3482 echo "${as_me:-configure}:3482: testing ignoring tack because we are cross-compiling ..." 1>&5
3483
3484                 cf_with_tack=no
3485         else
3486                 echo "$as_me:3486: checking if you want to build the tack program" >&5
3487 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3488
3489 # Check whether --with-tack or --without-tack was given.
3490 if test "${with_tack+set}" = set; then
3491   withval="$with_tack"
3492   cf_with_tack=$withval
3493 else
3494   cf_with_tack=$cf_with_progs
3495 fi;
3496                 echo "$as_me:3496: result: $cf_with_tack" >&5
3497 echo "${ECHO_T}$cf_with_tack" >&6
3498         fi
3499 else
3500         cf_with_tack=no
3501 fi
3502
3503 echo "$as_me:3503: checking if you want to build test-programs" >&5
3504 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3505
3506 # Check whether --with-tests or --without-tests was given.
3507 if test "${with_tests+set}" = set; then
3508   withval="$with_tests"
3509   cf_with_tests=$withval
3510 else
3511   cf_with_tests=yes
3512 fi;
3513 echo "$as_me:3513: result: $cf_with_tests" >&5
3514 echo "${ECHO_T}$cf_with_tests" >&6
3515
3516 echo "$as_me:3516: checking if you wish to install curses.h" >&5
3517 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3518
3519 # Check whether --with-curses-h or --without-curses-h was given.
3520 if test "${with_curses_h+set}" = set; then
3521   withval="$with_curses_h"
3522   with_curses_h=$withval
3523 else
3524   with_curses_h=yes
3525 fi;
3526 echo "$as_me:3526: result: $with_curses_h" >&5
3527 echo "${ECHO_T}$with_curses_h" >&6
3528
3529 modules_to_build="ncurses"
3530 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3531 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3532 modules_to_build="$modules_to_build panel menu form"
3533
3534 test "$program_prefix" != NONE &&
3535   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3536 # Use a double $ so make ignores it.
3537 test "$program_suffix" != NONE &&
3538   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3539 # Double any \ or $.  echo might interpret backslashes.
3540 # By default was `s,x,x', remove it if useless.
3541 cat <<\_ACEOF >conftest.sed
3542 s/[\\$]/&&/g;s/;s,x,x,$//
3543 _ACEOF
3544 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3545 rm conftest.sed
3546
3547 for ac_prog in mawk gawk nawk awk
3548 do
3549   # Extract the first word of "$ac_prog", so it can be a program name with args.
3550 set dummy $ac_prog; ac_word=$2
3551 echo "$as_me:3551: checking for $ac_word" >&5
3552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3553 if test "${ac_cv_prog_AWK+set}" = set; then
3554   echo $ECHO_N "(cached) $ECHO_C" >&6
3555 else
3556   if test -n "$AWK"; then
3557   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3558 else
3559   ac_save_IFS=$IFS; IFS=$ac_path_separator
3560 ac_dummy="$PATH"
3561 for ac_dir in $ac_dummy; do
3562   IFS=$ac_save_IFS
3563   test -z "$ac_dir" && ac_dir=.
3564   $as_executable_p "$ac_dir/$ac_word" || continue
3565 ac_cv_prog_AWK="$ac_prog"
3566 echo "$as_me:3566: found $ac_dir/$ac_word" >&5
3567 break
3568 done
3569
3570 fi
3571 fi
3572 AWK=$ac_cv_prog_AWK
3573 if test -n "$AWK"; then
3574   echo "$as_me:3574: result: $AWK" >&5
3575 echo "${ECHO_T}$AWK" >&6
3576 else
3577   echo "$as_me:3577: result: no" >&5
3578 echo "${ECHO_T}no" >&6
3579 fi
3580
3581   test -n "$AWK" && break
3582 done
3583
3584 test -z "$AWK" && { { echo "$as_me:3584: error: No awk program found" >&5
3585 echo "$as_me: error: No awk program found" >&2;}
3586    { (exit 1); exit 1; }; }
3587
3588 echo "$as_me:3588: checking for egrep" >&5
3589 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3590 if test "${ac_cv_prog_egrep+set}" = set; then
3591   echo $ECHO_N "(cached) $ECHO_C" >&6
3592 else
3593   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3594                 then ac_cv_prog_egrep='grep -E'
3595                 else ac_cv_prog_egrep='egrep'
3596         fi
3597 fi
3598 echo "$as_me:3598: result: $ac_cv_prog_egrep" >&5
3599 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3600         EGREP=$ac_cv_prog_egrep
3601
3602         test -z "$EGREP" && { { echo "$as_me:3602: error: No egrep program found" >&5
3603 echo "$as_me: error: No egrep program found" >&2;}
3604    { (exit 1); exit 1; }; }
3605
3606 # Find a good install program.  We prefer a C program (faster),
3607 # so one script is as good as another.  But avoid the broken or
3608 # incompatible versions:
3609 # SysV /etc/install, /usr/sbin/install
3610 # SunOS /usr/etc/install
3611 # IRIX /sbin/install
3612 # AIX /bin/install
3613 # AmigaOS /C/install, which installs bootblocks on floppy discs
3614 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3615 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3616 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3617 # ./install, which can be erroneously created by make from ./install.sh.
3618 echo "$as_me:3618: checking for a BSD compatible install" >&5
3619 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3620 if test -z "$INSTALL"; then
3621 if test "${ac_cv_path_install+set}" = set; then
3622   echo $ECHO_N "(cached) $ECHO_C" >&6
3623 else
3624     ac_save_IFS=$IFS; IFS=$ac_path_separator
3625   for ac_dir in $PATH; do
3626     IFS=$ac_save_IFS
3627     # Account for people who put trailing slashes in PATH elements.
3628     case $ac_dir/ in
3629     / | ./ | .// | /cC/* \
3630     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3631     | /usr/ucb/* ) ;;
3632     *)
3633       # OSF1 and SCO ODT 3.0 have their own names for install.
3634       # Don't use installbsd from OSF since it installs stuff as root
3635       # by default.
3636       for ac_prog in ginstall scoinst install; do
3637         if $as_executable_p "$ac_dir/$ac_prog"; then
3638           if test $ac_prog = install &&
3639             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3640             # AIX install.  It has an incompatible calling convention.
3641             :
3642           elif test $ac_prog = install &&
3643             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3644             # program-specific install script used by HP pwplus--don't use.
3645             :
3646           else
3647             ac_cv_path_install="$ac_dir/$ac_prog -c"
3648             break 2
3649           fi
3650         fi
3651       done
3652       ;;
3653     esac
3654   done
3655
3656 fi
3657   if test "${ac_cv_path_install+set}" = set; then
3658     INSTALL=$ac_cv_path_install
3659   else
3660     # As a last resort, use the slow shell script.  We don't cache a
3661     # path for INSTALL within a source directory, because that will
3662     # break other packages using the cache if that directory is
3663     # removed, or if the path is relative.
3664     INSTALL=$ac_install_sh
3665   fi
3666 fi
3667 echo "$as_me:3667: result: $INSTALL" >&5
3668 echo "${ECHO_T}$INSTALL" >&6
3669
3670 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3671 # It thinks the first close brace ends the variable substitution.
3672 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3673
3674 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3675
3676 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3677
3678 case $INSTALL in
3679 (/*)
3680         ;;
3681 (*)
3682         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3683         test -z "$cf_dir" && cf_dir=.
3684         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3685         ;;
3686 esac
3687
3688 for ac_prog in lint cppcheck splint
3689 do
3690   # Extract the first word of "$ac_prog", so it can be a program name with args.
3691 set dummy $ac_prog; ac_word=$2
3692 echo "$as_me:3692: checking for $ac_word" >&5
3693 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3694 if test "${ac_cv_prog_LINT+set}" = set; then
3695   echo $ECHO_N "(cached) $ECHO_C" >&6
3696 else
3697   if test -n "$LINT"; then
3698   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3699 else
3700   ac_save_IFS=$IFS; IFS=$ac_path_separator
3701 ac_dummy="$PATH"
3702 for ac_dir in $ac_dummy; do
3703   IFS=$ac_save_IFS
3704   test -z "$ac_dir" && ac_dir=.
3705   $as_executable_p "$ac_dir/$ac_word" || continue
3706 ac_cv_prog_LINT="$ac_prog"
3707 echo "$as_me:3707: found $ac_dir/$ac_word" >&5
3708 break
3709 done
3710
3711 fi
3712 fi
3713 LINT=$ac_cv_prog_LINT
3714 if test -n "$LINT"; then
3715   echo "$as_me:3715: result: $LINT" >&5
3716 echo "${ECHO_T}$LINT" >&6
3717 else
3718   echo "$as_me:3718: result: no" >&5
3719 echo "${ECHO_T}no" >&6
3720 fi
3721
3722   test -n "$LINT" && break
3723 done
3724
3725 case "x$LINT" in
3726 (xcppcheck|x*/cppcheck)
3727         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3728         ;;
3729 esac
3730
3731 echo "$as_me:3731: checking whether ln -s works" >&5
3732 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3733 LN_S=$as_ln_s
3734 if test "$LN_S" = "ln -s"; then
3735   echo "$as_me:3735: result: yes" >&5
3736 echo "${ECHO_T}yes" >&6
3737 else
3738   echo "$as_me:3738: result: no, using $LN_S" >&5
3739 echo "${ECHO_T}no, using $LN_S" >&6
3740 fi
3741
3742 echo "$as_me:3742: checking if $LN_S -f options work" >&5
3743 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3744
3745 rm -f conf$$.src conf$$dst
3746 echo >conf$$.dst
3747 echo first >conf$$.src
3748 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3749         cf_prog_ln_sf=yes
3750 else
3751         cf_prog_ln_sf=no
3752 fi
3753 rm -f conf$$.dst conf$$src
3754 echo "$as_me:3754: result: $cf_prog_ln_sf" >&5
3755 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3756
3757 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3758
3759 echo "$as_me:3759: checking for long file names" >&5
3760 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3761 if test "${ac_cv_sys_long_file_names+set}" = set; then
3762   echo $ECHO_N "(cached) $ECHO_C" >&6
3763 else
3764   ac_cv_sys_long_file_names=yes
3765 # Test for long file names in all the places we know might matter:
3766 #      .                the current directory, where building will happen
3767 #      $prefix/lib      where we will be installing things
3768 #      $exec_prefix/lib likewise
3769 # eval it to expand exec_prefix.
3770 #      $TMPDIR          if set, where it might want to write temporary files
3771 # if $TMPDIR is not set:
3772 #      /tmp             where it might want to write temporary files
3773 #      /var/tmp         likewise
3774 #      /usr/tmp         likewise
3775 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3776   ac_tmpdirs=$TMPDIR
3777 else
3778   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3779 fi
3780 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3781   test -d $ac_dir || continue
3782   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3783   ac_xdir=$ac_dir/cf$$
3784   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3785   ac_tf1=$ac_xdir/conftest9012345
3786   ac_tf2=$ac_xdir/conftest9012346
3787   (echo 1 >$ac_tf1) 2>/dev/null
3788   (echo 2 >$ac_tf2) 2>/dev/null
3789   ac_val=`cat $ac_tf1 2>/dev/null`
3790   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3791     ac_cv_sys_long_file_names=no
3792     rm -rf $ac_xdir 2>/dev/null
3793     break
3794   fi
3795   rm -rf $ac_xdir 2>/dev/null
3796 done
3797 fi
3798 echo "$as_me:3798: result: $ac_cv_sys_long_file_names" >&5
3799 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3800 if test $ac_cv_sys_long_file_names = yes; then
3801
3802 cat >>confdefs.h <<\EOF
3803 #define HAVE_LONG_FILE_NAMES 1
3804 EOF
3805
3806 fi
3807
3808 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3809 # of package conflict.
3810 cf_config_suffix=
3811
3812 # Check whether --with-config-suffix or --without-config-suffix was given.
3813 if test "${with_config_suffix+set}" = set; then
3814   withval="$with_config_suffix"
3815   case "x$withval" in
3816         (xyes|xno)
3817                 { echo "$as_me:3817: WARNING: expected a value for config-suffix option" >&5
3818 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3819                 ;;
3820         (*)     cf_config_suffix="$withval"
3821                 ;;
3822         esac
3823 fi;
3824
3825 # If we find pkg-config, check if we should install the ".pc" files.
3826
3827 echo "$as_me:3827: checking if you want to use pkg-config" >&5
3828 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3829
3830 # Check whether --with-pkg-config or --without-pkg-config was given.
3831 if test "${with_pkg_config+set}" = set; then
3832   withval="$with_pkg_config"
3833   cf_pkg_config=$withval
3834 else
3835   cf_pkg_config=yes
3836 fi;
3837 echo "$as_me:3837: result: $cf_pkg_config" >&5
3838 echo "${ECHO_T}$cf_pkg_config" >&6
3839
3840 case $cf_pkg_config in
3841 (no)
3842         PKG_CONFIG=none
3843         ;;
3844 (yes)
3845
3846 if test -n "$ac_tool_prefix"; then
3847   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3848 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3849 echo "$as_me:3849: checking for $ac_word" >&5
3850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3851 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3852   echo $ECHO_N "(cached) $ECHO_C" >&6
3853 else
3854   case $PKG_CONFIG in
3855   [\\/]* | ?:[\\/]*)
3856   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3857   ;;
3858   *)
3859   ac_save_IFS=$IFS; IFS=$ac_path_separator
3860 ac_dummy="$PATH"
3861 for ac_dir in $ac_dummy; do
3862   IFS=$ac_save_IFS
3863   test -z "$ac_dir" && ac_dir=.
3864   if $as_executable_p "$ac_dir/$ac_word"; then
3865    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3866    echo "$as_me:3866: found $ac_dir/$ac_word" >&5
3867    break
3868 fi
3869 done
3870
3871   ;;
3872 esac
3873 fi
3874 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3875
3876 if test -n "$PKG_CONFIG"; then
3877   echo "$as_me:3877: result: $PKG_CONFIG" >&5
3878 echo "${ECHO_T}$PKG_CONFIG" >&6
3879 else
3880   echo "$as_me:3880: result: no" >&5
3881 echo "${ECHO_T}no" >&6
3882 fi
3883
3884 fi
3885 if test -z "$ac_cv_path_PKG_CONFIG"; then
3886   ac_pt_PKG_CONFIG=$PKG_CONFIG
3887   # Extract the first word of "pkg-config", so it can be a program name with args.
3888 set dummy pkg-config; ac_word=$2
3889 echo "$as_me:3889: checking for $ac_word" >&5
3890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3891 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3892   echo $ECHO_N "(cached) $ECHO_C" >&6
3893 else
3894   case $ac_pt_PKG_CONFIG in
3895   [\\/]* | ?:[\\/]*)
3896   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3897   ;;
3898   *)
3899   ac_save_IFS=$IFS; IFS=$ac_path_separator
3900 ac_dummy="$PATH"
3901 for ac_dir in $ac_dummy; do
3902   IFS=$ac_save_IFS
3903   test -z "$ac_dir" && ac_dir=.
3904   if $as_executable_p "$ac_dir/$ac_word"; then
3905    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3906    echo "$as_me:3906: found $ac_dir/$ac_word" >&5
3907    break
3908 fi
3909 done
3910
3911   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3912   ;;
3913 esac
3914 fi
3915 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3916
3917 if test -n "$ac_pt_PKG_CONFIG"; then
3918   echo "$as_me:3918: result: $ac_pt_PKG_CONFIG" >&5
3919 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3920 else
3921   echo "$as_me:3921: result: no" >&5
3922 echo "${ECHO_T}no" >&6
3923 fi
3924
3925   PKG_CONFIG=$ac_pt_PKG_CONFIG
3926 else
3927   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3928 fi
3929
3930         ;;
3931 (*)
3932         PKG_CONFIG=$withval
3933         ;;
3934 esac
3935
3936 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3937 if test "$PKG_CONFIG" != none ; then
3938
3939 if test "x$prefix" != xNONE; then
3940         cf_path_syntax="$prefix"
3941 else
3942         cf_path_syntax="$ac_default_prefix"
3943 fi
3944
3945 case ".$PKG_CONFIG" in
3946 (.\$\(*\)*|.\'*\'*)
3947         ;;
3948 (..|./*|.\\*)
3949         ;;
3950 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3951         ;;
3952 (.\${*prefix}*|.\${*dir}*)
3953         eval PKG_CONFIG="$PKG_CONFIG"
3954         case ".$PKG_CONFIG" in
3955         (.NONE/*)
3956                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3957                 ;;
3958         esac
3959         ;;
3960 (.no|.NONE/*)
3961         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3962         ;;
3963 (*)
3964         { { echo "$as_me:3964: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3965 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3966    { (exit 1); exit 1; }; }
3967         ;;
3968 esac
3969
3970 elif test "x$cf_pkg_config" != xno ; then
3971         { echo "$as_me:3971: WARNING: pkg-config is not installed" >&5
3972 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3973 fi
3974
3975 case $PKG_CONFIG in
3976 (no|none|yes)
3977         echo "$as_me:3977: checking for pkg-config library directory" >&5
3978 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3979         ;;
3980 (*)
3981         echo "$as_me:3981: checking for $PKG_CONFIG library directory" >&5
3982 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3983         ;;
3984 esac
3985
3986 PKG_CONFIG_LIBDIR=no
3987
3988 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3989 if test "${with_pkg_config_libdir+set}" = set; then
3990   withval="$with_pkg_config_libdir"
3991   PKG_CONFIG_LIBDIR=$withval
3992 else
3993   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3994 fi;
3995
3996 case x$PKG_CONFIG_LIBDIR in
3997 (x/*)
3998         ;;
3999 (xyes)
4000         # Look for the library directory using the same prefix as the executable
4001         if test "x$PKG_CONFIG" = xnone
4002         then
4003                 cf_path=$prefix
4004         else
4005                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4006         fi
4007
4008         # If you don't like using the default architecture, you have to specify the
4009         # intended library directory and corresponding compiler/linker options.
4010         #
4011         # This case allows for Debian's 2014-flavor of multiarch, along with the
4012         # most common variations before that point.  Some other variants spell the
4013         # directory differently, e.g., "pkg-config", and put it in unusual places.
4014         # pkg-config has always been poorly standardized, which is ironic...
4015         case x`(arch) 2>/dev/null` in
4016         (*64)
4017                 cf_search_path="\
4018                         $cf_path/lib/*64-linux-gnu \
4019                         $cf_path/share \
4020                         $cf_path/lib64 \
4021                         $cf_path/lib32 \
4022                         $cf_path/lib"
4023                 ;;
4024         (*)
4025                 cf_search_path="\
4026                         $cf_path/lib/*-linux-gnu \
4027                         $cf_path/share \
4028                         $cf_path/lib32 \
4029                         $cf_path/lib \
4030                         $cf_path/libdata"
4031                 ;;
4032         esac
4033
4034         test -n "$verbose" && echo "    list..." 1>&6
4035
4036 echo "${as_me:-configure}:4036: testing list... ..." 1>&5
4037
4038         for cf_config in $cf_search_path
4039         do
4040                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4041
4042 echo "${as_me:-configure}:4042: testing checking $cf_config/pkgconfig ..." 1>&5
4043
4044                 if test -d $cf_config/pkgconfig
4045                 then
4046                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4047                         echo "$as_me:4047: checking done" >&5
4048 echo $ECHO_N "checking done... $ECHO_C" >&6
4049                         break
4050                 fi
4051         done
4052         ;;
4053 (*)
4054         ;;
4055 esac
4056
4057 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4058         echo "$as_me:4058: result: $PKG_CONFIG_LIBDIR" >&5
4059 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4060 fi
4061
4062 if test "x$PKG_CONFIG" != xnone
4063 then
4064         echo "$as_me:4064: checking if we should install .pc files for $PKG_CONFIG" >&5
4065 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4066 else
4067         echo "$as_me:4067: checking if we should install .pc files" >&5
4068 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4069 fi
4070
4071 # Check whether --enable-pc-files or --disable-pc-files was given.
4072 if test "${enable_pc_files+set}" = set; then
4073   enableval="$enable_pc_files"
4074   enable_pc_files=$enableval
4075 else
4076   enable_pc_files=no
4077 fi;
4078 echo "$as_me:4078: result: $enable_pc_files" >&5
4079 echo "${ECHO_T}$enable_pc_files" >&6
4080
4081 if test "x$enable_pc_files" != xno
4082 then
4083         MAKE_PC_FILES=
4084         case "x$PKG_CONFIG_LIBDIR" in
4085         (xno|xyes)
4086                 { echo "$as_me:4086: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4087 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4088                 ;;
4089         (*)
4090
4091 if test "x$prefix" != xNONE; then
4092         cf_path_syntax="$prefix"
4093 else
4094         cf_path_syntax="$ac_default_prefix"
4095 fi
4096
4097 case ".$PKG_CONFIG_LIBDIR" in
4098 (.\$\(*\)*|.\'*\'*)
4099         ;;
4100 (..|./*|.\\*)
4101         ;;
4102 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4103         ;;
4104 (.\${*prefix}*|.\${*dir}*)
4105         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4106         case ".$PKG_CONFIG_LIBDIR" in
4107         (.NONE/*)
4108                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4109                 ;;
4110         esac
4111         ;;
4112 (.no|.NONE/*)
4113         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4114         ;;
4115 (*)
4116         { { echo "$as_me:4116: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4117 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4118    { (exit 1); exit 1; }; }
4119         ;;
4120 esac
4121
4122                 ;;
4123         esac
4124 else
4125         MAKE_PC_FILES="#"
4126 fi
4127
4128 if test -z "$MAKE_PC_FILES"
4129 then
4130         echo "$as_me:4130: checking for suffix to add to pc-files" >&5
4131 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4132
4133 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4134 if test "${with_pc_suffix+set}" = set; then
4135   withval="$with_pc_suffix"
4136   case "x$withval" in
4137         (xyes|xno)
4138                 PC_MODULE_SUFFIX=
4139                 ;;
4140         (*)     PC_MODULE_SUFFIX="$withval"
4141                 ;;
4142         esac
4143 fi;
4144         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4145         echo "$as_me:4145: result: $PC_MODULE_SUFFIX" >&5
4146 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4147         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4148
4149 fi
4150
4151 echo "$as_me:4151: checking if we should assume mixed-case filenames" >&5
4152 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4153
4154 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4155 if test "${enable_mixed_case+set}" = set; then
4156   enableval="$enable_mixed_case"
4157   enable_mixedcase=$enableval
4158 else
4159   enable_mixedcase=auto
4160 fi;
4161 echo "$as_me:4161: result: $enable_mixedcase" >&5
4162 echo "${ECHO_T}$enable_mixedcase" >&6
4163 if test "$enable_mixedcase" = "auto" ; then
4164
4165 echo "$as_me:4165: checking if filesystem supports mixed-case filenames" >&5
4166 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4167 if test "${cf_cv_mixedcase+set}" = set; then
4168   echo $ECHO_N "(cached) $ECHO_C" >&6
4169 else
4170
4171 if test "$cross_compiling" = yes ; then
4172         case $target_alias in
4173         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4174                 cf_cv_mixedcase=no
4175                 ;;
4176         (*)
4177                 cf_cv_mixedcase=yes
4178                 ;;
4179         esac
4180 else
4181         rm -f conftest CONFTEST
4182         echo test >conftest
4183         if test -f CONFTEST ; then
4184                 cf_cv_mixedcase=no
4185         else
4186                 cf_cv_mixedcase=yes
4187         fi
4188         rm -f conftest CONFTEST
4189 fi
4190
4191 fi
4192 echo "$as_me:4192: result: $cf_cv_mixedcase" >&5
4193 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4194 test "$cf_cv_mixedcase" = yes &&
4195 cat >>confdefs.h <<\EOF
4196 #define MIXEDCASE_FILENAMES 1
4197 EOF
4198
4199 else
4200         cf_cv_mixedcase=$enable_mixedcase
4201         if test "x$enable_mixedcase" = "xyes" ; then
4202
4203 cat >>confdefs.h <<\EOF
4204 #define MIXEDCASE_FILENAMES 1
4205 EOF
4206
4207         fi
4208 fi
4209
4210 # do this after mixed-case option (tags/TAGS is not as important as tic).
4211 echo "$as_me:4211: checking whether ${MAKE-make} sets \${MAKE}" >&5
4212 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4213 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4214 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4215   echo $ECHO_N "(cached) $ECHO_C" >&6
4216 else
4217   cat >conftest.make <<\EOF
4218 all:
4219         @echo 'ac_maketemp="${MAKE}"'
4220 EOF
4221 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4222 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4223 if test -n "$ac_maketemp"; then
4224   eval ac_cv_prog_make_${ac_make}_set=yes
4225 else
4226   eval ac_cv_prog_make_${ac_make}_set=no
4227 fi
4228 rm -f conftest.make
4229 fi
4230 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4231   echo "$as_me:4231: result: yes" >&5
4232 echo "${ECHO_T}yes" >&6
4233   SET_MAKE=
4234 else
4235   echo "$as_me:4235: result: no" >&5
4236 echo "${ECHO_T}no" >&6
4237   SET_MAKE="MAKE=${MAKE-make}"
4238 fi
4239
4240 for ac_prog in exctags ctags
4241 do
4242   # Extract the first word of "$ac_prog", so it can be a program name with args.
4243 set dummy $ac_prog; ac_word=$2
4244 echo "$as_me:4244: checking for $ac_word" >&5
4245 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4246 if test "${ac_cv_prog_CTAGS+set}" = set; then
4247   echo $ECHO_N "(cached) $ECHO_C" >&6
4248 else
4249   if test -n "$CTAGS"; then
4250   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4251 else
4252   ac_save_IFS=$IFS; IFS=$ac_path_separator
4253 ac_dummy="$PATH"
4254 for ac_dir in $ac_dummy; do
4255   IFS=$ac_save_IFS
4256   test -z "$ac_dir" && ac_dir=.
4257   $as_executable_p "$ac_dir/$ac_word" || continue
4258 ac_cv_prog_CTAGS="$ac_prog"
4259 echo "$as_me:4259: found $ac_dir/$ac_word" >&5
4260 break
4261 done
4262
4263 fi
4264 fi
4265 CTAGS=$ac_cv_prog_CTAGS
4266 if test -n "$CTAGS"; then
4267   echo "$as_me:4267: result: $CTAGS" >&5
4268 echo "${ECHO_T}$CTAGS" >&6
4269 else
4270   echo "$as_me:4270: result: no" >&5
4271 echo "${ECHO_T}no" >&6
4272 fi
4273
4274   test -n "$CTAGS" && break
4275 done
4276
4277 for ac_prog in exetags etags
4278 do
4279   # Extract the first word of "$ac_prog", so it can be a program name with args.
4280 set dummy $ac_prog; ac_word=$2
4281 echo "$as_me:4281: checking for $ac_word" >&5
4282 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4283 if test "${ac_cv_prog_ETAGS+set}" = set; then
4284   echo $ECHO_N "(cached) $ECHO_C" >&6
4285 else
4286   if test -n "$ETAGS"; then
4287   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4288 else
4289   ac_save_IFS=$IFS; IFS=$ac_path_separator
4290 ac_dummy="$PATH"
4291 for ac_dir in $ac_dummy; do
4292   IFS=$ac_save_IFS
4293   test -z "$ac_dir" && ac_dir=.
4294   $as_executable_p "$ac_dir/$ac_word" || continue
4295 ac_cv_prog_ETAGS="$ac_prog"
4296 echo "$as_me:4296: found $ac_dir/$ac_word" >&5
4297 break
4298 done
4299
4300 fi
4301 fi
4302 ETAGS=$ac_cv_prog_ETAGS
4303 if test -n "$ETAGS"; then
4304   echo "$as_me:4304: result: $ETAGS" >&5
4305 echo "${ECHO_T}$ETAGS" >&6
4306 else
4307   echo "$as_me:4307: result: no" >&5
4308 echo "${ECHO_T}no" >&6
4309 fi
4310
4311   test -n "$ETAGS" && break
4312 done
4313
4314 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4315 set dummy ${CTAGS:-ctags}; ac_word=$2
4316 echo "$as_me:4316: checking for $ac_word" >&5
4317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4318 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4319   echo $ECHO_N "(cached) $ECHO_C" >&6
4320 else
4321   if test -n "$MAKE_LOWER_TAGS"; then
4322   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4323 else
4324   ac_save_IFS=$IFS; IFS=$ac_path_separator
4325 ac_dummy="$PATH"
4326 for ac_dir in $ac_dummy; do
4327   IFS=$ac_save_IFS
4328   test -z "$ac_dir" && ac_dir=.
4329   $as_executable_p "$ac_dir/$ac_word" || continue
4330 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4331 echo "$as_me:4331: found $ac_dir/$ac_word" >&5
4332 break
4333 done
4334
4335   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4336 fi
4337 fi
4338 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4339 if test -n "$MAKE_LOWER_TAGS"; then
4340   echo "$as_me:4340: result: $MAKE_LOWER_TAGS" >&5
4341 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4342 else
4343   echo "$as_me:4343: result: no" >&5
4344 echo "${ECHO_T}no" >&6
4345 fi
4346
4347 if test "$cf_cv_mixedcase" = yes ; then
4348         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4349 set dummy ${ETAGS:-etags}; ac_word=$2
4350 echo "$as_me:4350: checking for $ac_word" >&5
4351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4352 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4353   echo $ECHO_N "(cached) $ECHO_C" >&6
4354 else
4355   if test -n "$MAKE_UPPER_TAGS"; then
4356   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4357 else
4358   ac_save_IFS=$IFS; IFS=$ac_path_separator
4359 ac_dummy="$PATH"
4360 for ac_dir in $ac_dummy; do
4361   IFS=$ac_save_IFS
4362   test -z "$ac_dir" && ac_dir=.
4363   $as_executable_p "$ac_dir/$ac_word" || continue
4364 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4365 echo "$as_me:4365: found $ac_dir/$ac_word" >&5
4366 break
4367 done
4368
4369   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4370 fi
4371 fi
4372 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4373 if test -n "$MAKE_UPPER_TAGS"; then
4374   echo "$as_me:4374: result: $MAKE_UPPER_TAGS" >&5
4375 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4376 else
4377   echo "$as_me:4377: result: no" >&5
4378 echo "${ECHO_T}no" >&6
4379 fi
4380
4381 else
4382         MAKE_UPPER_TAGS=no
4383 fi
4384
4385 if test "$MAKE_UPPER_TAGS" = yes ; then
4386         MAKE_UPPER_TAGS=
4387 else
4388         MAKE_UPPER_TAGS="#"
4389 fi
4390
4391 if test "$MAKE_LOWER_TAGS" = yes ; then
4392         MAKE_LOWER_TAGS=
4393 else
4394         MAKE_LOWER_TAGS="#"
4395 fi
4396
4397 echo "$as_me:4397: checking for makeflags variable" >&5
4398 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4399 if test "${cf_cv_makeflags+set}" = set; then
4400   echo $ECHO_N "(cached) $ECHO_C" >&6
4401 else
4402
4403         cf_cv_makeflags=''
4404         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4405         do
4406                 cat >cf_makeflags.tmp <<CF_EOF
4407 SHELL = $SHELL
4408 all :
4409         @ echo '.$cf_option'
4410 CF_EOF
4411                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4412                 case "$cf_result" in
4413                 (.*k|.*kw)
4414                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4415                         case "$cf_result" in
4416                         (.*CC=*)        cf_cv_makeflags=
4417                                 ;;
4418                         (*)     cf_cv_makeflags=$cf_option
4419                                 ;;
4420                         esac
4421                         break
4422                         ;;
4423                 (.-)
4424                         ;;
4425                 (*)
4426
4427 echo "${as_me:-configure}:4427: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4428
4429                         ;;
4430                 esac
4431         done
4432         rm -f cf_makeflags.tmp
4433
4434 fi
4435 echo "$as_me:4435: result: $cf_cv_makeflags" >&5
4436 echo "${ECHO_T}$cf_cv_makeflags" >&6
4437
4438 if test -n "$ac_tool_prefix"; then
4439   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4440 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4441 echo "$as_me:4441: checking for $ac_word" >&5
4442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4443 if test "${ac_cv_prog_RANLIB+set}" = set; then
4444   echo $ECHO_N "(cached) $ECHO_C" >&6
4445 else
4446   if test -n "$RANLIB"; then
4447   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4448 else
4449   ac_save_IFS=$IFS; IFS=$ac_path_separator
4450 ac_dummy="$PATH"
4451 for ac_dir in $ac_dummy; do
4452   IFS=$ac_save_IFS
4453   test -z "$ac_dir" && ac_dir=.
4454   $as_executable_p "$ac_dir/$ac_word" || continue
4455 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4456 echo "$as_me:4456: found $ac_dir/$ac_word" >&5
4457 break
4458 done
4459
4460 fi
4461 fi
4462 RANLIB=$ac_cv_prog_RANLIB
4463 if test -n "$RANLIB"; then
4464   echo "$as_me:4464: result: $RANLIB" >&5
4465 echo "${ECHO_T}$RANLIB" >&6
4466 else
4467   echo "$as_me:4467: result: no" >&5
4468 echo "${ECHO_T}no" >&6
4469 fi
4470
4471 fi
4472 if test -z "$ac_cv_prog_RANLIB"; then
4473   ac_ct_RANLIB=$RANLIB
4474   # Extract the first word of "ranlib", so it can be a program name with args.
4475 set dummy ranlib; ac_word=$2
4476 echo "$as_me:4476: checking for $ac_word" >&5
4477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4478 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4479   echo $ECHO_N "(cached) $ECHO_C" >&6
4480 else
4481   if test -n "$ac_ct_RANLIB"; then
4482   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4483 else
4484   ac_save_IFS=$IFS; IFS=$ac_path_separator
4485 ac_dummy="$PATH"
4486 for ac_dir in $ac_dummy; do
4487   IFS=$ac_save_IFS
4488   test -z "$ac_dir" && ac_dir=.
4489   $as_executable_p "$ac_dir/$ac_word" || continue
4490 ac_cv_prog_ac_ct_RANLIB="ranlib"
4491 echo "$as_me:4491: found $ac_dir/$ac_word" >&5
4492 break
4493 done
4494
4495   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4496 fi
4497 fi
4498 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4499 if test -n "$ac_ct_RANLIB"; then
4500   echo "$as_me:4500: result: $ac_ct_RANLIB" >&5
4501 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4502 else
4503   echo "$as_me:4503: result: no" >&5
4504 echo "${ECHO_T}no" >&6
4505 fi
4506
4507   RANLIB=$ac_ct_RANLIB
4508 else
4509   RANLIB="$ac_cv_prog_RANLIB"
4510 fi
4511
4512 if test -n "$ac_tool_prefix"; then
4513   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4514 set dummy ${ac_tool_prefix}ld; ac_word=$2
4515 echo "$as_me:4515: checking for $ac_word" >&5
4516 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4517 if test "${ac_cv_prog_LD+set}" = set; then
4518   echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520   if test -n "$LD"; then
4521   ac_cv_prog_LD="$LD" # Let the user override the test.
4522 else
4523   ac_save_IFS=$IFS; IFS=$ac_path_separator
4524 ac_dummy="$PATH"
4525 for ac_dir in $ac_dummy; do
4526   IFS=$ac_save_IFS
4527   test -z "$ac_dir" && ac_dir=.
4528   $as_executable_p "$ac_dir/$ac_word" || continue
4529 ac_cv_prog_LD="${ac_tool_prefix}ld"
4530 echo "$as_me:4530: found $ac_dir/$ac_word" >&5
4531 break
4532 done
4533
4534 fi
4535 fi
4536 LD=$ac_cv_prog_LD
4537 if test -n "$LD"; then
4538   echo "$as_me:4538: result: $LD" >&5
4539 echo "${ECHO_T}$LD" >&6
4540 else
4541   echo "$as_me:4541: result: no" >&5
4542 echo "${ECHO_T}no" >&6
4543 fi
4544
4545 fi
4546 if test -z "$ac_cv_prog_LD"; then
4547   ac_ct_LD=$LD
4548   # Extract the first word of "ld", so it can be a program name with args.
4549 set dummy ld; ac_word=$2
4550 echo "$as_me:4550: checking for $ac_word" >&5
4551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4552 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4553   echo $ECHO_N "(cached) $ECHO_C" >&6
4554 else
4555   if test -n "$ac_ct_LD"; then
4556   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4557 else
4558   ac_save_IFS=$IFS; IFS=$ac_path_separator
4559 ac_dummy="$PATH"
4560 for ac_dir in $ac_dummy; do
4561   IFS=$ac_save_IFS
4562   test -z "$ac_dir" && ac_dir=.
4563   $as_executable_p "$ac_dir/$ac_word" || continue
4564 ac_cv_prog_ac_ct_LD="ld"
4565 echo "$as_me:4565: found $ac_dir/$ac_word" >&5
4566 break
4567 done
4568
4569   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4570 fi
4571 fi
4572 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4573 if test -n "$ac_ct_LD"; then
4574   echo "$as_me:4574: result: $ac_ct_LD" >&5
4575 echo "${ECHO_T}$ac_ct_LD" >&6
4576 else
4577   echo "$as_me:4577: result: no" >&5
4578 echo "${ECHO_T}no" >&6
4579 fi
4580
4581   LD=$ac_ct_LD
4582 else
4583   LD="$ac_cv_prog_LD"
4584 fi
4585
4586 if test -n "$ac_tool_prefix"; then
4587   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4588 set dummy ${ac_tool_prefix}ar; ac_word=$2
4589 echo "$as_me:4589: checking for $ac_word" >&5
4590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4591 if test "${ac_cv_prog_AR+set}" = set; then
4592   echo $ECHO_N "(cached) $ECHO_C" >&6
4593 else
4594   if test -n "$AR"; then
4595   ac_cv_prog_AR="$AR" # Let the user override the test.
4596 else
4597   ac_save_IFS=$IFS; IFS=$ac_path_separator
4598 ac_dummy="$PATH"
4599 for ac_dir in $ac_dummy; do
4600   IFS=$ac_save_IFS
4601   test -z "$ac_dir" && ac_dir=.
4602   $as_executable_p "$ac_dir/$ac_word" || continue
4603 ac_cv_prog_AR="${ac_tool_prefix}ar"
4604 echo "$as_me:4604: found $ac_dir/$ac_word" >&5
4605 break
4606 done
4607
4608 fi
4609 fi
4610 AR=$ac_cv_prog_AR
4611 if test -n "$AR"; then
4612   echo "$as_me:4612: result: $AR" >&5
4613 echo "${ECHO_T}$AR" >&6
4614 else
4615   echo "$as_me:4615: result: no" >&5
4616 echo "${ECHO_T}no" >&6
4617 fi
4618
4619 fi
4620 if test -z "$ac_cv_prog_AR"; then
4621   ac_ct_AR=$AR
4622   # Extract the first word of "ar", so it can be a program name with args.
4623 set dummy ar; ac_word=$2
4624 echo "$as_me:4624: checking for $ac_word" >&5
4625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4626 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4627   echo $ECHO_N "(cached) $ECHO_C" >&6
4628 else
4629   if test -n "$ac_ct_AR"; then
4630   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4631 else
4632   ac_save_IFS=$IFS; IFS=$ac_path_separator
4633 ac_dummy="$PATH"
4634 for ac_dir in $ac_dummy; do
4635   IFS=$ac_save_IFS
4636   test -z "$ac_dir" && ac_dir=.
4637   $as_executable_p "$ac_dir/$ac_word" || continue
4638 ac_cv_prog_ac_ct_AR="ar"
4639 echo "$as_me:4639: found $ac_dir/$ac_word" >&5
4640 break
4641 done
4642
4643   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4644 fi
4645 fi
4646 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4647 if test -n "$ac_ct_AR"; then
4648   echo "$as_me:4648: result: $ac_ct_AR" >&5
4649 echo "${ECHO_T}$ac_ct_AR" >&6
4650 else
4651   echo "$as_me:4651: result: no" >&5
4652 echo "${ECHO_T}no" >&6
4653 fi
4654
4655   AR=$ac_ct_AR
4656 else
4657   AR="$ac_cv_prog_AR"
4658 fi
4659
4660 if test -n "$ac_tool_prefix"; then
4661   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4662 set dummy ${ac_tool_prefix}nm; ac_word=$2
4663 echo "$as_me:4663: checking for $ac_word" >&5
4664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4665 if test "${ac_cv_prog_NM+set}" = set; then
4666   echo $ECHO_N "(cached) $ECHO_C" >&6
4667 else
4668   if test -n "$NM"; then
4669   ac_cv_prog_NM="$NM" # Let the user override the test.
4670 else
4671   ac_save_IFS=$IFS; IFS=$ac_path_separator
4672 ac_dummy="$PATH"
4673 for ac_dir in $ac_dummy; do
4674   IFS=$ac_save_IFS
4675   test -z "$ac_dir" && ac_dir=.
4676   $as_executable_p "$ac_dir/$ac_word" || continue
4677 ac_cv_prog_NM="${ac_tool_prefix}nm"
4678 echo "$as_me:4678: found $ac_dir/$ac_word" >&5
4679 break
4680 done
4681
4682 fi
4683 fi
4684 NM=$ac_cv_prog_NM
4685 if test -n "$NM"; then
4686   echo "$as_me:4686: result: $NM" >&5
4687 echo "${ECHO_T}$NM" >&6
4688 else
4689   echo "$as_me:4689: result: no" >&5
4690 echo "${ECHO_T}no" >&6
4691 fi
4692
4693 fi
4694 if test -z "$ac_cv_prog_NM"; then
4695   ac_ct_NM=$NM
4696   # Extract the first word of "nm", so it can be a program name with args.
4697 set dummy nm; ac_word=$2
4698 echo "$as_me:4698: checking for $ac_word" >&5
4699 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4700 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4701   echo $ECHO_N "(cached) $ECHO_C" >&6
4702 else
4703   if test -n "$ac_ct_NM"; then
4704   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4705 else
4706   ac_save_IFS=$IFS; IFS=$ac_path_separator
4707 ac_dummy="$PATH"
4708 for ac_dir in $ac_dummy; do
4709   IFS=$ac_save_IFS
4710   test -z "$ac_dir" && ac_dir=.
4711   $as_executable_p "$ac_dir/$ac_word" || continue
4712 ac_cv_prog_ac_ct_NM="nm"
4713 echo "$as_me:4713: found $ac_dir/$ac_word" >&5
4714 break
4715 done
4716
4717   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4718 fi
4719 fi
4720 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4721 if test -n "$ac_ct_NM"; then
4722   echo "$as_me:4722: result: $ac_ct_NM" >&5
4723 echo "${ECHO_T}$ac_ct_NM" >&6
4724 else
4725   echo "$as_me:4725: result: no" >&5
4726 echo "${ECHO_T}no" >&6
4727 fi
4728
4729   NM=$ac_ct_NM
4730 else
4731   NM="$ac_cv_prog_NM"
4732 fi
4733
4734 if test -n "$ac_tool_prefix"; then
4735   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4736 set dummy ${ac_tool_prefix}ar; ac_word=$2
4737 echo "$as_me:4737: checking for $ac_word" >&5
4738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4739 if test "${ac_cv_prog_AR+set}" = set; then
4740   echo $ECHO_N "(cached) $ECHO_C" >&6
4741 else
4742   if test -n "$AR"; then
4743   ac_cv_prog_AR="$AR" # Let the user override the test.
4744 else
4745   ac_save_IFS=$IFS; IFS=$ac_path_separator
4746 ac_dummy="$PATH"
4747 for ac_dir in $ac_dummy; do
4748   IFS=$ac_save_IFS
4749   test -z "$ac_dir" && ac_dir=.
4750   $as_executable_p "$ac_dir/$ac_word" || continue
4751 ac_cv_prog_AR="${ac_tool_prefix}ar"
4752 echo "$as_me:4752: found $ac_dir/$ac_word" >&5
4753 break
4754 done
4755
4756 fi
4757 fi
4758 AR=$ac_cv_prog_AR
4759 if test -n "$AR"; then
4760   echo "$as_me:4760: result: $AR" >&5
4761 echo "${ECHO_T}$AR" >&6
4762 else
4763   echo "$as_me:4763: result: no" >&5
4764 echo "${ECHO_T}no" >&6
4765 fi
4766
4767 fi
4768 if test -z "$ac_cv_prog_AR"; then
4769   ac_ct_AR=$AR
4770   # Extract the first word of "ar", so it can be a program name with args.
4771 set dummy ar; ac_word=$2
4772 echo "$as_me:4772: checking for $ac_word" >&5
4773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4774 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4775   echo $ECHO_N "(cached) $ECHO_C" >&6
4776 else
4777   if test -n "$ac_ct_AR"; then
4778   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4779 else
4780   ac_save_IFS=$IFS; IFS=$ac_path_separator
4781 ac_dummy="$PATH"
4782 for ac_dir in $ac_dummy; do
4783   IFS=$ac_save_IFS
4784   test -z "$ac_dir" && ac_dir=.
4785   $as_executable_p "$ac_dir/$ac_word" || continue
4786 ac_cv_prog_ac_ct_AR="ar"
4787 echo "$as_me:4787: found $ac_dir/$ac_word" >&5
4788 break
4789 done
4790
4791   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4792 fi
4793 fi
4794 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4795 if test -n "$ac_ct_AR"; then
4796   echo "$as_me:4796: result: $ac_ct_AR" >&5
4797 echo "${ECHO_T}$ac_ct_AR" >&6
4798 else
4799   echo "$as_me:4799: result: no" >&5
4800 echo "${ECHO_T}no" >&6
4801 fi
4802
4803   AR=$ac_ct_AR
4804 else
4805   AR="$ac_cv_prog_AR"
4806 fi
4807
4808 echo "$as_me:4808: checking for options to update archives" >&5
4809 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4810 if test "${cf_cv_ar_flags+set}" = set; then
4811   echo $ECHO_N "(cached) $ECHO_C" >&6
4812 else
4813
4814         case $cf_cv_system_name in
4815         (*-msvc*)
4816                 cf_cv_ar_flags=''
4817                 cat >mk_static_lib.sh <<-EOF
4818                 #!$SHELL
4819                 MSVC_BIN="$AR"
4820                 out="\$1"
4821                 shift
4822                 exec \$MSVC_BIN -out:"\$out" \$@
4823                 EOF
4824                 chmod +x mk_static_lib.sh
4825                 AR=`pwd`/mk_static_lib.sh
4826                 ;;
4827         (*)
4828                 cf_cv_ar_flags=unknown
4829                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4830                 do
4831
4832                         # check if $ARFLAGS already contains this choice
4833                         if test "x$ARFLAGS" != "x" ; then
4834                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4835                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4836                                         cf_cv_ar_flags=
4837                                         break
4838                                 fi
4839                         fi
4840
4841                         rm -f conftest.$ac_cv_objext
4842                         rm -f conftest.a
4843
4844                         cat >conftest.$ac_ext <<EOF
4845 #line 4845 "configure"
4846 int     testdata[3] = { 123, 456, 789 };
4847 EOF
4848                         if { (eval echo "$as_me:4848: \"$ac_compile\"") >&5
4849   (eval $ac_compile) 2>&5
4850   ac_status=$?
4851   echo "$as_me:4851: \$? = $ac_status" >&5
4852   (exit $ac_status); } ; then
4853                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4854                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4855                                 if test -f conftest.a ; then
4856                                         cf_cv_ar_flags=$cf_ar_flags
4857                                         break
4858                                 fi
4859                         else
4860                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4861
4862 echo "${as_me:-configure}:4862: testing cannot compile test-program ..." 1>&5
4863
4864                                 break
4865                         fi
4866                 done
4867                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4868                 ;;
4869         esac
4870
4871 fi
4872 echo "$as_me:4872: result: $cf_cv_ar_flags" >&5
4873 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4874
4875 if test -n "$ARFLAGS" ; then
4876         if test -n "$cf_cv_ar_flags" ; then
4877                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4878         fi
4879 else
4880         ARFLAGS=$cf_cv_ar_flags
4881 fi
4882
4883 echo "$as_me:4883: checking if you have specified an install-prefix" >&5
4884 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4885
4886 # Check whether --with-install-prefix or --without-install-prefix was given.
4887 if test "${with_install_prefix+set}" = set; then
4888   withval="$with_install_prefix"
4889   case "x$withval" in
4890         (xyes|xno)
4891                 ;;
4892         (*)     DESTDIR="$withval"
4893                 ;;
4894         esac
4895 fi;
4896 echo "$as_me:4896: result: $DESTDIR" >&5
4897 echo "${ECHO_T}$DESTDIR" >&6
4898
4899 ###############################################################################
4900
4901 # If we're cross-compiling, allow the user to override the tools and their
4902 # options.  The configure script is oriented toward identifying the host
4903 # compiler, etc., but we need a build compiler to generate parts of the source.
4904
4905 case $cf_cv_system_name in
4906 (*-msvc*)
4907         LDFLAGS="$LDFLAGS user32.lib"
4908         export LDFLAGS
4909         ;;
4910 esac
4911
4912 if test "$cross_compiling" = yes ; then
4913
4914         # defaults that we might want to override
4915         : ${BUILD_CFLAGS:=''}
4916         : ${BUILD_CPPFLAGS:=''}
4917         : ${BUILD_LDFLAGS:=''}
4918         : ${BUILD_LIBS:=''}
4919         : ${BUILD_EXEEXT:='$x'}
4920         : ${BUILD_OBJEXT:='o'}
4921
4922 # Check whether --with-build-cc or --without-build-cc was given.
4923 if test "${with_build_cc+set}" = set; then
4924   withval="$with_build_cc"
4925   BUILD_CC="$withval"
4926 else
4927   for ac_prog in gcc clang c99 c89 cc cl
4928 do
4929   # Extract the first word of "$ac_prog", so it can be a program name with args.
4930 set dummy $ac_prog; ac_word=$2
4931 echo "$as_me:4931: checking for $ac_word" >&5
4932 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4933 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4934   echo $ECHO_N "(cached) $ECHO_C" >&6
4935 else
4936   if test -n "$BUILD_CC"; then
4937   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4938 else
4939   ac_save_IFS=$IFS; IFS=$ac_path_separator
4940 ac_dummy="$PATH"
4941 for ac_dir in $ac_dummy; do
4942   IFS=$ac_save_IFS
4943   test -z "$ac_dir" && ac_dir=.
4944   $as_executable_p "$ac_dir/$ac_word" || continue
4945 ac_cv_prog_BUILD_CC="$ac_prog"
4946 echo "$as_me:4946: found $ac_dir/$ac_word" >&5
4947 break
4948 done
4949
4950 fi
4951 fi
4952 BUILD_CC=$ac_cv_prog_BUILD_CC
4953 if test -n "$BUILD_CC"; then
4954   echo "$as_me:4954: result: $BUILD_CC" >&5
4955 echo "${ECHO_T}$BUILD_CC" >&6
4956 else
4957   echo "$as_me:4957: result: no" >&5
4958 echo "${ECHO_T}no" >&6
4959 fi
4960
4961   test -n "$BUILD_CC" && break
4962 done
4963 test -n "$BUILD_CC" || BUILD_CC="none"
4964
4965 fi;
4966         echo "$as_me:4966: checking for native build C compiler" >&5
4967 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4968         echo "$as_me:4968: result: $BUILD_CC" >&5
4969 echo "${ECHO_T}$BUILD_CC" >&6
4970
4971         echo "$as_me:4971: checking for native build C preprocessor" >&5
4972 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4973
4974 # Check whether --with-build-cpp or --without-build-cpp was given.
4975 if test "${with_build_cpp+set}" = set; then
4976   withval="$with_build_cpp"
4977   BUILD_CPP="$withval"
4978 else
4979   BUILD_CPP='${BUILD_CC} -E'
4980 fi;
4981         echo "$as_me:4981: result: $BUILD_CPP" >&5
4982 echo "${ECHO_T}$BUILD_CPP" >&6
4983
4984         echo "$as_me:4984: checking for native build C flags" >&5
4985 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4986
4987 # Check whether --with-build-cflags or --without-build-cflags was given.
4988 if test "${with_build_cflags+set}" = set; then
4989   withval="$with_build_cflags"
4990   BUILD_CFLAGS="$withval"
4991 fi;
4992         echo "$as_me:4992: result: $BUILD_CFLAGS" >&5
4993 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4994
4995         echo "$as_me:4995: checking for native build C preprocessor-flags" >&5
4996 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4997
4998 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4999 if test "${with_build_cppflags+set}" = set; then
5000   withval="$with_build_cppflags"
5001   BUILD_CPPFLAGS="$withval"
5002 fi;
5003         echo "$as_me:5003: result: $BUILD_CPPFLAGS" >&5
5004 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5005
5006         echo "$as_me:5006: checking for native build linker-flags" >&5
5007 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5008
5009 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5010 if test "${with_build_ldflags+set}" = set; then
5011   withval="$with_build_ldflags"
5012   BUILD_LDFLAGS="$withval"
5013 fi;
5014         echo "$as_me:5014: result: $BUILD_LDFLAGS" >&5
5015 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5016
5017         echo "$as_me:5017: checking for native build linker-libraries" >&5
5018 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5019
5020 # Check whether --with-build-libs or --without-build-libs was given.
5021 if test "${with_build_libs+set}" = set; then
5022   withval="$with_build_libs"
5023   BUILD_LIBS="$withval"
5024 fi;
5025         echo "$as_me:5025: result: $BUILD_LIBS" >&5
5026 echo "${ECHO_T}$BUILD_LIBS" >&6
5027
5028         # this assumes we're on Unix.
5029         BUILD_EXEEXT=
5030         BUILD_OBJEXT=o
5031
5032         : ${BUILD_CC:='${CC}'}
5033
5034         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
5035                 { { echo "$as_me:5035: error: Cross-build requires two compilers.
5036 Use --with-build-cc to specify the native compiler." >&5
5037 echo "$as_me: error: Cross-build requires two compilers.
5038 Use --with-build-cc to specify the native compiler." >&2;}
5039    { (exit 1); exit 1; }; }
5040         fi
5041
5042 else
5043         : ${BUILD_CC:='${CC}'}
5044         : ${BUILD_CPP:='${CPP}'}
5045         : ${BUILD_CFLAGS:='${CFLAGS}'}
5046         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5047         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5048         : ${BUILD_LIBS:='${LIBS}'}
5049         : ${BUILD_EXEEXT:='$x'}
5050         : ${BUILD_OBJEXT:='o'}
5051 fi
5052
5053 ###############################################################################
5054
5055 ### Options to allow the user to specify the set of libraries which are used.
5056 ### Use "--without-normal --with-shared" to allow the default model to be
5057 ### shared, for example.
5058 cf_list_models=""
5059
5060 echo "$as_me:5060: checking if libtool -version-number should be used" >&5
5061 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5062
5063 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5064 if test "${enable_libtool_version+set}" = set; then
5065   enableval="$enable_libtool_version"
5066   test "$enableval" != no && enableval=yes
5067         if test "$enableval" != "yes" ; then
5068     cf_libtool_version=no
5069         else
5070                 cf_libtool_version=yes
5071         fi
5072 else
5073   enableval=yes
5074         cf_libtool_version=yes
5075
5076 fi;
5077 echo "$as_me:5077: result: $cf_libtool_version" >&5
5078 echo "${ECHO_T}$cf_libtool_version" >&6
5079
5080 if test "$cf_libtool_version" = yes ; then
5081         LIBTOOL_VERSION="-version-number"
5082 else
5083         LIBTOOL_VERSION="-version-info"
5084         case "x$VERSION" in
5085         (x)
5086                 { echo "$as_me:5086: WARNING: VERSION was not set" >&5
5087 echo "$as_me: WARNING: VERSION was not set" >&2;}
5088                 ;;
5089         (x*.*.*)
5090                 ABI_VERSION="$VERSION"
5091                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5092
5093 echo "${as_me:-configure}:5093: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5094
5095                 ;;
5096         (x*:*:*)
5097                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5098                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5099
5100 echo "${as_me:-configure}:5100: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5101
5102                 ;;
5103         (*)
5104                 { echo "$as_me:5104: WARNING: unexpected VERSION value: $VERSION" >&5
5105 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5106                 ;;
5107         esac
5108 fi
5109
5110 LIBTOOL=
5111
5112 # common library maintenance symbols that are convenient for libtool scripts:
5113 LIB_CREATE='${AR} -cr'
5114 LIB_OBJECT='${OBJECTS}'
5115 LIB_SUFFIX=.a
5116 LIB_PREP="$RANLIB"
5117
5118 # symbols used to prop libtool up to enable it to determine what it should be
5119 # doing:
5120 LIB_CLEAN=
5121 LIB_COMPILE=
5122 LIB_LINK='${CC}'
5123 LIB_INSTALL=
5124 LIB_UNINSTALL=
5125
5126 echo "$as_me:5126: checking if you want to build libraries with libtool" >&5
5127 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5128
5129 # Check whether --with-libtool or --without-libtool was given.
5130 if test "${with_libtool+set}" = set; then
5131   withval="$with_libtool"
5132   with_libtool=$withval
5133 else
5134   with_libtool=no
5135 fi;
5136 echo "$as_me:5136: result: $with_libtool" >&5
5137 echo "${ECHO_T}$with_libtool" >&6
5138 if test "$with_libtool" != "no"; then
5139
5140         if test "$with_libtool" != "yes" ; then
5141
5142 if test "x$prefix" != xNONE; then
5143         cf_path_syntax="$prefix"
5144 else
5145         cf_path_syntax="$ac_default_prefix"
5146 fi
5147
5148 case ".$with_libtool" in
5149 (.\$\(*\)*|.\'*\'*)
5150         ;;
5151 (..|./*|.\\*)
5152         ;;
5153 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5154         ;;
5155 (.\${*prefix}*|.\${*dir}*)
5156         eval with_libtool="$with_libtool"
5157         case ".$with_libtool" in
5158         (.NONE/*)
5159                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5160                 ;;
5161         esac
5162         ;;
5163 (.no|.NONE/*)
5164         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5165         ;;
5166 (*)
5167         { { echo "$as_me:5167: error: expected a pathname, not \"$with_libtool\"" >&5
5168 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5169    { (exit 1); exit 1; }; }
5170         ;;
5171 esac
5172
5173                 LIBTOOL=$with_libtool
5174         else
5175                 if test -n "$ac_tool_prefix"; then
5176   for ac_prog in libtool glibtool
5177   do
5178     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5179 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5180 echo "$as_me:5180: checking for $ac_word" >&5
5181 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5182 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5183   echo $ECHO_N "(cached) $ECHO_C" >&6
5184 else
5185   if test -n "$LIBTOOL"; then
5186   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5187 else
5188   ac_save_IFS=$IFS; IFS=$ac_path_separator
5189 ac_dummy="$PATH"
5190 for ac_dir in $ac_dummy; do
5191   IFS=$ac_save_IFS
5192   test -z "$ac_dir" && ac_dir=.
5193   $as_executable_p "$ac_dir/$ac_word" || continue
5194 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5195 echo "$as_me:5195: found $ac_dir/$ac_word" >&5
5196 break
5197 done
5198
5199 fi
5200 fi
5201 LIBTOOL=$ac_cv_prog_LIBTOOL
5202 if test -n "$LIBTOOL"; then
5203   echo "$as_me:5203: result: $LIBTOOL" >&5
5204 echo "${ECHO_T}$LIBTOOL" >&6
5205 else
5206   echo "$as_me:5206: result: no" >&5
5207 echo "${ECHO_T}no" >&6
5208 fi
5209
5210     test -n "$LIBTOOL" && break
5211   done
5212 fi
5213 if test -z "$LIBTOOL"; then
5214   ac_ct_LIBTOOL=$LIBTOOL
5215   for ac_prog in libtool glibtool
5216 do
5217   # Extract the first word of "$ac_prog", so it can be a program name with args.
5218 set dummy $ac_prog; ac_word=$2
5219 echo "$as_me:5219: checking for $ac_word" >&5
5220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5221 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5222   echo $ECHO_N "(cached) $ECHO_C" >&6
5223 else
5224   if test -n "$ac_ct_LIBTOOL"; then
5225   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5226 else
5227   ac_save_IFS=$IFS; IFS=$ac_path_separator
5228 ac_dummy="$PATH"
5229 for ac_dir in $ac_dummy; do
5230   IFS=$ac_save_IFS
5231   test -z "$ac_dir" && ac_dir=.
5232   $as_executable_p "$ac_dir/$ac_word" || continue
5233 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5234 echo "$as_me:5234: found $ac_dir/$ac_word" >&5
5235 break
5236 done
5237
5238 fi
5239 fi
5240 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5241 if test -n "$ac_ct_LIBTOOL"; then
5242   echo "$as_me:5242: result: $ac_ct_LIBTOOL" >&5
5243 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5244 else
5245   echo "$as_me:5245: result: no" >&5
5246 echo "${ECHO_T}no" >&6
5247 fi
5248
5249   test -n "$ac_ct_LIBTOOL" && break
5250 done
5251 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5252
5253   LIBTOOL=$ac_ct_LIBTOOL
5254 fi
5255
5256 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5257 then
5258         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.].*//'`
5259 else
5260         cf_cv_libtool_version=
5261 fi
5262 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5263
5264                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5265                 then
5266
5267 unset ac_cv_prog_ac_ct_LIBTOOL
5268 unset ac_ct_LIBTOOL
5269 unset LIBTOOL
5270
5271                         if test -n "$ac_tool_prefix"; then
5272   for ac_prog in glibtool
5273   do
5274     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5275 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5276 echo "$as_me:5276: checking for $ac_word" >&5
5277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5278 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5279   echo $ECHO_N "(cached) $ECHO_C" >&6
5280 else
5281   if test -n "$LIBTOOL"; then
5282   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5283 else
5284   ac_save_IFS=$IFS; IFS=$ac_path_separator
5285 ac_dummy="$PATH"
5286 for ac_dir in $ac_dummy; do
5287   IFS=$ac_save_IFS
5288   test -z "$ac_dir" && ac_dir=.
5289   $as_executable_p "$ac_dir/$ac_word" || continue
5290 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5291 echo "$as_me:5291: found $ac_dir/$ac_word" >&5
5292 break
5293 done
5294
5295 fi
5296 fi
5297 LIBTOOL=$ac_cv_prog_LIBTOOL
5298 if test -n "$LIBTOOL"; then
5299   echo "$as_me:5299: result: $LIBTOOL" >&5
5300 echo "${ECHO_T}$LIBTOOL" >&6
5301 else
5302   echo "$as_me:5302: result: no" >&5
5303 echo "${ECHO_T}no" >&6
5304 fi
5305
5306     test -n "$LIBTOOL" && break
5307   done
5308 fi
5309 if test -z "$LIBTOOL"; then
5310   ac_ct_LIBTOOL=$LIBTOOL
5311   for ac_prog in glibtool
5312 do
5313   # Extract the first word of "$ac_prog", so it can be a program name with args.
5314 set dummy $ac_prog; ac_word=$2
5315 echo "$as_me:5315: checking for $ac_word" >&5
5316 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5317 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5318   echo $ECHO_N "(cached) $ECHO_C" >&6
5319 else
5320   if test -n "$ac_ct_LIBTOOL"; then
5321   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5322 else
5323   ac_save_IFS=$IFS; IFS=$ac_path_separator
5324 ac_dummy="$PATH"
5325 for ac_dir in $ac_dummy; do
5326   IFS=$ac_save_IFS
5327   test -z "$ac_dir" && ac_dir=.
5328   $as_executable_p "$ac_dir/$ac_word" || continue
5329 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5330 echo "$as_me:5330: found $ac_dir/$ac_word" >&5
5331 break
5332 done
5333
5334 fi
5335 fi
5336 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5337 if test -n "$ac_ct_LIBTOOL"; then
5338   echo "$as_me:5338: result: $ac_ct_LIBTOOL" >&5
5339 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5340 else
5341   echo "$as_me:5341: result: no" >&5
5342 echo "${ECHO_T}no" >&6
5343 fi
5344
5345   test -n "$ac_ct_LIBTOOL" && break
5346 done
5347 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5348
5349   LIBTOOL=$ac_ct_LIBTOOL
5350 fi
5351
5352 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5353 then
5354         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.].*//'`
5355 else
5356         cf_cv_libtool_version=
5357 fi
5358 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5359
5360                 fi
5361         fi
5362         if test -z "$LIBTOOL" ; then
5363                 { { echo "$as_me:5363: error: Cannot find libtool" >&5
5364 echo "$as_me: error: Cannot find libtool" >&2;}
5365    { (exit 1); exit 1; }; }
5366         fi
5367         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5368         LIB_OBJECT='${OBJECTS:.o=.lo}'
5369         LIB_SUFFIX=.la
5370         LIB_CLEAN='${LIBTOOL} --mode=clean'
5371         LIB_COMPILE='${LIBTOOL} --mode=compile'
5372         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5373         LIB_INSTALL='${LIBTOOL} --mode=install'
5374         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5375         LIB_PREP=:
5376
5377 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5378 then
5379         echo "$as_me:5379: checking version of $LIBTOOL" >&5
5380 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5381
5382 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5383 then
5384         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.].*//'`
5385 else
5386         cf_cv_libtool_version=
5387 fi
5388 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5389
5390         echo "$as_me:5390: result: $cf_cv_libtool_version" >&5
5391 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5392         if test -z "$cf_cv_libtool_version" ; then
5393                 { { echo "$as_me:5393: error: This is not GNU libtool" >&5
5394 echo "$as_me: error: This is not GNU libtool" >&2;}
5395    { (exit 1); exit 1; }; }
5396         fi
5397 else
5398         { { echo "$as_me:5398: error: GNU libtool has not been found" >&5
5399 echo "$as_me: error: GNU libtool has not been found" >&2;}
5400    { (exit 1); exit 1; }; }
5401 fi
5402
5403         # special hack to add -no-undefined (which libtool should do for itself)
5404         LT_UNDEF=
5405         case "$cf_cv_system_name" in
5406         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5407                 LT_UNDEF=-no-undefined
5408                 ;;
5409         esac
5410
5411         # special hack to add --tag option for C++ compiler
5412         case $cf_cv_libtool_version in
5413         (1.[5-9]*|[2-9].[0-9.a-z]*)
5414                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5415                 LIBTOOL="$LIBTOOL --tag=CC"
5416                 ;;
5417         (*)
5418                 LIBTOOL_CXX="$LIBTOOL"
5419                 ;;
5420         esac
5421 else
5422         LIBTOOL=""
5423         LIBTOOL_CXX=""
5424 fi
5425
5426 test -z "$LIBTOOL" && ECHO_LT=
5427
5428 if test "$with_libtool" != "no" ; then
5429
5430 cf_list_models="$cf_list_models libtool"
5431
5432 else
5433
5434 echo "$as_me:5434: checking if you want to build shared libraries" >&5
5435 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5436
5437 # Check whether --with-shared or --without-shared was given.
5438 if test "${with_shared+set}" = set; then
5439   withval="$with_shared"
5440   with_shared=$withval
5441 else
5442   with_shared=no
5443 fi;
5444 echo "$as_me:5444: result: $with_shared" >&5
5445 echo "${ECHO_T}$with_shared" >&6
5446 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5447
5448 echo "$as_me:5448: checking if you want to build static libraries" >&5
5449 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5450
5451 # Check whether --with-normal or --without-normal was given.
5452 if test "${with_normal+set}" = set; then
5453   withval="$with_normal"
5454   with_normal=$withval
5455 else
5456   with_normal=yes
5457 fi;
5458 echo "$as_me:5458: result: $with_normal" >&5
5459 echo "${ECHO_T}$with_normal" >&6
5460 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5461
5462 echo "$as_me:5462: checking if you want to build debug libraries" >&5
5463 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5464
5465 # Check whether --with-debug or --without-debug was given.
5466 if test "${with_debug+set}" = set; then
5467   withval="$with_debug"
5468   with_debug=$withval
5469 else
5470   with_debug=yes
5471 fi;
5472 echo "$as_me:5472: result: $with_debug" >&5
5473 echo "${ECHO_T}$with_debug" >&6
5474 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5475
5476 echo "$as_me:5476: checking if you want to build profiling libraries" >&5
5477 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5478
5479 # Check whether --with-profile or --without-profile was given.
5480 if test "${with_profile+set}" = set; then
5481   withval="$with_profile"
5482   with_profile=$withval
5483 else
5484   with_profile=no
5485 fi;
5486 echo "$as_me:5486: result: $with_profile" >&5
5487 echo "${ECHO_T}$with_profile" >&6
5488 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5489
5490 fi
5491
5492 if test "X$cf_with_cxx_binding" != Xno; then
5493 if test "x$with_shared" = "xyes"; then
5494 echo "$as_me:5494: checking if you want to build C++ shared libraries" >&5
5495 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5496
5497 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5498 if test "${with_cxx_shared+set}" = set; then
5499   withval="$with_cxx_shared"
5500   with_shared_cxx=$withval
5501 else
5502   with_shared_cxx=no
5503 fi;
5504 echo "$as_me:5504: result: $with_shared_cxx" >&5
5505 echo "${ECHO_T}$with_shared_cxx" >&6
5506 fi
5507 fi
5508
5509 ###############################################################################
5510
5511 echo "$as_me:5511: checking for specified models" >&5
5512 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5513 test -z "$cf_list_models" && cf_list_models=normal
5514 test "$with_libtool" != "no" && cf_list_models=libtool
5515 echo "$as_me:5515: result: $cf_list_models" >&5
5516 echo "${ECHO_T}$cf_list_models" >&6
5517
5518 ### Use the first model as the default, and save its suffix for use in building
5519 ### up test-applications.
5520 echo "$as_me:5520: checking for default model" >&5
5521 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5522 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5523 echo "$as_me:5523: result: $DFT_LWR_MODEL" >&5
5524 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5525
5526 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5527
5528 TICS_NAME=tic
5529
5530 TINFO_NAME=tinfo
5531
5532 LIB_NAME=ncurses
5533
5534 LIB_DIR=../lib
5535 LIB_2ND=../../lib
5536
5537 echo "$as_me:5537: checking if you want to have a library-prefix" >&5
5538 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5539
5540 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5541 if test "${with_lib_prefix+set}" = set; then
5542   withval="$with_lib_prefix"
5543   with_lib_prefix=$withval
5544 else
5545   with_lib_prefix=auto
5546 fi;
5547 echo "$as_me:5547: result: $with_lib_prefix" >&5
5548 echo "${ECHO_T}$with_lib_prefix" >&6
5549
5550 if test $with_lib_prefix = auto
5551 then
5552
5553         case $cf_cv_system_name in
5554         (OS/2*|os2*)
5555                 if test "$DFT_LWR_MODEL" = libtool; then
5556                         LIB_PREFIX='lib'
5557                 else
5558                         LIB_PREFIX=''
5559                 fi
5560                 ;;
5561         (*-msvc*)
5562                 LIB_PREFIX=''
5563                 ;;
5564         (*)     LIB_PREFIX='lib'
5565                 ;;
5566         esac
5567 cf_prefix=$LIB_PREFIX
5568
5569 elif test $with_lib_prefix = no
5570 then
5571         LIB_PREFIX=
5572 else
5573         LIB_PREFIX=$with_lib_prefix
5574 fi
5575
5576 LIB_SUFFIX=
5577
5578         echo "$as_me:5578: checking for PATH separator" >&5
5579 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5580         case $cf_cv_system_name in
5581         (os2*)  PATH_SEPARATOR=';'  ;;
5582         (*)     ${PATH_SEPARATOR:=':'}  ;;
5583         esac
5584
5585         echo "$as_me:5585: result: $PATH_SEPARATOR" >&5
5586 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5587
5588 ###############################################################################
5589
5590 echo "$as_me:5590: checking if you want to build a separate terminfo library" >&5
5591 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5592
5593 # Check whether --with-termlib or --without-termlib was given.
5594 if test "${with_termlib+set}" = set; then
5595   withval="$with_termlib"
5596   with_termlib=$withval
5597 else
5598   with_termlib=no
5599 fi;
5600 echo "$as_me:5600: result: $with_termlib" >&5
5601 echo "${ECHO_T}$with_termlib" >&6
5602
5603 echo "$as_me:5603: checking if you want to build a separate tic library" >&5
5604 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5605
5606 # Check whether --with-ticlib or --without-ticlib was given.
5607 if test "${with_ticlib+set}" = set; then
5608   withval="$with_ticlib"
5609   with_ticlib=$withval
5610 else
5611   with_ticlib=no
5612 fi;
5613 echo "$as_me:5613: result: $with_ticlib" >&5
5614 echo "${ECHO_T}$with_ticlib" >&6
5615
5616 if test X"$CC_G_OPT" = X"" ; then
5617         CC_G_OPT='-g'
5618         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5619 fi
5620
5621 if test X"$CXX_G_OPT" = X"" ; then
5622         CXX_G_OPT='-g'
5623         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5624 fi
5625
5626 echo "$as_me:5626: checking for default loader flags" >&5
5627 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5628 case $DFT_LWR_MODEL in
5629 (libtool) LD_MODEL=''   ;;
5630 (normal)  LD_MODEL=''   ;;
5631 (debug)   LD_MODEL=$CC_G_OPT ;;
5632 (profile) LD_MODEL='-pg';;
5633 (shared)  LD_MODEL=''   ;;
5634 esac
5635 echo "$as_me:5635: result: $LD_MODEL" >&5
5636 echo "${ECHO_T}$LD_MODEL" >&6
5637
5638 case $DFT_LWR_MODEL in
5639 (shared)
5640
5641 echo "$as_me:5641: checking if rpath option should be used" >&5
5642 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5643
5644 # Check whether --enable-rpath or --disable-rpath was given.
5645 if test "${enable_rpath+set}" = set; then
5646   enableval="$enable_rpath"
5647   cf_cv_enable_rpath=$enableval
5648 else
5649   cf_cv_enable_rpath=no
5650 fi;
5651 echo "$as_me:5651: result: $cf_cv_enable_rpath" >&5
5652 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5653
5654 echo "$as_me:5654: checking if shared libraries should be relinked during install" >&5
5655 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5656
5657 # Check whether --enable-relink or --disable-relink was given.
5658 if test "${enable_relink+set}" = set; then
5659   enableval="$enable_relink"
5660   cf_cv_do_relink=$enableval
5661 else
5662   cf_cv_do_relink=yes
5663 fi;
5664 echo "$as_me:5664: result: $cf_cv_do_relink" >&5
5665 echo "${ECHO_T}$cf_cv_do_relink" >&6
5666         ;;
5667 esac
5668
5669 # we will build libraries one-level down.
5670 rel_builddir=..
5671
5672 LD_RPATH_OPT=
5673 if test "x$cf_cv_enable_rpath" != xno
5674 then
5675         echo "$as_me:5675: checking for an rpath option" >&5
5676 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5677         case $cf_cv_system_name in
5678         (irix*)
5679                 if test "$GCC" = yes; then
5680                         LD_RPATH_OPT="-Wl,-rpath,"
5681                 else
5682                         LD_RPATH_OPT="-rpath "
5683                 fi
5684                 ;;
5685         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5686                 LD_RPATH_OPT="-Wl,-rpath,"
5687                 ;;
5688         (openbsd[2-9].*|mirbsd*)
5689                 LD_RPATH_OPT="-Wl,-rpath,"
5690                 ;;
5691         (dragonfly*)
5692                 LD_RPATH_OPT="-rpath "
5693                 ;;
5694         (netbsd*)
5695                 LD_RPATH_OPT="-Wl,-rpath,"
5696                 ;;
5697         (osf*|mls+*)
5698                 LD_RPATH_OPT="-rpath "
5699                 ;;
5700         (solaris2*)
5701                 LD_RPATH_OPT="-R"
5702                 ;;
5703         (*)
5704                 ;;
5705         esac
5706         echo "$as_me:5706: result: $LD_RPATH_OPT" >&5
5707 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5708
5709         case "x$LD_RPATH_OPT" in
5710         (x-R*)
5711                 echo "$as_me:5711: checking if we need a space after rpath option" >&5
5712 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5713                 cf_save_LIBS="$LIBS"
5714
5715 cf_add_libs="$LIBS"
5716 # reverse order
5717 cf_add_0lib=
5718 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5719 # filter duplicates
5720 for cf_add_1lib in $cf_add_0lib; do
5721         for cf_add_2lib in $cf_add_libs; do
5722                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5723                         cf_add_1lib=
5724                         break
5725                 fi
5726         done
5727         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5728 done
5729 LIBS="$cf_add_libs"
5730
5731                 cat >conftest.$ac_ext <<_ACEOF
5732 #line 5732 "configure"
5733 #include "confdefs.h"
5734
5735 int
5736 main (void)
5737 {
5738
5739   ;
5740   return 0;
5741 }
5742 _ACEOF
5743 rm -f conftest.$ac_objext conftest$ac_exeext
5744 if { (eval echo "$as_me:5744: \"$ac_link\"") >&5
5745   (eval $ac_link) 2>&5
5746   ac_status=$?
5747   echo "$as_me:5747: \$? = $ac_status" >&5
5748   (exit $ac_status); } &&
5749          { ac_try='test -s conftest$ac_exeext'
5750   { (eval echo "$as_me:5750: \"$ac_try\"") >&5
5751   (eval $ac_try) 2>&5
5752   ac_status=$?
5753   echo "$as_me:5753: \$? = $ac_status" >&5
5754   (exit $ac_status); }; }; then
5755   cf_rpath_space=no
5756 else
5757   echo "$as_me: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5759 cf_rpath_space=yes
5760 fi
5761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5762                 LIBS="$cf_save_LIBS"
5763                 echo "$as_me:5763: result: $cf_rpath_space" >&5
5764 echo "${ECHO_T}$cf_rpath_space" >&6
5765                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5766                 ;;
5767         esac
5768 fi
5769
5770         RM_SHARED_OPTS=
5771         LOCAL_LDFLAGS=
5772         LOCAL_LDFLAGS2=
5773         LD_SHARED_OPTS=
5774         INSTALL_LIB="-m 644"
5775         : ${rel_builddir:=.}
5776
5777         shlibdir=$libdir
5778
5779         MAKE_DLLS="#"
5780
5781         cf_cv_do_symlinks=no
5782         cf_ld_rpath_opt=
5783         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5784
5785         echo "$as_me:5785: checking if release/abi version should be used for shared libs" >&5
5786 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5787
5788 # Check whether --with-shlib-version or --without-shlib-version was given.
5789 if test "${with_shlib_version+set}" = set; then
5790   withval="$with_shlib_version"
5791   test -z "$withval" && withval=auto
5792         case $withval in
5793         (yes)
5794                 cf_cv_shlib_version=auto
5795                 ;;
5796         (rel|abi|auto)
5797                 cf_cv_shlib_version=$withval
5798                 ;;
5799         (*)
5800                 echo "$as_me:5800: result: $withval" >&5
5801 echo "${ECHO_T}$withval" >&6
5802                 { { echo "$as_me:5802: error: option value must be one of: rel, abi, or auto" >&5
5803 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5804    { (exit 1); exit 1; }; }
5805                 ;;
5806         esac
5807
5808 else
5809   cf_cv_shlib_version=auto
5810 fi;
5811         echo "$as_me:5811: result: $cf_cv_shlib_version" >&5
5812 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5813
5814         cf_cv_rm_so_locs=no
5815         cf_try_cflags=
5816
5817         # Some less-capable ports of gcc support only -fpic
5818         CC_SHARED_OPTS=
5819
5820         cf_try_fPIC=no
5821         if test "$GCC" = yes
5822         then
5823                 cf_try_fPIC=yes
5824         else
5825                 case $cf_cv_system_name in
5826                 (*linux*)       # e.g., PGI compiler
5827                         cf_try_fPIC=yes
5828                         ;;
5829                 esac
5830         fi
5831
5832         if test "$cf_try_fPIC" = yes
5833         then
5834                 echo "$as_me:5834: checking which $CC option to use" >&5
5835 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5836                 cf_save_CFLAGS="$CFLAGS"
5837                 for CC_SHARED_OPTS in -fPIC -fpic ''
5838                 do
5839                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5840                         cat >conftest.$ac_ext <<_ACEOF
5841 #line 5841 "configure"
5842 #include "confdefs.h"
5843 #include <stdio.h>
5844 int
5845 main (void)
5846 {
5847 int x = 1
5848   ;
5849   return 0;
5850 }
5851 _ACEOF
5852 rm -f conftest.$ac_objext
5853 if { (eval echo "$as_me:5853: \"$ac_compile\"") >&5
5854   (eval $ac_compile) 2>&5
5855   ac_status=$?
5856   echo "$as_me:5856: \$? = $ac_status" >&5
5857   (exit $ac_status); } &&
5858          { ac_try='test -s conftest.$ac_objext'
5859   { (eval echo "$as_me:5859: \"$ac_try\"") >&5
5860   (eval $ac_try) 2>&5
5861   ac_status=$?
5862   echo "$as_me:5862: \$? = $ac_status" >&5
5863   (exit $ac_status); }; }; then
5864   break
5865 else
5866   echo "$as_me: failed program was:" >&5
5867 cat conftest.$ac_ext >&5
5868 fi
5869 rm -f conftest.$ac_objext conftest.$ac_ext
5870                 done
5871                 echo "$as_me:5871: result: $CC_SHARED_OPTS" >&5
5872 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5873                 CFLAGS="$cf_save_CFLAGS"
5874         fi
5875
5876         cf_cv_shlib_version_infix=no
5877
5878         case $cf_cv_system_name in
5879         (aix4.3-9*|aix[5-7]*)
5880                 if test "$GCC" = yes; then
5881                         CC_SHARED_OPTS='-Wl,-brtl'
5882                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5883                 else
5884                         CC_SHARED_OPTS='-brtl'
5885                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5886                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5887                 fi
5888                 ;;
5889         (beos*)
5890                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5891                 ;;
5892         (cygwin*)
5893                 CC_SHARED_OPTS=
5894                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5895                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5896                 cf_cv_shlib_version=cygdll
5897                 cf_cv_shlib_version_infix=cygdll
5898                 shlibdir=$bindir
5899                 MAKE_DLLS=
5900                 cat >mk_shared_lib.sh <<-CF_EOF
5901                 #!$SHELL
5902                 SHARED_LIB=\$1
5903                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5904                 shift
5905                 cat <<-EOF
5906                 Linking shared library
5907                 ** SHARED_LIB \$SHARED_LIB
5908                 ** IMPORT_LIB \$IMPORT_LIB
5909 EOF
5910                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5911 CF_EOF
5912                 chmod +x mk_shared_lib.sh
5913                 ;;
5914         (msys*)
5915                 CC_SHARED_OPTS=
5916                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5917                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5918                 cf_cv_shlib_version=msysdll
5919                 cf_cv_shlib_version_infix=msysdll
5920                 shlibdir=$bindir
5921                 MAKE_DLLS=
5922                 cat >mk_shared_lib.sh <<-CF_EOF
5923                 #!$SHELL
5924                 SHARED_LIB=\$1
5925                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5926                 shift
5927                 cat <<-EOF
5928                 Linking shared library
5929                 ** SHARED_LIB \$SHARED_LIB
5930                 ** IMPORT_LIB \$IMPORT_LIB
5931 EOF
5932                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5933 CF_EOF
5934                 chmod +x mk_shared_lib.sh
5935                 ;;
5936         (darwin*)
5937                 cf_try_cflags="no-cpp-precomp"
5938                 CC_SHARED_OPTS="-dynamic"
5939                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5940                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5941                 cf_cv_shlib_version_infix=yes
5942                 echo "$as_me:5942: checking if ld -search_paths_first works" >&5
5943 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5944 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5945   echo $ECHO_N "(cached) $ECHO_C" >&6
5946 else
5947
5948                         cf_save_LDFLAGS=$LDFLAGS
5949                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5950                         cat >conftest.$ac_ext <<_ACEOF
5951 #line 5951 "configure"
5952 #include "confdefs.h"
5953
5954 int
5955 main (void)
5956 {
5957 int i;
5958   ;
5959   return 0;
5960 }
5961 _ACEOF
5962 rm -f conftest.$ac_objext conftest$ac_exeext
5963 if { (eval echo "$as_me:5963: \"$ac_link\"") >&5
5964   (eval $ac_link) 2>&5
5965   ac_status=$?
5966   echo "$as_me:5966: \$? = $ac_status" >&5
5967   (exit $ac_status); } &&
5968          { ac_try='test -s conftest$ac_exeext'
5969   { (eval echo "$as_me:5969: \"$ac_try\"") >&5
5970   (eval $ac_try) 2>&5
5971   ac_status=$?
5972   echo "$as_me:5972: \$? = $ac_status" >&5
5973   (exit $ac_status); }; }; then
5974   cf_cv_ldflags_search_paths_first=yes
5975 else
5976   echo "$as_me: failed program was:" >&5
5977 cat conftest.$ac_ext >&5
5978 cf_cv_ldflags_search_paths_first=no
5979 fi
5980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5981                                 LDFLAGS=$cf_save_LDFLAGS
5982 fi
5983 echo "$as_me:5983: result: $cf_cv_ldflags_search_paths_first" >&5
5984 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5985                 if test $cf_cv_ldflags_search_paths_first = yes; then
5986                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5987                 fi
5988                 ;;
5989         (hpux[7-8]*)
5990                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5991                 if test "$GCC" != yes; then
5992                         CC_SHARED_OPTS='+Z'
5993                 fi
5994                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5995                 INSTALL_LIB="-m 555"
5996                 ;;
5997         (hpux*)
5998                 # (tested with gcc 2.7.2 -- I don't have c89)
5999                 if test "$GCC" = yes; then
6000                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6001                 else
6002                         CC_SHARED_OPTS='+Z'
6003                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6004                 fi
6005                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6006                 # HP-UX shared libraries must be executable, and should be
6007                 # readonly to exploit a quirk in the memory manager.
6008                 INSTALL_LIB="-m 555"
6009                 ;;
6010         (interix*)
6011                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6012                 if test "$cf_cv_shlib_version" = rel; then
6013                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6014                 else
6015                         cf_shared_soname='`basename $@`'
6016                 fi
6017                 CC_SHARED_OPTS=
6018                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6019                 ;;
6020         (irix*)
6021                 if test "$cf_cv_enable_rpath" = yes ; then
6022                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6023                 fi
6024                 # tested with IRIX 5.2 and 'cc'.
6025                 if test "$GCC" != yes; then
6026                         CC_SHARED_OPTS='-KPIC'
6027                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6028                 else
6029                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6030                 fi
6031                 cf_cv_rm_so_locs=yes
6032                 ;;
6033         (linux*|gnu*|k*bsd*-gnu)
6034                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6035                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6036                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6037                 fi
6038                 if test "$cf_cv_enable_rpath" = yes ; then
6039                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6040                 fi
6041
6042         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6043         if test "$cf_cv_shlib_version" = rel; then
6044                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6045         else
6046                 cf_cv_shared_soname='`basename $@`'
6047         fi
6048
6049                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6050                 ;;
6051         (mingw*msvc*)
6052                 cf_cv_shlib_version=msvcdll
6053                 cf_cv_shlib_version_infix=msvcdll
6054                 shlibdir=$bindir
6055                 MAKE_DLLS=
6056                 if test "$DFT_LWR_MODEL" = "shared" ; then
6057                         LOCAL_LDFLAGS="-link -dll"
6058                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6059                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6060                 fi
6061                 CC_SHARED_OPTS=
6062                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6063                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6064                 cat >mk_shared_lib.sh <<-CF_EOF
6065                 #!$SHELL
6066                 SHARED_LIB=\$1
6067                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6068                 shift
6069                 my_ld=\$1
6070                 shift
6071                 cat <<-EOF
6072                 Linking shared library
6073                 ** SHARED LIB \$SHARED_LIB
6074                 ** IMPORT_LIB \$IMPORT_LIB
6075 EOF
6076                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6077                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6078                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6079 CF_EOF
6080                 chmod +x mk_shared_lib.sh
6081                 cat >mk_prog.sh <<-CF_EOF
6082                 #!$SHELL
6083                 shift
6084                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6085                 LD="$LD"
6086                 clopts=()
6087                 ldopts=("/subsystem:console")
6088                 libs=()
6089                 isdll=0
6090                 while test \$# -gt 0; do
6091                         case "\$1" in
6092                                 -link)
6093                                         # ignore -link argument
6094                                         ;;
6095                                 -M[TD] | -M[TD]d)
6096                                         # ignore runtime-library option
6097                                         ;;
6098                                 -dll)
6099                                         isdll=1
6100                                         ;;
6101                                 -W* | -w*)
6102                                         # ignore warnings
6103                                         ;;
6104                                 -D*)
6105                                         clopts+=("\$1")
6106                                         ;;
6107                                 -I*)
6108                                         clopts+=("\$1")
6109                                         ;;
6110                                 -l*)
6111                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6112                                         ;;
6113                                 -L*)
6114                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6115                                         ;;
6116                                 *.obj | *.o)
6117                                         ldopts+=("\$1")
6118                                         ;;
6119                                 -Wl,*)
6120                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6121                                                 ldopts+=("\${linkarg}")
6122                                         done
6123                                         ;;
6124                                 *.lib)
6125                                         ldopts+=("\$1")
6126                                         ;;
6127                                 -o)
6128                                         shift
6129                                         ldopts+=("-out:\$1")
6130                                         ;;
6131                                 *)
6132                                         clopts+=("\$1")
6133                                         ldopts+=("\$1")
6134                                         ;;
6135                         esac
6136                         shift
6137                 done
6138                 if [ "\$isdll" -ne 0 ]; then
6139                         for lib in \${libs[*]}; do
6140                                 ldopts+=("\$lib.dll.lib")
6141                         done
6142                 else
6143                         for lib in \${libs[*]}; do
6144                                 ldopts+=("\$lib.lib")
6145                         done
6146                 fi
6147                 cat <<-EOF
6148                 Creating program
6149                 ** ld options:   "\${ldopts[@]}"
6150 EOF
6151                 exec \$LD \${ldopts[@]}
6152 CF_EOF
6153                 chmod +x mk_prog.sh
6154                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6155                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6156                 ;;
6157         (mingw*)
6158                 cf_cv_shlib_version=mingw
6159                 cf_cv_shlib_version_infix=mingw
6160                 shlibdir=$bindir
6161                 MAKE_DLLS=
6162                 if test "$DFT_LWR_MODEL" = "shared" ; then
6163                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6164                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6165                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6166                 fi
6167                 CC_SHARED_OPTS=
6168                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6169                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6170                 cat >mk_shared_lib.sh <<-CF_EOF
6171                 #!$SHELL
6172                 SHARED_LIB=\$1
6173                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6174                 shift
6175                 cat <<-EOF
6176                 Linking shared library
6177                 ** SHARED_LIB \$SHARED_LIB
6178                 ** IMPORT_LIB \$IMPORT_LIB
6179 EOF
6180                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6181 CF_EOF
6182                 chmod +x mk_shared_lib.sh
6183                 ;;
6184         (openbsd[2-9].*|mirbsd*)
6185                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6186                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6187                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6188                 fi
6189                 if test "$cf_cv_enable_rpath" = yes ; then
6190                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6191                 fi
6192                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6193
6194         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6195         if test "$cf_cv_shlib_version" = rel; then
6196                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6197         else
6198                 cf_cv_shared_soname='`basename $@`'
6199         fi
6200
6201                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6202                 ;;
6203         (nskJ*)
6204                 CC_SHARED_OPTS=
6205                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6206                 ;;
6207         (nskL*)
6208                 CC_SHARED_OPTS=
6209                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6210                 ;;
6211         (nto-qnx*|openbsd*|freebsd[12].*)
6212                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6213                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6214                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6215                 ;;
6216         (dragonfly*|freebsd*)
6217                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6218                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6219                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6220                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6221                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6222                 fi
6223
6224         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6225         if test "$cf_cv_shlib_version" = rel; then
6226                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6227         else
6228                 cf_cv_shared_soname='`basename $@`'
6229         fi
6230
6231                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6232                 ;;
6233         (netbsd*)
6234                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6235                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6236                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6237                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6238                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6239                         if test "$cf_cv_shlib_version" = auto; then
6240                         if test -f /usr/libexec/ld.elf_so; then
6241                                 cf_cv_shlib_version=abi
6242                         else
6243                                 cf_cv_shlib_version=rel
6244                         fi
6245                         fi
6246
6247         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6248         if test "$cf_cv_shlib_version" = rel; then
6249                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6250         else
6251                 cf_cv_shared_soname='`basename $@`'
6252         fi
6253
6254                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6255                 else
6256                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6257                 fi
6258                 ;;
6259         (osf*|mls+*)
6260                 # tested with OSF/1 V3.2 and 'cc'
6261                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6262                 # link with shared libs).
6263                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6264                 case $host_os in
6265                 (osf4*)
6266                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6267                         ;;
6268                 esac
6269                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6270                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6271                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6272                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6273                 fi
6274                 cf_cv_rm_so_locs=yes
6275                 ;;
6276         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6277                 # tested with osr5.0.5
6278                 if test "$GCC" != yes; then
6279                         CC_SHARED_OPTS='-belf -KPIC'
6280                 fi
6281                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6282                 if test "$cf_cv_enable_rpath" = yes ; then
6283                         # only way is to set LD_RUN_PATH but no switch for it
6284                         RUN_PATH=$libdir
6285                 fi
6286                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6287                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6288                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6289                 ;;
6290         (sunos4*)
6291                 # tested with SunOS 4.1.1 and gcc 2.7.0
6292                 if test "$GCC" != yes; then
6293                         CC_SHARED_OPTS='-KPIC'
6294                 fi
6295                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6296                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6297                 ;;
6298         (solaris2*)
6299                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6300                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6301                 if test "$DFT_LWR_MODEL" = "shared" ; then
6302                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6303                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6304                 fi
6305                 if test "$cf_cv_enable_rpath" = yes ; then
6306                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6307                 fi
6308
6309         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6310         if test "$cf_cv_shlib_version" = rel; then
6311                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6312         else
6313                 cf_cv_shared_soname='`basename $@`'
6314         fi
6315
6316                 if test "$GCC" != yes; then
6317                         cf_save_CFLAGS="$CFLAGS"
6318                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6319                         do
6320                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6321                                 cat >conftest.$ac_ext <<_ACEOF
6322 #line 6322 "configure"
6323 #include "confdefs.h"
6324 #include <stdio.h>
6325 int
6326 main (void)
6327 {
6328 printf("Hello\n");
6329   ;
6330   return 0;
6331 }
6332 _ACEOF
6333 rm -f conftest.$ac_objext
6334 if { (eval echo "$as_me:6334: \"$ac_compile\"") >&5
6335   (eval $ac_compile) 2>&5
6336   ac_status=$?
6337   echo "$as_me:6337: \$? = $ac_status" >&5
6338   (exit $ac_status); } &&
6339          { ac_try='test -s conftest.$ac_objext'
6340   { (eval echo "$as_me:6340: \"$ac_try\"") >&5
6341   (eval $ac_try) 2>&5
6342   ac_status=$?
6343   echo "$as_me:6343: \$? = $ac_status" >&5
6344   (exit $ac_status); }; }; then
6345   break
6346 else
6347   echo "$as_me: failed program was:" >&5
6348 cat conftest.$ac_ext >&5
6349 fi
6350 rm -f conftest.$ac_objext conftest.$ac_ext
6351                         done
6352                         CFLAGS="$cf_save_CFLAGS"
6353                         CC_SHARED_OPTS=$cf_shared_opts
6354                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6355                 else
6356                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6357                 fi
6358                 ;;
6359         (sysv5uw7*|unix_sv*)
6360                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6361                 if test "$GCC" != yes; then
6362                         CC_SHARED_OPTS='-KPIC'
6363                 fi
6364                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6365                 ;;
6366         (*)
6367                 CC_SHARED_OPTS='unknown'
6368                 MK_SHARED_LIB='echo unknown'
6369                 ;;
6370         esac
6371
6372         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6373         case "$cf_cv_shlib_version" in
6374         (rel|abi)
6375                 case "$MK_SHARED_LIB" in
6376                 (*'-o $@')
6377                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6378                         ;;
6379                 (*)
6380                         { echo "$as_me:6380: WARNING: ignored --with-shlib-version" >&5
6381 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6382                         ;;
6383                 esac
6384                 ;;
6385         esac
6386
6387         if test -n "$cf_try_cflags"
6388         then
6389 cat > conftest.$ac_ext <<EOF
6390 #line 6390 "${as_me:-configure}"
6391 #include <stdio.h>
6392 int main(int argc, char *argv[])
6393 {
6394         printf("hello\n");
6395         return (argv[argc-1] == 0) ;
6396 }
6397 EOF
6398                 cf_save_CFLAGS="$CFLAGS"
6399                 for cf_opt in $cf_try_cflags
6400                 do
6401                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6402                         echo "$as_me:6402: checking if CFLAGS option -$cf_opt works" >&5
6403 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6404                         if { (eval echo "$as_me:6404: \"$ac_compile\"") >&5
6405   (eval $ac_compile) 2>&5
6406   ac_status=$?
6407   echo "$as_me:6407: \$? = $ac_status" >&5
6408   (exit $ac_status); }; then
6409                                 echo "$as_me:6409: result: yes" >&5
6410 echo "${ECHO_T}yes" >&6
6411                                 cf_save_CFLAGS="$CFLAGS"
6412                         else
6413                                 echo "$as_me:6413: result: no" >&5
6414 echo "${ECHO_T}no" >&6
6415                         fi
6416                 done
6417                 CFLAGS="$cf_save_CFLAGS"
6418         fi
6419
6420         # RPATH_LIST is a colon-separated list of directories
6421         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6422         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6423
6424         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6425
6426         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6427
6428 echo "${as_me:-configure}:6428: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6429
6430         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6431
6432 echo "${as_me:-configure}:6432: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6433
6434 for model in $cf_list_models; do
6435         case $model in
6436         (libtool)
6437
6438 echo "$as_me:6438: checking for additional libtool options" >&5
6439 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6440
6441 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6442 if test "${with_libtool_opts+set}" = set; then
6443   withval="$with_libtool_opts"
6444   with_libtool_opts=$withval
6445 else
6446   with_libtool_opts=no
6447 fi;
6448 echo "$as_me:6448: result: $with_libtool_opts" >&5
6449 echo "${ECHO_T}$with_libtool_opts" >&6
6450
6451 case .$with_libtool_opts in
6452 (.yes|.no|.)
6453         ;;
6454 (*)
6455         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6456         ;;
6457 esac
6458
6459 echo "$as_me:6459: checking if exported-symbols file should be used" >&5
6460 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6461
6462 # Check whether --with-export-syms or --without-export-syms was given.
6463 if test "${with_export_syms+set}" = set; then
6464   withval="$with_export_syms"
6465   with_export_syms=$withval
6466 else
6467   with_export_syms=no
6468 fi;
6469 if test "x$with_export_syms" = xyes
6470 then
6471         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6472
6473 fi
6474 echo "$as_me:6474: result: $with_export_syms" >&5
6475 echo "${ECHO_T}$with_export_syms" >&6
6476 if test "x$with_export_syms" != xno
6477 then
6478         EXPORT_SYMS="-export-symbols $with_export_syms"
6479
6480 fi
6481
6482                 ;;
6483         (shared)
6484                 if test "$CC_SHARED_OPTS" = "unknown"; then
6485                         { { echo "$as_me:6485: error: Shared libraries are not supported in this version" >&5
6486 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6487    { (exit 1); exit 1; }; }
6488                 fi
6489                 # workaround for inept transition to PIE vs PIC...
6490                 echo "$as_me:6490: checking if current CFLAGS link properly" >&5
6491 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6492                 cat >conftest.$ac_ext <<_ACEOF
6493 #line 6493 "configure"
6494 #include "confdefs.h"
6495 #include <stdio.h>
6496 int
6497 main (void)
6498 {
6499 printf("Hello work\n");
6500   ;
6501   return 0;
6502 }
6503 _ACEOF
6504 rm -f conftest.$ac_objext conftest$ac_exeext
6505 if { (eval echo "$as_me:6505: \"$ac_link\"") >&5
6506   (eval $ac_link) 2>&5
6507   ac_status=$?
6508   echo "$as_me:6508: \$? = $ac_status" >&5
6509   (exit $ac_status); } &&
6510          { ac_try='test -s conftest$ac_exeext'
6511   { (eval echo "$as_me:6511: \"$ac_try\"") >&5
6512   (eval $ac_try) 2>&5
6513   ac_status=$?
6514   echo "$as_me:6514: \$? = $ac_status" >&5
6515   (exit $ac_status); }; }; then
6516   cf_cflags_work=yes
6517 else
6518   echo "$as_me: failed program was:" >&5
6519 cat conftest.$ac_ext >&5
6520 cf_cflags_work=no
6521 fi
6522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6523                 echo "$as_me:6523: result: $cf_cflags_work" >&5
6524 echo "${ECHO_T}$cf_cflags_work" >&6
6525                 if test "$cf_cflags_work" = no
6526                 then
6527                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6528
6529 echo "${as_me:-configure}:6529: testing try to work around by appending shared-options ..." 1>&5
6530
6531                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6532                 fi
6533
6534 echo "$as_me:6534: checking if versioned-symbols file should be used" >&5
6535 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6536
6537 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6538 if test "${with_versioned_syms+set}" = set; then
6539   withval="$with_versioned_syms"
6540   with_versioned_syms=$withval
6541 else
6542   with_versioned_syms=no
6543 fi;
6544 case "x$with_versioned_syms" in
6545 (xyes)
6546         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6547
6548         ;;
6549 (xno)
6550         ;;
6551 (x/*)
6552         test -f "$with_versioned_syms" || { { echo "$as_me:6552: error: expected a filename: $with_versioned_syms" >&5
6553 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6554    { (exit 1); exit 1; }; }
6555         ;;
6556 (*)
6557         test -f "$with_versioned_syms" || { { echo "$as_me:6557: error: expected a filename: $with_versioned_syms" >&5
6558 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6559    { (exit 1); exit 1; }; }
6560         with_versioned_syms=`pwd`/"$with_versioned_syms"
6561         ;;
6562 esac
6563 echo "$as_me:6563: result: $with_versioned_syms" >&5
6564 echo "${ECHO_T}$with_versioned_syms" >&6
6565
6566 RESULTING_SYMS=
6567 VERSIONED_SYMS=
6568 WILDCARD_SYMS=
6569
6570 if test "x$with_versioned_syms" != xno
6571 then
6572         RESULTING_SYMS=$with_versioned_syms
6573         case "x$MK_SHARED_LIB" in
6574         (*-Wl,*)
6575                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6576                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6577                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6578
6579 echo "${as_me:-configure}:6579: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6580
6581                 ;;
6582         (*-dy\ *)
6583                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6584                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6585                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6586
6587 echo "${as_me:-configure}:6587: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6588
6589                 ;;
6590         (*)
6591                 { echo "$as_me:6591: WARNING: this system does not support versioned-symbols" >&5
6592 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6593                 ;;
6594         esac
6595
6596         # Linux ld can selectively override scope, e.g., of symbols beginning with
6597         # "_" by first declaring some as global, and then using a wildcard to
6598         # declare the others as local.  Some other loaders cannot do this.  Check
6599         # by constructing a (very) simple shared library and inspecting its
6600         # symbols.
6601         if test "x$VERSIONED_SYMS" != "x"
6602         then
6603                 echo "$as_me:6603: checking if wildcards can be used to selectively omit symbols" >&5
6604 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6605                 WILDCARD_SYMS=no
6606
6607                 # make sources
6608                 rm -f conftest.*
6609
6610                 cat >conftest.ver <<EOF
6611 module_1.0 {
6612 global:
6613         globalf1;
6614 local:
6615         localf1;
6616 };
6617 module_2.0 {
6618 global:
6619         globalf2;
6620 local:
6621         localf2;
6622         _*;
6623 } module_1.0;
6624 submodule_1.0 {
6625 global:
6626         subglobalf1;
6627         _ismissing;
6628 local:
6629         sublocalf1;
6630 };
6631 submodule_2.0 {
6632 global:
6633         subglobalf2;
6634 local:
6635         sublocalf2;
6636         _*;
6637 } submodule_1.0;
6638 EOF
6639                 cat >conftest.$ac_ext <<EOF
6640 #line 6640 "configure"
6641 int     _ismissing(void) { return 1; }
6642 int     _localf1(void) { return 1; }
6643 int     _localf2(void) { return 2; }
6644 int     globalf1(void) { return 1; }
6645 int     globalf2(void) { return 2; }
6646 int     _sublocalf1(void) { return 1; }
6647 int     _sublocalf2(void) { return 2; }
6648 int     subglobalf1(void) { return 1; }
6649 int     subglobalf2(void) { return 2; }
6650 EOF
6651                 cat >conftest.mk <<EOF
6652 CC=${CC}
6653 CFLAGS=${CFLAGS}
6654 CPPFLAGS=${CPPFLAGS}
6655 LDFLAGS=${LDFLAGS}
6656 LIBS=${LIBS}
6657 VERSIONED_SYMS=${VERSIONED_SYMS}
6658 RESULTING_SYMS=conftest.ver
6659 MK_SHARED_LIB=${MK_SHARED_LIB}
6660 conftest.so: conftest.$ac_cv_objext
6661                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6662 EOF
6663
6664                 # compile source, make library
6665                 if make -f conftest.mk 2>&5 >/dev/null
6666                 then
6667                         # test for missing symbol in either Data or Text section
6668                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6669                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6670                 fi
6671                 echo "$as_me:6671: result: $WILDCARD_SYMS" >&5
6672 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6673                 rm -f conftest.*
6674         fi
6675 fi
6676
6677                 ;;
6678         esac
6679 done
6680
6681 ### Checks for special libraries, must be done up-front.
6682 SHLIB_LIST=""
6683
6684 echo "$as_me:6684: checking if you want to link with the GPM mouse library" >&5
6685 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6686
6687 # Check whether --with-gpm or --without-gpm was given.
6688 if test "${with_gpm+set}" = set; then
6689   withval="$with_gpm"
6690   with_gpm=$withval
6691 else
6692   with_gpm=maybe
6693 fi;
6694 echo "$as_me:6694: result: $with_gpm" >&5
6695 echo "${ECHO_T}$with_gpm" >&6
6696
6697 if test "$with_gpm" != no ; then
6698         echo "$as_me:6698: checking for gpm.h" >&5
6699 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6700 if test "${ac_cv_header_gpm_h+set}" = set; then
6701   echo $ECHO_N "(cached) $ECHO_C" >&6
6702 else
6703   cat >conftest.$ac_ext <<_ACEOF
6704 #line 6704 "configure"
6705 #include "confdefs.h"
6706 #include <gpm.h>
6707 _ACEOF
6708 if { (eval echo "$as_me:6708: \"$ac_cpp conftest.$ac_ext\"") >&5
6709   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6710   ac_status=$?
6711   egrep -v '^ *\+' conftest.er1 >conftest.err
6712   rm -f conftest.er1
6713   cat conftest.err >&5
6714   echo "$as_me:6714: \$? = $ac_status" >&5
6715   (exit $ac_status); } >/dev/null; then
6716   if test -s conftest.err; then
6717     ac_cpp_err=$ac_c_preproc_warn_flag
6718   else
6719     ac_cpp_err=
6720   fi
6721 else
6722   ac_cpp_err=yes
6723 fi
6724 if test -z "$ac_cpp_err"; then
6725   ac_cv_header_gpm_h=yes
6726 else
6727   echo "$as_me: failed program was:" >&5
6728   cat conftest.$ac_ext >&5
6729   ac_cv_header_gpm_h=no
6730 fi
6731 rm -f conftest.err conftest.$ac_ext
6732 fi
6733 echo "$as_me:6733: result: $ac_cv_header_gpm_h" >&5
6734 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6735 if test $ac_cv_header_gpm_h = yes; then
6736
6737 cat >>confdefs.h <<\EOF
6738 #define HAVE_GPM_H 1
6739 EOF
6740
6741                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6742                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6743
6744 echo "${as_me:-configure}:6744: testing assuming we really have GPM library ..." 1>&5
6745
6746 cat >>confdefs.h <<\EOF
6747 #define HAVE_LIBGPM 1
6748 EOF
6749
6750                         with_gpm=yes
6751                 else
6752                         echo "$as_me:6752: checking for Gpm_Open in -lgpm" >&5
6753 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6754 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6755   echo $ECHO_N "(cached) $ECHO_C" >&6
6756 else
6757   ac_check_lib_save_LIBS=$LIBS
6758 LIBS="-lgpm  $LIBS"
6759 cat >conftest.$ac_ext <<_ACEOF
6760 #line 6760 "configure"
6761 #include "confdefs.h"
6762
6763 /* Override any gcc2 internal prototype to avoid an error.  */
6764 #ifdef __cplusplus
6765 extern "C"
6766 #endif
6767 /* We use char because int might match the return type of a gcc2
6768    builtin and then its argument prototype would still apply.  */
6769 char Gpm_Open ();
6770 int
6771 main (void)
6772 {
6773 Gpm_Open ();
6774   ;
6775   return 0;
6776 }
6777 _ACEOF
6778 rm -f conftest.$ac_objext conftest$ac_exeext
6779 if { (eval echo "$as_me:6779: \"$ac_link\"") >&5
6780   (eval $ac_link) 2>&5
6781   ac_status=$?
6782   echo "$as_me:6782: \$? = $ac_status" >&5
6783   (exit $ac_status); } &&
6784          { ac_try='test -s conftest$ac_exeext'
6785   { (eval echo "$as_me:6785: \"$ac_try\"") >&5
6786   (eval $ac_try) 2>&5
6787   ac_status=$?
6788   echo "$as_me:6788: \$? = $ac_status" >&5
6789   (exit $ac_status); }; }; then
6790   ac_cv_lib_gpm_Gpm_Open=yes
6791 else
6792   echo "$as_me: failed program was:" >&5
6793 cat conftest.$ac_ext >&5
6794 ac_cv_lib_gpm_Gpm_Open=no
6795 fi
6796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6797 LIBS=$ac_check_lib_save_LIBS
6798 fi
6799 echo "$as_me:6799: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6800 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6801 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6802   with_gpm=yes
6803 else
6804
6805                                 if test "$with_gpm" = maybe; then
6806                                         { echo "$as_me:6806: WARNING: Cannot link with GPM library" >&5
6807 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6808                                         with_gpm=no
6809                                 else
6810                                         { { echo "$as_me:6810: error: Cannot link with GPM library" >&5
6811 echo "$as_me: error: Cannot link with GPM library" >&2;}
6812    { (exit 1); exit 1; }; }
6813                                 fi
6814
6815 fi
6816
6817                 fi
6818
6819 else
6820
6821                 test "$with_gpm" != maybe && { echo "$as_me:6821: WARNING: Cannot find GPM header" >&5
6822 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6823                 with_gpm=no
6824
6825 fi
6826
6827 fi
6828
6829 if test "$with_gpm" != no ; then
6830         echo "$as_me:6830: checking if you want to load GPM dynamically" >&5
6831 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6832
6833 # Check whether --with-dlsym or --without-dlsym was given.
6834 if test "${with_dlsym+set}" = set; then
6835   withval="$with_dlsym"
6836   with_dlsym=$withval
6837 else
6838   with_dlsym=yes
6839 fi;
6840         echo "$as_me:6840: result: $with_dlsym" >&5
6841 echo "${ECHO_T}$with_dlsym" >&6
6842         if test "x$with_dlsym" = xyes ; then
6843
6844 cf_have_dlsym=no
6845 echo "$as_me:6845: checking for dlsym" >&5
6846 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6847 if test "${ac_cv_func_dlsym+set}" = set; then
6848   echo $ECHO_N "(cached) $ECHO_C" >&6
6849 else
6850   cat >conftest.$ac_ext <<_ACEOF
6851 #line 6851 "configure"
6852 #include "confdefs.h"
6853 #define dlsym autoconf_temporary
6854 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6855 #undef dlsym
6856
6857 #ifdef __cplusplus
6858 extern "C"
6859 #endif
6860
6861 /* We use char because int might match the return type of a gcc2
6862    builtin and then its argument prototype would still apply.  */
6863 char dlsym (void);
6864
6865 int
6866 main (void)
6867 {
6868
6869 /* The GNU C library defines stubs for functions which it implements
6870     to always fail with ENOSYS.  Some functions are actually named
6871     something starting with __ and the normal name is an alias.  */
6872 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6873 #error found stub for dlsym
6874 #endif
6875
6876         return dlsym ();
6877   ;
6878   return 0;
6879 }
6880 _ACEOF
6881 rm -f conftest.$ac_objext conftest$ac_exeext
6882 if { (eval echo "$as_me:6882: \"$ac_link\"") >&5
6883   (eval $ac_link) 2>&5
6884   ac_status=$?
6885   echo "$as_me:6885: \$? = $ac_status" >&5
6886   (exit $ac_status); } &&
6887          { ac_try='test -s conftest$ac_exeext'
6888   { (eval echo "$as_me:6888: \"$ac_try\"") >&5
6889   (eval $ac_try) 2>&5
6890   ac_status=$?
6891   echo "$as_me:6891: \$? = $ac_status" >&5
6892   (exit $ac_status); }; }; then
6893   ac_cv_func_dlsym=yes
6894 else
6895   echo "$as_me: failed program was:" >&5
6896 cat conftest.$ac_ext >&5
6897 ac_cv_func_dlsym=no
6898 fi
6899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6900 fi
6901 echo "$as_me:6901: result: $ac_cv_func_dlsym" >&5
6902 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6903 if test $ac_cv_func_dlsym = yes; then
6904   cf_have_dlsym=yes
6905 else
6906
6907 cf_have_libdl=no
6908 echo "$as_me:6908: checking for dlsym in -ldl" >&5
6909 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6910 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6911   echo $ECHO_N "(cached) $ECHO_C" >&6
6912 else
6913   ac_check_lib_save_LIBS=$LIBS
6914 LIBS="-ldl  $LIBS"
6915 cat >conftest.$ac_ext <<_ACEOF
6916 #line 6916 "configure"
6917 #include "confdefs.h"
6918
6919 /* Override any gcc2 internal prototype to avoid an error.  */
6920 #ifdef __cplusplus
6921 extern "C"
6922 #endif
6923 /* We use char because int might match the return type of a gcc2
6924    builtin and then its argument prototype would still apply.  */
6925 char dlsym ();
6926 int
6927 main (void)
6928 {
6929 dlsym ();
6930   ;
6931   return 0;
6932 }
6933 _ACEOF
6934 rm -f conftest.$ac_objext conftest$ac_exeext
6935 if { (eval echo "$as_me:6935: \"$ac_link\"") >&5
6936   (eval $ac_link) 2>&5
6937   ac_status=$?
6938   echo "$as_me:6938: \$? = $ac_status" >&5
6939   (exit $ac_status); } &&
6940          { ac_try='test -s conftest$ac_exeext'
6941   { (eval echo "$as_me:6941: \"$ac_try\"") >&5
6942   (eval $ac_try) 2>&5
6943   ac_status=$?
6944   echo "$as_me:6944: \$? = $ac_status" >&5
6945   (exit $ac_status); }; }; then
6946   ac_cv_lib_dl_dlsym=yes
6947 else
6948   echo "$as_me: failed program was:" >&5
6949 cat conftest.$ac_ext >&5
6950 ac_cv_lib_dl_dlsym=no
6951 fi
6952 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6953 LIBS=$ac_check_lib_save_LIBS
6954 fi
6955 echo "$as_me:6955: result: $ac_cv_lib_dl_dlsym" >&5
6956 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6957 if test $ac_cv_lib_dl_dlsym = yes; then
6958
6959         cf_have_dlsym=yes
6960         cf_have_libdl=yes
6961 fi
6962
6963 fi
6964
6965 if test "$cf_have_dlsym" = yes ; then
6966         test "$cf_have_libdl" = yes && {
6967 cf_add_libs="$LIBS"
6968 # reverse order
6969 cf_add_0lib=
6970 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6971 # filter duplicates
6972 for cf_add_1lib in $cf_add_0lib; do
6973         for cf_add_2lib in $cf_add_libs; do
6974                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6975                         cf_add_1lib=
6976                         break
6977                 fi
6978         done
6979         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6980 done
6981 LIBS="$cf_add_libs"
6982  }
6983
6984         echo "$as_me:6984: checking whether able to link to dl*() functions" >&5
6985 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6986         cat >conftest.$ac_ext <<_ACEOF
6987 #line 6987 "configure"
6988 #include "confdefs.h"
6989 #include <dlfcn.h>
6990 int
6991 main (void)
6992 {
6993
6994                 void *obj;
6995                 if ((obj = dlopen("filename", 0)) != 0) {
6996                         if (dlsym(obj, "symbolname") == 0) {
6997                         dlclose(obj);
6998                         }
6999                 }
7000   ;
7001   return 0;
7002 }
7003 _ACEOF
7004 rm -f conftest.$ac_objext conftest$ac_exeext
7005 if { (eval echo "$as_me:7005: \"$ac_link\"") >&5
7006   (eval $ac_link) 2>&5
7007   ac_status=$?
7008   echo "$as_me:7008: \$? = $ac_status" >&5
7009   (exit $ac_status); } &&
7010          { ac_try='test -s conftest$ac_exeext'
7011   { (eval echo "$as_me:7011: \"$ac_try\"") >&5
7012   (eval $ac_try) 2>&5
7013   ac_status=$?
7014   echo "$as_me:7014: \$? = $ac_status" >&5
7015   (exit $ac_status); }; }; then
7016
7017 cat >>confdefs.h <<\EOF
7018 #define HAVE_LIBDL 1
7019 EOF
7020
7021 else
7022   echo "$as_me: failed program was:" >&5
7023 cat conftest.$ac_ext >&5
7024
7025                 { { echo "$as_me:7025: error: Cannot link test program for libdl" >&5
7026 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7027    { (exit 1); exit 1; }; }
7028 fi
7029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7030         echo "$as_me:7030: result: ok" >&5
7031 echo "${ECHO_T}ok" >&6
7032 else
7033         { { echo "$as_me:7033: error: Cannot find dlsym function" >&5
7034 echo "$as_me: error: Cannot find dlsym function" >&2;}
7035    { (exit 1); exit 1; }; }
7036 fi
7037
7038                 if test "x$with_gpm" != xyes ; then
7039                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7040
7041 echo "${as_me:-configure}:7041: testing assuming soname for gpm is $with_gpm ..." 1>&5
7042
7043                         cf_cv_gpm_soname="$with_gpm"
7044                 else
7045
7046 echo "$as_me:7046: checking for soname of gpm library" >&5
7047 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7048 if test "${cf_cv_gpm_soname+set}" = set; then
7049   echo $ECHO_N "(cached) $ECHO_C" >&6
7050 else
7051
7052 cf_cv_gpm_soname=unknown
7053 if test "$cross_compiling" != yes ; then
7054 cat >conftest.$ac_ext <<CF_EOF
7055 #include <gpm.h>
7056 int main(void)
7057 {
7058 if (Gpm_Open(0,0)) Gpm_Close();
7059         ${cf_cv_main_return:-return}(0);
7060 }
7061 CF_EOF
7062 cf_save_LIBS="$LIBS"
7063
7064 cf_add_libs="$LIBS"
7065 # reverse order
7066 cf_add_0lib=
7067 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7068 # filter duplicates
7069 for cf_add_1lib in $cf_add_0lib; do
7070         for cf_add_2lib in $cf_add_libs; do
7071                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7072                         cf_add_1lib=
7073                         break
7074                 fi
7075         done
7076         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7077 done
7078 LIBS="$cf_add_libs"
7079
7080         if { (eval echo "$as_me:7080: \"$ac_compile\"") >&5
7081   (eval $ac_compile) 2>&5
7082   ac_status=$?
7083   echo "$as_me:7083: \$? = $ac_status" >&5
7084   (exit $ac_status); } ; then
7085                 if { (eval echo "$as_me:7085: \"$ac_link\"") >&5
7086   (eval $ac_link) 2>&5
7087   ac_status=$?
7088   echo "$as_me:7088: \$? = $ac_status" >&5
7089   (exit $ac_status); } ; then
7090                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7091                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7092                 fi
7093         fi
7094 rm -rf conftest*
7095 LIBS="$cf_save_LIBS"
7096 fi
7097
7098 fi
7099 echo "$as_me:7099: result: $cf_cv_gpm_soname" >&5
7100 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7101
7102                 fi
7103                 test "$cf_cv_gpm_soname" != "unknown" &&
7104 cat >>confdefs.h <<EOF
7105 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7106 EOF
7107
7108                 SHLIB_LIST="-ldl $SHLIB_LIST"
7109
7110 cf_add_libs="$PRIVATE_LIBS"
7111 # reverse order
7112 cf_add_0lib=
7113 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7114 # filter duplicates
7115 for cf_add_1lib in $cf_add_0lib; do
7116         for cf_add_2lib in $cf_add_libs; do
7117                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7118                         cf_add_1lib=
7119                         break
7120                 fi
7121         done
7122         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7123 done
7124 PRIVATE_LIBS="$cf_add_libs"
7125
7126         else
7127                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7128
7129 cf_add_libs="$TEST_LIBS"
7130 # reverse order
7131 cf_add_0lib=
7132 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7133 # filter duplicates
7134 for cf_add_1lib in $cf_add_0lib; do
7135         for cf_add_2lib in $cf_add_libs; do
7136                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7137                         cf_add_1lib=
7138                         break
7139                 fi
7140         done
7141         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7142 done
7143 TEST_LIBS="$cf_add_libs"
7144
7145 cf_add_libs="$PRIVATE_LIBS"
7146 # reverse order
7147 cf_add_0lib=
7148 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7149 # filter duplicates
7150 for cf_add_1lib in $cf_add_0lib; do
7151         for cf_add_2lib in $cf_add_libs; do
7152                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7153                         cf_add_1lib=
7154                         break
7155                 fi
7156         done
7157         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7158 done
7159 PRIVATE_LIBS="$cf_add_libs"
7160
7161         fi
7162
7163 cat >>confdefs.h <<\EOF
7164 #define HAVE_LIBGPM 1
7165 EOF
7166
7167 echo "$as_me:7167: checking for Gpm_Wgetch in -lgpm" >&5
7168 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7169 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7170   echo $ECHO_N "(cached) $ECHO_C" >&6
7171 else
7172   ac_check_lib_save_LIBS=$LIBS
7173 LIBS="-lgpm  $LIBS"
7174 cat >conftest.$ac_ext <<_ACEOF
7175 #line 7175 "configure"
7176 #include "confdefs.h"
7177
7178 /* Override any gcc2 internal prototype to avoid an error.  */
7179 #ifdef __cplusplus
7180 extern "C"
7181 #endif
7182 /* We use char because int might match the return type of a gcc2
7183    builtin and then its argument prototype would still apply.  */
7184 char Gpm_Wgetch ();
7185 int
7186 main (void)
7187 {
7188 Gpm_Wgetch ();
7189   ;
7190   return 0;
7191 }
7192 _ACEOF
7193 rm -f conftest.$ac_objext conftest$ac_exeext
7194 if { (eval echo "$as_me:7194: \"$ac_link\"") >&5
7195   (eval $ac_link) 2>&5
7196   ac_status=$?
7197   echo "$as_me:7197: \$? = $ac_status" >&5
7198   (exit $ac_status); } &&
7199          { ac_try='test -s conftest$ac_exeext'
7200   { (eval echo "$as_me:7200: \"$ac_try\"") >&5
7201   (eval $ac_try) 2>&5
7202   ac_status=$?
7203   echo "$as_me:7203: \$? = $ac_status" >&5
7204   (exit $ac_status); }; }; then
7205   ac_cv_lib_gpm_Gpm_Wgetch=yes
7206 else
7207   echo "$as_me: failed program was:" >&5
7208 cat conftest.$ac_ext >&5
7209 ac_cv_lib_gpm_Gpm_Wgetch=no
7210 fi
7211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7212 LIBS=$ac_check_lib_save_LIBS
7213 fi
7214 echo "$as_me:7214: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7215 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7216 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7217
7218 echo "$as_me:7218: checking if GPM is weakly bound to curses library" >&5
7219 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7220 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7221   echo $ECHO_N "(cached) $ECHO_C" >&6
7222 else
7223
7224 cf_cv_check_gpm_wgetch=unknown
7225 if test "$cross_compiling" != yes ; then
7226
7227 cat >conftest.$ac_ext <<CF_EOF
7228 #include <gpm.h>
7229 int main(void)
7230 {
7231         Gpm_Wgetch();
7232         ${cf_cv_main_return:-return}(0);
7233 }
7234 CF_EOF
7235
7236         cf_save_LIBS="$LIBS"
7237         # This only works if we can look at the symbol table.  If a shared
7238         # library is stripped for install, we cannot use that.  So we're forced
7239         # to rely on the static library, noting that some packagers may not
7240         # include it.
7241         LIBS="-static -lgpm -dynamic $LIBS"
7242         if { (eval echo "$as_me:7242: \"$ac_compile\"") >&5
7243   (eval $ac_compile) 2>&5
7244   ac_status=$?
7245   echo "$as_me:7245: \$? = $ac_status" >&5
7246   (exit $ac_status); } ; then
7247                 if { (eval echo "$as_me:7247: \"$ac_link\"") >&5
7248   (eval $ac_link) 2>&5
7249   ac_status=$?
7250   echo "$as_me:7250: \$? = $ac_status" >&5
7251   (exit $ac_status); } ; then
7252                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7253                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7254                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7255                 fi
7256         fi
7257         rm -rf conftest*
7258         LIBS="$cf_save_LIBS"
7259 fi
7260
7261 fi
7262 echo "$as_me:7262: result: $cf_cv_check_gpm_wgetch" >&5
7263 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7264
7265 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7266         { echo "$as_me:7266: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7267 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7268 fi
7269
7270 fi
7271
7272 fi
7273
7274 echo "$as_me:7274: checking if you want to use PCRE2 for regular-expressions" >&5
7275 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7276
7277 # Check whether --with-pcre2 or --without-pcre2 was given.
7278 if test "${with_pcre2+set}" = set; then
7279   withval="$with_pcre2"
7280
7281 fi;
7282 test -z "$with_pcre2" && with_pcre2=no
7283 echo "$as_me:7283: result: $with_pcre2" >&5
7284 echo "${ECHO_T}$with_pcre2" >&6
7285
7286 if test "x$with_pcre2" != xno ; then
7287
7288 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7289         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7290
7291 echo "${as_me:-configure}:7291: testing found package libpcre2 ..." 1>&5
7292
7293         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7294         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7295         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7296
7297 echo "${as_me:-configure}:7297: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7298
7299         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7300
7301 echo "${as_me:-configure}:7301: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7302
7303 cf_fix_cppflags=no
7304 cf_new_cflags=
7305 cf_new_cppflags=
7306 cf_new_extra_cppflags=
7307
7308 for cf_add_cflags in $cf_pkgconfig_incs
7309 do
7310 case $cf_fix_cppflags in
7311 (no)
7312         case $cf_add_cflags in
7313         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7314                 case $cf_add_cflags in
7315                 (-D*)
7316                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7317
7318                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7319                                 && test -z "${cf_tst_cflags}" \
7320                                 && cf_fix_cppflags=yes
7321
7322                         if test $cf_fix_cppflags = yes ; then
7323
7324         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7325         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7326
7327                                 continue
7328                         elif test "${cf_tst_cflags}" = "\"'" ; then
7329
7330         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7331         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7332
7333                                 continue
7334                         fi
7335                         ;;
7336                 esac
7337                 case "$CPPFLAGS" in
7338                 (*$cf_add_cflags)
7339                         ;;
7340                 (*)
7341                         case $cf_add_cflags in
7342                         (-D*)
7343                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7344
7345 CPPFLAGS=`echo "$CPPFLAGS" | \
7346         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7347                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7348
7349                                 ;;
7350                         esac
7351
7352         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7353         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7354
7355                         ;;
7356                 esac
7357                 ;;
7358         (*)
7359
7360         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7361         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7362
7363                 ;;
7364         esac
7365         ;;
7366 (yes)
7367
7368         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7369         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7370
7371         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7372
7373         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7374                 && test -z "${cf_tst_cflags}" \
7375                 && cf_fix_cppflags=no
7376         ;;
7377 esac
7378 done
7379
7380 if test -n "$cf_new_cflags" ; then
7381
7382         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7383         CFLAGS="${CFLAGS}$cf_new_cflags"
7384
7385 fi
7386
7387 if test -n "$cf_new_cppflags" ; then
7388
7389         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7390         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7391
7392 fi
7393
7394 if test -n "$cf_new_extra_cppflags" ; then
7395
7396         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7397         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7398
7399 fi
7400
7401 cf_add_libs="$LIBS"
7402 # reverse order
7403 cf_add_0lib=
7404 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7405 # filter duplicates
7406 for cf_add_1lib in $cf_add_0lib; do
7407         for cf_add_2lib in $cf_add_libs; do
7408                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7409                         cf_add_1lib=
7410                         break
7411                 fi
7412         done
7413         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7414 done
7415 LIBS="$cf_add_libs"
7416
7417         :
7418 else
7419         cf_pkgconfig_incs=
7420         cf_pkgconfig_libs=
7421
7422 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7423         test -n "$verbose" && echo "    found package libpcre" 1>&6
7424
7425 echo "${as_me:-configure}:7425: testing found package libpcre ..." 1>&5
7426
7427         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7428         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7429         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7430
7431 echo "${as_me:-configure}:7431: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7432
7433         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7434
7435 echo "${as_me:-configure}:7435: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7436
7437 cf_fix_cppflags=no
7438 cf_new_cflags=
7439 cf_new_cppflags=
7440 cf_new_extra_cppflags=
7441
7442 for cf_add_cflags in $cf_pkgconfig_incs
7443 do
7444 case $cf_fix_cppflags in
7445 (no)
7446         case $cf_add_cflags in
7447         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7448                 case $cf_add_cflags in
7449                 (-D*)
7450                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7451
7452                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7453                                 && test -z "${cf_tst_cflags}" \
7454                                 && cf_fix_cppflags=yes
7455
7456                         if test $cf_fix_cppflags = yes ; then
7457
7458         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7459         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7460
7461                                 continue
7462                         elif test "${cf_tst_cflags}" = "\"'" ; then
7463
7464         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7465         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7466
7467                                 continue
7468                         fi
7469                         ;;
7470                 esac
7471                 case "$CPPFLAGS" in
7472                 (*$cf_add_cflags)
7473                         ;;
7474                 (*)
7475                         case $cf_add_cflags in
7476                         (-D*)
7477                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7478
7479 CPPFLAGS=`echo "$CPPFLAGS" | \
7480         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7481                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7482
7483                                 ;;
7484                         esac
7485
7486         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7487         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7488
7489                         ;;
7490                 esac
7491                 ;;
7492         (*)
7493
7494         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7495         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7496
7497                 ;;
7498         esac
7499         ;;
7500 (yes)
7501
7502         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7503         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7504
7505         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7506
7507         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7508                 && test -z "${cf_tst_cflags}" \
7509                 && cf_fix_cppflags=no
7510         ;;
7511 esac
7512 done
7513
7514 if test -n "$cf_new_cflags" ; then
7515
7516         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7517         CFLAGS="${CFLAGS}$cf_new_cflags"
7518
7519 fi
7520
7521 if test -n "$cf_new_cppflags" ; then
7522
7523         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7524         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7525
7526 fi
7527
7528 if test -n "$cf_new_extra_cppflags" ; then
7529
7530         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7531         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7532
7533 fi
7534
7535 cf_add_libs="$LIBS"
7536 # reverse order
7537 cf_add_0lib=
7538 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7539 # filter duplicates
7540 for cf_add_1lib in $cf_add_0lib; do
7541         for cf_add_2lib in $cf_add_libs; do
7542                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7543                         cf_add_1lib=
7544                         break
7545                 fi
7546         done
7547         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7548 done
7549 LIBS="$cf_add_libs"
7550
7551         :
7552 else
7553         cf_pkgconfig_incs=
7554         cf_pkgconfig_libs=
7555
7556                         { { echo "$as_me:7556: error: Cannot find PCRE2 library" >&5
7557 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7558    { (exit 1); exit 1; }; }
7559 fi
7560
7561 fi
7562
7563 cat >>confdefs.h <<\EOF
7564 #define HAVE_LIB_PCRE2 1
7565 EOF
7566
7567         # if pkgconfig gave no results, look for the libraries directly
7568         case $LIBS in
7569         (*pcre2-posix*|*pcreposix*)
7570                 ;;
7571         (*)
7572                 echo "$as_me:7572: checking for regcomp in -lpcre2-posix" >&5
7573 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7574 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7575   echo $ECHO_N "(cached) $ECHO_C" >&6
7576 else
7577   ac_check_lib_save_LIBS=$LIBS
7578 LIBS="-lpcre2-posix  $LIBS"
7579 cat >conftest.$ac_ext <<_ACEOF
7580 #line 7580 "configure"
7581 #include "confdefs.h"
7582
7583 /* Override any gcc2 internal prototype to avoid an error.  */
7584 #ifdef __cplusplus
7585 extern "C"
7586 #endif
7587 /* We use char because int might match the return type of a gcc2
7588    builtin and then its argument prototype would still apply.  */
7589 char regcomp ();
7590 int
7591 main (void)
7592 {
7593 regcomp ();
7594   ;
7595   return 0;
7596 }
7597 _ACEOF
7598 rm -f conftest.$ac_objext conftest$ac_exeext
7599 if { (eval echo "$as_me:7599: \"$ac_link\"") >&5
7600   (eval $ac_link) 2>&5
7601   ac_status=$?
7602   echo "$as_me:7602: \$? = $ac_status" >&5
7603   (exit $ac_status); } &&
7604          { ac_try='test -s conftest$ac_exeext'
7605   { (eval echo "$as_me:7605: \"$ac_try\"") >&5
7606   (eval $ac_try) 2>&5
7607   ac_status=$?
7608   echo "$as_me:7608: \$? = $ac_status" >&5
7609   (exit $ac_status); }; }; then
7610   ac_cv_lib_pcre2_posix_regcomp=yes
7611 else
7612   echo "$as_me: failed program was:" >&5
7613 cat conftest.$ac_ext >&5
7614 ac_cv_lib_pcre2_posix_regcomp=no
7615 fi
7616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7617 LIBS=$ac_check_lib_save_LIBS
7618 fi
7619 echo "$as_me:7619: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7620 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7621 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7622
7623 cf_add_libs="$LIBS"
7624 # reverse order
7625 cf_add_0lib=
7626 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7627 # filter duplicates
7628 for cf_add_1lib in $cf_add_0lib; do
7629         for cf_add_2lib in $cf_add_libs; do
7630                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7631                         cf_add_1lib=
7632                         break
7633                 fi
7634         done
7635         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7636 done
7637 LIBS="$cf_add_libs"
7638
7639 else
7640   echo "$as_me:7640: checking for regcomp in -lpcreposix" >&5
7641 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7642 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7643   echo $ECHO_N "(cached) $ECHO_C" >&6
7644 else
7645   ac_check_lib_save_LIBS=$LIBS
7646 LIBS="-lpcreposix  $LIBS"
7647 cat >conftest.$ac_ext <<_ACEOF
7648 #line 7648 "configure"
7649 #include "confdefs.h"
7650
7651 /* Override any gcc2 internal prototype to avoid an error.  */
7652 #ifdef __cplusplus
7653 extern "C"
7654 #endif
7655 /* We use char because int might match the return type of a gcc2
7656    builtin and then its argument prototype would still apply.  */
7657 char regcomp ();
7658 int
7659 main (void)
7660 {
7661 regcomp ();
7662   ;
7663   return 0;
7664 }
7665 _ACEOF
7666 rm -f conftest.$ac_objext conftest$ac_exeext
7667 if { (eval echo "$as_me:7667: \"$ac_link\"") >&5
7668   (eval $ac_link) 2>&5
7669   ac_status=$?
7670   echo "$as_me:7670: \$? = $ac_status" >&5
7671   (exit $ac_status); } &&
7672          { ac_try='test -s conftest$ac_exeext'
7673   { (eval echo "$as_me:7673: \"$ac_try\"") >&5
7674   (eval $ac_try) 2>&5
7675   ac_status=$?
7676   echo "$as_me:7676: \$? = $ac_status" >&5
7677   (exit $ac_status); }; }; then
7678   ac_cv_lib_pcreposix_regcomp=yes
7679 else
7680   echo "$as_me: failed program was:" >&5
7681 cat conftest.$ac_ext >&5
7682 ac_cv_lib_pcreposix_regcomp=no
7683 fi
7684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7685 LIBS=$ac_check_lib_save_LIBS
7686 fi
7687 echo "$as_me:7687: result: $ac_cv_lib_pcreposix_regcomp" >&5
7688 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7689 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7690
7691 cf_add_libs="$LIBS"
7692 # reverse order
7693 cf_add_0lib=
7694 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7695 # filter duplicates
7696 for cf_add_1lib in $cf_add_0lib; do
7697         for cf_add_2lib in $cf_add_libs; do
7698                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7699                         cf_add_1lib=
7700                         break
7701                 fi
7702         done
7703         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7704 done
7705 LIBS="$cf_add_libs"
7706
7707 else
7708   { { echo "$as_me:7708: error: Cannot find PCRE2 POSIX library" >&5
7709 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7710    { (exit 1); exit 1; }; }
7711 fi
7712
7713 fi
7714
7715                 ;;
7716         esac
7717
7718         # either way, check for the library header files
7719
7720 for ac_header in pcre2posix.h pcreposix.h
7721 do
7722 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7723 echo "$as_me:7723: checking for $ac_header" >&5
7724 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7726   echo $ECHO_N "(cached) $ECHO_C" >&6
7727 else
7728   cat >conftest.$ac_ext <<_ACEOF
7729 #line 7729 "configure"
7730 #include "confdefs.h"
7731 #include <$ac_header>
7732 _ACEOF
7733 if { (eval echo "$as_me:7733: \"$ac_cpp conftest.$ac_ext\"") >&5
7734   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7735   ac_status=$?
7736   egrep -v '^ *\+' conftest.er1 >conftest.err
7737   rm -f conftest.er1
7738   cat conftest.err >&5
7739   echo "$as_me:7739: \$? = $ac_status" >&5
7740   (exit $ac_status); } >/dev/null; then
7741   if test -s conftest.err; then
7742     ac_cpp_err=$ac_c_preproc_warn_flag
7743   else
7744     ac_cpp_err=
7745   fi
7746 else
7747   ac_cpp_err=yes
7748 fi
7749 if test -z "$ac_cpp_err"; then
7750   eval "$as_ac_Header=yes"
7751 else
7752   echo "$as_me: failed program was:" >&5
7753   cat conftest.$ac_ext >&5
7754   eval "$as_ac_Header=no"
7755 fi
7756 rm -f conftest.err conftest.$ac_ext
7757 fi
7758 echo "$as_me:7758: result: `eval echo '${'$as_ac_Header'}'`" >&5
7759 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7760 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7761   cat >>confdefs.h <<EOF
7762 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7763 EOF
7764
7765 fi
7766 done
7767
7768 fi
7769
7770 # not everyone has "test -c"
7771 if test -c /dev/sysmouse 2>/dev/null ; then
7772 echo "$as_me:7772: checking if you want to use sysmouse" >&5
7773 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7774
7775 # Check whether --with-sysmouse or --without-sysmouse was given.
7776 if test "${with_sysmouse+set}" = set; then
7777   withval="$with_sysmouse"
7778   cf_with_sysmouse=$withval
7779 else
7780   cf_with_sysmouse=maybe
7781 fi;
7782         if test "$cf_with_sysmouse" != no ; then
7783         cat >conftest.$ac_ext <<_ACEOF
7784 #line 7784 "configure"
7785 #include "confdefs.h"
7786
7787 #include <osreldate.h>
7788 #if (__FreeBSD_version >= 400017)
7789 #include <sys/consio.h>
7790 #include <sys/fbio.h>
7791 #else
7792 #include <machine/console.h>
7793 #endif
7794
7795 int
7796 main (void)
7797 {
7798
7799         struct mouse_info the_mouse;
7800         ioctl(0, CONS_MOUSECTL, &the_mouse);
7801
7802   ;
7803   return 0;
7804 }
7805 _ACEOF
7806 rm -f conftest.$ac_objext
7807 if { (eval echo "$as_me:7807: \"$ac_compile\"") >&5
7808   (eval $ac_compile) 2>&5
7809   ac_status=$?
7810   echo "$as_me:7810: \$? = $ac_status" >&5
7811   (exit $ac_status); } &&
7812          { ac_try='test -s conftest.$ac_objext'
7813   { (eval echo "$as_me:7813: \"$ac_try\"") >&5
7814   (eval $ac_try) 2>&5
7815   ac_status=$?
7816   echo "$as_me:7816: \$? = $ac_status" >&5
7817   (exit $ac_status); }; }; then
7818   cf_with_sysmouse=yes
7819 else
7820   echo "$as_me: failed program was:" >&5
7821 cat conftest.$ac_ext >&5
7822 cf_with_sysmouse=no
7823 fi
7824 rm -f conftest.$ac_objext conftest.$ac_ext
7825         fi
7826 echo "$as_me:7826: result: $cf_with_sysmouse" >&5
7827 echo "${ECHO_T}$cf_with_sysmouse" >&6
7828 test "$cf_with_sysmouse" = yes &&
7829 cat >>confdefs.h <<\EOF
7830 #define USE_SYSMOUSE 1
7831 EOF
7832
7833 fi
7834
7835 # pretend that ncurses==ncursesw==ncursest
7836 echo "$as_me:7836: checking if you want to disable library suffixes" >&5
7837 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7838
7839 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7840 if test "${enable_lib_suffixes+set}" = set; then
7841   enableval="$enable_lib_suffixes"
7842   test "$enableval" != no && enableval=yes
7843         if test "$enableval" != "yes" ; then
7844     disable_lib_suffixes=yes
7845         else
7846                 disable_lib_suffixes=no
7847         fi
7848 else
7849   enableval=yes
7850         disable_lib_suffixes=no
7851
7852 fi;
7853 echo "$as_me:7853: result: $disable_lib_suffixes" >&5
7854 echo "${ECHO_T}$disable_lib_suffixes" >&6
7855
7856 ### If we're building with rpath, try to link non-standard libs that way too.
7857 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7858
7859 echo "$as_me:7859: checking if rpath-hack should be disabled" >&5
7860 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7861
7862 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7863 if test "${enable_rpath_hack+set}" = set; then
7864   enableval="$enable_rpath_hack"
7865   test "$enableval" != no && enableval=yes
7866         if test "$enableval" != "yes" ; then
7867     cf_disable_rpath_hack=yes
7868         else
7869                 cf_disable_rpath_hack=no
7870         fi
7871 else
7872   enableval=yes
7873         cf_disable_rpath_hack=no
7874
7875 fi;
7876 echo "$as_me:7876: result: $cf_disable_rpath_hack" >&5
7877 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7878 if test "$cf_disable_rpath_hack" = no ; then
7879
7880 echo "$as_me:7880: checking for updated LDFLAGS" >&5
7881 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7882 if test -n "$LD_RPATH_OPT" ; then
7883         echo "$as_me:7883: result: maybe" >&5
7884 echo "${ECHO_T}maybe" >&6
7885
7886         for ac_prog in ldd
7887 do
7888   # Extract the first word of "$ac_prog", so it can be a program name with args.
7889 set dummy $ac_prog; ac_word=$2
7890 echo "$as_me:7890: checking for $ac_word" >&5
7891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7892 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7893   echo $ECHO_N "(cached) $ECHO_C" >&6
7894 else
7895   if test -n "$cf_ldd_prog"; then
7896   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7897 else
7898   ac_save_IFS=$IFS; IFS=$ac_path_separator
7899 ac_dummy="$PATH"
7900 for ac_dir in $ac_dummy; do
7901   IFS=$ac_save_IFS
7902   test -z "$ac_dir" && ac_dir=.
7903   $as_executable_p "$ac_dir/$ac_word" || continue
7904 ac_cv_prog_cf_ldd_prog="$ac_prog"
7905 echo "$as_me:7905: found $ac_dir/$ac_word" >&5
7906 break
7907 done
7908
7909 fi
7910 fi
7911 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7912 if test -n "$cf_ldd_prog"; then
7913   echo "$as_me:7913: result: $cf_ldd_prog" >&5
7914 echo "${ECHO_T}$cf_ldd_prog" >&6
7915 else
7916   echo "$as_me:7916: result: no" >&5
7917 echo "${ECHO_T}no" >&6
7918 fi
7919
7920   test -n "$cf_ldd_prog" && break
7921 done
7922 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7923
7924         cf_rpath_list="/usr/lib /lib"
7925         if test "$cf_ldd_prog" != no
7926         then
7927                 cf_rpath_oops=
7928
7929 cat >conftest.$ac_ext <<_ACEOF
7930 #line 7930 "configure"
7931 #include "confdefs.h"
7932 #include <stdio.h>
7933 int
7934 main (void)
7935 {
7936 printf("Hello");
7937   ;
7938   return 0;
7939 }
7940 _ACEOF
7941 rm -f conftest.$ac_objext conftest$ac_exeext
7942 if { (eval echo "$as_me:7942: \"$ac_link\"") >&5
7943   (eval $ac_link) 2>&5
7944   ac_status=$?
7945   echo "$as_me:7945: \$? = $ac_status" >&5
7946   (exit $ac_status); } &&
7947          { ac_try='test -s conftest$ac_exeext'
7948   { (eval echo "$as_me:7948: \"$ac_try\"") >&5
7949   (eval $ac_try) 2>&5
7950   ac_status=$?
7951   echo "$as_me:7951: \$? = $ac_status" >&5
7952   (exit $ac_status); }; }; then
7953   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7954                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7955 else
7956   echo "$as_me: failed program was:" >&5
7957 cat conftest.$ac_ext >&5
7958 fi
7959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7960
7961                 # If we passed the link-test, but get a "not found" on a given library,
7962                 # this could be due to inept reconfiguration of gcc to make it only
7963                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7964                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7965                 # /usr/local libraries.
7966                 if test -n "$cf_rpath_oops"
7967                 then
7968                         for cf_rpath_src in $cf_rpath_oops
7969                         do
7970                                 for cf_rpath_dir in \
7971                                         /usr/local \
7972                                         /usr/pkg \
7973                                         /opt/sfw
7974                                 do
7975                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7976                                         then
7977                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7978
7979 echo "${as_me:-configure}:7979: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7980
7981                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7982                                                 break
7983                                         fi
7984                                 done
7985                         done
7986                 fi
7987         fi
7988
7989         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7990
7991 echo "${as_me:-configure}:7991: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7992
7993 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7994
7995 echo "${as_me:-configure}:7995: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7996
7997 cf_rpath_dst=
7998 for cf_rpath_src in $LDFLAGS
7999 do
8000         case $cf_rpath_src in
8001         (-L*)
8002
8003                 # check if this refers to a directory which we will ignore
8004                 cf_rpath_skip=no
8005                 if test -n "$cf_rpath_list"
8006                 then
8007                         for cf_rpath_item in $cf_rpath_list
8008                         do
8009                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8010                                 then
8011                                         cf_rpath_skip=yes
8012                                         break
8013                                 fi
8014                         done
8015                 fi
8016
8017                 if test "$cf_rpath_skip" = no
8018                 then
8019                         # transform the option
8020                         if test "$LD_RPATH_OPT" = "-R " ; then
8021                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8022                         else
8023                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8024                         fi
8025
8026                         # if we have not already added this, add it now
8027                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8028                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8029                         then
8030                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8031
8032 echo "${as_me:-configure}:8032: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8033
8034                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8035                         fi
8036                 fi
8037                 ;;
8038         esac
8039         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8040 done
8041 LDFLAGS=$cf_rpath_dst
8042
8043 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8044
8045 echo "${as_me:-configure}:8045: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8046
8047 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8048
8049 echo "${as_me:-configure}:8049: testing ...checking LIBS $LIBS ..." 1>&5
8050
8051 cf_rpath_dst=
8052 for cf_rpath_src in $LIBS
8053 do
8054         case $cf_rpath_src in
8055         (-L*)
8056
8057                 # check if this refers to a directory which we will ignore
8058                 cf_rpath_skip=no
8059                 if test -n "$cf_rpath_list"
8060                 then
8061                         for cf_rpath_item in $cf_rpath_list
8062                         do
8063                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8064                                 then
8065                                         cf_rpath_skip=yes
8066                                         break
8067                                 fi
8068                         done
8069                 fi
8070
8071                 if test "$cf_rpath_skip" = no
8072                 then
8073                         # transform the option
8074                         if test "$LD_RPATH_OPT" = "-R " ; then
8075                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8076                         else
8077                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8078                         fi
8079
8080                         # if we have not already added this, add it now
8081                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8082                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8083                         then
8084                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8085
8086 echo "${as_me:-configure}:8086: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8087
8088                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8089                         fi
8090                 fi
8091                 ;;
8092         esac
8093         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8094 done
8095 LIBS=$cf_rpath_dst
8096
8097 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8098
8099 echo "${as_me:-configure}:8099: testing ...checked LIBS $LIBS ..." 1>&5
8100
8101         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8102
8103 echo "${as_me:-configure}:8103: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8104
8105 else
8106         echo "$as_me:8106: result: no" >&5
8107 echo "${ECHO_T}no" >&6
8108 fi
8109
8110 fi
8111
8112 fi
8113
8114 ### Depending on the system, someone may use rpath to build ncurses but not
8115 # want users of the package to rely upon that feature.  Give those people an
8116 # option to suppress that detail from EXTRA_LDFLAGS.
8117 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8118 if test -n "$EXTRA_PKG_LDFLAGS"
8119 then
8120         echo "$as_me:8120: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8121 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8122
8123 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8124 if test "${enable_pkg_ldflags+set}" = set; then
8125   enableval="$enable_pkg_ldflags"
8126   test "$enableval" != no && enableval=yes
8127         if test "$enableval" != "yes" ; then
8128     disable_pkg_ldflags=yes
8129         else
8130                 disable_pkg_ldflags=no
8131         fi
8132 else
8133   enableval=yes
8134         disable_pkg_ldflags=no
8135
8136 fi;
8137         echo "$as_me:8137: result: $disable_pkg_ldflags" >&5
8138 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8139         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8140 fi
8141
8142 ###############################################################################
8143
8144 ###     use option --with-extra-suffix to append suffix to headers and libraries
8145 echo "$as_me:8145: checking if you wish to append extra suffix to header/library paths" >&5
8146 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8147 EXTRA_SUFFIX=
8148
8149 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8150 if test "${with_extra_suffix+set}" = set; then
8151   withval="$with_extra_suffix"
8152   case x$withval in
8153         (no)
8154                 ;;
8155         (xyes|x)
8156                 EXTRA_SUFFIX=$cf_cv_abi_version
8157                 ;;
8158         (*)
8159                 EXTRA_SUFFIX=$withval
8160                 ;;
8161         esac
8162
8163 fi;
8164 echo "$as_me:8164: result: $EXTRA_SUFFIX" >&5
8165 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8166
8167 ###     use option --disable-overwrite to leave out the link to -lcurses
8168 echo "$as_me:8168: checking if you wish to install ncurses overwriting curses" >&5
8169 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8170
8171 # Check whether --enable-overwrite or --disable-overwrite was given.
8172 if test "${enable_overwrite+set}" = set; then
8173   enableval="$enable_overwrite"
8174   with_overwrite=$enableval
8175 else
8176   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8177 fi;
8178 echo "$as_me:8178: result: $with_overwrite" >&5
8179 echo "${ECHO_T}$with_overwrite" >&6
8180
8181 echo "$as_me:8181: checking if external terminfo-database is used" >&5
8182 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8183
8184 # Check whether --enable-database or --disable-database was given.
8185 if test "${enable_database+set}" = set; then
8186   enableval="$enable_database"
8187   use_database=$enableval
8188 else
8189   use_database=yes
8190 fi;
8191 echo "$as_me:8191: result: $use_database" >&5
8192 echo "${ECHO_T}$use_database" >&6
8193
8194 case $host_os in
8195 (os2*)
8196         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8197         ;;
8198 (*)
8199         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8200         ;;
8201 esac
8202
8203 NCURSES_USE_DATABASE=0
8204 if test "$use_database" != no ; then
8205         NCURSES_USE_DATABASE=1
8206
8207         echo "$as_me:8207: checking which terminfo source-file will be installed" >&5
8208 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8209
8210 # Check whether --with-database or --without-database was given.
8211 if test "${with_database+set}" = set; then
8212   withval="$with_database"
8213   TERMINFO_SRC=$withval
8214 fi;
8215         echo "$as_me:8215: result: $TERMINFO_SRC" >&5
8216 echo "${ECHO_T}$TERMINFO_SRC" >&6
8217
8218         echo "$as_me:8218: checking whether to use hashed database instead of directory/tree" >&5
8219 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8220
8221 # Check whether --with-hashed-db or --without-hashed-db was given.
8222 if test "${with_hashed_db+set}" = set; then
8223   withval="$with_hashed_db"
8224
8225 else
8226   with_hashed_db=no
8227 fi;
8228         echo "$as_me:8228: result: $with_hashed_db" >&5
8229 echo "${ECHO_T}$with_hashed_db" >&6
8230 else
8231         with_hashed_db=no
8232 fi
8233
8234 echo "$as_me:8234: checking for list of fallback descriptions" >&5
8235 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8236
8237 # Check whether --with-fallbacks or --without-fallbacks was given.
8238 if test "${with_fallbacks+set}" = set; then
8239   withval="$with_fallbacks"
8240   with_fallback=$withval
8241 else
8242   with_fallback=
8243 fi;
8244 echo "$as_me:8244: result: $with_fallback" >&5
8245 echo "${ECHO_T}$with_fallback" >&6
8246
8247 case ".$with_fallback" in
8248 (.|.no)
8249         FALLBACK_LIST=
8250         ;;
8251 (.yes)
8252         { echo "$as_me:8252: WARNING: expected a list of terminal descriptions" >&5
8253 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8254         ;;
8255 (*)
8256         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8257         ;;
8258 esac
8259
8260 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8261 # tree for generating the terminal descriptions that will be compiled into the
8262 # library.  If your toolchain is old, it may not handle current terminal
8263 # databases.  Use configure-options to point to the tools which will be used,
8264 # rather than the first ones found on the $PATH.
8265 if test -n "$ac_tool_prefix"; then
8266   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8267 set dummy ${ac_tool_prefix}tic; ac_word=$2
8268 echo "$as_me:8268: checking for $ac_word" >&5
8269 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8270 if test "${ac_cv_prog_TIC+set}" = set; then
8271   echo $ECHO_N "(cached) $ECHO_C" >&6
8272 else
8273   if test -n "$TIC"; then
8274   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8275 else
8276   ac_save_IFS=$IFS; IFS=$ac_path_separator
8277 ac_dummy="$PATH"
8278 for ac_dir in $ac_dummy; do
8279   IFS=$ac_save_IFS
8280   test -z "$ac_dir" && ac_dir=.
8281   $as_executable_p "$ac_dir/$ac_word" || continue
8282 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8283 echo "$as_me:8283: found $ac_dir/$ac_word" >&5
8284 break
8285 done
8286
8287 fi
8288 fi
8289 TIC=$ac_cv_prog_TIC
8290 if test -n "$TIC"; then
8291   echo "$as_me:8291: result: $TIC" >&5
8292 echo "${ECHO_T}$TIC" >&6
8293 else
8294   echo "$as_me:8294: result: no" >&5
8295 echo "${ECHO_T}no" >&6
8296 fi
8297
8298 fi
8299 if test -z "$ac_cv_prog_TIC"; then
8300   ac_ct_TIC=$TIC
8301   # Extract the first word of "tic", so it can be a program name with args.
8302 set dummy tic; ac_word=$2
8303 echo "$as_me:8303: checking for $ac_word" >&5
8304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8305 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8306   echo $ECHO_N "(cached) $ECHO_C" >&6
8307 else
8308   if test -n "$ac_ct_TIC"; then
8309   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8310 else
8311   ac_save_IFS=$IFS; IFS=$ac_path_separator
8312 ac_dummy="$PATH"
8313 for ac_dir in $ac_dummy; do
8314   IFS=$ac_save_IFS
8315   test -z "$ac_dir" && ac_dir=.
8316   $as_executable_p "$ac_dir/$ac_word" || continue
8317 ac_cv_prog_ac_ct_TIC="tic"
8318 echo "$as_me:8318: found $ac_dir/$ac_word" >&5
8319 break
8320 done
8321
8322 fi
8323 fi
8324 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8325 if test -n "$ac_ct_TIC"; then
8326   echo "$as_me:8326: result: $ac_ct_TIC" >&5
8327 echo "${ECHO_T}$ac_ct_TIC" >&6
8328 else
8329   echo "$as_me:8329: result: no" >&5
8330 echo "${ECHO_T}no" >&6
8331 fi
8332
8333   TIC=$ac_ct_TIC
8334 else
8335   TIC="$ac_cv_prog_TIC"
8336 fi
8337
8338 if test -n "$ac_tool_prefix"; then
8339   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8340 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8341 echo "$as_me:8341: checking for $ac_word" >&5
8342 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8343 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8344   echo $ECHO_N "(cached) $ECHO_C" >&6
8345 else
8346   if test -n "$INFOCMP"; then
8347   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8348 else
8349   ac_save_IFS=$IFS; IFS=$ac_path_separator
8350 ac_dummy="$PATH"
8351 for ac_dir in $ac_dummy; do
8352   IFS=$ac_save_IFS
8353   test -z "$ac_dir" && ac_dir=.
8354   $as_executable_p "$ac_dir/$ac_word" || continue
8355 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8356 echo "$as_me:8356: found $ac_dir/$ac_word" >&5
8357 break
8358 done
8359
8360 fi
8361 fi
8362 INFOCMP=$ac_cv_prog_INFOCMP
8363 if test -n "$INFOCMP"; then
8364   echo "$as_me:8364: result: $INFOCMP" >&5
8365 echo "${ECHO_T}$INFOCMP" >&6
8366 else
8367   echo "$as_me:8367: result: no" >&5
8368 echo "${ECHO_T}no" >&6
8369 fi
8370
8371 fi
8372 if test -z "$ac_cv_prog_INFOCMP"; then
8373   ac_ct_INFOCMP=$INFOCMP
8374   # Extract the first word of "infocmp", so it can be a program name with args.
8375 set dummy infocmp; ac_word=$2
8376 echo "$as_me:8376: checking for $ac_word" >&5
8377 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8378 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8379   echo $ECHO_N "(cached) $ECHO_C" >&6
8380 else
8381   if test -n "$ac_ct_INFOCMP"; then
8382   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8383 else
8384   ac_save_IFS=$IFS; IFS=$ac_path_separator
8385 ac_dummy="$PATH"
8386 for ac_dir in $ac_dummy; do
8387   IFS=$ac_save_IFS
8388   test -z "$ac_dir" && ac_dir=.
8389   $as_executable_p "$ac_dir/$ac_word" || continue
8390 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8391 echo "$as_me:8391: found $ac_dir/$ac_word" >&5
8392 break
8393 done
8394
8395 fi
8396 fi
8397 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8398 if test -n "$ac_ct_INFOCMP"; then
8399   echo "$as_me:8399: result: $ac_ct_INFOCMP" >&5
8400 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8401 else
8402   echo "$as_me:8402: result: no" >&5
8403 echo "${ECHO_T}no" >&6
8404 fi
8405
8406   INFOCMP=$ac_ct_INFOCMP
8407 else
8408   INFOCMP="$ac_cv_prog_INFOCMP"
8409 fi
8410
8411 if test -n "$FALLBACK_LIST"
8412 then
8413
8414 # Check whether --with-tic-path or --without-tic-path was given.
8415 if test "${with_tic_path+set}" = set; then
8416   withval="$with_tic_path"
8417   echo "$as_me:8417: checking for tic program for fallbacks" >&5
8418 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8419                 TIC=$withval
8420                 echo "$as_me:8420: result: $TIC" >&5
8421 echo "${ECHO_T}$TIC" >&6
8422
8423 if test "x$prefix" != xNONE; then
8424         cf_path_syntax="$prefix"
8425 else
8426         cf_path_syntax="$ac_default_prefix"
8427 fi
8428
8429 case ".$TIC" in
8430 (.\$\(*\)*|.\'*\'*)
8431         ;;
8432 (..|./*|.\\*)
8433         ;;
8434 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8435         ;;
8436 (.\${*prefix}*|.\${*dir}*)
8437         eval TIC="$TIC"
8438         case ".$TIC" in
8439         (.NONE/*)
8440                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8441                 ;;
8442         esac
8443         ;;
8444 (.no|.NONE/*)
8445         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8446         ;;
8447 (*)
8448         { { echo "$as_me:8448: error: expected a pathname, not \"$TIC\"" >&5
8449 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8450    { (exit 1); exit 1; }; }
8451         ;;
8452 esac
8453
8454 else
8455
8456 test -z "$TIC" && TIC=tic
8457 for ac_prog in $TIC tic
8458 do
8459   # Extract the first word of "$ac_prog", so it can be a program name with args.
8460 set dummy $ac_prog; ac_word=$2
8461 echo "$as_me:8461: checking for $ac_word" >&5
8462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8463 if test "${ac_cv_path_TIC+set}" = set; then
8464   echo $ECHO_N "(cached) $ECHO_C" >&6
8465 else
8466   case $TIC in
8467   [\\/]* | ?:[\\/]*)
8468   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8469   ;;
8470   *)
8471   ac_save_IFS=$IFS; IFS=$ac_path_separator
8472 ac_dummy="$PATH:/usr/local/ncurses/bin"
8473 for ac_dir in $ac_dummy; do
8474   IFS=$ac_save_IFS
8475   test -z "$ac_dir" && ac_dir=.
8476   if $as_executable_p "$ac_dir/$ac_word"; then
8477    ac_cv_path_TIC="$ac_dir/$ac_word"
8478    echo "$as_me:8478: found $ac_dir/$ac_word" >&5
8479    break
8480 fi
8481 done
8482
8483   ;;
8484 esac
8485 fi
8486 TIC=$ac_cv_path_TIC
8487
8488 if test -n "$TIC"; then
8489   echo "$as_me:8489: result: $TIC" >&5
8490 echo "${ECHO_T}$TIC" >&6
8491 else
8492   echo "$as_me:8492: result: no" >&5
8493 echo "${ECHO_T}no" >&6
8494 fi
8495
8496   test -n "$TIC" && break
8497 done
8498 test -n "$TIC" || TIC="$TIC"
8499
8500 cf_path_prog=""
8501 cf_path_args=""
8502 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8503 for cf_temp in $ac_cv_path_TIC
8504 do
8505         if test -z "$cf_path_prog" ; then
8506                 if test "$with_full_paths" = yes ; then
8507
8508 if test "x$prefix" != xNONE; then
8509         cf_path_syntax="$prefix"
8510 else
8511         cf_path_syntax="$ac_default_prefix"
8512 fi
8513
8514 case ".$cf_temp" in
8515 (.\$\(*\)*|.\'*\'*)
8516         ;;
8517 (..|./*|.\\*)
8518         ;;
8519 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8520         ;;
8521 (.\${*prefix}*|.\${*dir}*)
8522         eval cf_temp="$cf_temp"
8523         case ".$cf_temp" in
8524         (.NONE/*)
8525                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8526                 ;;
8527         esac
8528         ;;
8529 (.no|.NONE/*)
8530         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8531         ;;
8532 (*)
8533         break
8534         ;;
8535 esac
8536
8537                         cf_path_prog="$cf_temp"
8538                 else
8539                         cf_path_prog="`basename $cf_temp`"
8540                 fi
8541         elif test -z "$cf_path_args" ; then
8542                 cf_path_args="$cf_temp"
8543         else
8544                 cf_path_args="$cf_path_args $cf_temp"
8545         fi
8546 done
8547 IFS="$cf_save_ifs"
8548
8549 if test -n "$cf_path_prog" ; then
8550
8551 echo "${as_me:-configure}:8551: testing defining path for ${cf_path_prog} ..." 1>&5
8552
8553 cat >>confdefs.h <<EOF
8554 #define TIC_PATH "$cf_path_prog"
8555 EOF
8556
8557         test -n "$cf_path_args" &&
8558 cat >>confdefs.h <<EOF
8559 #define TIC_ARGS "$cf_path_args"
8560 EOF
8561
8562 fi
8563
8564                 if test -z "$TIC"
8565                 then
8566                         { echo "$as_me:8566: WARNING: no tic program found for fallbacks" >&5
8567 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8568                 fi
8569
8570 fi;
8571
8572 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8573 if test "${with_infocmp_path+set}" = set; then
8574   withval="$with_infocmp_path"
8575   echo "$as_me:8575: checking for infocmp program for fallbacks" >&5
8576 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8577                 INFOCMP=$withval
8578                 echo "$as_me:8578: result: $INFOCMP" >&5
8579 echo "${ECHO_T}$INFOCMP" >&6
8580
8581 if test "x$prefix" != xNONE; then
8582         cf_path_syntax="$prefix"
8583 else
8584         cf_path_syntax="$ac_default_prefix"
8585 fi
8586
8587 case ".$INFOCMP" in
8588 (.\$\(*\)*|.\'*\'*)
8589         ;;
8590 (..|./*|.\\*)
8591         ;;
8592 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8593         ;;
8594 (.\${*prefix}*|.\${*dir}*)
8595         eval INFOCMP="$INFOCMP"
8596         case ".$INFOCMP" in
8597         (.NONE/*)
8598                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8599                 ;;
8600         esac
8601         ;;
8602 (.no|.NONE/*)
8603         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8604         ;;
8605 (*)
8606         { { echo "$as_me:8606: error: expected a pathname, not \"$INFOCMP\"" >&5
8607 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8608    { (exit 1); exit 1; }; }
8609         ;;
8610 esac
8611
8612 else
8613
8614 test -z "$INFOCMP" && INFOCMP=infocmp
8615 for ac_prog in $INFOCMP infocmp
8616 do
8617   # Extract the first word of "$ac_prog", so it can be a program name with args.
8618 set dummy $ac_prog; ac_word=$2
8619 echo "$as_me:8619: checking for $ac_word" >&5
8620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8621 if test "${ac_cv_path_INFOCMP+set}" = set; then
8622   echo $ECHO_N "(cached) $ECHO_C" >&6
8623 else
8624   case $INFOCMP in
8625   [\\/]* | ?:[\\/]*)
8626   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8627   ;;
8628   *)
8629   ac_save_IFS=$IFS; IFS=$ac_path_separator
8630 ac_dummy="$PATH:/usr/local/ncurses/bin"
8631 for ac_dir in $ac_dummy; do
8632   IFS=$ac_save_IFS
8633   test -z "$ac_dir" && ac_dir=.
8634   if $as_executable_p "$ac_dir/$ac_word"; then
8635    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8636    echo "$as_me:8636: found $ac_dir/$ac_word" >&5
8637    break
8638 fi
8639 done
8640
8641   ;;
8642 esac
8643 fi
8644 INFOCMP=$ac_cv_path_INFOCMP
8645
8646 if test -n "$INFOCMP"; then
8647   echo "$as_me:8647: result: $INFOCMP" >&5
8648 echo "${ECHO_T}$INFOCMP" >&6
8649 else
8650   echo "$as_me:8650: result: no" >&5
8651 echo "${ECHO_T}no" >&6
8652 fi
8653
8654   test -n "$INFOCMP" && break
8655 done
8656 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8657
8658 cf_path_prog=""
8659 cf_path_args=""
8660 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8661 for cf_temp in $ac_cv_path_INFOCMP
8662 do
8663         if test -z "$cf_path_prog" ; then
8664                 if test "$with_full_paths" = yes ; then
8665
8666 if test "x$prefix" != xNONE; then
8667         cf_path_syntax="$prefix"
8668 else
8669         cf_path_syntax="$ac_default_prefix"
8670 fi
8671
8672 case ".$cf_temp" in
8673 (.\$\(*\)*|.\'*\'*)
8674         ;;
8675 (..|./*|.\\*)
8676         ;;
8677 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8678         ;;
8679 (.\${*prefix}*|.\${*dir}*)
8680         eval cf_temp="$cf_temp"
8681         case ".$cf_temp" in
8682         (.NONE/*)
8683                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8684                 ;;
8685         esac
8686         ;;
8687 (.no|.NONE/*)
8688         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8689         ;;
8690 (*)
8691         break
8692         ;;
8693 esac
8694
8695                         cf_path_prog="$cf_temp"
8696                 else
8697                         cf_path_prog="`basename $cf_temp`"
8698                 fi
8699         elif test -z "$cf_path_args" ; then
8700                 cf_path_args="$cf_temp"
8701         else
8702                 cf_path_args="$cf_path_args $cf_temp"
8703         fi
8704 done
8705 IFS="$cf_save_ifs"
8706
8707 if test -n "$cf_path_prog" ; then
8708
8709 echo "${as_me:-configure}:8709: testing defining path for ${cf_path_prog} ..." 1>&5
8710
8711 cat >>confdefs.h <<EOF
8712 #define INFOCMP_PATH "$cf_path_prog"
8713 EOF
8714
8715         test -n "$cf_path_args" &&
8716 cat >>confdefs.h <<EOF
8717 #define INFOCMP_ARGS "$cf_path_args"
8718 EOF
8719
8720 fi
8721
8722                 if test -z "$INFOCMP"
8723                 then
8724                         { echo "$as_me:8724: WARNING: no infocmp program found for fallbacks" >&5
8725 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8726                 fi
8727
8728 fi;
8729
8730         test -z "$TIC" && FALLBACK_LIST=
8731         test -z "$INFOCMP" && FALLBACK_LIST=
8732         if test -z "$FALLBACK_LIST"
8733         then
8734                 { echo "$as_me:8734: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8735 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8736         fi
8737 fi
8738
8739 USE_FALLBACKS=
8740 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8741
8742 echo "$as_me:8742: checking if you want modern xterm or antique" >&5
8743 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8744
8745 # Check whether --with-xterm-new or --without-xterm-new was given.
8746 if test "${with_xterm_new+set}" = set; then
8747   withval="$with_xterm_new"
8748   with_xterm_new=$withval
8749 else
8750   with_xterm_new=yes
8751 fi;
8752 case $with_xterm_new in
8753 (no) with_xterm_new=xterm-old;;
8754 (*)      with_xterm_new=xterm-new;;
8755 esac
8756 echo "$as_me:8756: result: $with_xterm_new" >&5
8757 echo "${ECHO_T}$with_xterm_new" >&6
8758 WHICH_XTERM=$with_xterm_new
8759
8760 echo "$as_me:8760: checking if xterm backspace sends BS or DEL" >&5
8761 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8762
8763 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8764 if test "${with_xterm_kbs+set}" = set; then
8765   withval="$with_xterm_kbs"
8766   with_xterm_kbs=$withval
8767 else
8768   with_xterm_kbs=BS
8769 fi;
8770 case x$with_xterm_kbs in
8771 (xyes|xno|xBS|xbs|x8)
8772         with_xterm_kbs=BS
8773         ;;
8774 (xDEL|xdel|x127)
8775         with_xterm_kbs=DEL
8776         ;;
8777 (*)
8778         with_xterm_kbs=$withval
8779         ;;
8780 esac
8781 echo "$as_me:8781: result: $with_xterm_kbs" >&5
8782 echo "${ECHO_T}$with_xterm_kbs" >&6
8783 XTERM_KBS=$with_xterm_kbs
8784
8785 MAKE_TERMINFO=
8786 if test "$use_database" = no ; then
8787         TERMINFO="${datadir}/terminfo"
8788         MAKE_TERMINFO="#"
8789 else
8790
8791 echo "$as_me:8791: checking for list of terminfo directories" >&5
8792 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8793
8794 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8795 if test "${with_terminfo_dirs+set}" = set; then
8796   withval="$with_terminfo_dirs"
8797
8798 else
8799   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8800 fi;
8801 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8802 cf_dst_path=
8803 for cf_src_path in $withval
8804 do
8805
8806 if test "x$prefix" != xNONE; then
8807         cf_path_syntax="$prefix"
8808 else
8809         cf_path_syntax="$ac_default_prefix"
8810 fi
8811
8812 case ".$cf_src_path" in
8813 (.\$\(*\)*|.\'*\'*)
8814         ;;
8815 (..|./*|.\\*)
8816         ;;
8817 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8818         ;;
8819 (.\${*prefix}*|.\${*dir}*)
8820         eval cf_src_path="$cf_src_path"
8821         case ".$cf_src_path" in
8822         (.NONE/*)
8823                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8824                 ;;
8825         esac
8826         ;;
8827 (.no|.NONE/*)
8828         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8829         ;;
8830 (*)
8831         { { echo "$as_me:8831: error: expected a pathname, not \"$cf_src_path\"" >&5
8832 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8833    { (exit 1); exit 1; }; }
8834         ;;
8835 esac
8836
8837   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8838   cf_dst_path="${cf_dst_path}${cf_src_path}"
8839 done
8840 IFS="$ac_save_ifs"
8841
8842 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8843 # so we have to check/work around.  We do prefer the result of "eval"...
8844 eval cf_dst_eval="$cf_dst_path"
8845 case "x$cf_dst_eval" in
8846 (xNONE*)
8847         TERMINFO_DIRS=$cf_dst_path
8848         ;;
8849 (*)
8850         TERMINFO_DIRS="$cf_dst_eval"
8851         ;;
8852 esac
8853
8854 echo "$as_me:8854: result: $TERMINFO_DIRS" >&5
8855 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8856 test -n "$TERMINFO_DIRS" &&
8857 cat >>confdefs.h <<EOF
8858 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8859 EOF
8860
8861 case "x$TERMINFO" in
8862 x???:*)
8863         { echo "$as_me:8863: WARNING: ignoring non-directory/file TERMINFO value" >&5
8864 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8865         unset TERMINFO
8866         ;;
8867 esac
8868
8869 echo "$as_me:8869: checking for default terminfo directory" >&5
8870 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8871
8872 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8873 if test "${with_default_terminfo_dir+set}" = set; then
8874   withval="$with_default_terminfo_dir"
8875
8876 else
8877   withval="${TERMINFO:-${datadir}/terminfo}"
8878 fi; if test -n "${datadir}/terminfo" ; then
8879
8880 if test "x$prefix" != xNONE; then
8881         cf_path_syntax="$prefix"
8882 else
8883         cf_path_syntax="$ac_default_prefix"
8884 fi
8885
8886 case ".$withval" in
8887 (.\$\(*\)*|.\'*\'*)
8888         ;;
8889 (..|./*|.\\*)
8890         ;;
8891 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8892         ;;
8893 (.\${*prefix}*|.\${*dir}*)
8894         eval withval="$withval"
8895         case ".$withval" in
8896         (.NONE/*)
8897                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8898                 ;;
8899         esac
8900         ;;
8901 (.no|.NONE/*)
8902         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8903         ;;
8904 (*)
8905         { { echo "$as_me:8905: error: expected a pathname, not \"$withval\"" >&5
8906 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8907    { (exit 1); exit 1; }; }
8908         ;;
8909 esac
8910
8911 fi
8912 eval TERMINFO="$withval"
8913
8914 echo "$as_me:8914: result: $TERMINFO" >&5
8915 echo "${ECHO_T}$TERMINFO" >&6
8916
8917 cat >>confdefs.h <<EOF
8918 #define TERMINFO "$TERMINFO"
8919 EOF
8920
8921 fi
8922
8923 ###     use option --disable-big-core to make tic run on small machines
8924 ###     We need 4Mb, check if we can allocate 50% more than that.
8925 echo "$as_me:8925: checking if big-core option selected" >&5
8926 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8927
8928 # Check whether --enable-big-core or --disable-big-core was given.
8929 if test "${enable_big_core+set}" = set; then
8930   enableval="$enable_big_core"
8931   with_big_core=$enableval
8932 else
8933   if test "$cross_compiling" = yes; then
8934   with_big_core=no
8935 else
8936   cat >conftest.$ac_ext <<_ACEOF
8937 #line 8937 "configure"
8938 #include "confdefs.h"
8939
8940 #include <stdlib.h>
8941 #include <string.h>
8942 int main() {
8943         unsigned long n = 6000000L;
8944         char *s = malloc(n);
8945         if (s != 0)
8946                 s[0] = s[n-1] = 0;
8947         ${cf_cv_main_return:-return}(s == 0);
8948 }
8949 _ACEOF
8950 rm -f conftest$ac_exeext
8951 if { (eval echo "$as_me:8951: \"$ac_link\"") >&5
8952   (eval $ac_link) 2>&5
8953   ac_status=$?
8954   echo "$as_me:8954: \$? = $ac_status" >&5
8955   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8956   { (eval echo "$as_me:8956: \"$ac_try\"") >&5
8957   (eval $ac_try) 2>&5
8958   ac_status=$?
8959   echo "$as_me:8959: \$? = $ac_status" >&5
8960   (exit $ac_status); }; }; then
8961   with_big_core=yes
8962 else
8963   echo "$as_me: program exited with status $ac_status" >&5
8964 echo "$as_me: failed program was:" >&5
8965 cat conftest.$ac_ext >&5
8966 with_big_core=no
8967 fi
8968 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8969 fi
8970 fi;
8971 echo "$as_me:8971: result: $with_big_core" >&5
8972 echo "${ECHO_T}$with_big_core" >&6
8973 test "x$with_big_core" = "xyes" &&
8974 cat >>confdefs.h <<\EOF
8975 #define HAVE_BIG_CORE 1
8976 EOF
8977
8978 ### ISO C only guarantees 512-char strings, we have tables which load faster
8979 ### when constructed using "big" strings.  More than the C compiler, the awk
8980 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8981 echo "$as_me:8981: checking if big-strings option selected" >&5
8982 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8983
8984 # Check whether --enable-big-strings or --disable-big-strings was given.
8985 if test "${enable_big_strings+set}" = set; then
8986   enableval="$enable_big_strings"
8987   with_big_strings=$enableval
8988 else
8989
8990         case x$AWK in
8991         (x)
8992                 eval with_big_strings=no
8993                 ;;
8994         (*)
8995                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8996                         | $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
8997                         eval with_big_strings=yes
8998                 else
8999                         eval with_big_strings=no
9000                 fi
9001                 ;;
9002         esac
9003
9004 fi;
9005 echo "$as_me:9005: result: $with_big_strings" >&5
9006 echo "${ECHO_T}$with_big_strings" >&6
9007
9008 USE_BIG_STRINGS=0
9009 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9010
9011 ###     use option --enable-termcap to compile in the termcap fallback support
9012 echo "$as_me:9012: checking if you want termcap-fallback support" >&5
9013 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9014
9015 # Check whether --enable-termcap or --disable-termcap was given.
9016 if test "${enable_termcap+set}" = set; then
9017   enableval="$enable_termcap"
9018   with_termcap=$enableval
9019 else
9020   with_termcap=no
9021 fi;
9022 echo "$as_me:9022: result: $with_termcap" >&5
9023 echo "${ECHO_T}$with_termcap" >&6
9024
9025 NCURSES_USE_TERMCAP=0
9026 if test "x$with_termcap" != "xyes" ; then
9027         if test "$use_database" = no ; then
9028                 if test -z "$with_fallback" ; then
9029                         { { echo "$as_me:9029: error: You have disabled the database w/o specifying fallbacks" >&5
9030 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9031    { (exit 1); exit 1; }; }
9032                 fi
9033         fi
9034
9035 cat >>confdefs.h <<\EOF
9036 #define PURE_TERMINFO 1
9037 EOF
9038
9039 else
9040
9041         if test "$with_ticlib" != no ; then
9042                 { { echo "$as_me:9042: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9043 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9044    { (exit 1); exit 1; }; }
9045         fi
9046
9047         NCURSES_USE_TERMCAP=1
9048         echo "$as_me:9048: checking for list of termcap files" >&5
9049 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9050
9051 # Check whether --with-termpath or --without-termpath was given.
9052 if test "${with_termpath+set}" = set; then
9053   withval="$with_termpath"
9054
9055 else
9056   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9057 fi;
9058 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9059 cf_dst_path=
9060 for cf_src_path in $withval
9061 do
9062
9063 if test "x$prefix" != xNONE; then
9064         cf_path_syntax="$prefix"
9065 else
9066         cf_path_syntax="$ac_default_prefix"
9067 fi
9068
9069 case ".$cf_src_path" in
9070 (.\$\(*\)*|.\'*\'*)
9071         ;;
9072 (..|./*|.\\*)
9073         ;;
9074 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9075         ;;
9076 (.\${*prefix}*|.\${*dir}*)
9077         eval cf_src_path="$cf_src_path"
9078         case ".$cf_src_path" in
9079         (.NONE/*)
9080                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9081                 ;;
9082         esac
9083         ;;
9084 (.no|.NONE/*)
9085         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9086         ;;
9087 (*)
9088         { { echo "$as_me:9088: error: expected a pathname, not \"$cf_src_path\"" >&5
9089 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9090    { (exit 1); exit 1; }; }
9091         ;;
9092 esac
9093
9094   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9095   cf_dst_path="${cf_dst_path}${cf_src_path}"
9096 done
9097 IFS="$ac_save_ifs"
9098
9099 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9100 # so we have to check/work around.  We do prefer the result of "eval"...
9101 eval cf_dst_eval="$cf_dst_path"
9102 case "x$cf_dst_eval" in
9103 (xNONE*)
9104         TERMPATH=$cf_dst_path
9105         ;;
9106 (*)
9107         TERMPATH="$cf_dst_eval"
9108         ;;
9109 esac
9110
9111         echo "$as_me:9111: result: $TERMPATH" >&5
9112 echo "${ECHO_T}$TERMPATH" >&6
9113         test -n "$TERMPATH" &&
9114 cat >>confdefs.h <<EOF
9115 #define TERMPATH "$TERMPATH"
9116 EOF
9117
9118         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9119         echo "$as_me:9119: checking if fast termcap-loader is needed" >&5
9120 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9121
9122 # Check whether --enable-getcap or --disable-getcap was given.
9123 if test "${enable_getcap+set}" = set; then
9124   enableval="$enable_getcap"
9125   with_getcap=$enableval
9126 else
9127   with_getcap=no
9128 fi;
9129         echo "$as_me:9129: result: $with_getcap" >&5
9130 echo "${ECHO_T}$with_getcap" >&6
9131         test "x$with_getcap" = "xyes" &&
9132 cat >>confdefs.h <<\EOF
9133 #define USE_GETCAP 1
9134 EOF
9135
9136         echo "$as_me:9136: checking if translated termcaps will be cached in ~/.terminfo" >&5
9137 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9138
9139 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9140 if test "${enable_getcap_cache+set}" = set; then
9141   enableval="$enable_getcap_cache"
9142   with_getcap_cache=$enableval
9143 else
9144   with_getcap_cache=no
9145 fi;
9146         echo "$as_me:9146: result: $with_getcap_cache" >&5
9147 echo "${ECHO_T}$with_getcap_cache" >&6
9148         test "x$with_getcap_cache" = "xyes" &&
9149 cat >>confdefs.h <<\EOF
9150 #define USE_GETCAP_CACHE 1
9151 EOF
9152
9153 fi
9154
9155 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9156 echo "$as_me:9156: checking if ~/.terminfo is wanted" >&5
9157 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9158
9159 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9160 if test "${enable_home_terminfo+set}" = set; then
9161   enableval="$enable_home_terminfo"
9162   with_home_terminfo=$enableval
9163 else
9164   with_home_terminfo=yes
9165 fi;
9166 echo "$as_me:9166: result: $with_home_terminfo" >&5
9167 echo "${ECHO_T}$with_home_terminfo" >&6
9168 test "x$with_home_terminfo" = "xyes" &&
9169 cat >>confdefs.h <<\EOF
9170 #define USE_HOME_TERMINFO 1
9171 EOF
9172
9173 echo "$as_me:9173: checking if you want to use restricted environment when running as root" >&5
9174 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9175
9176 # Check whether --enable-root-environ or --disable-root-environ was given.
9177 if test "${enable_root_environ+set}" = set; then
9178   enableval="$enable_root_environ"
9179   with_root_environ=$enableval
9180 else
9181   with_root_environ=yes
9182 fi;
9183 echo "$as_me:9183: result: $with_root_environ" >&5
9184 echo "${ECHO_T}$with_root_environ" >&6
9185 test "x$with_root_environ" = xyes &&
9186 cat >>confdefs.h <<\EOF
9187 #define USE_ROOT_ENVIRON 1
9188 EOF
9189
9190 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9191 ###   to reduce storage requirements for the terminfo database.
9192
9193 for ac_header in \
9194 unistd.h \
9195
9196 do
9197 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9198 echo "$as_me:9198: checking for $ac_header" >&5
9199 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9200 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9201   echo $ECHO_N "(cached) $ECHO_C" >&6
9202 else
9203   cat >conftest.$ac_ext <<_ACEOF
9204 #line 9204 "configure"
9205 #include "confdefs.h"
9206 #include <$ac_header>
9207 _ACEOF
9208 if { (eval echo "$as_me:9208: \"$ac_cpp conftest.$ac_ext\"") >&5
9209   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9210   ac_status=$?
9211   egrep -v '^ *\+' conftest.er1 >conftest.err
9212   rm -f conftest.er1
9213   cat conftest.err >&5
9214   echo "$as_me:9214: \$? = $ac_status" >&5
9215   (exit $ac_status); } >/dev/null; then
9216   if test -s conftest.err; then
9217     ac_cpp_err=$ac_c_preproc_warn_flag
9218   else
9219     ac_cpp_err=
9220   fi
9221 else
9222   ac_cpp_err=yes
9223 fi
9224 if test -z "$ac_cpp_err"; then
9225   eval "$as_ac_Header=yes"
9226 else
9227   echo "$as_me: failed program was:" >&5
9228   cat conftest.$ac_ext >&5
9229   eval "$as_ac_Header=no"
9230 fi
9231 rm -f conftest.err conftest.$ac_ext
9232 fi
9233 echo "$as_me:9233: result: `eval echo '${'$as_ac_Header'}'`" >&5
9234 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9235 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9236   cat >>confdefs.h <<EOF
9237 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9238 EOF
9239
9240 fi
9241 done
9242
9243 for ac_func in \
9244         remove \
9245         unlink
9246 do
9247 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9248 echo "$as_me:9248: checking for $ac_func" >&5
9249 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9250 if eval "test \"\${$as_ac_var+set}\" = set"; then
9251   echo $ECHO_N "(cached) $ECHO_C" >&6
9252 else
9253   cat >conftest.$ac_ext <<_ACEOF
9254 #line 9254 "configure"
9255 #include "confdefs.h"
9256 #define $ac_func autoconf_temporary
9257 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9258 #undef $ac_func
9259
9260 #ifdef __cplusplus
9261 extern "C"
9262 #endif
9263
9264 /* We use char because int might match the return type of a gcc2
9265    builtin and then its argument prototype would still apply.  */
9266 char $ac_func (void);
9267
9268 int
9269 main (void)
9270 {
9271
9272 /* The GNU C library defines stubs for functions which it implements
9273     to always fail with ENOSYS.  Some functions are actually named
9274     something starting with __ and the normal name is an alias.  */
9275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9276 #error found stub for $ac_func
9277 #endif
9278
9279         return $ac_func ();
9280   ;
9281   return 0;
9282 }
9283 _ACEOF
9284 rm -f conftest.$ac_objext conftest$ac_exeext
9285 if { (eval echo "$as_me:9285: \"$ac_link\"") >&5
9286   (eval $ac_link) 2>&5
9287   ac_status=$?
9288   echo "$as_me:9288: \$? = $ac_status" >&5
9289   (exit $ac_status); } &&
9290          { ac_try='test -s conftest$ac_exeext'
9291   { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9292   (eval $ac_try) 2>&5
9293   ac_status=$?
9294   echo "$as_me:9294: \$? = $ac_status" >&5
9295   (exit $ac_status); }; }; then
9296   eval "$as_ac_var=yes"
9297 else
9298   echo "$as_me: failed program was:" >&5
9299 cat conftest.$ac_ext >&5
9300 eval "$as_ac_var=no"
9301 fi
9302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9303 fi
9304 echo "$as_me:9304: result: `eval echo '${'$as_ac_var'}'`" >&5
9305 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9306 if test `eval echo '${'$as_ac_var'}'` = yes; then
9307   cat >>confdefs.h <<EOF
9308 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9309 EOF
9310
9311 fi
9312 done
9313
9314 if test "$cross_compiling" = yes ; then
9315
9316 for ac_func in \
9317                 link \
9318                 symlink
9319 do
9320 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9321 echo "$as_me:9321: checking for $ac_func" >&5
9322 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9323 if eval "test \"\${$as_ac_var+set}\" = set"; then
9324   echo $ECHO_N "(cached) $ECHO_C" >&6
9325 else
9326   cat >conftest.$ac_ext <<_ACEOF
9327 #line 9327 "configure"
9328 #include "confdefs.h"
9329 #define $ac_func autoconf_temporary
9330 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9331 #undef $ac_func
9332
9333 #ifdef __cplusplus
9334 extern "C"
9335 #endif
9336
9337 /* We use char because int might match the return type of a gcc2
9338    builtin and then its argument prototype would still apply.  */
9339 char $ac_func (void);
9340
9341 int
9342 main (void)
9343 {
9344
9345 /* The GNU C library defines stubs for functions which it implements
9346     to always fail with ENOSYS.  Some functions are actually named
9347     something starting with __ and the normal name is an alias.  */
9348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9349 #error found stub for $ac_func
9350 #endif
9351
9352         return $ac_func ();
9353   ;
9354   return 0;
9355 }
9356 _ACEOF
9357 rm -f conftest.$ac_objext conftest$ac_exeext
9358 if { (eval echo "$as_me:9358: \"$ac_link\"") >&5
9359   (eval $ac_link) 2>&5
9360   ac_status=$?
9361   echo "$as_me:9361: \$? = $ac_status" >&5
9362   (exit $ac_status); } &&
9363          { ac_try='test -s conftest$ac_exeext'
9364   { (eval echo "$as_me:9364: \"$ac_try\"") >&5
9365   (eval $ac_try) 2>&5
9366   ac_status=$?
9367   echo "$as_me:9367: \$? = $ac_status" >&5
9368   (exit $ac_status); }; }; then
9369   eval "$as_ac_var=yes"
9370 else
9371   echo "$as_me: failed program was:" >&5
9372 cat conftest.$ac_ext >&5
9373 eval "$as_ac_var=no"
9374 fi
9375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9376 fi
9377 echo "$as_me:9377: result: `eval echo '${'$as_ac_var'}'`" >&5
9378 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9379 if test `eval echo '${'$as_ac_var'}'` = yes; then
9380   cat >>confdefs.h <<EOF
9381 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9382 EOF
9383
9384 fi
9385 done
9386
9387 else
9388         echo "$as_me:9388: checking if link/symlink functions work" >&5
9389 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9390 if test "${cf_cv_link_funcs+set}" = set; then
9391   echo $ECHO_N "(cached) $ECHO_C" >&6
9392 else
9393
9394                 cf_cv_link_funcs=
9395                 for cf_func in link symlink ; do
9396                         if test "$cross_compiling" = yes; then
9397
9398                         eval 'ac_cv_func_'$cf_func'=error'
9399 else
9400   cat >conftest.$ac_ext <<_ACEOF
9401 #line 9401 "configure"
9402 #include "confdefs.h"
9403
9404 #include <sys/types.h>
9405 #include <sys/stat.h>
9406 #ifdef HAVE_UNISTD_H
9407 #include <unistd.h>
9408 #endif
9409 int main(void)
9410 {
9411         int fail = 0;
9412         char *src = "config.log";
9413         char *dst = "conftest.chk";
9414         struct stat src_sb;
9415         struct stat dst_sb;
9416
9417         stat(src, &src_sb);
9418         fail = ($cf_func("config.log", "conftest.chk") < 0)
9419             || (stat(dst, &dst_sb) < 0)
9420             || (dst_sb.st_mtime != src_sb.st_mtime);
9421 #ifdef HAVE_UNLINK
9422         unlink(dst);
9423 #else
9424         remove(dst);
9425 #endif
9426         ${cf_cv_main_return:-return} (fail);
9427 }
9428
9429 _ACEOF
9430 rm -f conftest$ac_exeext
9431 if { (eval echo "$as_me:9431: \"$ac_link\"") >&5
9432   (eval $ac_link) 2>&5
9433   ac_status=$?
9434   echo "$as_me:9434: \$? = $ac_status" >&5
9435   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9436   { (eval echo "$as_me:9436: \"$ac_try\"") >&5
9437   (eval $ac_try) 2>&5
9438   ac_status=$?
9439   echo "$as_me:9439: \$? = $ac_status" >&5
9440   (exit $ac_status); }; }; then
9441
9442                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9443                         eval 'ac_cv_func_'$cf_func'=yes'
9444 else
9445   echo "$as_me: program exited with status $ac_status" >&5
9446 echo "$as_me: failed program was:" >&5
9447 cat conftest.$ac_ext >&5
9448
9449                         eval 'ac_cv_func_'$cf_func'=no'
9450 fi
9451 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9452 fi
9453                 done
9454                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9455
9456 fi
9457 echo "$as_me:9457: result: $cf_cv_link_funcs" >&5
9458 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9459         test "$ac_cv_func_link"    = yes &&
9460 cat >>confdefs.h <<\EOF
9461 #define HAVE_LINK 1
9462 EOF
9463
9464         test "$ac_cv_func_symlink" = yes &&
9465 cat >>confdefs.h <<\EOF
9466 #define HAVE_SYMLINK 1
9467 EOF
9468
9469 fi
9470
9471 with_links=no
9472 with_symlinks=no
9473
9474 # soft links (symbolic links) are useful for some systems where hard links do
9475 # not work, or to make it simpler to copy terminfo trees around.
9476 if test "x$ac_cv_func_symlink" = xyes ; then
9477         echo "$as_me:9477: checking if tic should use symbolic links" >&5
9478 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9479
9480 # Check whether --enable-symlinks or --disable-symlinks was given.
9481 if test "${enable_symlinks+set}" = set; then
9482   enableval="$enable_symlinks"
9483   with_symlinks=$enableval
9484 else
9485   with_symlinks=no
9486 fi;
9487         echo "$as_me:9487: result: $with_symlinks" >&5
9488 echo "${ECHO_T}$with_symlinks" >&6
9489 fi
9490
9491 # If we have hard links and did not choose to use soft links instead, there is
9492 # no reason to make this choice optional - use the hard links.
9493 if test "$with_symlinks" = no ; then
9494         echo "$as_me:9494: checking if tic should use hard links" >&5
9495 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9496         if test "x$ac_cv_func_link" = xyes ; then
9497                 with_links=yes
9498         else
9499                 with_links=no
9500         fi
9501         echo "$as_me:9501: result: $with_links" >&5
9502 echo "${ECHO_T}$with_links" >&6
9503 fi
9504
9505 test "x$with_links" = xyes &&
9506 cat >>confdefs.h <<\EOF
9507 #define USE_LINKS 1
9508 EOF
9509
9510 test "x$with_symlinks" = xyes &&
9511 cat >>confdefs.h <<\EOF
9512 #define USE_SYMLINKS 1
9513 EOF
9514
9515 ###   use option --enable-broken-linker to force on use of broken-linker support
9516
9517 echo "$as_me:9517: checking if you want broken-linker support code" >&5
9518 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9519
9520 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9521 if test "${enable_broken_linker+set}" = set; then
9522   enableval="$enable_broken_linker"
9523   with_broken_linker=$enableval
9524 else
9525   with_broken_linker=no
9526 fi;
9527 echo "$as_me:9527: result: $with_broken_linker" >&5
9528 echo "${ECHO_T}$with_broken_linker" >&6
9529
9530 : ${BROKEN_LINKER:=0}
9531 if test "x$with_broken_linker" = xyes ; then
9532
9533 cat >>confdefs.h <<\EOF
9534 #define BROKEN_LINKER 1
9535 EOF
9536
9537         BROKEN_LINKER=1
9538 fi
9539
9540 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9541 echo "$as_me:9541: checking if tputs should process BSD-style prefix padding" >&5
9542 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9543
9544 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9545 if test "${enable_bsdpad+set}" = set; then
9546   enableval="$enable_bsdpad"
9547   with_bsdpad=$enableval
9548 else
9549   with_bsdpad=no
9550 fi;
9551 echo "$as_me:9551: result: $with_bsdpad" >&5
9552 echo "${ECHO_T}$with_bsdpad" >&6
9553 test "x$with_bsdpad" = xyes &&
9554 cat >>confdefs.h <<\EOF
9555 #define BSD_TPUTS 1
9556 EOF
9557
9558 ###   use option --enable-widec to turn on use of wide-character support
9559 NCURSES_CH_T=chtype
9560 NCURSES_LIBUTF8=0
9561
9562 NEED_WCHAR_H=0
9563 NCURSES_MBSTATE_T=0
9564 NCURSES_WCHAR_T=0
9565 NCURSES_WINT_T=0
9566
9567 # Check to define _XOPEN_SOURCE "automatically"
9568 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9569
9570 echo "$as_me:9570: checking if the POSIX test-macros are already defined" >&5
9571 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9572 if test "${cf_cv_posix_visible+set}" = set; then
9573   echo $ECHO_N "(cached) $ECHO_C" >&6
9574 else
9575
9576 cat >conftest.$ac_ext <<_ACEOF
9577 #line 9577 "configure"
9578 #include "confdefs.h"
9579 #include <stdio.h>
9580 int
9581 main (void)
9582 {
9583
9584 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9585         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9586         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9587         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9588 #error conflicting symbols found
9589 #endif
9590
9591   ;
9592   return 0;
9593 }
9594 _ACEOF
9595 rm -f conftest.$ac_objext
9596 if { (eval echo "$as_me:9596: \"$ac_compile\"") >&5
9597   (eval $ac_compile) 2>&5
9598   ac_status=$?
9599   echo "$as_me:9599: \$? = $ac_status" >&5
9600   (exit $ac_status); } &&
9601          { ac_try='test -s conftest.$ac_objext'
9602   { (eval echo "$as_me:9602: \"$ac_try\"") >&5
9603   (eval $ac_try) 2>&5
9604   ac_status=$?
9605   echo "$as_me:9605: \$? = $ac_status" >&5
9606   (exit $ac_status); }; }; then
9607   cf_cv_posix_visible=no
9608 else
9609   echo "$as_me: failed program was:" >&5
9610 cat conftest.$ac_ext >&5
9611 cf_cv_posix_visible=yes
9612 fi
9613 rm -f conftest.$ac_objext conftest.$ac_ext
9614
9615 fi
9616 echo "$as_me:9616: result: $cf_cv_posix_visible" >&5
9617 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9618
9619 if test "$cf_cv_posix_visible" = no; then
9620
9621 cf_XOPEN_SOURCE=600
9622 cf_POSIX_C_SOURCE=199506L
9623 cf_xopen_source=
9624
9625 case $host_os in
9626 (aix[4-7]*)
9627         cf_xopen_source="-D_ALL_SOURCE"
9628         ;;
9629 (msys)
9630         cf_XOPEN_SOURCE=600
9631         ;;
9632 (darwin[0-8].*)
9633         cf_xopen_source="-D_APPLE_C_SOURCE"
9634         ;;
9635 (darwin*)
9636         cf_xopen_source="-D_DARWIN_C_SOURCE"
9637         cf_XOPEN_SOURCE=
9638         ;;
9639 (freebsd*|dragonfly*|midnightbsd*)
9640         # 5.x headers associate
9641         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9642         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9643         cf_POSIX_C_SOURCE=200112L
9644         cf_XOPEN_SOURCE=600
9645         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9646         ;;
9647 (hpux11*)
9648         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9649         ;;
9650 (hpux*)
9651         cf_xopen_source="-D_HPUX_SOURCE"
9652         ;;
9653 (irix[56].*)
9654         cf_xopen_source="-D_SGI_SOURCE"
9655         cf_XOPEN_SOURCE=
9656         ;;
9657 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9658
9659 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9660
9661 echo "$as_me:9661: checking if this is the GNU C library" >&5
9662 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9663 if test "${cf_cv_gnu_library+set}" = set; then
9664   echo $ECHO_N "(cached) $ECHO_C" >&6
9665 else
9666
9667 cat >conftest.$ac_ext <<_ACEOF
9668 #line 9668 "configure"
9669 #include "confdefs.h"
9670 #include <sys/types.h>
9671 int
9672 main (void)
9673 {
9674
9675         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9676                 return 0;
9677         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9678                 return 0;
9679         #else
9680         #       error not GNU C library
9681         #endif
9682   ;
9683   return 0;
9684 }
9685 _ACEOF
9686 rm -f conftest.$ac_objext
9687 if { (eval echo "$as_me:9687: \"$ac_compile\"") >&5
9688   (eval $ac_compile) 2>&5
9689   ac_status=$?
9690   echo "$as_me:9690: \$? = $ac_status" >&5
9691   (exit $ac_status); } &&
9692          { ac_try='test -s conftest.$ac_objext'
9693   { (eval echo "$as_me:9693: \"$ac_try\"") >&5
9694   (eval $ac_try) 2>&5
9695   ac_status=$?
9696   echo "$as_me:9696: \$? = $ac_status" >&5
9697   (exit $ac_status); }; }; then
9698   cf_cv_gnu_library=yes
9699 else
9700   echo "$as_me: failed program was:" >&5
9701 cat conftest.$ac_ext >&5
9702 cf_cv_gnu_library=no
9703 fi
9704 rm -f conftest.$ac_objext conftest.$ac_ext
9705
9706 fi
9707 echo "$as_me:9707: result: $cf_cv_gnu_library" >&5
9708 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9709
9710 if test x$cf_cv_gnu_library = xyes; then
9711
9712         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9713         # was changed to help a little.  newlib incorporated the change about 4
9714         # years later.
9715         echo "$as_me:9715: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9716 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9717 if test "${cf_cv_gnu_library_219+set}" = set; then
9718   echo $ECHO_N "(cached) $ECHO_C" >&6
9719 else
9720
9721                 cf_save="$CPPFLAGS"
9722
9723         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9724         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9725
9726                 cat >conftest.$ac_ext <<_ACEOF
9727 #line 9727 "configure"
9728 #include "confdefs.h"
9729 #include <sys/types.h>
9730 int
9731 main (void)
9732 {
9733
9734                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9735                                 return 0;
9736                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9737                                 return 0;
9738                         #else
9739                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9740                         #endif
9741   ;
9742   return 0;
9743 }
9744 _ACEOF
9745 rm -f conftest.$ac_objext
9746 if { (eval echo "$as_me:9746: \"$ac_compile\"") >&5
9747   (eval $ac_compile) 2>&5
9748   ac_status=$?
9749   echo "$as_me:9749: \$? = $ac_status" >&5
9750   (exit $ac_status); } &&
9751          { ac_try='test -s conftest.$ac_objext'
9752   { (eval echo "$as_me:9752: \"$ac_try\"") >&5
9753   (eval $ac_try) 2>&5
9754   ac_status=$?
9755   echo "$as_me:9755: \$? = $ac_status" >&5
9756   (exit $ac_status); }; }; then
9757   cf_cv_gnu_library_219=yes
9758 else
9759   echo "$as_me: failed program was:" >&5
9760 cat conftest.$ac_ext >&5
9761 cf_cv_gnu_library_219=no
9762 fi
9763 rm -f conftest.$ac_objext conftest.$ac_ext
9764                 CPPFLAGS="$cf_save"
9765
9766 fi
9767 echo "$as_me:9767: result: $cf_cv_gnu_library_219" >&5
9768 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9769
9770         if test "x$cf_cv_gnu_library_219" = xyes; then
9771                 cf_save="$CPPFLAGS"
9772                 echo "$as_me:9772: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9773 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9774 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9775   echo $ECHO_N "(cached) $ECHO_C" >&6
9776 else
9777
9778 cf_fix_cppflags=no
9779 cf_new_cflags=
9780 cf_new_cppflags=
9781 cf_new_extra_cppflags=
9782
9783 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9784 do
9785 case $cf_fix_cppflags in
9786 (no)
9787         case $cf_add_cflags in
9788         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9789                 case $cf_add_cflags in
9790                 (-D*)
9791                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9792
9793                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9794                                 && test -z "${cf_tst_cflags}" \
9795                                 && cf_fix_cppflags=yes
9796
9797                         if test $cf_fix_cppflags = yes ; then
9798
9799         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9800         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9801
9802                                 continue
9803                         elif test "${cf_tst_cflags}" = "\"'" ; then
9804
9805         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9806         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9807
9808                                 continue
9809                         fi
9810                         ;;
9811                 esac
9812                 case "$CPPFLAGS" in
9813                 (*$cf_add_cflags)
9814                         ;;
9815                 (*)
9816                         case $cf_add_cflags in
9817                         (-D*)
9818                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9819
9820 CPPFLAGS=`echo "$CPPFLAGS" | \
9821         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9822                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9823
9824                                 ;;
9825                         esac
9826
9827         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9828         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9829
9830                         ;;
9831                 esac
9832                 ;;
9833         (*)
9834
9835         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9836         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9837
9838                 ;;
9839         esac
9840         ;;
9841 (yes)
9842
9843         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9844         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9845
9846         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9847
9848         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9849                 && test -z "${cf_tst_cflags}" \
9850                 && cf_fix_cppflags=no
9851         ;;
9852 esac
9853 done
9854
9855 if test -n "$cf_new_cflags" ; then
9856
9857         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9858         CFLAGS="${CFLAGS}$cf_new_cflags"
9859
9860 fi
9861
9862 if test -n "$cf_new_cppflags" ; then
9863
9864         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9865         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9866
9867 fi
9868
9869 if test -n "$cf_new_extra_cppflags" ; then
9870
9871         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9872         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9873
9874 fi
9875
9876                         cat >conftest.$ac_ext <<_ACEOF
9877 #line 9877 "configure"
9878 #include "confdefs.h"
9879
9880                                 #include <limits.h>
9881                                 #include <sys/types.h>
9882
9883 int
9884 main (void)
9885 {
9886
9887                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9888                                         return 0;
9889                                 #else
9890                                 #       error GNU C library is too old
9891                                 #endif
9892   ;
9893   return 0;
9894 }
9895 _ACEOF
9896 rm -f conftest.$ac_objext
9897 if { (eval echo "$as_me:9897: \"$ac_compile\"") >&5
9898   (eval $ac_compile) 2>&5
9899   ac_status=$?
9900   echo "$as_me:9900: \$? = $ac_status" >&5
9901   (exit $ac_status); } &&
9902          { ac_try='test -s conftest.$ac_objext'
9903   { (eval echo "$as_me:9903: \"$ac_try\"") >&5
9904   (eval $ac_try) 2>&5
9905   ac_status=$?
9906   echo "$as_me:9906: \$? = $ac_status" >&5
9907   (exit $ac_status); }; }; then
9908   cf_cv_gnu_dftsrc_219=yes
9909 else
9910   echo "$as_me: failed program was:" >&5
9911 cat conftest.$ac_ext >&5
9912 cf_cv_gnu_dftsrc_219=no
9913 fi
9914 rm -f conftest.$ac_objext conftest.$ac_ext
9915
9916 fi
9917 echo "$as_me:9917: result: $cf_cv_gnu_dftsrc_219" >&5
9918 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9919                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9920         else
9921                 cf_cv_gnu_dftsrc_219=maybe
9922         fi
9923
9924         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9925
9926                 echo "$as_me:9926: checking if we must define _GNU_SOURCE" >&5
9927 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9928 if test "${cf_cv_gnu_source+set}" = set; then
9929   echo $ECHO_N "(cached) $ECHO_C" >&6
9930 else
9931
9932                 cat >conftest.$ac_ext <<_ACEOF
9933 #line 9933 "configure"
9934 #include "confdefs.h"
9935 #include <sys/types.h>
9936 int
9937 main (void)
9938 {
9939
9940                         #ifndef _XOPEN_SOURCE
9941                         #error  expected _XOPEN_SOURCE to be defined
9942                         #endif
9943   ;
9944   return 0;
9945 }
9946 _ACEOF
9947 rm -f conftest.$ac_objext
9948 if { (eval echo "$as_me:9948: \"$ac_compile\"") >&5
9949   (eval $ac_compile) 2>&5
9950   ac_status=$?
9951   echo "$as_me:9951: \$? = $ac_status" >&5
9952   (exit $ac_status); } &&
9953          { ac_try='test -s conftest.$ac_objext'
9954   { (eval echo "$as_me:9954: \"$ac_try\"") >&5
9955   (eval $ac_try) 2>&5
9956   ac_status=$?
9957   echo "$as_me:9957: \$? = $ac_status" >&5
9958   (exit $ac_status); }; }; then
9959   cf_cv_gnu_source=no
9960 else
9961   echo "$as_me: failed program was:" >&5
9962 cat conftest.$ac_ext >&5
9963 cf_save="$CPPFLAGS"
9964
9965 cf_fix_cppflags=no
9966 cf_new_cflags=
9967 cf_new_cppflags=
9968 cf_new_extra_cppflags=
9969
9970 for cf_add_cflags in -D_GNU_SOURCE
9971 do
9972 case $cf_fix_cppflags in
9973 (no)
9974         case $cf_add_cflags in
9975         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9976                 case $cf_add_cflags in
9977                 (-D*)
9978                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9979
9980                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9981                                 && test -z "${cf_tst_cflags}" \
9982                                 && cf_fix_cppflags=yes
9983
9984                         if test $cf_fix_cppflags = yes ; then
9985
9986         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9987         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9988
9989                                 continue
9990                         elif test "${cf_tst_cflags}" = "\"'" ; then
9991
9992         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9993         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9994
9995                                 continue
9996                         fi
9997                         ;;
9998                 esac
9999                 case "$CPPFLAGS" in
10000                 (*$cf_add_cflags)
10001                         ;;
10002                 (*)
10003                         case $cf_add_cflags in
10004                         (-D*)
10005                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10006
10007 CPPFLAGS=`echo "$CPPFLAGS" | \
10008         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10009                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10010
10011                                 ;;
10012                         esac
10013
10014         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10015         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10016
10017                         ;;
10018                 esac
10019                 ;;
10020         (*)
10021
10022         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10023         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10024
10025                 ;;
10026         esac
10027         ;;
10028 (yes)
10029
10030         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10031         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10032
10033         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10034
10035         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10036                 && test -z "${cf_tst_cflags}" \
10037                 && cf_fix_cppflags=no
10038         ;;
10039 esac
10040 done
10041
10042 if test -n "$cf_new_cflags" ; then
10043
10044         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10045         CFLAGS="${CFLAGS}$cf_new_cflags"
10046
10047 fi
10048
10049 if test -n "$cf_new_cppflags" ; then
10050
10051         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10052         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10053
10054 fi
10055
10056 if test -n "$cf_new_extra_cppflags" ; then
10057
10058         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10059         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10060
10061 fi
10062
10063                          cat >conftest.$ac_ext <<_ACEOF
10064 #line 10064 "configure"
10065 #include "confdefs.h"
10066 #include <sys/types.h>
10067 int
10068 main (void)
10069 {
10070
10071                                 #ifdef _XOPEN_SOURCE
10072                                 #error  expected _XOPEN_SOURCE to be undefined
10073                                 #endif
10074   ;
10075   return 0;
10076 }
10077 _ACEOF
10078 rm -f conftest.$ac_objext
10079 if { (eval echo "$as_me:10079: \"$ac_compile\"") >&5
10080   (eval $ac_compile) 2>&5
10081   ac_status=$?
10082   echo "$as_me:10082: \$? = $ac_status" >&5
10083   (exit $ac_status); } &&
10084          { ac_try='test -s conftest.$ac_objext'
10085   { (eval echo "$as_me:10085: \"$ac_try\"") >&5
10086   (eval $ac_try) 2>&5
10087   ac_status=$?
10088   echo "$as_me:10088: \$? = $ac_status" >&5
10089   (exit $ac_status); }; }; then
10090   cf_cv_gnu_source=no
10091 else
10092   echo "$as_me: failed program was:" >&5
10093 cat conftest.$ac_ext >&5
10094 cf_cv_gnu_source=yes
10095 fi
10096 rm -f conftest.$ac_objext conftest.$ac_ext
10097                         CPPFLAGS="$cf_save"
10098
10099 fi
10100 rm -f conftest.$ac_objext conftest.$ac_ext
10101
10102 fi
10103 echo "$as_me:10103: result: $cf_cv_gnu_source" >&5
10104 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10105
10106                 if test "$cf_cv_gnu_source" = yes
10107                 then
10108                 echo "$as_me:10108: checking if we should also define _DEFAULT_SOURCE" >&5
10109 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10110 if test "${cf_cv_default_source+set}" = set; then
10111   echo $ECHO_N "(cached) $ECHO_C" >&6
10112 else
10113
10114         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10115         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10116
10117                         cat >conftest.$ac_ext <<_ACEOF
10118 #line 10118 "configure"
10119 #include "confdefs.h"
10120 #include <sys/types.h>
10121 int
10122 main (void)
10123 {
10124
10125                                 #ifdef _DEFAULT_SOURCE
10126                                 #error  expected _DEFAULT_SOURCE to be undefined
10127                                 #endif
10128   ;
10129   return 0;
10130 }
10131 _ACEOF
10132 rm -f conftest.$ac_objext
10133 if { (eval echo "$as_me:10133: \"$ac_compile\"") >&5
10134   (eval $ac_compile) 2>&5
10135   ac_status=$?
10136   echo "$as_me:10136: \$? = $ac_status" >&5
10137   (exit $ac_status); } &&
10138          { ac_try='test -s conftest.$ac_objext'
10139   { (eval echo "$as_me:10139: \"$ac_try\"") >&5
10140   (eval $ac_try) 2>&5
10141   ac_status=$?
10142   echo "$as_me:10142: \$? = $ac_status" >&5
10143   (exit $ac_status); }; }; then
10144   cf_cv_default_source=no
10145 else
10146   echo "$as_me: failed program was:" >&5
10147 cat conftest.$ac_ext >&5
10148 cf_cv_default_source=yes
10149 fi
10150 rm -f conftest.$ac_objext conftest.$ac_ext
10151
10152 fi
10153 echo "$as_me:10153: result: $cf_cv_default_source" >&5
10154 echo "${ECHO_T}$cf_cv_default_source" >&6
10155                         if test "$cf_cv_default_source" = yes
10156                         then
10157
10158         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10159         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10160
10161                         fi
10162                 fi
10163         fi
10164
10165 fi
10166
10167         ;;
10168 (minix*)
10169         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10170         ;;
10171 (mirbsd*)
10172         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10173         cf_XOPEN_SOURCE=
10174
10175 if test "$cf_cv_posix_visible" = no; then
10176
10177 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10178
10179 cf_save_CFLAGS="$CFLAGS"
10180 cf_save_CPPFLAGS="$CPPFLAGS"
10181
10182 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10183         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10184                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10185
10186 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10187         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10188                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10189
10190 echo "$as_me:10190: checking if we should define _POSIX_C_SOURCE" >&5
10191 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10192 if test "${cf_cv_posix_c_source+set}" = set; then
10193   echo $ECHO_N "(cached) $ECHO_C" >&6
10194 else
10195
10196 echo "${as_me:-configure}:10196: testing if the symbol is already defined go no further ..." 1>&5
10197
10198         cat >conftest.$ac_ext <<_ACEOF
10199 #line 10199 "configure"
10200 #include "confdefs.h"
10201 #include <sys/types.h>
10202 int
10203 main (void)
10204 {
10205
10206 #ifndef _POSIX_C_SOURCE
10207 make an error
10208 #endif
10209   ;
10210   return 0;
10211 }
10212 _ACEOF
10213 rm -f conftest.$ac_objext
10214 if { (eval echo "$as_me:10214: \"$ac_compile\"") >&5
10215   (eval $ac_compile) 2>&5
10216   ac_status=$?
10217   echo "$as_me:10217: \$? = $ac_status" >&5
10218   (exit $ac_status); } &&
10219          { ac_try='test -s conftest.$ac_objext'
10220   { (eval echo "$as_me:10220: \"$ac_try\"") >&5
10221   (eval $ac_try) 2>&5
10222   ac_status=$?
10223   echo "$as_me:10223: \$? = $ac_status" >&5
10224   (exit $ac_status); }; }; then
10225   cf_cv_posix_c_source=no
10226 else
10227   echo "$as_me: failed program was:" >&5
10228 cat conftest.$ac_ext >&5
10229 cf_want_posix_source=no
10230          case .$cf_POSIX_C_SOURCE in
10231          (.[12]??*)
10232                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10233                 ;;
10234          (.2)
10235                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10236                 cf_want_posix_source=yes
10237                 ;;
10238          (.*)
10239                 cf_want_posix_source=yes
10240                 ;;
10241          esac
10242          if test "$cf_want_posix_source" = yes ; then
10243                 cat >conftest.$ac_ext <<_ACEOF
10244 #line 10244 "configure"
10245 #include "confdefs.h"
10246 #include <sys/types.h>
10247 int
10248 main (void)
10249 {
10250
10251 #ifdef _POSIX_SOURCE
10252 make an error
10253 #endif
10254   ;
10255   return 0;
10256 }
10257 _ACEOF
10258 rm -f conftest.$ac_objext
10259 if { (eval echo "$as_me:10259: \"$ac_compile\"") >&5
10260   (eval $ac_compile) 2>&5
10261   ac_status=$?
10262   echo "$as_me:10262: \$? = $ac_status" >&5
10263   (exit $ac_status); } &&
10264          { ac_try='test -s conftest.$ac_objext'
10265   { (eval echo "$as_me:10265: \"$ac_try\"") >&5
10266   (eval $ac_try) 2>&5
10267   ac_status=$?
10268   echo "$as_me:10268: \$? = $ac_status" >&5
10269   (exit $ac_status); }; }; then
10270   :
10271 else
10272   echo "$as_me: failed program was:" >&5
10273 cat conftest.$ac_ext >&5
10274 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10275 fi
10276 rm -f conftest.$ac_objext conftest.$ac_ext
10277          fi
10278
10279 echo "${as_me:-configure}:10279: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10280
10281          CFLAGS="$cf_trim_CFLAGS"
10282          CPPFLAGS="$cf_trim_CPPFLAGS"
10283
10284         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10285         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10286
10287 echo "${as_me:-configure}:10287: testing if the second compile does not leave our definition intact error ..." 1>&5
10288
10289          cat >conftest.$ac_ext <<_ACEOF
10290 #line 10290 "configure"
10291 #include "confdefs.h"
10292 #include <sys/types.h>
10293 int
10294 main (void)
10295 {
10296
10297 #ifndef _POSIX_C_SOURCE
10298 make an error
10299 #endif
10300   ;
10301   return 0;
10302 }
10303 _ACEOF
10304 rm -f conftest.$ac_objext
10305 if { (eval echo "$as_me:10305: \"$ac_compile\"") >&5
10306   (eval $ac_compile) 2>&5
10307   ac_status=$?
10308   echo "$as_me:10308: \$? = $ac_status" >&5
10309   (exit $ac_status); } &&
10310          { ac_try='test -s conftest.$ac_objext'
10311   { (eval echo "$as_me:10311: \"$ac_try\"") >&5
10312   (eval $ac_try) 2>&5
10313   ac_status=$?
10314   echo "$as_me:10314: \$? = $ac_status" >&5
10315   (exit $ac_status); }; }; then
10316   :
10317 else
10318   echo "$as_me: failed program was:" >&5
10319 cat conftest.$ac_ext >&5
10320 cf_cv_posix_c_source=no
10321 fi
10322 rm -f conftest.$ac_objext conftest.$ac_ext
10323          CFLAGS="$cf_save_CFLAGS"
10324          CPPFLAGS="$cf_save_CPPFLAGS"
10325
10326 fi
10327 rm -f conftest.$ac_objext conftest.$ac_ext
10328
10329 fi
10330 echo "$as_me:10330: result: $cf_cv_posix_c_source" >&5
10331 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10332
10333 if test "$cf_cv_posix_c_source" != no ; then
10334         CFLAGS="$cf_trim_CFLAGS"
10335         CPPFLAGS="$cf_trim_CPPFLAGS"
10336
10337 cf_fix_cppflags=no
10338 cf_new_cflags=
10339 cf_new_cppflags=
10340 cf_new_extra_cppflags=
10341
10342 for cf_add_cflags in $cf_cv_posix_c_source
10343 do
10344 case $cf_fix_cppflags in
10345 (no)
10346         case $cf_add_cflags in
10347         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10348                 case $cf_add_cflags in
10349                 (-D*)
10350                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10351
10352                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10353                                 && test -z "${cf_tst_cflags}" \
10354                                 && cf_fix_cppflags=yes
10355
10356                         if test $cf_fix_cppflags = yes ; then
10357
10358         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10359         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10360
10361                                 continue
10362                         elif test "${cf_tst_cflags}" = "\"'" ; then
10363
10364         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10365         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10366
10367                                 continue
10368                         fi
10369                         ;;
10370                 esac
10371                 case "$CPPFLAGS" in
10372                 (*$cf_add_cflags)
10373                         ;;
10374                 (*)
10375                         case $cf_add_cflags in
10376                         (-D*)
10377                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10378
10379 CPPFLAGS=`echo "$CPPFLAGS" | \
10380         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10381                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10382
10383                                 ;;
10384                         esac
10385
10386         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10387         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10388
10389                         ;;
10390                 esac
10391                 ;;
10392         (*)
10393
10394         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10395         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10396
10397                 ;;
10398         esac
10399         ;;
10400 (yes)
10401
10402         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10403         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10404
10405         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10406
10407         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10408                 && test -z "${cf_tst_cflags}" \
10409                 && cf_fix_cppflags=no
10410         ;;
10411 esac
10412 done
10413
10414 if test -n "$cf_new_cflags" ; then
10415
10416         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10417         CFLAGS="${CFLAGS}$cf_new_cflags"
10418
10419 fi
10420
10421 if test -n "$cf_new_cppflags" ; then
10422
10423         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10424         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10425
10426 fi
10427
10428 if test -n "$cf_new_extra_cppflags" ; then
10429
10430         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10431         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10432
10433 fi
10434
10435 fi
10436
10437 fi # cf_cv_posix_visible
10438
10439         ;;
10440 (netbsd*)
10441         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10442         ;;
10443 (openbsd[4-9]*)
10444         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10445         cf_xopen_source="-D_BSD_SOURCE"
10446         cf_XOPEN_SOURCE=600
10447         ;;
10448 (openbsd*)
10449         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10450         ;;
10451 (osf[45]*)
10452         cf_xopen_source="-D_OSF_SOURCE"
10453         ;;
10454 (nto-qnx*)
10455         cf_xopen_source="-D_QNX_SOURCE"
10456         ;;
10457 (sco*)
10458         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10459         ;;
10460 (solaris2.*)
10461         cf_xopen_source="-D__EXTENSIONS__"
10462         cf_cv_xopen_source=broken
10463         ;;
10464 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10465         cf_XOPEN_SOURCE=
10466         cf_POSIX_C_SOURCE=
10467         ;;
10468 (*)
10469
10470 echo "$as_me:10470: checking if we should define _XOPEN_SOURCE" >&5
10471 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10472 if test "${cf_cv_xopen_source+set}" = set; then
10473   echo $ECHO_N "(cached) $ECHO_C" >&6
10474 else
10475
10476         cat >conftest.$ac_ext <<_ACEOF
10477 #line 10477 "configure"
10478 #include "confdefs.h"
10479
10480 #include <stdlib.h>
10481 #include <string.h>
10482 #include <sys/types.h>
10483
10484 int
10485 main (void)
10486 {
10487
10488 #ifndef _XOPEN_SOURCE
10489 make an error
10490 #endif
10491   ;
10492   return 0;
10493 }
10494 _ACEOF
10495 rm -f conftest.$ac_objext
10496 if { (eval echo "$as_me:10496: \"$ac_compile\"") >&5
10497   (eval $ac_compile) 2>&5
10498   ac_status=$?
10499   echo "$as_me:10499: \$? = $ac_status" >&5
10500   (exit $ac_status); } &&
10501          { ac_try='test -s conftest.$ac_objext'
10502   { (eval echo "$as_me:10502: \"$ac_try\"") >&5
10503   (eval $ac_try) 2>&5
10504   ac_status=$?
10505   echo "$as_me:10505: \$? = $ac_status" >&5
10506   (exit $ac_status); }; }; then
10507   cf_cv_xopen_source=no
10508 else
10509   echo "$as_me: failed program was:" >&5
10510 cat conftest.$ac_ext >&5
10511 cf_save="$CPPFLAGS"
10512
10513         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10514         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10515
10516          cat >conftest.$ac_ext <<_ACEOF
10517 #line 10517 "configure"
10518 #include "confdefs.h"
10519
10520 #include <stdlib.h>
10521 #include <string.h>
10522 #include <sys/types.h>
10523
10524 int
10525 main (void)
10526 {
10527
10528 #ifdef _XOPEN_SOURCE
10529 make an error
10530 #endif
10531   ;
10532   return 0;
10533 }
10534 _ACEOF
10535 rm -f conftest.$ac_objext
10536 if { (eval echo "$as_me:10536: \"$ac_compile\"") >&5
10537   (eval $ac_compile) 2>&5
10538   ac_status=$?
10539   echo "$as_me:10539: \$? = $ac_status" >&5
10540   (exit $ac_status); } &&
10541          { ac_try='test -s conftest.$ac_objext'
10542   { (eval echo "$as_me:10542: \"$ac_try\"") >&5
10543   (eval $ac_try) 2>&5
10544   ac_status=$?
10545   echo "$as_me:10545: \$? = $ac_status" >&5
10546   (exit $ac_status); }; }; then
10547   cf_cv_xopen_source=no
10548 else
10549   echo "$as_me: failed program was:" >&5
10550 cat conftest.$ac_ext >&5
10551 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10552 fi
10553 rm -f conftest.$ac_objext conftest.$ac_ext
10554         CPPFLAGS="$cf_save"
10555
10556 fi
10557 rm -f conftest.$ac_objext conftest.$ac_ext
10558
10559 fi
10560 echo "$as_me:10560: result: $cf_cv_xopen_source" >&5
10561 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10562
10563 if test "$cf_cv_xopen_source" != no ; then
10564
10565 CFLAGS=`echo "$CFLAGS" | \
10566         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10567                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10568
10569 CPPFLAGS=`echo "$CPPFLAGS" | \
10570         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10571                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10572
10573         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10574
10575 cf_fix_cppflags=no
10576 cf_new_cflags=
10577 cf_new_cppflags=
10578 cf_new_extra_cppflags=
10579
10580 for cf_add_cflags in $cf_temp_xopen_source
10581 do
10582 case $cf_fix_cppflags in
10583 (no)
10584         case $cf_add_cflags in
10585         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10586                 case $cf_add_cflags in
10587                 (-D*)
10588                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10589
10590                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10591                                 && test -z "${cf_tst_cflags}" \
10592                                 && cf_fix_cppflags=yes
10593
10594                         if test $cf_fix_cppflags = yes ; then
10595
10596         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10597         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10598
10599                                 continue
10600                         elif test "${cf_tst_cflags}" = "\"'" ; then
10601
10602         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10603         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10604
10605                                 continue
10606                         fi
10607                         ;;
10608                 esac
10609                 case "$CPPFLAGS" in
10610                 (*$cf_add_cflags)
10611                         ;;
10612                 (*)
10613                         case $cf_add_cflags in
10614                         (-D*)
10615                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10616
10617 CPPFLAGS=`echo "$CPPFLAGS" | \
10618         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10619                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10620
10621                                 ;;
10622                         esac
10623
10624         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10625         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10626
10627                         ;;
10628                 esac
10629                 ;;
10630         (*)
10631
10632         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10633         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10634
10635                 ;;
10636         esac
10637         ;;
10638 (yes)
10639
10640         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10641         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10642
10643         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10644
10645         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10646                 && test -z "${cf_tst_cflags}" \
10647                 && cf_fix_cppflags=no
10648         ;;
10649 esac
10650 done
10651
10652 if test -n "$cf_new_cflags" ; then
10653
10654         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10655         CFLAGS="${CFLAGS}$cf_new_cflags"
10656
10657 fi
10658
10659 if test -n "$cf_new_cppflags" ; then
10660
10661         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10662         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10663
10664 fi
10665
10666 if test -n "$cf_new_extra_cppflags" ; then
10667
10668         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10669         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10670
10671 fi
10672
10673 fi
10674
10675 if test "$cf_cv_posix_visible" = no; then
10676
10677 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10678
10679 cf_save_CFLAGS="$CFLAGS"
10680 cf_save_CPPFLAGS="$CPPFLAGS"
10681
10682 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10683         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10684                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10685
10686 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10687         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10688                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10689
10690 echo "$as_me:10690: checking if we should define _POSIX_C_SOURCE" >&5
10691 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10692 if test "${cf_cv_posix_c_source+set}" = set; then
10693   echo $ECHO_N "(cached) $ECHO_C" >&6
10694 else
10695
10696 echo "${as_me:-configure}:10696: testing if the symbol is already defined go no further ..." 1>&5
10697
10698         cat >conftest.$ac_ext <<_ACEOF
10699 #line 10699 "configure"
10700 #include "confdefs.h"
10701 #include <sys/types.h>
10702 int
10703 main (void)
10704 {
10705
10706 #ifndef _POSIX_C_SOURCE
10707 make an error
10708 #endif
10709   ;
10710   return 0;
10711 }
10712 _ACEOF
10713 rm -f conftest.$ac_objext
10714 if { (eval echo "$as_me:10714: \"$ac_compile\"") >&5
10715   (eval $ac_compile) 2>&5
10716   ac_status=$?
10717   echo "$as_me:10717: \$? = $ac_status" >&5
10718   (exit $ac_status); } &&
10719          { ac_try='test -s conftest.$ac_objext'
10720   { (eval echo "$as_me:10720: \"$ac_try\"") >&5
10721   (eval $ac_try) 2>&5
10722   ac_status=$?
10723   echo "$as_me:10723: \$? = $ac_status" >&5
10724   (exit $ac_status); }; }; then
10725   cf_cv_posix_c_source=no
10726 else
10727   echo "$as_me: failed program was:" >&5
10728 cat conftest.$ac_ext >&5
10729 cf_want_posix_source=no
10730          case .$cf_POSIX_C_SOURCE in
10731          (.[12]??*)
10732                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10733                 ;;
10734          (.2)
10735                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10736                 cf_want_posix_source=yes
10737                 ;;
10738          (.*)
10739                 cf_want_posix_source=yes
10740                 ;;
10741          esac
10742          if test "$cf_want_posix_source" = yes ; then
10743                 cat >conftest.$ac_ext <<_ACEOF
10744 #line 10744 "configure"
10745 #include "confdefs.h"
10746 #include <sys/types.h>
10747 int
10748 main (void)
10749 {
10750
10751 #ifdef _POSIX_SOURCE
10752 make an error
10753 #endif
10754   ;
10755   return 0;
10756 }
10757 _ACEOF
10758 rm -f conftest.$ac_objext
10759 if { (eval echo "$as_me:10759: \"$ac_compile\"") >&5
10760   (eval $ac_compile) 2>&5
10761   ac_status=$?
10762   echo "$as_me:10762: \$? = $ac_status" >&5
10763   (exit $ac_status); } &&
10764          { ac_try='test -s conftest.$ac_objext'
10765   { (eval echo "$as_me:10765: \"$ac_try\"") >&5
10766   (eval $ac_try) 2>&5
10767   ac_status=$?
10768   echo "$as_me:10768: \$? = $ac_status" >&5
10769   (exit $ac_status); }; }; then
10770   :
10771 else
10772   echo "$as_me: failed program was:" >&5
10773 cat conftest.$ac_ext >&5
10774 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10775 fi
10776 rm -f conftest.$ac_objext conftest.$ac_ext
10777          fi
10778
10779 echo "${as_me:-configure}:10779: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10780
10781          CFLAGS="$cf_trim_CFLAGS"
10782          CPPFLAGS="$cf_trim_CPPFLAGS"
10783
10784         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10785         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10786
10787 echo "${as_me:-configure}:10787: testing if the second compile does not leave our definition intact error ..." 1>&5
10788
10789          cat >conftest.$ac_ext <<_ACEOF
10790 #line 10790 "configure"
10791 #include "confdefs.h"
10792 #include <sys/types.h>
10793 int
10794 main (void)
10795 {
10796
10797 #ifndef _POSIX_C_SOURCE
10798 make an error
10799 #endif
10800   ;
10801   return 0;
10802 }
10803 _ACEOF
10804 rm -f conftest.$ac_objext
10805 if { (eval echo "$as_me:10805: \"$ac_compile\"") >&5
10806   (eval $ac_compile) 2>&5
10807   ac_status=$?
10808   echo "$as_me:10808: \$? = $ac_status" >&5
10809   (exit $ac_status); } &&
10810          { ac_try='test -s conftest.$ac_objext'
10811   { (eval echo "$as_me:10811: \"$ac_try\"") >&5
10812   (eval $ac_try) 2>&5
10813   ac_status=$?
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); }; }; then
10816   :
10817 else
10818   echo "$as_me: failed program was:" >&5
10819 cat conftest.$ac_ext >&5
10820 cf_cv_posix_c_source=no
10821 fi
10822 rm -f conftest.$ac_objext conftest.$ac_ext
10823          CFLAGS="$cf_save_CFLAGS"
10824          CPPFLAGS="$cf_save_CPPFLAGS"
10825
10826 fi
10827 rm -f conftest.$ac_objext conftest.$ac_ext
10828
10829 fi
10830 echo "$as_me:10830: result: $cf_cv_posix_c_source" >&5
10831 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10832
10833 if test "$cf_cv_posix_c_source" != no ; then
10834         CFLAGS="$cf_trim_CFLAGS"
10835         CPPFLAGS="$cf_trim_CPPFLAGS"
10836
10837 cf_fix_cppflags=no
10838 cf_new_cflags=
10839 cf_new_cppflags=
10840 cf_new_extra_cppflags=
10841
10842 for cf_add_cflags in $cf_cv_posix_c_source
10843 do
10844 case $cf_fix_cppflags in
10845 (no)
10846         case $cf_add_cflags in
10847         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10848                 case $cf_add_cflags in
10849                 (-D*)
10850                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10851
10852                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10853                                 && test -z "${cf_tst_cflags}" \
10854                                 && cf_fix_cppflags=yes
10855
10856                         if test $cf_fix_cppflags = yes ; then
10857
10858         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10859         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10860
10861                                 continue
10862                         elif test "${cf_tst_cflags}" = "\"'" ; then
10863
10864         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10865         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10866
10867                                 continue
10868                         fi
10869                         ;;
10870                 esac
10871                 case "$CPPFLAGS" in
10872                 (*$cf_add_cflags)
10873                         ;;
10874                 (*)
10875                         case $cf_add_cflags in
10876                         (-D*)
10877                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10878
10879 CPPFLAGS=`echo "$CPPFLAGS" | \
10880         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10881                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10882
10883                                 ;;
10884                         esac
10885
10886         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10887         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10888
10889                         ;;
10890                 esac
10891                 ;;
10892         (*)
10893
10894         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10895         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10896
10897                 ;;
10898         esac
10899         ;;
10900 (yes)
10901
10902         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10903         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10904
10905         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10906
10907         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10908                 && test -z "${cf_tst_cflags}" \
10909                 && cf_fix_cppflags=no
10910         ;;
10911 esac
10912 done
10913
10914 if test -n "$cf_new_cflags" ; then
10915
10916         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10917         CFLAGS="${CFLAGS}$cf_new_cflags"
10918
10919 fi
10920
10921 if test -n "$cf_new_cppflags" ; then
10922
10923         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10924         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10925
10926 fi
10927
10928 if test -n "$cf_new_extra_cppflags" ; then
10929
10930         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10931         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10932
10933 fi
10934
10935 fi
10936
10937 fi # cf_cv_posix_visible
10938
10939         ;;
10940 esac
10941
10942 if test -n "$cf_xopen_source" ; then
10943
10944 cf_fix_cppflags=no
10945 cf_new_cflags=
10946 cf_new_cppflags=
10947 cf_new_extra_cppflags=
10948
10949 for cf_add_cflags in $cf_xopen_source
10950 do
10951 case $cf_fix_cppflags in
10952 (no)
10953         case $cf_add_cflags in
10954         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10955                 case $cf_add_cflags in
10956                 (-D*)
10957                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10958
10959                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10960                                 && test -z "${cf_tst_cflags}" \
10961                                 && cf_fix_cppflags=yes
10962
10963                         if test $cf_fix_cppflags = yes ; then
10964
10965         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10966         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10967
10968                                 continue
10969                         elif test "${cf_tst_cflags}" = "\"'" ; then
10970
10971         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10972         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10973
10974                                 continue
10975                         fi
10976                         ;;
10977                 esac
10978                 case "$CPPFLAGS" in
10979                 (*$cf_add_cflags)
10980                         ;;
10981                 (*)
10982                         case $cf_add_cflags in
10983                         (-D*)
10984                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10985
10986 CPPFLAGS=`echo "$CPPFLAGS" | \
10987         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10988                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10989
10990                                 ;;
10991                         esac
10992
10993         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10994         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10995
10996                         ;;
10997                 esac
10998                 ;;
10999         (*)
11000
11001         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11002         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11003
11004                 ;;
11005         esac
11006         ;;
11007 (yes)
11008
11009         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11010         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11011
11012         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11013
11014         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11015                 && test -z "${cf_tst_cflags}" \
11016                 && cf_fix_cppflags=no
11017         ;;
11018 esac
11019 done
11020
11021 if test -n "$cf_new_cflags" ; then
11022         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11023
11024 echo "${as_me:-configure}:11024: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11025
11026         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11027         CFLAGS="${CFLAGS}$cf_new_cflags"
11028
11029 fi
11030
11031 if test -n "$cf_new_cppflags" ; then
11032         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11033
11034 echo "${as_me:-configure}:11034: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11035
11036         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11037         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11038
11039 fi
11040
11041 if test -n "$cf_new_extra_cppflags" ; then
11042         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11043
11044 echo "${as_me:-configure}:11044: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11045
11046         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11047         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11048
11049 fi
11050
11051 fi
11052
11053 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11054         echo "$as_me:11054: checking if _XOPEN_SOURCE really is set" >&5
11055 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11056         cat >conftest.$ac_ext <<_ACEOF
11057 #line 11057 "configure"
11058 #include "confdefs.h"
11059 #include <stdlib.h>
11060 int
11061 main (void)
11062 {
11063
11064 #ifndef _XOPEN_SOURCE
11065 make an error
11066 #endif
11067   ;
11068   return 0;
11069 }
11070 _ACEOF
11071 rm -f conftest.$ac_objext
11072 if { (eval echo "$as_me:11072: \"$ac_compile\"") >&5
11073   (eval $ac_compile) 2>&5
11074   ac_status=$?
11075   echo "$as_me:11075: \$? = $ac_status" >&5
11076   (exit $ac_status); } &&
11077          { ac_try='test -s conftest.$ac_objext'
11078   { (eval echo "$as_me:11078: \"$ac_try\"") >&5
11079   (eval $ac_try) 2>&5
11080   ac_status=$?
11081   echo "$as_me:11081: \$? = $ac_status" >&5
11082   (exit $ac_status); }; }; then
11083   cf_XOPEN_SOURCE_set=yes
11084 else
11085   echo "$as_me: failed program was:" >&5
11086 cat conftest.$ac_ext >&5
11087 cf_XOPEN_SOURCE_set=no
11088 fi
11089 rm -f conftest.$ac_objext conftest.$ac_ext
11090         echo "$as_me:11090: result: $cf_XOPEN_SOURCE_set" >&5
11091 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11092         if test $cf_XOPEN_SOURCE_set = yes
11093         then
11094                 cat >conftest.$ac_ext <<_ACEOF
11095 #line 11095 "configure"
11096 #include "confdefs.h"
11097 #include <stdlib.h>
11098 int
11099 main (void)
11100 {
11101
11102 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11103 make an error
11104 #endif
11105   ;
11106   return 0;
11107 }
11108 _ACEOF
11109 rm -f conftest.$ac_objext
11110 if { (eval echo "$as_me:11110: \"$ac_compile\"") >&5
11111   (eval $ac_compile) 2>&5
11112   ac_status=$?
11113   echo "$as_me:11113: \$? = $ac_status" >&5
11114   (exit $ac_status); } &&
11115          { ac_try='test -s conftest.$ac_objext'
11116   { (eval echo "$as_me:11116: \"$ac_try\"") >&5
11117   (eval $ac_try) 2>&5
11118   ac_status=$?
11119   echo "$as_me:11119: \$? = $ac_status" >&5
11120   (exit $ac_status); }; }; then
11121   cf_XOPEN_SOURCE_set_ok=yes
11122 else
11123   echo "$as_me: failed program was:" >&5
11124 cat conftest.$ac_ext >&5
11125 cf_XOPEN_SOURCE_set_ok=no
11126 fi
11127 rm -f conftest.$ac_objext conftest.$ac_ext
11128                 if test $cf_XOPEN_SOURCE_set_ok = no
11129                 then
11130                         { echo "$as_me:11130: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11131 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11132                 fi
11133         else
11134
11135 echo "$as_me:11135: checking if we should define _XOPEN_SOURCE" >&5
11136 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11137 if test "${cf_cv_xopen_source+set}" = set; then
11138   echo $ECHO_N "(cached) $ECHO_C" >&6
11139 else
11140
11141         cat >conftest.$ac_ext <<_ACEOF
11142 #line 11142 "configure"
11143 #include "confdefs.h"
11144
11145 #include <stdlib.h>
11146 #include <string.h>
11147 #include <sys/types.h>
11148
11149 int
11150 main (void)
11151 {
11152
11153 #ifndef _XOPEN_SOURCE
11154 make an error
11155 #endif
11156   ;
11157   return 0;
11158 }
11159 _ACEOF
11160 rm -f conftest.$ac_objext
11161 if { (eval echo "$as_me:11161: \"$ac_compile\"") >&5
11162   (eval $ac_compile) 2>&5
11163   ac_status=$?
11164   echo "$as_me:11164: \$? = $ac_status" >&5
11165   (exit $ac_status); } &&
11166          { ac_try='test -s conftest.$ac_objext'
11167   { (eval echo "$as_me:11167: \"$ac_try\"") >&5
11168   (eval $ac_try) 2>&5
11169   ac_status=$?
11170   echo "$as_me:11170: \$? = $ac_status" >&5
11171   (exit $ac_status); }; }; then
11172   cf_cv_xopen_source=no
11173 else
11174   echo "$as_me: failed program was:" >&5
11175 cat conftest.$ac_ext >&5
11176 cf_save="$CPPFLAGS"
11177
11178         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11179         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11180
11181          cat >conftest.$ac_ext <<_ACEOF
11182 #line 11182 "configure"
11183 #include "confdefs.h"
11184
11185 #include <stdlib.h>
11186 #include <string.h>
11187 #include <sys/types.h>
11188
11189 int
11190 main (void)
11191 {
11192
11193 #ifdef _XOPEN_SOURCE
11194 make an error
11195 #endif
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 rm -f conftest.$ac_objext
11201 if { (eval echo "$as_me:11201: \"$ac_compile\"") >&5
11202   (eval $ac_compile) 2>&5
11203   ac_status=$?
11204   echo "$as_me:11204: \$? = $ac_status" >&5
11205   (exit $ac_status); } &&
11206          { ac_try='test -s conftest.$ac_objext'
11207   { (eval echo "$as_me:11207: \"$ac_try\"") >&5
11208   (eval $ac_try) 2>&5
11209   ac_status=$?
11210   echo "$as_me:11210: \$? = $ac_status" >&5
11211   (exit $ac_status); }; }; then
11212   cf_cv_xopen_source=no
11213 else
11214   echo "$as_me: failed program was:" >&5
11215 cat conftest.$ac_ext >&5
11216 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11217 fi
11218 rm -f conftest.$ac_objext conftest.$ac_ext
11219         CPPFLAGS="$cf_save"
11220
11221 fi
11222 rm -f conftest.$ac_objext conftest.$ac_ext
11223
11224 fi
11225 echo "$as_me:11225: result: $cf_cv_xopen_source" >&5
11226 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11227
11228 if test "$cf_cv_xopen_source" != no ; then
11229
11230 CFLAGS=`echo "$CFLAGS" | \
11231         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11232                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11233
11234 CPPFLAGS=`echo "$CPPFLAGS" | \
11235         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11236                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11237
11238         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11239
11240 cf_fix_cppflags=no
11241 cf_new_cflags=
11242 cf_new_cppflags=
11243 cf_new_extra_cppflags=
11244
11245 for cf_add_cflags in $cf_temp_xopen_source
11246 do
11247 case $cf_fix_cppflags in
11248 (no)
11249         case $cf_add_cflags in
11250         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11251                 case $cf_add_cflags in
11252                 (-D*)
11253                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11254
11255                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11256                                 && test -z "${cf_tst_cflags}" \
11257                                 && cf_fix_cppflags=yes
11258
11259                         if test $cf_fix_cppflags = yes ; then
11260
11261         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11262         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11263
11264                                 continue
11265                         elif test "${cf_tst_cflags}" = "\"'" ; then
11266
11267         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11268         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11269
11270                                 continue
11271                         fi
11272                         ;;
11273                 esac
11274                 case "$CPPFLAGS" in
11275                 (*$cf_add_cflags)
11276                         ;;
11277                 (*)
11278                         case $cf_add_cflags in
11279                         (-D*)
11280                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11281
11282 CPPFLAGS=`echo "$CPPFLAGS" | \
11283         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11284                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11285
11286                                 ;;
11287                         esac
11288
11289         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11290         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11291
11292                         ;;
11293                 esac
11294                 ;;
11295         (*)
11296
11297         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11298         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11299
11300                 ;;
11301         esac
11302         ;;
11303 (yes)
11304
11305         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11306         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11307
11308         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11309
11310         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11311                 && test -z "${cf_tst_cflags}" \
11312                 && cf_fix_cppflags=no
11313         ;;
11314 esac
11315 done
11316
11317 if test -n "$cf_new_cflags" ; then
11318
11319         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11320         CFLAGS="${CFLAGS}$cf_new_cflags"
11321
11322 fi
11323
11324 if test -n "$cf_new_cppflags" ; then
11325
11326         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11327         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11328
11329 fi
11330
11331 if test -n "$cf_new_extra_cppflags" ; then
11332
11333         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11334         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11335
11336 fi
11337
11338 fi
11339
11340         fi
11341 fi
11342 fi # cf_cv_posix_visible
11343
11344 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11345
11346 # Work around breakage on OS X
11347
11348 echo "$as_me:11348: checking if SIGWINCH is defined" >&5
11349 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11350 if test "${cf_cv_define_sigwinch+set}" = set; then
11351   echo $ECHO_N "(cached) $ECHO_C" >&6
11352 else
11353
11354         cat >conftest.$ac_ext <<_ACEOF
11355 #line 11355 "configure"
11356 #include "confdefs.h"
11357
11358 #include <sys/types.h>
11359 #include <sys/signal.h>
11360
11361 int
11362 main (void)
11363 {
11364 int x = SIGWINCH; (void)x
11365   ;
11366   return 0;
11367 }
11368 _ACEOF
11369 rm -f conftest.$ac_objext
11370 if { (eval echo "$as_me:11370: \"$ac_compile\"") >&5
11371   (eval $ac_compile) 2>&5
11372   ac_status=$?
11373   echo "$as_me:11373: \$? = $ac_status" >&5
11374   (exit $ac_status); } &&
11375          { ac_try='test -s conftest.$ac_objext'
11376   { (eval echo "$as_me:11376: \"$ac_try\"") >&5
11377   (eval $ac_try) 2>&5
11378   ac_status=$?
11379   echo "$as_me:11379: \$? = $ac_status" >&5
11380   (exit $ac_status); }; }; then
11381   cf_cv_define_sigwinch=yes
11382 else
11383   echo "$as_me: failed program was:" >&5
11384 cat conftest.$ac_ext >&5
11385 cat >conftest.$ac_ext <<_ACEOF
11386 #line 11386 "configure"
11387 #include "confdefs.h"
11388
11389 #undef _XOPEN_SOURCE
11390 #undef _POSIX_SOURCE
11391 #undef _POSIX_C_SOURCE
11392 #include <sys/types.h>
11393 #include <sys/signal.h>
11394
11395 int
11396 main (void)
11397 {
11398 int x = SIGWINCH; (void)x
11399   ;
11400   return 0;
11401 }
11402 _ACEOF
11403 rm -f conftest.$ac_objext
11404 if { (eval echo "$as_me:11404: \"$ac_compile\"") >&5
11405   (eval $ac_compile) 2>&5
11406   ac_status=$?
11407   echo "$as_me:11407: \$? = $ac_status" >&5
11408   (exit $ac_status); } &&
11409          { ac_try='test -s conftest.$ac_objext'
11410   { (eval echo "$as_me:11410: \"$ac_try\"") >&5
11411   (eval $ac_try) 2>&5
11412   ac_status=$?
11413   echo "$as_me:11413: \$? = $ac_status" >&5
11414   (exit $ac_status); }; }; then
11415   cf_cv_define_sigwinch=maybe
11416 else
11417   echo "$as_me: failed program was:" >&5
11418 cat conftest.$ac_ext >&5
11419 cf_cv_define_sigwinch=no
11420 fi
11421 rm -f conftest.$ac_objext conftest.$ac_ext
11422
11423 fi
11424 rm -f conftest.$ac_objext conftest.$ac_ext
11425
11426 fi
11427 echo "$as_me:11427: result: $cf_cv_define_sigwinch" >&5
11428 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11429
11430 if test "$cf_cv_define_sigwinch" = maybe ; then
11431 echo "$as_me:11431: checking for actual SIGWINCH definition" >&5
11432 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11433 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11434   echo $ECHO_N "(cached) $ECHO_C" >&6
11435 else
11436
11437 cf_cv_fixup_sigwinch=unknown
11438 cf_sigwinch=32
11439 while test $cf_sigwinch != 1
11440 do
11441         cat >conftest.$ac_ext <<_ACEOF
11442 #line 11442 "configure"
11443 #include "confdefs.h"
11444
11445 #undef _XOPEN_SOURCE
11446 #undef _POSIX_SOURCE
11447 #undef _POSIX_C_SOURCE
11448 #include <sys/types.h>
11449 #include <sys/signal.h>
11450
11451 int
11452 main (void)
11453 {
11454
11455 #if SIGWINCH != $cf_sigwinch
11456 make an error
11457 #endif
11458 int x = SIGWINCH; (void)x
11459   ;
11460   return 0;
11461 }
11462 _ACEOF
11463 rm -f conftest.$ac_objext
11464 if { (eval echo "$as_me:11464: \"$ac_compile\"") >&5
11465   (eval $ac_compile) 2>&5
11466   ac_status=$?
11467   echo "$as_me:11467: \$? = $ac_status" >&5
11468   (exit $ac_status); } &&
11469          { ac_try='test -s conftest.$ac_objext'
11470   { (eval echo "$as_me:11470: \"$ac_try\"") >&5
11471   (eval $ac_try) 2>&5
11472   ac_status=$?
11473   echo "$as_me:11473: \$? = $ac_status" >&5
11474   (exit $ac_status); }; }; then
11475   cf_cv_fixup_sigwinch=$cf_sigwinch
11476          break
11477 else
11478   echo "$as_me: failed program was:" >&5
11479 cat conftest.$ac_ext >&5
11480 fi
11481 rm -f conftest.$ac_objext conftest.$ac_ext
11482
11483 cf_sigwinch=`expr $cf_sigwinch - 1`
11484 done
11485
11486 fi
11487 echo "$as_me:11487: result: $cf_cv_fixup_sigwinch" >&5
11488 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11489
11490         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11491                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11492         fi
11493 fi
11494
11495 # Checks for CODESET support.
11496
11497 echo "$as_me:11497: checking for nl_langinfo and CODESET" >&5
11498 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11499 if test "${am_cv_langinfo_codeset+set}" = set; then
11500   echo $ECHO_N "(cached) $ECHO_C" >&6
11501 else
11502   cat >conftest.$ac_ext <<_ACEOF
11503 #line 11503 "configure"
11504 #include "confdefs.h"
11505 #include <langinfo.h>
11506 int
11507 main (void)
11508 {
11509 char* cs = nl_langinfo(CODESET); (void)cs
11510   ;
11511   return 0;
11512 }
11513 _ACEOF
11514 rm -f conftest.$ac_objext conftest$ac_exeext
11515 if { (eval echo "$as_me:11515: \"$ac_link\"") >&5
11516   (eval $ac_link) 2>&5
11517   ac_status=$?
11518   echo "$as_me:11518: \$? = $ac_status" >&5
11519   (exit $ac_status); } &&
11520          { ac_try='test -s conftest$ac_exeext'
11521   { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522   (eval $ac_try) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit $ac_status); }; }; then
11526   am_cv_langinfo_codeset=yes
11527 else
11528   echo "$as_me: failed program was:" >&5
11529 cat conftest.$ac_ext >&5
11530 am_cv_langinfo_codeset=no
11531 fi
11532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11533
11534 fi
11535 echo "$as_me:11535: result: $am_cv_langinfo_codeset" >&5
11536 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11537         if test $am_cv_langinfo_codeset = yes; then
11538
11539 cat >>confdefs.h <<\EOF
11540 #define HAVE_LANGINFO_CODESET 1
11541 EOF
11542
11543         fi
11544
11545 # use these variables to work around a defect in gcc's fixincludes.
11546 NCURSES_OK_WCHAR_T=
11547 NCURSES_OK_WINT_T=
11548
11549 echo "$as_me:11549: checking if you want wide-character code" >&5
11550 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11551
11552 # Check whether --enable-widec or --disable-widec was given.
11553 if test "${enable_widec+set}" = set; then
11554   enableval="$enable_widec"
11555   with_widec=$enableval
11556 else
11557   with_widec=no
11558 fi;
11559 echo "$as_me:11559: result: $with_widec" >&5
11560 echo "${ECHO_T}$with_widec" >&6
11561
11562 NCURSES_WCWIDTH_GRAPHICS=1
11563
11564 if test "x$with_widec" = xyes ; then
11565         if test "x$disable_lib_suffixes" = xno ; then
11566                 LIB_SUFFIX="w${LIB_SUFFIX}"
11567         fi
11568
11569 cat >>confdefs.h <<\EOF
11570 #define USE_WIDEC_SUPPORT 1
11571 EOF
11572
11573 cat >>confdefs.h <<\EOF
11574 #define NCURSES_WIDECHAR 1
11575 EOF
11576
11577 for ac_header in \
11578 wchar.h \
11579 wctype.h \
11580
11581 do
11582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11583 echo "$as_me:11583: checking for $ac_header" >&5
11584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11585 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11586   echo $ECHO_N "(cached) $ECHO_C" >&6
11587 else
11588   cat >conftest.$ac_ext <<_ACEOF
11589 #line 11589 "configure"
11590 #include "confdefs.h"
11591 #include <$ac_header>
11592 _ACEOF
11593 if { (eval echo "$as_me:11593: \"$ac_cpp conftest.$ac_ext\"") >&5
11594   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11595   ac_status=$?
11596   egrep -v '^ *\+' conftest.er1 >conftest.err
11597   rm -f conftest.er1
11598   cat conftest.err >&5
11599   echo "$as_me:11599: \$? = $ac_status" >&5
11600   (exit $ac_status); } >/dev/null; then
11601   if test -s conftest.err; then
11602     ac_cpp_err=$ac_c_preproc_warn_flag
11603   else
11604     ac_cpp_err=
11605   fi
11606 else
11607   ac_cpp_err=yes
11608 fi
11609 if test -z "$ac_cpp_err"; then
11610   eval "$as_ac_Header=yes"
11611 else
11612   echo "$as_me: failed program was:" >&5
11613   cat conftest.$ac_ext >&5
11614   eval "$as_ac_Header=no"
11615 fi
11616 rm -f conftest.err conftest.$ac_ext
11617 fi
11618 echo "$as_me:11618: result: `eval echo '${'$as_ac_Header'}'`" >&5
11619 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11620 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11621   cat >>confdefs.h <<EOF
11622 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11623 EOF
11624
11625 fi
11626 done
11627
11628 echo "$as_me:11628: checking if wchar.h can be used as is" >&5
11629 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11630 if test "${cf_cv_wchar_h_okay+set}" = set; then
11631   echo $ECHO_N "(cached) $ECHO_C" >&6
11632 else
11633
11634 cat >conftest.$ac_ext <<_ACEOF
11635 #line 11635 "configure"
11636 #include "confdefs.h"
11637
11638 #include <stdlib.h>
11639 #ifdef HAVE_WCHAR_H
11640 #include <wchar.h>
11641 #endif
11642 #ifdef HAVE_WCTYPE_H
11643 #include <wctype.h>
11644 #endif
11645
11646 int
11647 main (void)
11648 {
11649
11650         wint_t foo = 0;
11651         int bar = iswpunct(foo)
11652   ;
11653   return 0;
11654 }
11655 _ACEOF
11656 rm -f conftest.$ac_objext
11657 if { (eval echo "$as_me:11657: \"$ac_compile\"") >&5
11658   (eval $ac_compile) 2>&5
11659   ac_status=$?
11660   echo "$as_me:11660: \$? = $ac_status" >&5
11661   (exit $ac_status); } &&
11662          { ac_try='test -s conftest.$ac_objext'
11663   { (eval echo "$as_me:11663: \"$ac_try\"") >&5
11664   (eval $ac_try) 2>&5
11665   ac_status=$?
11666   echo "$as_me:11666: \$? = $ac_status" >&5
11667   (exit $ac_status); }; }; then
11668   cf_cv_wchar_h_okay=yes
11669 else
11670   echo "$as_me: failed program was:" >&5
11671 cat conftest.$ac_ext >&5
11672 cf_cv_wchar_h_okay=no
11673 fi
11674 rm -f conftest.$ac_objext conftest.$ac_ext
11675 fi
11676 echo "$as_me:11676: result: $cf_cv_wchar_h_okay" >&5
11677 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11678
11679 if test $cf_cv_wchar_h_okay = no
11680 then
11681
11682 echo "$as_me:11682: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11683 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11684 cat >conftest.$ac_ext <<_ACEOF
11685 #line 11685 "configure"
11686 #include "confdefs.h"
11687 #include <sys/types.h>
11688
11689 int
11690 main (void)
11691 {
11692
11693 #ifndef _XOPEN_SOURCE_EXTENDED
11694 make an error
11695 #endif
11696   ;
11697   return 0;
11698 }
11699 _ACEOF
11700 rm -f conftest.$ac_objext
11701 if { (eval echo "$as_me:11701: \"$ac_compile\"") >&5
11702   (eval $ac_compile) 2>&5
11703   ac_status=$?
11704   echo "$as_me:11704: \$? = $ac_status" >&5
11705   (exit $ac_status); } &&
11706          { ac_try='test -s conftest.$ac_objext'
11707   { (eval echo "$as_me:11707: \"$ac_try\"") >&5
11708   (eval $ac_try) 2>&5
11709   ac_status=$?
11710   echo "$as_me:11710: \$? = $ac_status" >&5
11711   (exit $ac_status); }; }; then
11712   cf_result=no
11713 else
11714   echo "$as_me: failed program was:" >&5
11715 cat conftest.$ac_ext >&5
11716 cf_result=yes
11717 fi
11718 rm -f conftest.$ac_objext conftest.$ac_ext
11719 echo "$as_me:11719: result: $cf_result" >&5
11720 echo "${ECHO_T}$cf_result" >&6
11721
11722 if test "$cf_result" = yes ; then
11723         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11724 elif test "x" != "x" ; then
11725         echo "$as_me:11725: checking checking for compatible value versus " >&5
11726 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11727         cat >conftest.$ac_ext <<_ACEOF
11728 #line 11728 "configure"
11729 #include "confdefs.h"
11730 #include <sys/types.h>
11731
11732 int
11733 main (void)
11734 {
11735
11736 #if _XOPEN_SOURCE_EXTENDED- < 0
11737 make an error
11738 #endif
11739   ;
11740   return 0;
11741 }
11742 _ACEOF
11743 rm -f conftest.$ac_objext
11744 if { (eval echo "$as_me:11744: \"$ac_compile\"") >&5
11745   (eval $ac_compile) 2>&5
11746   ac_status=$?
11747   echo "$as_me:11747: \$? = $ac_status" >&5
11748   (exit $ac_status); } &&
11749          { ac_try='test -s conftest.$ac_objext'
11750   { (eval echo "$as_me:11750: \"$ac_try\"") >&5
11751   (eval $ac_try) 2>&5
11752   ac_status=$?
11753   echo "$as_me:11753: \$? = $ac_status" >&5
11754   (exit $ac_status); }; }; then
11755   cf_result=yes
11756 else
11757   echo "$as_me: failed program was:" >&5
11758 cat conftest.$ac_ext >&5
11759 cf_result=no
11760 fi
11761 rm -f conftest.$ac_objext conftest.$ac_ext
11762         echo "$as_me:11762: result: $cf_result" >&5
11763 echo "${ECHO_T}$cf_result" >&6
11764         if test "$cf_result" = no ; then
11765                 # perhaps we can override it - try...
11766                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11767         fi
11768 fi
11769
11770 fi
11771
11772 echo "$as_me:11772: checking if wcwidth agrees graphics are single-width" >&5
11773 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11774 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11775   echo $ECHO_N "(cached) $ECHO_C" >&6
11776 else
11777
11778 cat >conftest.in <<CF_EOF
11779 -       VT100 symbols
11780 0x250c  upper left corner
11781 0x2514  lower left corner
11782 0x2510  upper right corner
11783 0x2518  lower right corner
11784 0x251c  tee pointing left
11785 0x2524  tee pointing right
11786 0x2534  tee pointing up
11787 0x252c  tee pointing down
11788 0x2500  horizontal line
11789 0x2502  vertical line
11790 0x253c  large plus or crossover
11791 0x23ba  scan line 1
11792 0x23bd  scan line 9
11793 0x25c6  diamond
11794 0x2592  checker board (stipple)
11795 0x00b0  degree symbol
11796 0x00b1  plus/minus
11797 0x00b7  bullet
11798 -       Teletype 5410v1 symbols
11799 0x2190  arrow pointing left
11800 0x2192  arrow pointing right
11801 0x2193  arrow pointing down
11802 0x2191  arrow pointing up
11803 0x2592  board of squares
11804 0x2603  lantern symbol
11805 0x25ae  solid square block
11806 -       these defaults were invented for ncurses
11807 0x23bb  scan line 3
11808 0x23bc  scan line 7
11809 0x2264  less-than-or-equal-to
11810 0x2265  greater-than-or-equal-to
11811 0x03c0  greek pi
11812 0x2260  not-equal
11813 0x00a3  pound-sterling symbol
11814 -       thick-line-drawing
11815 0x250f  upper left corner
11816 0x2517  lower left corner
11817 0x2513  upper right corner
11818 0x251b  lower right corner
11819 0x2523  tee pointing left
11820 0x252b  tee pointing right
11821 0x253b  tee pointing up
11822 0x2533  tee pointing down
11823 0x2501  horizontal line
11824 0x2503  vertical line
11825 0x254b  large plus or crossover
11826 -       double-line-drawing
11827 0x2554  upper left corner
11828 0x255a  lower left corner
11829 0x2557  upper right corner
11830 0x255d  lower right corner
11831 0x2563  tee pointing left
11832 0x2560  tee pointing right
11833 0x2569  tee pointing up
11834 0x2566  tee pointing down
11835 0x2550  horizontal line
11836 0x2551  vertical line
11837 0x256c  large plus or crossover
11838 CF_EOF
11839 if test "$cross_compiling" = yes; then
11840   cf_cv_wcwidth_graphics=unknown
11841 else
11842   cat >conftest.$ac_ext <<_ACEOF
11843 #line 11843 "configure"
11844 #include "confdefs.h"
11845
11846 #include <locale.h>
11847 #include <stdio.h>
11848 #include <wchar.h>
11849
11850 #define MY_LEN 80
11851
11852 int
11853 main(void)
11854 {
11855         FILE *fp;
11856         int value;
11857         char buffer[MY_LEN + 1];
11858         char notes[MY_LEN + 1];
11859         int totals = 0;
11860         int passed = 0;
11861
11862         if (setlocale(LC_ALL, "en_US.UTF8") ||
11863                 setlocale(LC_ALL, "en_US.UTF-8") ||
11864                 setlocale(LC_ALL, "en_US.utf8") ||
11865                 setlocale(LC_ALL, "en_US.utf-8")) {
11866                 if ((fp = fopen("conftest.in", "r")) != 0) {
11867                         while (fgets(buffer, MY_LEN, fp) != 0) {
11868                                 if (*buffer == '-') {
11869                                         fprintf(stderr, "\t%s", buffer);
11870                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11871                                         ++totals;
11872                                         if (wcwidth(value) == 1)
11873                                                 ++passed;
11874                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11875                                 } else {
11876                                         fprintf(stderr, "?\t%s", buffer);
11877                                 }
11878                         }
11879                 }
11880         }
11881         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11882         return (totals == passed) ? 0 : 1;
11883 }
11884
11885 _ACEOF
11886 rm -f conftest$ac_exeext
11887 if { (eval echo "$as_me:11887: \"$ac_link\"") >&5
11888   (eval $ac_link) 2>&5
11889   ac_status=$?
11890   echo "$as_me:11890: \$? = $ac_status" >&5
11891   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11892   { (eval echo "$as_me:11892: \"$ac_try\"") >&5
11893   (eval $ac_try) 2>&5
11894   ac_status=$?
11895   echo "$as_me:11895: \$? = $ac_status" >&5
11896   (exit $ac_status); }; }; then
11897   cf_cv_wcwidth_graphics=yes
11898 else
11899   echo "$as_me: program exited with status $ac_status" >&5
11900 echo "$as_me: failed program was:" >&5
11901 cat conftest.$ac_ext >&5
11902 cf_cv_wcwidth_graphics=no
11903 fi
11904 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11905 fi
11906
11907 fi
11908 echo "$as_me:11908: result: $cf_cv_wcwidth_graphics" >&5
11909 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11910
11911         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11912
11913         # with_overwrite=no
11914         NCURSES_CH_T=cchar_t
11915
11916 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11917 do
11918 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11919 echo "$as_me:11919: checking for $ac_func" >&5
11920 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11921 if eval "test \"\${$as_ac_var+set}\" = set"; then
11922   echo $ECHO_N "(cached) $ECHO_C" >&6
11923 else
11924   cat >conftest.$ac_ext <<_ACEOF
11925 #line 11925 "configure"
11926 #include "confdefs.h"
11927 #define $ac_func autoconf_temporary
11928 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11929 #undef $ac_func
11930
11931 #ifdef __cplusplus
11932 extern "C"
11933 #endif
11934
11935 /* We use char because int might match the return type of a gcc2
11936    builtin and then its argument prototype would still apply.  */
11937 char $ac_func (void);
11938
11939 int
11940 main (void)
11941 {
11942
11943 /* The GNU C library defines stubs for functions which it implements
11944     to always fail with ENOSYS.  Some functions are actually named
11945     something starting with __ and the normal name is an alias.  */
11946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11947 #error found stub for $ac_func
11948 #endif
11949
11950         return $ac_func ();
11951   ;
11952   return 0;
11953 }
11954 _ACEOF
11955 rm -f conftest.$ac_objext conftest$ac_exeext
11956 if { (eval echo "$as_me:11956: \"$ac_link\"") >&5
11957   (eval $ac_link) 2>&5
11958   ac_status=$?
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit $ac_status); } &&
11961          { ac_try='test -s conftest$ac_exeext'
11962   { (eval echo "$as_me:11962: \"$ac_try\"") >&5
11963   (eval $ac_try) 2>&5
11964   ac_status=$?
11965   echo "$as_me:11965: \$? = $ac_status" >&5
11966   (exit $ac_status); }; }; then
11967   eval "$as_ac_var=yes"
11968 else
11969   echo "$as_me: failed program was:" >&5
11970 cat conftest.$ac_ext >&5
11971 eval "$as_ac_var=no"
11972 fi
11973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11974 fi
11975 echo "$as_me:11975: result: `eval echo '${'$as_ac_var'}'`" >&5
11976 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11977 if test `eval echo '${'$as_ac_var'}'` = yes; then
11978   cat >>confdefs.h <<EOF
11979 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11980 EOF
11981
11982 fi
11983 done
11984
11985         if test "x$ac_cv_func_putwc" != xyes ; then
11986
11987 echo "$as_me:11987: checking for multibyte character support" >&5
11988 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11989 if test "${cf_cv_utf8_lib+set}" = set; then
11990   echo $ECHO_N "(cached) $ECHO_C" >&6
11991 else
11992
11993         cf_save_LIBS="$LIBS"
11994         cat >conftest.$ac_ext <<_ACEOF
11995 #line 11995 "configure"
11996 #include "confdefs.h"
11997
11998 #include <stdlib.h>
11999 int
12000 main (void)
12001 {
12002 putwc(0,0);
12003   ;
12004   return 0;
12005 }
12006 _ACEOF
12007 rm -f conftest.$ac_objext conftest$ac_exeext
12008 if { (eval echo "$as_me:12008: \"$ac_link\"") >&5
12009   (eval $ac_link) 2>&5
12010   ac_status=$?
12011   echo "$as_me:12011: \$? = $ac_status" >&5
12012   (exit $ac_status); } &&
12013          { ac_try='test -s conftest$ac_exeext'
12014   { (eval echo "$as_me:12014: \"$ac_try\"") >&5
12015   (eval $ac_try) 2>&5
12016   ac_status=$?
12017   echo "$as_me:12017: \$? = $ac_status" >&5
12018   (exit $ac_status); }; }; then
12019   cf_cv_utf8_lib=yes
12020 else
12021   echo "$as_me: failed program was:" >&5
12022 cat conftest.$ac_ext >&5
12023
12024 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12025 # will be set on completion of the AC_TRY_LINK below.
12026 cf_cv_header_path_utf8=
12027 cf_cv_library_path_utf8=
12028
12029 echo "${as_me:-configure}:12029: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12030
12031 cf_save_LIBS="$LIBS"
12032
12033 cat >conftest.$ac_ext <<_ACEOF
12034 #line 12034 "configure"
12035 #include "confdefs.h"
12036
12037 #include <libutf8.h>
12038 int
12039 main (void)
12040 {
12041 putwc(0,0);
12042   ;
12043   return 0;
12044 }
12045 _ACEOF
12046 rm -f conftest.$ac_objext conftest$ac_exeext
12047 if { (eval echo "$as_me:12047: \"$ac_link\"") >&5
12048   (eval $ac_link) 2>&5
12049   ac_status=$?
12050   echo "$as_me:12050: \$? = $ac_status" >&5
12051   (exit $ac_status); } &&
12052          { ac_try='test -s conftest$ac_exeext'
12053   { (eval echo "$as_me:12053: \"$ac_try\"") >&5
12054   (eval $ac_try) 2>&5
12055   ac_status=$?
12056   echo "$as_me:12056: \$? = $ac_status" >&5
12057   (exit $ac_status); }; }; then
12058
12059         cf_cv_find_linkage_utf8=yes
12060         cf_cv_header_path_utf8=/usr/include
12061         cf_cv_library_path_utf8=/usr/lib
12062
12063 else
12064   echo "$as_me: failed program was:" >&5
12065 cat conftest.$ac_ext >&5
12066
12067 LIBS="-lutf8  $cf_save_LIBS"
12068
12069 cat >conftest.$ac_ext <<_ACEOF
12070 #line 12070 "configure"
12071 #include "confdefs.h"
12072
12073 #include <libutf8.h>
12074 int
12075 main (void)
12076 {
12077 putwc(0,0);
12078   ;
12079   return 0;
12080 }
12081 _ACEOF
12082 rm -f conftest.$ac_objext conftest$ac_exeext
12083 if { (eval echo "$as_me:12083: \"$ac_link\"") >&5
12084   (eval $ac_link) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit $ac_status); } &&
12088          { ac_try='test -s conftest$ac_exeext'
12089   { (eval echo "$as_me:12089: \"$ac_try\"") >&5
12090   (eval $ac_try) 2>&5
12091   ac_status=$?
12092   echo "$as_me:12092: \$? = $ac_status" >&5
12093   (exit $ac_status); }; }; then
12094
12095         cf_cv_find_linkage_utf8=yes
12096         cf_cv_header_path_utf8=/usr/include
12097         cf_cv_library_path_utf8=/usr/lib
12098         cf_cv_library_file_utf8="-lutf8"
12099
12100 else
12101   echo "$as_me: failed program was:" >&5
12102 cat conftest.$ac_ext >&5
12103
12104         cf_cv_find_linkage_utf8=no
12105         LIBS="$cf_save_LIBS"
12106
12107         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12108
12109 echo "${as_me:-configure}:12109: testing find linkage for utf8 library ..." 1>&5
12110
12111 echo "${as_me:-configure}:12111: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12112
12113         cf_save_CPPFLAGS="$CPPFLAGS"
12114         cf_test_CPPFLAGS="$CPPFLAGS"
12115
12116 cf_search=
12117
12118 # collect the current set of include-directories from compiler flags
12119 cf_header_path_list=""
12120 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12121         for cf_header_path in $CPPFLAGS $CFLAGS
12122         do
12123                 case $cf_header_path in
12124                 (-I*)
12125                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12126
12127 test "x$cf_header_path" != "xNONE" && \
12128 test -d "$cf_header_path" && \
12129  {
12130         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12131         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
12132         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
12133         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12134         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
12135         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12136 }
12137
12138                         cf_header_path_list="$cf_header_path_list $cf_search"
12139                         ;;
12140                 esac
12141         done
12142 fi
12143
12144 # add the variations for the package we are looking for
12145
12146 cf_search=
12147
12148 test "x$prefix" != "xNONE" && \
12149 test -d "$prefix" && \
12150  {
12151         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12152         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
12153         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
12154         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
12155         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
12156         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12157 }
12158
12159 for cf_subdir_prefix in \
12160         /usr \
12161         /usr/local \
12162         /usr/pkg \
12163         /opt \
12164         /opt/local \
12165         $HOME
12166 do
12167
12168 test "x$cf_subdir_prefix" != "x$prefix" && \
12169 test -d "$cf_subdir_prefix" && \
12170 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12171         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12172         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
12173         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12174         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12175         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12176         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12177 }
12178
12179 done
12180
12181 test "$includedir" != NONE && \
12182 test "$includedir" != "/usr/include" && \
12183 test -d "$includedir" && {
12184         test -d $includedir &&    cf_search="$cf_search $includedir"
12185         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
12186 }
12187
12188 test "$oldincludedir" != NONE && \
12189 test "$oldincludedir" != "/usr/include" && \
12190 test -d "$oldincludedir" && {
12191         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
12192         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
12193 }
12194
12195 cf_search="$cf_search $cf_header_path_list"
12196
12197         for cf_cv_header_path_utf8 in $cf_search
12198         do
12199                 if test -d $cf_cv_header_path_utf8 ; then
12200                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12201
12202 echo "${as_me:-configure}:12202: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12203
12204                         CPPFLAGS="$cf_save_CPPFLAGS"
12205
12206         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12207         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12208
12209                         cat >conftest.$ac_ext <<_ACEOF
12210 #line 12210 "configure"
12211 #include "confdefs.h"
12212
12213 #include <libutf8.h>
12214 int
12215 main (void)
12216 {
12217 putwc(0,0);
12218   ;
12219   return 0;
12220 }
12221 _ACEOF
12222 rm -f conftest.$ac_objext
12223 if { (eval echo "$as_me:12223: \"$ac_compile\"") >&5
12224   (eval $ac_compile) 2>&5
12225   ac_status=$?
12226   echo "$as_me:12226: \$? = $ac_status" >&5
12227   (exit $ac_status); } &&
12228          { ac_try='test -s conftest.$ac_objext'
12229   { (eval echo "$as_me:12229: \"$ac_try\"") >&5
12230   (eval $ac_try) 2>&5
12231   ac_status=$?
12232   echo "$as_me:12232: \$? = $ac_status" >&5
12233   (exit $ac_status); }; }; then
12234
12235                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12236
12237 echo "${as_me:-configure}:12237: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12238
12239                                 cf_cv_find_linkage_utf8=maybe
12240                                 cf_test_CPPFLAGS="$CPPFLAGS"
12241                                 break
12242 else
12243   echo "$as_me: failed program was:" >&5
12244 cat conftest.$ac_ext >&5
12245
12246                                 CPPFLAGS="$cf_save_CPPFLAGS"
12247
12248 fi
12249 rm -f conftest.$ac_objext conftest.$ac_ext
12250                 fi
12251         done
12252
12253         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12254
12255 echo "${as_me:-configure}:12255: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12256
12257                 cf_save_LIBS="$LIBS"
12258                 cf_save_LDFLAGS="$LDFLAGS"
12259
12260                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12261
12262 cf_search=
12263 cf_library_path_list=""
12264 if test -n "${LDFLAGS}${LIBS}" ; then
12265         for cf_library_path in $LDFLAGS $LIBS
12266         do
12267                 case $cf_library_path in
12268                 (-L*)
12269                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12270
12271 test "x$cf_library_path" != "xNONE" && \
12272 test -d "$cf_library_path" && \
12273  {
12274         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12275         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12276         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12277         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12278         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12279         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12280 }
12281
12282                         cf_library_path_list="$cf_library_path_list $cf_search"
12283                         ;;
12284                 esac
12285         done
12286 fi
12287
12288 cf_search=
12289
12290 test "x$prefix" != "xNONE" && \
12291 test -d "$prefix" && \
12292  {
12293         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12294         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12295         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12296         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12297         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12298         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12299 }
12300
12301 for cf_subdir_prefix in \
12302         /usr \
12303         /usr/local \
12304         /usr/pkg \
12305         /opt \
12306         /opt/local \
12307         $HOME
12308 do
12309
12310 test "x$cf_subdir_prefix" != "x$prefix" && \
12311 test -d "$cf_subdir_prefix" && \
12312 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12313         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12314         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12315         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12316         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12317         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12318         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12319 }
12320
12321 done
12322
12323 cf_search="$cf_library_path_list $cf_search"
12324
12325                         for cf_cv_library_path_utf8 in $cf_search
12326                         do
12327                                 if test -d $cf_cv_library_path_utf8 ; then
12328                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12329
12330 echo "${as_me:-configure}:12330: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12331
12332                                         CPPFLAGS="$cf_test_CPPFLAGS"
12333                                         LIBS="-lutf8  $cf_save_LIBS"
12334                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12335                                         cat >conftest.$ac_ext <<_ACEOF
12336 #line 12336 "configure"
12337 #include "confdefs.h"
12338
12339 #include <libutf8.h>
12340 int
12341 main (void)
12342 {
12343 putwc(0,0);
12344   ;
12345   return 0;
12346 }
12347 _ACEOF
12348 rm -f conftest.$ac_objext conftest$ac_exeext
12349 if { (eval echo "$as_me:12349: \"$ac_link\"") >&5
12350   (eval $ac_link) 2>&5
12351   ac_status=$?
12352   echo "$as_me:12352: \$? = $ac_status" >&5
12353   (exit $ac_status); } &&
12354          { ac_try='test -s conftest$ac_exeext'
12355   { (eval echo "$as_me:12355: \"$ac_try\"") >&5
12356   (eval $ac_try) 2>&5
12357   ac_status=$?
12358   echo "$as_me:12358: \$? = $ac_status" >&5
12359   (exit $ac_status); }; }; then
12360
12361                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12362
12363 echo "${as_me:-configure}:12363: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12364
12365                                         cf_cv_find_linkage_utf8=yes
12366                                         cf_cv_library_file_utf8="-lutf8"
12367                                         break
12368 else
12369   echo "$as_me: failed program was:" >&5
12370 cat conftest.$ac_ext >&5
12371
12372                                         CPPFLAGS="$cf_save_CPPFLAGS"
12373                                         LIBS="$cf_save_LIBS"
12374                                         LDFLAGS="$cf_save_LDFLAGS"
12375
12376 fi
12377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12378                                 fi
12379                         done
12380                         CPPFLAGS="$cf_save_CPPFLAGS"
12381                         LDFLAGS="$cf_save_LDFLAGS"
12382                 fi
12383
12384         else
12385                 cf_cv_find_linkage_utf8=no
12386         fi
12387
12388 fi
12389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12390
12391 fi
12392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12393
12394 LIBS="$cf_save_LIBS"
12395
12396 if test "$cf_cv_find_linkage_utf8" = yes ; then
12397 cf_cv_utf8_lib=add-on
12398 else
12399 cf_cv_utf8_lib=no
12400 fi
12401
12402 fi
12403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12404 fi
12405 echo "$as_me:12405: result: $cf_cv_utf8_lib" >&5
12406 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12407
12408 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12409 # ncurses/ncursesw:
12410 if test "$cf_cv_utf8_lib" = "add-on" ; then
12411
12412 cat >>confdefs.h <<\EOF
12413 #define HAVE_LIBUTF8_H 1
12414 EOF
12415
12416 if test -n "$cf_cv_header_path_utf8" ; then
12417   for cf_add_incdir in $cf_cv_header_path_utf8
12418   do
12419         while test $cf_add_incdir != /usr/include
12420         do
12421           if test -d $cf_add_incdir
12422           then
12423                 cf_have_incdir=no
12424                 if test -n "$CFLAGS$CPPFLAGS" ; then
12425                   # a loop is needed to ensure we can add subdirs of existing dirs
12426                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12427                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12428                           cf_have_incdir=yes; break
12429                         fi
12430                   done
12431                 fi
12432
12433                 if test "$cf_have_incdir" = no ; then
12434                   if test "$cf_add_incdir" = /usr/local/include ; then
12435                         if test "$GCC" = yes
12436                         then
12437                           cf_save_CPPFLAGS=$CPPFLAGS
12438
12439         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12440         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12441
12442                           cat >conftest.$ac_ext <<_ACEOF
12443 #line 12443 "configure"
12444 #include "confdefs.h"
12445 #include <stdio.h>
12446 int
12447 main (void)
12448 {
12449 printf("Hello")
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 rm -f conftest.$ac_objext
12455 if { (eval echo "$as_me:12455: \"$ac_compile\"") >&5
12456   (eval $ac_compile) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); } &&
12460          { ac_try='test -s conftest.$ac_objext'
12461   { (eval echo "$as_me:12461: \"$ac_try\"") >&5
12462   (eval $ac_try) 2>&5
12463   ac_status=$?
12464   echo "$as_me:12464: \$? = $ac_status" >&5
12465   (exit $ac_status); }; }; then
12466   :
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 cat conftest.$ac_ext >&5
12470 cf_have_incdir=yes
12471 fi
12472 rm -f conftest.$ac_objext conftest.$ac_ext
12473                           CPPFLAGS=$cf_save_CPPFLAGS
12474                         fi
12475                   fi
12476                 fi
12477
12478                 if test "$cf_have_incdir" = no ; then
12479                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12480
12481 echo "${as_me:-configure}:12481: testing adding $cf_add_incdir to include-path ..." 1>&5
12482
12483                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12484
12485                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12486                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12487                   cf_add_incdir="$cf_top_incdir"
12488                 else
12489                   break
12490                 fi
12491           else
12492                 break
12493           fi
12494         done
12495   done
12496 fi
12497
12498 if test -n "$cf_cv_library_path_utf8" ; then
12499         for cf_add_libdir in $cf_cv_library_path_utf8
12500         do
12501                 if test $cf_add_libdir = /usr/lib ; then
12502                         :
12503                 elif test -d $cf_add_libdir
12504                 then
12505                         cf_have_libdir=no
12506                         if test -n "$LDFLAGS$LIBS" ; then
12507                                 # a loop is needed to ensure we can add subdirs of existing dirs
12508                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12509                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12510                                                 cf_have_libdir=yes; break
12511                                         fi
12512                                 done
12513                         fi
12514                         if test "$cf_have_libdir" = no ; then
12515                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12516
12517 echo "${as_me:-configure}:12517: testing adding $cf_add_libdir to library-path ..." 1>&5
12518
12519                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12520                         fi
12521                 fi
12522         done
12523 fi
12524
12525 cf_add_libs="$LIBS"
12526 # reverse order
12527 cf_add_0lib=
12528 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12529 # filter duplicates
12530 for cf_add_1lib in $cf_add_0lib; do
12531         for cf_add_2lib in $cf_add_libs; do
12532                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12533                         cf_add_1lib=
12534                         break
12535                 fi
12536         done
12537         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12538 done
12539 LIBS="$cf_add_libs"
12540
12541 fi
12542
12543                 if test "$cf_cv_utf8_lib" != no ; then
12544                         NCURSES_LIBUTF8=1
12545                 fi
12546         fi
12547
12548 # This is needed on Tru64 5.0 to declare mbstate_t
12549 echo "$as_me:12549: checking if we must include wchar.h to declare mbstate_t" >&5
12550 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12551 if test "${cf_cv_mbstate_t+set}" = set; then
12552   echo $ECHO_N "(cached) $ECHO_C" >&6
12553 else
12554
12555 cat >conftest.$ac_ext <<_ACEOF
12556 #line 12556 "configure"
12557 #include "confdefs.h"
12558
12559 #include <stdlib.h>
12560 #include <stdarg.h>
12561 #include <stdio.h>
12562 #ifdef HAVE_LIBUTF8_H
12563 #include <libutf8.h>
12564 #endif
12565 int
12566 main (void)
12567 {
12568 mbstate_t state
12569   ;
12570   return 0;
12571 }
12572 _ACEOF
12573 rm -f conftest.$ac_objext
12574 if { (eval echo "$as_me:12574: \"$ac_compile\"") >&5
12575   (eval $ac_compile) 2>&5
12576   ac_status=$?
12577   echo "$as_me:12577: \$? = $ac_status" >&5
12578   (exit $ac_status); } &&
12579          { ac_try='test -s conftest.$ac_objext'
12580   { (eval echo "$as_me:12580: \"$ac_try\"") >&5
12581   (eval $ac_try) 2>&5
12582   ac_status=$?
12583   echo "$as_me:12583: \$? = $ac_status" >&5
12584   (exit $ac_status); }; }; then
12585   cf_cv_mbstate_t=no
12586 else
12587   echo "$as_me: failed program was:" >&5
12588 cat conftest.$ac_ext >&5
12589 cat >conftest.$ac_ext <<_ACEOF
12590 #line 12590 "configure"
12591 #include "confdefs.h"
12592
12593 #include <stdlib.h>
12594 #include <stdarg.h>
12595 #include <stdio.h>
12596 #include <wchar.h>
12597 #ifdef HAVE_LIBUTF8_H
12598 #include <libutf8.h>
12599 #endif
12600 int
12601 main (void)
12602 {
12603 mbstate_t value
12604   ;
12605   return 0;
12606 }
12607 _ACEOF
12608 rm -f conftest.$ac_objext
12609 if { (eval echo "$as_me:12609: \"$ac_compile\"") >&5
12610   (eval $ac_compile) 2>&5
12611   ac_status=$?
12612   echo "$as_me:12612: \$? = $ac_status" >&5
12613   (exit $ac_status); } &&
12614          { ac_try='test -s conftest.$ac_objext'
12615   { (eval echo "$as_me:12615: \"$ac_try\"") >&5
12616   (eval $ac_try) 2>&5
12617   ac_status=$?
12618   echo "$as_me:12618: \$? = $ac_status" >&5
12619   (exit $ac_status); }; }; then
12620   cf_cv_mbstate_t=yes
12621 else
12622   echo "$as_me: failed program was:" >&5
12623 cat conftest.$ac_ext >&5
12624 cf_cv_mbstate_t=unknown
12625 fi
12626 rm -f conftest.$ac_objext conftest.$ac_ext
12627 fi
12628 rm -f conftest.$ac_objext conftest.$ac_ext
12629 fi
12630 echo "$as_me:12630: result: $cf_cv_mbstate_t" >&5
12631 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12632
12633 if test "$cf_cv_mbstate_t" = yes ; then
12634
12635 cat >>confdefs.h <<\EOF
12636 #define NEED_WCHAR_H 1
12637 EOF
12638
12639         NEED_WCHAR_H=1
12640 fi
12641
12642 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12643 if test "$cf_cv_mbstate_t" = unknown ; then
12644         NCURSES_MBSTATE_T=1
12645 fi
12646
12647 # This is needed on Tru64 5.0 to declare wchar_t
12648 echo "$as_me:12648: checking if we must include wchar.h to declare wchar_t" >&5
12649 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12650 if test "${cf_cv_wchar_t+set}" = set; then
12651   echo $ECHO_N "(cached) $ECHO_C" >&6
12652 else
12653
12654 cat >conftest.$ac_ext <<_ACEOF
12655 #line 12655 "configure"
12656 #include "confdefs.h"
12657
12658 #include <stdlib.h>
12659 #include <stdarg.h>
12660 #include <stdio.h>
12661 #ifdef HAVE_LIBUTF8_H
12662 #include <libutf8.h>
12663 #endif
12664 int
12665 main (void)
12666 {
12667 wchar_t state
12668   ;
12669   return 0;
12670 }
12671 _ACEOF
12672 rm -f conftest.$ac_objext
12673 if { (eval echo "$as_me:12673: \"$ac_compile\"") >&5
12674   (eval $ac_compile) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); } &&
12678          { ac_try='test -s conftest.$ac_objext'
12679   { (eval echo "$as_me:12679: \"$ac_try\"") >&5
12680   (eval $ac_try) 2>&5
12681   ac_status=$?
12682   echo "$as_me:12682: \$? = $ac_status" >&5
12683   (exit $ac_status); }; }; then
12684   cf_cv_wchar_t=no
12685 else
12686   echo "$as_me: failed program was:" >&5
12687 cat conftest.$ac_ext >&5
12688 cat >conftest.$ac_ext <<_ACEOF
12689 #line 12689 "configure"
12690 #include "confdefs.h"
12691
12692 #include <stdlib.h>
12693 #include <stdarg.h>
12694 #include <stdio.h>
12695 #include <wchar.h>
12696 #ifdef HAVE_LIBUTF8_H
12697 #include <libutf8.h>
12698 #endif
12699 int
12700 main (void)
12701 {
12702 wchar_t value
12703   ;
12704   return 0;
12705 }
12706 _ACEOF
12707 rm -f conftest.$ac_objext
12708 if { (eval echo "$as_me:12708: \"$ac_compile\"") >&5
12709   (eval $ac_compile) 2>&5
12710   ac_status=$?
12711   echo "$as_me:12711: \$? = $ac_status" >&5
12712   (exit $ac_status); } &&
12713          { ac_try='test -s conftest.$ac_objext'
12714   { (eval echo "$as_me:12714: \"$ac_try\"") >&5
12715   (eval $ac_try) 2>&5
12716   ac_status=$?
12717   echo "$as_me:12717: \$? = $ac_status" >&5
12718   (exit $ac_status); }; }; then
12719   cf_cv_wchar_t=yes
12720 else
12721   echo "$as_me: failed program was:" >&5
12722 cat conftest.$ac_ext >&5
12723 cf_cv_wchar_t=unknown
12724 fi
12725 rm -f conftest.$ac_objext conftest.$ac_ext
12726 fi
12727 rm -f conftest.$ac_objext conftest.$ac_ext
12728 fi
12729 echo "$as_me:12729: result: $cf_cv_wchar_t" >&5
12730 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12731
12732 if test "$cf_cv_wchar_t" = yes ; then
12733
12734 cat >>confdefs.h <<\EOF
12735 #define NEED_WCHAR_H 1
12736 EOF
12737
12738         NEED_WCHAR_H=1
12739 fi
12740
12741 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12742 if test "$cf_cv_wchar_t" = unknown ; then
12743         NCURSES_WCHAR_T=1
12744 fi
12745
12746 # if we find wchar_t in either place, use substitution to provide a fallback.
12747 if test "$cf_cv_wchar_t" != unknown ; then
12748         NCURSES_OK_WCHAR_T=1
12749 fi
12750
12751 # This is needed on Tru64 5.0 to declare wint_t
12752 echo "$as_me:12752: checking if we must include wchar.h to declare wint_t" >&5
12753 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12754 if test "${cf_cv_wint_t+set}" = set; then
12755   echo $ECHO_N "(cached) $ECHO_C" >&6
12756 else
12757
12758 cat >conftest.$ac_ext <<_ACEOF
12759 #line 12759 "configure"
12760 #include "confdefs.h"
12761
12762 #include <stdlib.h>
12763 #include <stdarg.h>
12764 #include <stdio.h>
12765 #ifdef HAVE_LIBUTF8_H
12766 #include <libutf8.h>
12767 #endif
12768 int
12769 main (void)
12770 {
12771 wint_t state
12772   ;
12773   return 0;
12774 }
12775 _ACEOF
12776 rm -f conftest.$ac_objext
12777 if { (eval echo "$as_me:12777: \"$ac_compile\"") >&5
12778   (eval $ac_compile) 2>&5
12779   ac_status=$?
12780   echo "$as_me:12780: \$? = $ac_status" >&5
12781   (exit $ac_status); } &&
12782          { ac_try='test -s conftest.$ac_objext'
12783   { (eval echo "$as_me:12783: \"$ac_try\"") >&5
12784   (eval $ac_try) 2>&5
12785   ac_status=$?
12786   echo "$as_me:12786: \$? = $ac_status" >&5
12787   (exit $ac_status); }; }; then
12788   cf_cv_wint_t=no
12789 else
12790   echo "$as_me: failed program was:" >&5
12791 cat conftest.$ac_ext >&5
12792 cat >conftest.$ac_ext <<_ACEOF
12793 #line 12793 "configure"
12794 #include "confdefs.h"
12795
12796 #include <stdlib.h>
12797 #include <stdarg.h>
12798 #include <stdio.h>
12799 #include <wchar.h>
12800 #ifdef HAVE_LIBUTF8_H
12801 #include <libutf8.h>
12802 #endif
12803 int
12804 main (void)
12805 {
12806 wint_t value
12807   ;
12808   return 0;
12809 }
12810 _ACEOF
12811 rm -f conftest.$ac_objext
12812 if { (eval echo "$as_me:12812: \"$ac_compile\"") >&5
12813   (eval $ac_compile) 2>&5
12814   ac_status=$?
12815   echo "$as_me:12815: \$? = $ac_status" >&5
12816   (exit $ac_status); } &&
12817          { ac_try='test -s conftest.$ac_objext'
12818   { (eval echo "$as_me:12818: \"$ac_try\"") >&5
12819   (eval $ac_try) 2>&5
12820   ac_status=$?
12821   echo "$as_me:12821: \$? = $ac_status" >&5
12822   (exit $ac_status); }; }; then
12823   cf_cv_wint_t=yes
12824 else
12825   echo "$as_me: failed program was:" >&5
12826 cat conftest.$ac_ext >&5
12827 cf_cv_wint_t=unknown
12828 fi
12829 rm -f conftest.$ac_objext conftest.$ac_ext
12830 fi
12831 rm -f conftest.$ac_objext conftest.$ac_ext
12832 fi
12833 echo "$as_me:12833: result: $cf_cv_wint_t" >&5
12834 echo "${ECHO_T}$cf_cv_wint_t" >&6
12835
12836 if test "$cf_cv_wint_t" = yes ; then
12837
12838 cat >>confdefs.h <<\EOF
12839 #define NEED_WCHAR_H 1
12840 EOF
12841
12842         NEED_WCHAR_H=1
12843 fi
12844
12845 # if we do not find wint_t in either place, use substitution to provide a fallback.
12846 if test "$cf_cv_wint_t" = unknown ; then
12847         NCURSES_WINT_T=1
12848 fi
12849
12850 # if we find wint_t in either place, use substitution to provide a fallback.
12851 if test "$cf_cv_wint_t" != unknown ; then
12852         NCURSES_OK_WINT_T=1
12853 fi
12854
12855         if test "$NCURSES_MBSTATE_T" != 0; then
12856
12857 cat >>confdefs.h <<\EOF
12858 #define NEED_MBSTATE_T_DEF 1
12859 EOF
12860
12861         fi
12862 fi
12863
12864 ###   use option --disable-lp64 to allow long chtype
12865 echo "$as_me:12865: checking whether to enable _LP64 definition in curses.h" >&5
12866 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12867
12868 # Check whether --enable-lp64 or --disable-lp64 was given.
12869 if test "${enable_lp64+set}" = set; then
12870   enableval="$enable_lp64"
12871   with_lp64=$enableval
12872 else
12873   with_lp64=$cf_dft_with_lp64
12874 fi;
12875 echo "$as_me:12875: result: $with_lp64" >&5
12876 echo "${ECHO_T}$with_lp64" >&6
12877
12878 if test "x$with_lp64" = xyes ; then
12879         cf_cv_enable_lp64=1
12880 else
12881         cf_cv_enable_lp64=0
12882 fi
12883
12884 # Check whether --enable-largefile or --disable-largefile was given.
12885 if test "${enable_largefile+set}" = set; then
12886   enableval="$enable_largefile"
12887
12888 fi;
12889 if test "$enable_largefile" != no; then
12890
12891   echo "$as_me:12891: checking for special C compiler options needed for large files" >&5
12892 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12893 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12894   echo $ECHO_N "(cached) $ECHO_C" >&6
12895 else
12896   ac_cv_sys_largefile_CC=no
12897      if test "$GCC" != yes; then
12898        ac_save_CC=$CC
12899        while :; do
12900          # IRIX 6.2 and later do not support large files by default,
12901          # so use the C compiler's -n32 option if that helps.
12902          cat >conftest.$ac_ext <<_ACEOF
12903 #line 12903 "configure"
12904 #include "confdefs.h"
12905 #include <sys/types.h>
12906  /* Check that off_t can represent 2**63 - 1 correctly.
12907     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12908     since some C++ compilers masquerading as C compilers
12909     incorrectly reject 9223372036854775807.  */
12910 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12911   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12912                        && LARGE_OFF_T % 2147483647 == 1)
12913                       ? 1 : -1];
12914 int
12915 main (void)
12916 {
12917
12918   ;
12919   return 0;
12920 }
12921 _ACEOF
12922          rm -f conftest.$ac_objext
12923 if { (eval echo "$as_me:12923: \"$ac_compile\"") >&5
12924   (eval $ac_compile) 2>&5
12925   ac_status=$?
12926   echo "$as_me:12926: \$? = $ac_status" >&5
12927   (exit $ac_status); } &&
12928          { ac_try='test -s conftest.$ac_objext'
12929   { (eval echo "$as_me:12929: \"$ac_try\"") >&5
12930   (eval $ac_try) 2>&5
12931   ac_status=$?
12932   echo "$as_me:12932: \$? = $ac_status" >&5
12933   (exit $ac_status); }; }; then
12934   break
12935 else
12936   echo "$as_me: failed program was:" >&5
12937 cat conftest.$ac_ext >&5
12938 fi
12939 rm -f conftest.$ac_objext
12940          CC="$CC -n32"
12941          rm -f conftest.$ac_objext
12942 if { (eval echo "$as_me:12942: \"$ac_compile\"") >&5
12943   (eval $ac_compile) 2>&5
12944   ac_status=$?
12945   echo "$as_me:12945: \$? = $ac_status" >&5
12946   (exit $ac_status); } &&
12947          { ac_try='test -s conftest.$ac_objext'
12948   { (eval echo "$as_me:12948: \"$ac_try\"") >&5
12949   (eval $ac_try) 2>&5
12950   ac_status=$?
12951   echo "$as_me:12951: \$? = $ac_status" >&5
12952   (exit $ac_status); }; }; then
12953   ac_cv_sys_largefile_CC=' -n32'; break
12954 else
12955   echo "$as_me: failed program was:" >&5
12956 cat conftest.$ac_ext >&5
12957 fi
12958 rm -f conftest.$ac_objext
12959          break
12960        done
12961        CC=$ac_save_CC
12962        rm -f conftest.$ac_ext
12963     fi
12964 fi
12965 echo "$as_me:12965: result: $ac_cv_sys_largefile_CC" >&5
12966 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12967   if test "$ac_cv_sys_largefile_CC" != no; then
12968     CC=$CC$ac_cv_sys_largefile_CC
12969   fi
12970
12971   echo "$as_me:12971: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12972 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12973 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12974   echo $ECHO_N "(cached) $ECHO_C" >&6
12975 else
12976   while :; do
12977   ac_cv_sys_file_offset_bits=no
12978   cat >conftest.$ac_ext <<_ACEOF
12979 #line 12979 "configure"
12980 #include "confdefs.h"
12981 #include <sys/types.h>
12982  /* Check that off_t can represent 2**63 - 1 correctly.
12983     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12984     since some C++ compilers masquerading as C compilers
12985     incorrectly reject 9223372036854775807.  */
12986 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12987   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12988                        && LARGE_OFF_T % 2147483647 == 1)
12989                       ? 1 : -1];
12990 int
12991 main (void)
12992 {
12993
12994   ;
12995   return 0;
12996 }
12997 _ACEOF
12998 rm -f conftest.$ac_objext
12999 if { (eval echo "$as_me:12999: \"$ac_compile\"") >&5
13000   (eval $ac_compile) 2>&5
13001   ac_status=$?
13002   echo "$as_me:13002: \$? = $ac_status" >&5
13003   (exit $ac_status); } &&
13004          { ac_try='test -s conftest.$ac_objext'
13005   { (eval echo "$as_me:13005: \"$ac_try\"") >&5
13006   (eval $ac_try) 2>&5
13007   ac_status=$?
13008   echo "$as_me:13008: \$? = $ac_status" >&5
13009   (exit $ac_status); }; }; then
13010   break
13011 else
13012   echo "$as_me: failed program was:" >&5
13013 cat conftest.$ac_ext >&5
13014 fi
13015 rm -f conftest.$ac_objext conftest.$ac_ext
13016   cat >conftest.$ac_ext <<_ACEOF
13017 #line 13017 "configure"
13018 #include "confdefs.h"
13019 #define _FILE_OFFSET_BITS 64
13020 #include <sys/types.h>
13021  /* Check that off_t can represent 2**63 - 1 correctly.
13022     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13023     since some C++ compilers masquerading as C compilers
13024     incorrectly reject 9223372036854775807.  */
13025 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13026   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13027                        && LARGE_OFF_T % 2147483647 == 1)
13028                       ? 1 : -1];
13029 int
13030 main (void)
13031 {
13032
13033   ;
13034   return 0;
13035 }
13036 _ACEOF
13037 rm -f conftest.$ac_objext
13038 if { (eval echo "$as_me:13038: \"$ac_compile\"") >&5
13039   (eval $ac_compile) 2>&5
13040   ac_status=$?
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit $ac_status); } &&
13043          { ac_try='test -s conftest.$ac_objext'
13044   { (eval echo "$as_me:13044: \"$ac_try\"") >&5
13045   (eval $ac_try) 2>&5
13046   ac_status=$?
13047   echo "$as_me:13047: \$? = $ac_status" >&5
13048   (exit $ac_status); }; }; then
13049   ac_cv_sys_file_offset_bits=64; break
13050 else
13051   echo "$as_me: failed program was:" >&5
13052 cat conftest.$ac_ext >&5
13053 fi
13054 rm -f conftest.$ac_objext conftest.$ac_ext
13055   break
13056 done
13057 fi
13058 echo "$as_me:13058: result: $ac_cv_sys_file_offset_bits" >&5
13059 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13060 if test "$ac_cv_sys_file_offset_bits" != no; then
13061
13062 cat >>confdefs.h <<EOF
13063 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13064 EOF
13065
13066 fi
13067 rm -rf conftest*
13068   echo "$as_me:13068: checking for _LARGE_FILES value needed for large files" >&5
13069 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13070 if test "${ac_cv_sys_large_files+set}" = set; then
13071   echo $ECHO_N "(cached) $ECHO_C" >&6
13072 else
13073   while :; do
13074   ac_cv_sys_large_files=no
13075   cat >conftest.$ac_ext <<_ACEOF
13076 #line 13076 "configure"
13077 #include "confdefs.h"
13078 #include <sys/types.h>
13079  /* Check that off_t can represent 2**63 - 1 correctly.
13080     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13081     since some C++ compilers masquerading as C compilers
13082     incorrectly reject 9223372036854775807.  */
13083 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13084   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13085                        && LARGE_OFF_T % 2147483647 == 1)
13086                       ? 1 : -1];
13087 int
13088 main (void)
13089 {
13090
13091   ;
13092   return 0;
13093 }
13094 _ACEOF
13095 rm -f conftest.$ac_objext
13096 if { (eval echo "$as_me:13096: \"$ac_compile\"") >&5
13097   (eval $ac_compile) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit $ac_status); } &&
13101          { ac_try='test -s conftest.$ac_objext'
13102   { (eval echo "$as_me:13102: \"$ac_try\"") >&5
13103   (eval $ac_try) 2>&5
13104   ac_status=$?
13105   echo "$as_me:13105: \$? = $ac_status" >&5
13106   (exit $ac_status); }; }; then
13107   break
13108 else
13109   echo "$as_me: failed program was:" >&5
13110 cat conftest.$ac_ext >&5
13111 fi
13112 rm -f conftest.$ac_objext conftest.$ac_ext
13113   cat >conftest.$ac_ext <<_ACEOF
13114 #line 13114 "configure"
13115 #include "confdefs.h"
13116 #define _LARGE_FILES 1
13117 #include <sys/types.h>
13118  /* Check that off_t can represent 2**63 - 1 correctly.
13119     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13120     since some C++ compilers masquerading as C compilers
13121     incorrectly reject 9223372036854775807.  */
13122 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13123   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13124                        && LARGE_OFF_T % 2147483647 == 1)
13125                       ? 1 : -1];
13126 int
13127 main (void)
13128 {
13129
13130   ;
13131   return 0;
13132 }
13133 _ACEOF
13134 rm -f conftest.$ac_objext
13135 if { (eval echo "$as_me:13135: \"$ac_compile\"") >&5
13136   (eval $ac_compile) 2>&5
13137   ac_status=$?
13138   echo "$as_me:13138: \$? = $ac_status" >&5
13139   (exit $ac_status); } &&
13140          { ac_try='test -s conftest.$ac_objext'
13141   { (eval echo "$as_me:13141: \"$ac_try\"") >&5
13142   (eval $ac_try) 2>&5
13143   ac_status=$?
13144   echo "$as_me:13144: \$? = $ac_status" >&5
13145   (exit $ac_status); }; }; then
13146   ac_cv_sys_large_files=1; break
13147 else
13148   echo "$as_me: failed program was:" >&5
13149 cat conftest.$ac_ext >&5
13150 fi
13151 rm -f conftest.$ac_objext conftest.$ac_ext
13152   break
13153 done
13154 fi
13155 echo "$as_me:13155: result: $ac_cv_sys_large_files" >&5
13156 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13157 if test "$ac_cv_sys_large_files" != no; then
13158
13159 cat >>confdefs.h <<EOF
13160 #define _LARGE_FILES $ac_cv_sys_large_files
13161 EOF
13162
13163 fi
13164 rm -rf conftest*
13165 fi
13166
13167         if test "$enable_largefile" != no ; then
13168         echo "$as_me:13168: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13169 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13170 if test "${ac_cv_sys_largefile_source+set}" = set; then
13171   echo $ECHO_N "(cached) $ECHO_C" >&6
13172 else
13173   while :; do
13174   ac_cv_sys_largefile_source=no
13175   cat >conftest.$ac_ext <<_ACEOF
13176 #line 13176 "configure"
13177 #include "confdefs.h"
13178 #include <stdio.h>
13179 int
13180 main (void)
13181 {
13182 return !fseeko;
13183   ;
13184   return 0;
13185 }
13186 _ACEOF
13187 rm -f conftest.$ac_objext
13188 if { (eval echo "$as_me:13188: \"$ac_compile\"") >&5
13189   (eval $ac_compile) 2>&5
13190   ac_status=$?
13191   echo "$as_me:13191: \$? = $ac_status" >&5
13192   (exit $ac_status); } &&
13193          { ac_try='test -s conftest.$ac_objext'
13194   { (eval echo "$as_me:13194: \"$ac_try\"") >&5
13195   (eval $ac_try) 2>&5
13196   ac_status=$?
13197   echo "$as_me:13197: \$? = $ac_status" >&5
13198   (exit $ac_status); }; }; then
13199   break
13200 else
13201   echo "$as_me: failed program was:" >&5
13202 cat conftest.$ac_ext >&5
13203 fi
13204 rm -f conftest.$ac_objext conftest.$ac_ext
13205   cat >conftest.$ac_ext <<_ACEOF
13206 #line 13206 "configure"
13207 #include "confdefs.h"
13208 #define _LARGEFILE_SOURCE 1
13209 #include <stdio.h>
13210 int
13211 main (void)
13212 {
13213 return !fseeko;
13214   ;
13215   return 0;
13216 }
13217 _ACEOF
13218 rm -f conftest.$ac_objext
13219 if { (eval echo "$as_me:13219: \"$ac_compile\"") >&5
13220   (eval $ac_compile) 2>&5
13221   ac_status=$?
13222   echo "$as_me:13222: \$? = $ac_status" >&5
13223   (exit $ac_status); } &&
13224          { ac_try='test -s conftest.$ac_objext'
13225   { (eval echo "$as_me:13225: \"$ac_try\"") >&5
13226   (eval $ac_try) 2>&5
13227   ac_status=$?
13228   echo "$as_me:13228: \$? = $ac_status" >&5
13229   (exit $ac_status); }; }; then
13230   ac_cv_sys_largefile_source=1; break
13231 else
13232   echo "$as_me: failed program was:" >&5
13233 cat conftest.$ac_ext >&5
13234 fi
13235 rm -f conftest.$ac_objext conftest.$ac_ext
13236   break
13237 done
13238 fi
13239 echo "$as_me:13239: result: $ac_cv_sys_largefile_source" >&5
13240 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13241 if test "$ac_cv_sys_largefile_source" != no; then
13242
13243 cat >>confdefs.h <<EOF
13244 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13245 EOF
13246
13247 fi
13248 rm -rf conftest*
13249
13250 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13251 # in glibc 2.1.3, but that breaks too many other things.
13252 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13253 echo "$as_me:13253: checking for fseeko" >&5
13254 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13255 if test "${ac_cv_func_fseeko+set}" = set; then
13256   echo $ECHO_N "(cached) $ECHO_C" >&6
13257 else
13258   cat >conftest.$ac_ext <<_ACEOF
13259 #line 13259 "configure"
13260 #include "confdefs.h"
13261 #include <stdio.h>
13262 int
13263 main (void)
13264 {
13265 return fseeko && fseeko (stdin, 0, 0);
13266   ;
13267   return 0;
13268 }
13269 _ACEOF
13270 rm -f conftest.$ac_objext conftest$ac_exeext
13271 if { (eval echo "$as_me:13271: \"$ac_link\"") >&5
13272   (eval $ac_link) 2>&5
13273   ac_status=$?
13274   echo "$as_me:13274: \$? = $ac_status" >&5
13275   (exit $ac_status); } &&
13276          { ac_try='test -s conftest$ac_exeext'
13277   { (eval echo "$as_me:13277: \"$ac_try\"") >&5
13278   (eval $ac_try) 2>&5
13279   ac_status=$?
13280   echo "$as_me:13280: \$? = $ac_status" >&5
13281   (exit $ac_status); }; }; then
13282   ac_cv_func_fseeko=yes
13283 else
13284   echo "$as_me: failed program was:" >&5
13285 cat conftest.$ac_ext >&5
13286 ac_cv_func_fseeko=no
13287 fi
13288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13289 fi
13290 echo "$as_me:13290: result: $ac_cv_func_fseeko" >&5
13291 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13292 if test $ac_cv_func_fseeko = yes; then
13293
13294 cat >>confdefs.h <<\EOF
13295 #define HAVE_FSEEKO 1
13296 EOF
13297
13298 fi
13299
13300         # Normally we would collect these definitions in the config.h,
13301         # but (like _XOPEN_SOURCE), some environments rely on having these
13302         # defined before any of the system headers are included.  Another
13303         # case comes up with C++, e.g., on AIX the compiler compiles the
13304         # header files by themselves before looking at the body files it is
13305         # told to compile.  For ncurses, those header files do not include
13306         # the config.h
13307         if test "$ac_cv_sys_large_files" != no
13308         then
13309
13310         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13311         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13312
13313         fi
13314         if test "$ac_cv_sys_largefile_source" != no
13315         then
13316
13317         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13318         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13319
13320         fi
13321         if test "$ac_cv_sys_file_offset_bits" != no
13322         then
13323
13324         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13325         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13326
13327         fi
13328
13329         echo "$as_me:13329: checking whether to use struct dirent64" >&5
13330 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13331 if test "${cf_cv_struct_dirent64+set}" = set; then
13332   echo $ECHO_N "(cached) $ECHO_C" >&6
13333 else
13334
13335                 cat >conftest.$ac_ext <<_ACEOF
13336 #line 13336 "configure"
13337 #include "confdefs.h"
13338
13339 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13340 #include <sys/types.h>
13341 #include <dirent.h>
13342
13343 int
13344 main (void)
13345 {
13346
13347                 /* if transitional largefile support is setup, this is true */
13348                 extern struct dirent64 * readdir(DIR *);
13349                 struct dirent64 *x = readdir((DIR *)0);
13350                 struct dirent *y = readdir((DIR *)0);
13351                 int z = x - y;
13352                 (void)z;
13353
13354   ;
13355   return 0;
13356 }
13357 _ACEOF
13358 rm -f conftest.$ac_objext
13359 if { (eval echo "$as_me:13359: \"$ac_compile\"") >&5
13360   (eval $ac_compile) 2>&5
13361   ac_status=$?
13362   echo "$as_me:13362: \$? = $ac_status" >&5
13363   (exit $ac_status); } &&
13364          { ac_try='test -s conftest.$ac_objext'
13365   { (eval echo "$as_me:13365: \"$ac_try\"") >&5
13366   (eval $ac_try) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit $ac_status); }; }; then
13370   cf_cv_struct_dirent64=yes
13371 else
13372   echo "$as_me: failed program was:" >&5
13373 cat conftest.$ac_ext >&5
13374 cf_cv_struct_dirent64=no
13375 fi
13376 rm -f conftest.$ac_objext conftest.$ac_ext
13377
13378 fi
13379 echo "$as_me:13379: result: $cf_cv_struct_dirent64" >&5
13380 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13381         test "$cf_cv_struct_dirent64" = yes &&
13382 cat >>confdefs.h <<\EOF
13383 #define HAVE_STRUCT_DIRENT64 1
13384 EOF
13385
13386         fi
13387
13388 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13389 echo "$as_me:13389: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13390 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13391
13392 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13393 if test "${enable_tparm_varargs+set}" = set; then
13394   enableval="$enable_tparm_varargs"
13395   with_tparm_varargs=$enableval
13396 else
13397   with_tparm_varargs=yes
13398 fi;
13399 echo "$as_me:13399: result: $with_tparm_varargs" >&5
13400 echo "${ECHO_T}$with_tparm_varargs" >&6
13401 NCURSES_TPARM_VARARGS=0
13402 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13403
13404 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13405 if test "$with_ticlib" != no ; then
13406 echo "$as_me:13406: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13407 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13408
13409 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13410 if test "${enable_tic_depends+set}" = set; then
13411   enableval="$enable_tic_depends"
13412   with_tic_depends=$enableval
13413 else
13414   with_tic_depends=yes
13415 fi;
13416 echo "$as_me:13416: result: $with_tic_depends" >&5
13417 echo "${ECHO_T}$with_tic_depends" >&6
13418 else
13419         with_tic_depends=no
13420 fi
13421
13422 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13423 echo "$as_me:13423: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13424 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13425
13426 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13427 if test "${enable_wattr_macros+set}" = set; then
13428   enableval="$enable_wattr_macros"
13429   with_wattr_macros=$enableval
13430 else
13431   with_wattr_macros=yes
13432 fi;
13433 if [ "x$with_wattr_macros" != xyes ]; then
13434         NCURSES_WATTR_MACROS=0
13435         echo "$as_me:13435: result: yes" >&5
13436 echo "${ECHO_T}yes" >&6
13437 else
13438         NCURSES_WATTR_MACROS=1
13439         echo "$as_me:13439: result: no" >&5
13440 echo "${ECHO_T}no" >&6
13441 fi
13442
13443 echo "$as_me:13443: checking for X11 rgb file" >&5
13444 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13445
13446 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13447 if test "${with_x11_rgb+set}" = set; then
13448   withval="$with_x11_rgb"
13449   RGB_PATH=$withval
13450 else
13451   RGB_PATH=auto
13452 fi;
13453
13454 if test "x$RGB_PATH" = xauto
13455 then
13456         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13457         for cf_path in \
13458                 /opt/local/share/X11/rgb.txt \
13459                 /opt/X11/share/X11/rgb.txt \
13460                 /usr/share/X11/rgb.txt \
13461                 /usr/X11/share/X11/rgb.txt \
13462                 /usr/X11/lib/X11/rgb.txt \
13463                 /usr/lib/X11/rgb.txt \
13464                 /etc/X11/rgb.txt \
13465                 /usr/pkg/lib/X11/rgb.txt \
13466                 /usr/X11R7/lib/X11/rgb.txt \
13467                 /usr/X11R6/lib/X11/rgb.txt \
13468                 /usr/X11R5/lib/X11/rgb.txt \
13469                 /usr/X11R4/lib/X11/rgb.txt \
13470                 /usr/local/lib/X11/rgb.txt \
13471                 /usr/local/share/X11/rgb.txt \
13472                 /usr/lib64/X11/rgb.txt
13473         do
13474                 if test -f "$cf_path" ; then
13475                         RGB_PATH="$cf_path"
13476                         break
13477                 fi
13478         done
13479 else
13480         cf_path=$RGB_PATH
13481
13482 if test "x$prefix" != xNONE; then
13483         cf_path_syntax="$prefix"
13484 else
13485         cf_path_syntax="$ac_default_prefix"
13486 fi
13487
13488 case ".$cf_path" in
13489 (.\$\(*\)*|.\'*\'*)
13490         ;;
13491 (..|./*|.\\*)
13492         ;;
13493 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13494         ;;
13495 (.\${*prefix}*|.\${*dir}*)
13496         eval cf_path="$cf_path"
13497         case ".$cf_path" in
13498         (.NONE/*)
13499                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13500                 ;;
13501         esac
13502         ;;
13503 (.no|.NONE/*)
13504         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13505         ;;
13506 (*)
13507         { { echo "$as_me:13507: error: expected a pathname, not \"$cf_path\"" >&5
13508 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13509    { (exit 1); exit 1; }; }
13510         ;;
13511 esac
13512
13513 fi
13514
13515 echo "$as_me:13515: result: $RGB_PATH" >&5
13516 echo "${ECHO_T}$RGB_PATH" >&6
13517
13518 cat >>confdefs.h <<EOF
13519 #define RGB_PATH "$cf_path"
13520 EOF
13521
13522 no_x11_rgb=
13523 if test "$RGB_PATH" = no
13524 then
13525         no_x11_rgb="#"
13526 fi
13527
13528 ###   use option --with-bool to override bool's type
13529 echo "$as_me:13529: checking for type of bool" >&5
13530 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13531
13532 # Check whether --with-bool or --without-bool was given.
13533 if test "${with_bool+set}" = set; then
13534   withval="$with_bool"
13535   NCURSES_BOOL="$withval"
13536 else
13537   NCURSES_BOOL=auto
13538 fi;
13539 echo "$as_me:13539: result: $NCURSES_BOOL" >&5
13540 echo "${ECHO_T}$NCURSES_BOOL" >&6
13541
13542 echo "$as_me:13542: checking for alternate terminal capabilities file" >&5
13543 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13544
13545 # Check whether --with-caps or --without-caps was given.
13546 if test "${with_caps+set}" = set; then
13547   withval="$with_caps"
13548   TERMINFO_CAPS=Caps.$withval
13549 else
13550   TERMINFO_CAPS=Caps
13551 fi;
13552 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13553 echo "$as_me:13553: result: $TERMINFO_CAPS" >&5
13554 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13555
13556 ###   use option --with-chtype to override chtype's type
13557 echo "$as_me:13557: checking for type of chtype" >&5
13558 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13559
13560 # Check whether --with-chtype or --without-chtype was given.
13561 if test "${with_chtype+set}" = set; then
13562   withval="$with_chtype"
13563   NCURSES_CHTYPE="$withval"
13564 else
13565   NCURSES_CHTYPE=$cf_dft_chtype
13566 fi;
13567 echo "$as_me:13567: result: $NCURSES_CHTYPE" >&5
13568 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13569
13570 ###   use option --with-ospeed to override ospeed's type
13571 echo "$as_me:13571: checking for type of ospeed" >&5
13572 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13573
13574 # Check whether --with-ospeed or --without-ospeed was given.
13575 if test "${with_ospeed+set}" = set; then
13576   withval="$with_ospeed"
13577   NCURSES_OSPEED="$withval"
13578 else
13579   NCURSES_OSPEED=short
13580 fi;
13581 echo "$as_me:13581: result: $NCURSES_OSPEED" >&5
13582 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13583
13584 ###   use option --with-mmask-t to override mmask_t's type
13585 echo "$as_me:13585: checking for type of mmask_t" >&5
13586 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13587
13588 # Check whether --with-mmask-t or --without-mmask-t was given.
13589 if test "${with_mmask_t+set}" = set; then
13590   withval="$with_mmask_t"
13591   NCURSES_MMASK_T="$withval"
13592 else
13593   NCURSES_MMASK_T=$cf_dft_mmask_t
13594 fi;
13595 echo "$as_me:13595: result: $NCURSES_MMASK_T" >&5
13596 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13597
13598 ###   use option --with-ccharw-max to override CCHARW_MAX size
13599 echo "$as_me:13599: checking for size CCHARW_MAX" >&5
13600 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13601
13602 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13603 if test "${with_ccharw_max+set}" = set; then
13604   withval="$with_ccharw_max"
13605   NCURSES_CCHARW_MAX="$withval"
13606 else
13607   NCURSES_CCHARW_MAX=5
13608 fi;
13609 echo "$as_me:13609: result: $NCURSES_CCHARW_MAX" >&5
13610 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13611
13612 echo "$as_me:13612: checking for ANSI C header files" >&5
13613 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13614 if test "${ac_cv_header_stdc+set}" = set; then
13615   echo $ECHO_N "(cached) $ECHO_C" >&6
13616 else
13617   cat >conftest.$ac_ext <<_ACEOF
13618 #line 13618 "configure"
13619 #include "confdefs.h"
13620 #include <stdlib.h>
13621 #include <stdarg.h>
13622 #include <string.h>
13623 #include <float.h>
13624
13625 _ACEOF
13626 if { (eval echo "$as_me:13626: \"$ac_cpp conftest.$ac_ext\"") >&5
13627   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13628   ac_status=$?
13629   egrep -v '^ *\+' conftest.er1 >conftest.err
13630   rm -f conftest.er1
13631   cat conftest.err >&5
13632   echo "$as_me:13632: \$? = $ac_status" >&5
13633   (exit $ac_status); } >/dev/null; then
13634   if test -s conftest.err; then
13635     ac_cpp_err=$ac_c_preproc_warn_flag
13636   else
13637     ac_cpp_err=
13638   fi
13639 else
13640   ac_cpp_err=yes
13641 fi
13642 if test -z "$ac_cpp_err"; then
13643   ac_cv_header_stdc=yes
13644 else
13645   echo "$as_me: failed program was:" >&5
13646   cat conftest.$ac_ext >&5
13647   ac_cv_header_stdc=no
13648 fi
13649 rm -f conftest.err conftest.$ac_ext
13650
13651 if test $ac_cv_header_stdc = yes; then
13652   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13653   cat >conftest.$ac_ext <<_ACEOF
13654 #line 13654 "configure"
13655 #include "confdefs.h"
13656 #include <string.h>
13657
13658 _ACEOF
13659 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13660   egrep "memchr" >/dev/null 2>&1; then
13661   :
13662 else
13663   ac_cv_header_stdc=no
13664 fi
13665 rm -rf conftest*
13666
13667 fi
13668
13669 if test $ac_cv_header_stdc = yes; then
13670   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13671   cat >conftest.$ac_ext <<_ACEOF
13672 #line 13672 "configure"
13673 #include "confdefs.h"
13674 #include <stdlib.h>
13675
13676 _ACEOF
13677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13678   egrep "free" >/dev/null 2>&1; then
13679   :
13680 else
13681   ac_cv_header_stdc=no
13682 fi
13683 rm -rf conftest*
13684
13685 fi
13686
13687 if test $ac_cv_header_stdc = yes; then
13688   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13689   if test "$cross_compiling" = yes; then
13690   :
13691 else
13692   cat >conftest.$ac_ext <<_ACEOF
13693 #line 13693 "configure"
13694 #include "confdefs.h"
13695 #include <ctype.h>
13696 #if ((' ' & 0x0FF) == 0x020)
13697 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13698 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13699 #else
13700 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13701                      || ('j' <= (c) && (c) <= 'r') \
13702                      || ('s' <= (c) && (c) <= 'z'))
13703 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13704 #endif
13705
13706 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13707 int
13708 main (void)
13709 {
13710   int i;
13711   for (i = 0; i < 256; i++)
13712     if (XOR (islower (i), ISLOWER (i))
13713         || toupper (i) != TOUPPER (i))
13714       $ac_main_return(2);
13715   $ac_main_return (0);
13716 }
13717 _ACEOF
13718 rm -f conftest$ac_exeext
13719 if { (eval echo "$as_me:13719: \"$ac_link\"") >&5
13720   (eval $ac_link) 2>&5
13721   ac_status=$?
13722   echo "$as_me:13722: \$? = $ac_status" >&5
13723   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13724   { (eval echo "$as_me:13724: \"$ac_try\"") >&5
13725   (eval $ac_try) 2>&5
13726   ac_status=$?
13727   echo "$as_me:13727: \$? = $ac_status" >&5
13728   (exit $ac_status); }; }; then
13729   :
13730 else
13731   echo "$as_me: program exited with status $ac_status" >&5
13732 echo "$as_me: failed program was:" >&5
13733 cat conftest.$ac_ext >&5
13734 ac_cv_header_stdc=no
13735 fi
13736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13737 fi
13738 fi
13739 fi
13740 echo "$as_me:13740: result: $ac_cv_header_stdc" >&5
13741 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13742 if test $ac_cv_header_stdc = yes; then
13743
13744 cat >>confdefs.h <<\EOF
13745 #define STDC_HEADERS 1
13746 EOF
13747
13748 fi
13749
13750 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13751
13752 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13753                   inttypes.h stdint.h unistd.h
13754 do
13755 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13756 echo "$as_me:13756: checking for $ac_header" >&5
13757 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13758 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13759   echo $ECHO_N "(cached) $ECHO_C" >&6
13760 else
13761   cat >conftest.$ac_ext <<_ACEOF
13762 #line 13762 "configure"
13763 #include "confdefs.h"
13764 $ac_includes_default
13765 #include <$ac_header>
13766 _ACEOF
13767 rm -f conftest.$ac_objext
13768 if { (eval echo "$as_me:13768: \"$ac_compile\"") >&5
13769   (eval $ac_compile) 2>&5
13770   ac_status=$?
13771   echo "$as_me:13771: \$? = $ac_status" >&5
13772   (exit $ac_status); } &&
13773          { ac_try='test -s conftest.$ac_objext'
13774   { (eval echo "$as_me:13774: \"$ac_try\"") >&5
13775   (eval $ac_try) 2>&5
13776   ac_status=$?
13777   echo "$as_me:13777: \$? = $ac_status" >&5
13778   (exit $ac_status); }; }; then
13779   eval "$as_ac_Header=yes"
13780 else
13781   echo "$as_me: failed program was:" >&5
13782 cat conftest.$ac_ext >&5
13783 eval "$as_ac_Header=no"
13784 fi
13785 rm -f conftest.$ac_objext conftest.$ac_ext
13786 fi
13787 echo "$as_me:13787: result: `eval echo '${'$as_ac_Header'}'`" >&5
13788 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13789 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13790   cat >>confdefs.h <<EOF
13791 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13792 EOF
13793
13794 fi
13795 done
13796
13797 echo "$as_me:13797: checking for signed char" >&5
13798 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13799 if test "${ac_cv_type_signed_char+set}" = set; then
13800   echo $ECHO_N "(cached) $ECHO_C" >&6
13801 else
13802   cat >conftest.$ac_ext <<_ACEOF
13803 #line 13803 "configure"
13804 #include "confdefs.h"
13805 $ac_includes_default
13806 int
13807 main (void)
13808 {
13809 if ((signed char *) 0)
13810   return 0;
13811 if (sizeof (signed char))
13812   return 0;
13813   ;
13814   return 0;
13815 }
13816 _ACEOF
13817 rm -f conftest.$ac_objext
13818 if { (eval echo "$as_me:13818: \"$ac_compile\"") >&5
13819   (eval $ac_compile) 2>&5
13820   ac_status=$?
13821   echo "$as_me:13821: \$? = $ac_status" >&5
13822   (exit $ac_status); } &&
13823          { ac_try='test -s conftest.$ac_objext'
13824   { (eval echo "$as_me:13824: \"$ac_try\"") >&5
13825   (eval $ac_try) 2>&5
13826   ac_status=$?
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); }; }; then
13829   ac_cv_type_signed_char=yes
13830 else
13831   echo "$as_me: failed program was:" >&5
13832 cat conftest.$ac_ext >&5
13833 ac_cv_type_signed_char=no
13834 fi
13835 rm -f conftest.$ac_objext conftest.$ac_ext
13836 fi
13837 echo "$as_me:13837: result: $ac_cv_type_signed_char" >&5
13838 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13839
13840 echo "$as_me:13840: checking size of signed char" >&5
13841 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13842 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13843   echo $ECHO_N "(cached) $ECHO_C" >&6
13844 else
13845   if test "$ac_cv_type_signed_char" = yes; then
13846   if test "$cross_compiling" = yes; then
13847   # Depending upon the size, compute the lo and hi bounds.
13848 cat >conftest.$ac_ext <<_ACEOF
13849 #line 13849 "configure"
13850 #include "confdefs.h"
13851 $ac_includes_default
13852 int
13853 main (void)
13854 {
13855 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13856   ;
13857   return 0;
13858 }
13859 _ACEOF
13860 rm -f conftest.$ac_objext
13861 if { (eval echo "$as_me:13861: \"$ac_compile\"") >&5
13862   (eval $ac_compile) 2>&5
13863   ac_status=$?
13864   echo "$as_me:13864: \$? = $ac_status" >&5
13865   (exit $ac_status); } &&
13866          { ac_try='test -s conftest.$ac_objext'
13867   { (eval echo "$as_me:13867: \"$ac_try\"") >&5
13868   (eval $ac_try) 2>&5
13869   ac_status=$?
13870   echo "$as_me:13870: \$? = $ac_status" >&5
13871   (exit $ac_status); }; }; then
13872   ac_lo=0 ac_mid=0
13873   while :; do
13874     cat >conftest.$ac_ext <<_ACEOF
13875 #line 13875 "configure"
13876 #include "confdefs.h"
13877 $ac_includes_default
13878 int
13879 main (void)
13880 {
13881 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13882   ;
13883   return 0;
13884 }
13885 _ACEOF
13886 rm -f conftest.$ac_objext
13887 if { (eval echo "$as_me:13887: \"$ac_compile\"") >&5
13888   (eval $ac_compile) 2>&5
13889   ac_status=$?
13890   echo "$as_me:13890: \$? = $ac_status" >&5
13891   (exit $ac_status); } &&
13892          { ac_try='test -s conftest.$ac_objext'
13893   { (eval echo "$as_me:13893: \"$ac_try\"") >&5
13894   (eval $ac_try) 2>&5
13895   ac_status=$?
13896   echo "$as_me:13896: \$? = $ac_status" >&5
13897   (exit $ac_status); }; }; then
13898   ac_hi=$ac_mid; break
13899 else
13900   echo "$as_me: failed program was:" >&5
13901 cat conftest.$ac_ext >&5
13902 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13903 fi
13904 rm -f conftest.$ac_objext conftest.$ac_ext
13905   done
13906 else
13907   echo "$as_me: failed program was:" >&5
13908 cat conftest.$ac_ext >&5
13909 ac_hi=-1 ac_mid=-1
13910   while :; do
13911     cat >conftest.$ac_ext <<_ACEOF
13912 #line 13912 "configure"
13913 #include "confdefs.h"
13914 $ac_includes_default
13915 int
13916 main (void)
13917 {
13918 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13919   ;
13920   return 0;
13921 }
13922 _ACEOF
13923 rm -f conftest.$ac_objext
13924 if { (eval echo "$as_me:13924: \"$ac_compile\"") >&5
13925   (eval $ac_compile) 2>&5
13926   ac_status=$?
13927   echo "$as_me:13927: \$? = $ac_status" >&5
13928   (exit $ac_status); } &&
13929          { ac_try='test -s conftest.$ac_objext'
13930   { (eval echo "$as_me:13930: \"$ac_try\"") >&5
13931   (eval $ac_try) 2>&5
13932   ac_status=$?
13933   echo "$as_me:13933: \$? = $ac_status" >&5
13934   (exit $ac_status); }; }; then
13935   ac_lo=$ac_mid; break
13936 else
13937   echo "$as_me: failed program was:" >&5
13938 cat conftest.$ac_ext >&5
13939 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13940 fi
13941 rm -f conftest.$ac_objext conftest.$ac_ext
13942   done
13943 fi
13944 rm -f conftest.$ac_objext conftest.$ac_ext
13945 # Binary search between lo and hi bounds.
13946 while test "x$ac_lo" != "x$ac_hi"; do
13947   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13948   cat >conftest.$ac_ext <<_ACEOF
13949 #line 13949 "configure"
13950 #include "confdefs.h"
13951 $ac_includes_default
13952 int
13953 main (void)
13954 {
13955 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13956   ;
13957   return 0;
13958 }
13959 _ACEOF
13960 rm -f conftest.$ac_objext
13961 if { (eval echo "$as_me:13961: \"$ac_compile\"") >&5
13962   (eval $ac_compile) 2>&5
13963   ac_status=$?
13964   echo "$as_me:13964: \$? = $ac_status" >&5
13965   (exit $ac_status); } &&
13966          { ac_try='test -s conftest.$ac_objext'
13967   { (eval echo "$as_me:13967: \"$ac_try\"") >&5
13968   (eval $ac_try) 2>&5
13969   ac_status=$?
13970   echo "$as_me:13970: \$? = $ac_status" >&5
13971   (exit $ac_status); }; }; then
13972   ac_hi=$ac_mid
13973 else
13974   echo "$as_me: failed program was:" >&5
13975 cat conftest.$ac_ext >&5
13976 ac_lo=`expr $ac_mid + 1`
13977 fi
13978 rm -f conftest.$ac_objext conftest.$ac_ext
13979 done
13980 ac_cv_sizeof_signed_char=$ac_lo
13981 else
13982   if test "$cross_compiling" = yes; then
13983   { { echo "$as_me:13983: error: cannot run test program while cross compiling" >&5
13984 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13985    { (exit 1); exit 1; }; }
13986 else
13987   cat >conftest.$ac_ext <<_ACEOF
13988 #line 13988 "configure"
13989 #include "confdefs.h"
13990 $ac_includes_default
13991 int
13992 main (void)
13993 {
13994 FILE *f = fopen ("conftest.val", "w");
13995 if (!f)
13996   $ac_main_return (1);
13997 fprintf (f, "%d", (sizeof (signed char)));
13998 fclose (f);
13999   ;
14000   return 0;
14001 }
14002 _ACEOF
14003 rm -f conftest$ac_exeext
14004 if { (eval echo "$as_me:14004: \"$ac_link\"") >&5
14005   (eval $ac_link) 2>&5
14006   ac_status=$?
14007   echo "$as_me:14007: \$? = $ac_status" >&5
14008   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14009   { (eval echo "$as_me:14009: \"$ac_try\"") >&5
14010   (eval $ac_try) 2>&5
14011   ac_status=$?
14012   echo "$as_me:14012: \$? = $ac_status" >&5
14013   (exit $ac_status); }; }; then
14014   ac_cv_sizeof_signed_char=`cat conftest.val`
14015 else
14016   echo "$as_me: program exited with status $ac_status" >&5
14017 echo "$as_me: failed program was:" >&5
14018 cat conftest.$ac_ext >&5
14019 fi
14020 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14021 fi
14022 fi
14023 rm -f conftest.val
14024 else
14025   ac_cv_sizeof_signed_char=0
14026 fi
14027 fi
14028 echo "$as_me:14028: result: $ac_cv_sizeof_signed_char" >&5
14029 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14030 cat >>confdefs.h <<EOF
14031 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14032 EOF
14033
14034 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14035         NCURSES_SBOOL="signed char"
14036 else
14037         NCURSES_SBOOL="char"
14038 fi
14039 echo "$as_me:14039: checking if you want to use signed Boolean array in term.h" >&5
14040 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14041
14042 # Check whether --enable-signed-char or --disable-signed-char was given.
14043 if test "${enable_signed_char+set}" = set; then
14044   enableval="$enable_signed_char"
14045   with_signed_char=$enableval
14046 else
14047   with_signed_char=no
14048 fi;
14049 echo "$as_me:14049: result: $with_signed_char" >&5
14050 echo "${ECHO_T}$with_signed_char" >&6
14051 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14052
14053 ###   use option --with-tparm-arg to override tparm's argument type
14054 echo "$as_me:14054: checking for type of tparm args" >&5
14055 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14056
14057 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14058 if test "${with_tparm_arg+set}" = set; then
14059   withval="$with_tparm_arg"
14060   NCURSES_TPARM_ARG="$withval"
14061 else
14062   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14063 fi;
14064 echo "$as_me:14064: result: $NCURSES_TPARM_ARG" >&5
14065 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14066
14067 ### Enable compiling-in rcs id's
14068 echo "$as_me:14068: checking if RCS identifiers should be compiled-in" >&5
14069 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14070
14071 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14072 if test "${with_rcs_ids+set}" = set; then
14073   withval="$with_rcs_ids"
14074   with_rcs_ids=$withval
14075 else
14076   with_rcs_ids=no
14077 fi;
14078 echo "$as_me:14078: result: $with_rcs_ids" >&5
14079 echo "${ECHO_T}$with_rcs_ids" >&6
14080 test "x$with_rcs_ids" = xyes &&
14081 cat >>confdefs.h <<\EOF
14082 #define USE_RCS_IDS 1
14083 EOF
14084
14085 ###############################################################################
14086
14087 echo "$as_me:14087: checking format of man-pages" >&5
14088 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14089
14090 # Check whether --with-manpage-format or --without-manpage-format was given.
14091 if test "${with_manpage_format+set}" = set; then
14092   withval="$with_manpage_format"
14093   MANPAGE_FORMAT=$withval
14094 else
14095   MANPAGE_FORMAT=unknown
14096 fi;
14097
14098 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14099 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14100
14101 cf_unknown=
14102
14103 case $MANPAGE_FORMAT in
14104 (unknown)
14105         if test -z "$MANPATH" ; then
14106                 MANPATH="/usr/man:/usr/share/man"
14107         fi
14108
14109         # look for the 'date' man-page (it's most likely to be installed!)
14110         MANPAGE_FORMAT=
14111         cf_preform=no
14112         cf_catonly=yes
14113         cf_example=date
14114
14115         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14116         for cf_dir in $MANPATH; do
14117                 test -z "$cf_dir" && cf_dir=/usr/man
14118                 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
14119                 do
14120                         cf_test=`echo $cf_name | sed -e 's/*//'`
14121                         if test "x$cf_test" = "x$cf_name" ; then
14122
14123                                 case "$cf_name" in
14124                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14125                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14126                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14127                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14128                                 esac
14129
14130                                 case "$cf_name" in
14131                                 ($cf_dir/man*)
14132                                         cf_catonly=no
14133                                         ;;
14134                                 ($cf_dir/cat*)
14135                                         cf_preform=yes
14136                                         ;;
14137                                 esac
14138                                 break
14139                         fi
14140
14141                         # if we found a match in either man* or cat*, stop looking
14142                         if test -n "$MANPAGE_FORMAT" ; then
14143                                 cf_found=no
14144                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14145                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14146                                 case "$cf_name" in
14147                                 ($cf_dir/cat*)
14148                                         cf_found=yes
14149                                         ;;
14150                                 esac
14151                                 test $cf_found=yes && break
14152                         fi
14153                 done
14154                 # only check the first directory in $MANPATH where we find manpages
14155                 if test -n "$MANPAGE_FORMAT" ; then
14156                         break
14157                 fi
14158         done
14159         # if we did not find the example, just assume it is normal
14160         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14161         IFS="$ac_save_ifs"
14162         ;;
14163 (*)
14164         for cf_option in $MANPAGE_FORMAT; do
14165         case $cf_option in
14166         (gzip|compress|BSDI|normal|formatted|catonly)
14167                 ;;
14168         (*)
14169                 cf_unknown="$cf_unknown $cf_option"
14170                 ;;
14171         esac
14172         done
14173         ;;
14174 esac
14175
14176 echo "$as_me:14176: result: $MANPAGE_FORMAT" >&5
14177 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14178 if test -n "$cf_unknown" ; then
14179         { echo "$as_me:14179: WARNING: Unexpected manpage-format $cf_unknown" >&5
14180 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14181 fi
14182
14183 echo "$as_me:14183: checking for manpage renaming" >&5
14184 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14185
14186 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14187 if test "${with_manpage_renames+set}" = set; then
14188   withval="$with_manpage_renames"
14189   MANPAGE_RENAMES=$withval
14190 else
14191   MANPAGE_RENAMES=yes
14192 fi;
14193
14194 case ".$MANPAGE_RENAMES" in
14195 (.no)
14196         ;;
14197 (.|.yes)
14198         # Debian 'man' program?
14199         if test -f /etc/debian_version ; then
14200                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
14201         else
14202                 MANPAGE_RENAMES=no
14203         fi
14204         ;;
14205 esac
14206
14207 if test "$MANPAGE_RENAMES" != no ; then
14208         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
14209                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
14210         elif test ! -f $MANPAGE_RENAMES ; then
14211                 { { echo "$as_me:14211: error: not a filename: $MANPAGE_RENAMES" >&5
14212 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14213    { (exit 1); exit 1; }; }
14214         fi
14215
14216         test ! -d man && mkdir man
14217
14218         # Construct a sed-script to perform renaming within man-pages
14219         if test -n "$MANPAGE_RENAMES" ; then
14220                 test ! -d man && mkdir man
14221                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
14222         fi
14223 fi
14224
14225 echo "$as_me:14225: result: $MANPAGE_RENAMES" >&5
14226 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14227
14228 echo "$as_me:14228: checking if manpage aliases will be installed" >&5
14229 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14230
14231 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14232 if test "${with_manpage_aliases+set}" = set; then
14233   withval="$with_manpage_aliases"
14234   MANPAGE_ALIASES=$withval
14235 else
14236   MANPAGE_ALIASES=yes
14237 fi;
14238
14239 echo "$as_me:14239: result: $MANPAGE_ALIASES" >&5
14240 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14241
14242 case "x$LN_S" in
14243 (xln*)
14244         cf_use_symlinks=yes
14245         ;;
14246 (*)
14247         cf_use_symlinks=no
14248         ;;
14249 esac
14250
14251 MANPAGE_SYMLINKS=no
14252 if test "$MANPAGE_ALIASES" = yes ; then
14253 echo "$as_me:14253: checking if manpage symlinks should be used" >&5
14254 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14255
14256 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14257 if test "${with_manpage_symlinks+set}" = set; then
14258   withval="$with_manpage_symlinks"
14259   MANPAGE_SYMLINKS=$withval
14260 else
14261   MANPAGE_SYMLINKS=$cf_use_symlinks
14262 fi;
14263
14264 if test "$$cf_use_symlinks" = no; then
14265 if test "$MANPAGE_SYMLINKS" = yes ; then
14266         { echo "$as_me:14266: WARNING: cannot make symlinks" >&5
14267 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14268         MANPAGE_SYMLINKS=no
14269 fi
14270 fi
14271
14272 echo "$as_me:14272: result: $MANPAGE_SYMLINKS" >&5
14273 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14274 fi
14275
14276 echo "$as_me:14276: checking for manpage tbl" >&5
14277 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14278
14279 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14280 if test "${with_manpage_tbl+set}" = set; then
14281   withval="$with_manpage_tbl"
14282   MANPAGE_TBL=$withval
14283 else
14284   MANPAGE_TBL=no
14285 fi;
14286
14287 echo "$as_me:14287: result: $MANPAGE_TBL" >&5
14288 echo "${ECHO_T}$MANPAGE_TBL" >&6
14289
14290 if test "$prefix" = "NONE" ; then
14291         cf_prefix="$ac_default_prefix"
14292 else
14293         cf_prefix="$prefix"
14294 fi
14295
14296 case "$MANPAGE_FORMAT" in
14297 (*catonly*)
14298         cf_format=yes
14299         cf_inboth=no
14300         ;;
14301 (*formatted*)
14302         cf_format=yes
14303         cf_inboth=yes
14304         ;;
14305 (*)
14306         cf_format=no
14307         cf_inboth=no
14308         ;;
14309 esac
14310
14311 test ! -d man && mkdir man
14312
14313 cf_so_strip=
14314 cf_compress=
14315 case "$MANPAGE_FORMAT" in
14316 (*compress*)
14317         cf_so_strip="Z"
14318         cf_compress=compress
14319         ;;
14320 (*gzip*)
14321         cf_so_strip="gz"
14322         cf_compress=gzip
14323         ;;
14324 esac
14325
14326 cf_edit_man=./edit_man.sh
14327 cf_man_alias=`pwd`/man_alias.sed
14328
14329 cat >$cf_edit_man <<CF_EOF
14330 #! $SHELL
14331 # this script is generated by the configure-script CF_MAN_PAGES macro.
14332
14333 prefix="$cf_prefix"
14334 datarootdir="$datarootdir"
14335 datadir="$datadir"
14336
14337 NCURSES_MAJOR="$NCURSES_MAJOR"
14338 NCURSES_MINOR="$NCURSES_MINOR"
14339 NCURSES_PATCH="$NCURSES_PATCH"
14340
14341 NCURSES_OSPEED="$NCURSES_OSPEED"
14342 TERMINFO="$TERMINFO"
14343
14344 INSTALL="$INSTALL"
14345 INSTALL_DATA="$INSTALL_DATA"
14346
14347 transform="$program_transform_name"
14348
14349 TMP=\${TMPDIR:=/tmp}/man\$\$
14350 trap "rm -f \$TMP" 0 1 2 3 15
14351
14352 form=\$1
14353 shift || exit 1
14354
14355 verb=\$1
14356 shift || exit 1
14357
14358 mandir=\$1
14359 shift || exit 1
14360
14361 srcdir=\$1
14362 top_srcdir=\$srcdir/..
14363 shift || exit 1
14364
14365 if test "\$form" = normal ; then
14366         if test "$cf_format" = yes ; then
14367         if test "$cf_inboth" = no ; then
14368                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14369                 exit $?
14370         fi
14371         fi
14372         cf_subdir=\$mandir/man
14373         cf_tables=$MANPAGE_TBL
14374 else
14375         cf_subdir=\$mandir/cat
14376         cf_tables=yes
14377 fi
14378
14379 # process the list of source-files
14380 for i in \$* ; do
14381 case \$i in
14382 (*.orig|*.rej) ;;
14383 (*.[0-9]*)
14384         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14385         if test \$verb = installing ; then
14386         if test ! -d \$cf_subdir\${section} ; then
14387                 mkdir -p \$cf_subdir\$section
14388         fi
14389         fi
14390
14391         # replace variables in man page
14392         if test ! -f $cf_man_alias ; then
14393 cat >>$cf_man_alias <<-CF_EOF2
14394                 s,@DATADIR@,\$datadir,g
14395                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14396                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14397                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14398                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14399                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14400                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14401 CF_EOF
14402
14403         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14404         do
14405                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14406                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14407 cat >>$cf_edit_man <<-CF_EOF
14408                 s,@$cf_NAME@,$cf_name,g
14409 CF_EOF
14410         done
14411
14412 cat >>$cf_edit_man <<CF_EOF
14413 CF_EOF2
14414                 echo "...made $cf_man_alias"
14415         fi
14416
14417         aliases=
14418         cf_source=\`basename \$i\`
14419         inalias=\$cf_source
14420         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14421         if test ! -f \$inalias ; then
14422                 echo .. skipped \$cf_source
14423                 continue
14424         fi
14425 CF_EOF
14426
14427 if test "$MANPAGE_ALIASES" != no ; then
14428 cat >>$cf_edit_man <<CF_EOF
14429         nCurses=ignore.3x
14430         test $with_curses_h = yes && nCurses=ncurses.3x
14431         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14432 CF_EOF
14433 fi
14434
14435 if test "$MANPAGE_RENAMES" = no ; then
14436 cat >>$cf_edit_man <<CF_EOF
14437         # perform program transformations for section 1 man pages
14438         if test \$section = 1 ; then
14439                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14440         else
14441                 cf_target=\$cf_subdir\${section}/\$cf_source
14442         fi
14443 CF_EOF
14444 else
14445 cat >>$cf_edit_man <<CF_EOF
14446         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14447         if test -z "\$cf_target" ; then
14448                 echo '? missing rename for '\$cf_source
14449                 cf_target="\$cf_source"
14450         fi
14451         cf_target="\$cf_subdir\${section}/\${cf_target}"
14452
14453 CF_EOF
14454 fi
14455
14456 cat >>$cf_edit_man <<CF_EOF
14457         sed     -f $cf_man_alias \\
14458 CF_EOF
14459
14460 if test -f $MANPAGE_RENAMES ; then
14461 cat >>$cf_edit_man <<CF_EOF
14462                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14463 CF_EOF
14464 else
14465 cat >>$cf_edit_man <<CF_EOF
14466                 < \$i >\$TMP
14467 CF_EOF
14468 fi
14469
14470 cat >>$cf_edit_man <<CF_EOF
14471 if test \$cf_tables = yes ; then
14472         tbl \$TMP >\$TMP.out
14473         mv \$TMP.out \$TMP
14474 fi
14475 CF_EOF
14476
14477 if test $with_overwrite != yes ; then
14478 cat >>$cf_edit_man <<CF_EOF
14479         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14480         mv \$TMP.out \$TMP
14481 CF_EOF
14482 fi
14483
14484 if test $with_curses_h != yes ; then
14485 cat >>$cf_edit_man <<CF_EOF
14486         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14487         mv \$TMP.out \$TMP
14488 CF_EOF
14489 fi
14490
14491 cat >>$cf_edit_man <<CF_EOF
14492         if test \$form = format ; then
14493                 nroff -man \$TMP >\$TMP.out
14494                 mv \$TMP.out \$TMP
14495         fi
14496 CF_EOF
14497
14498 if test -n "$cf_compress" ; then
14499 cat >>$cf_edit_man <<CF_EOF
14500         if test \$verb = installing ; then
14501         if ( $cf_compress -f \$TMP )
14502         then
14503                 mv \$TMP.$cf_so_strip \$TMP
14504         fi
14505         fi
14506         cf_target="\$cf_target.$cf_so_strip"
14507 CF_EOF
14508 fi
14509
14510 case "$MANPAGE_FORMAT" in
14511 (*BSDI*)
14512 cat >>$cf_edit_man <<CF_EOF
14513         if test \$form = format ; then
14514                 # BSDI installs only .0 suffixes in the cat directories
14515                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14516         fi
14517 CF_EOF
14518   ;;
14519 esac
14520
14521 cat >>$cf_edit_man <<CF_EOF
14522         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14523         if test \$verb = installing ; then
14524                 echo \$verb \$cf_target
14525                 \$INSTALL_DATA \$TMP \$cf_target
14526                 test -d \$cf_subdir\${section} &&
14527                 test -n "\$aliases" && (
14528                         cd \$cf_subdir\${section} && (
14529                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14530                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14531                                 cf_target=\`basename \$cf_target\`
14532                                 for cf_alias in \$aliases
14533                                 do
14534                                         if test \$section = 1 ; then
14535                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14536                                         fi
14537
14538                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14539                                                 if test -f \$cf_alias\${suffix} ; then
14540                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14541                                                         then
14542                                                                 continue
14543                                                         fi
14544                                                 fi
14545                                                 echo .. \$verb alias \$cf_alias\${suffix}
14546 CF_EOF
14547 case "x$LN_S" in
14548 (*-f)
14549 cat >>$cf_edit_man <<CF_EOF
14550                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14551 CF_EOF
14552         ;;
14553 (*)
14554 cat >>$cf_edit_man <<CF_EOF
14555                                                 rm -f \$cf_alias\${suffix}
14556                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14557 CF_EOF
14558         ;;
14559 esac
14560 cat >>$cf_edit_man <<CF_EOF
14561                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14562                                                 echo ".so \$cf_source" >\$TMP
14563 CF_EOF
14564 if test -n "$cf_compress" ; then
14565 cat >>$cf_edit_man <<CF_EOF
14566                                                 if test -n "$cf_so_strip" ; then
14567                                                         $cf_compress -f \$TMP
14568                                                         mv \$TMP.$cf_so_strip \$TMP
14569                                                 fi
14570 CF_EOF
14571 fi
14572 cat >>$cf_edit_man <<CF_EOF
14573                                                 echo .. \$verb alias \$cf_alias\${suffix}
14574                                                 rm -f \$cf_alias\${suffix}
14575                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14576                                         fi
14577                                 done
14578                         )
14579                 )
14580         elif test \$verb = removing ; then
14581                 test -f \$cf_target && (
14582                         echo \$verb \$cf_target
14583                         rm -f \$cf_target
14584                 )
14585                 test -d \$cf_subdir\${section} &&
14586                 test -n "\$aliases" && (
14587                         cd \$cf_subdir\${section} && (
14588                                 for cf_alias in \$aliases
14589                                 do
14590                                         if test \$section = 1 ; then
14591                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14592                                         fi
14593
14594                                         echo .. \$verb alias \$cf_alias\${suffix}
14595                                         rm -f \$cf_alias\${suffix}
14596                                 done
14597                         )
14598                 )
14599         else
14600 #               echo ".hy 0"
14601                 cat \$TMP
14602         fi
14603         ;;
14604 esac
14605 done
14606
14607 if test $cf_inboth = yes ; then
14608 if test \$form != format ; then
14609         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14610 fi
14611 fi
14612
14613 exit 0
14614 CF_EOF
14615 chmod 755 $cf_edit_man
14616
14617 ###############################################################################
14618
14619 ### Note that some functions (such as const) are normally disabled anyway.
14620 echo "$as_me:14620: checking if you want to build with function extensions" >&5
14621 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14622
14623 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14624 if test "${enable_ext_funcs+set}" = set; then
14625   enableval="$enable_ext_funcs"
14626   with_ext_funcs=$enableval
14627 else
14628   with_ext_funcs=yes
14629 fi;
14630 echo "$as_me:14630: result: $with_ext_funcs" >&5
14631 echo "${ECHO_T}$with_ext_funcs" >&6
14632 if test "x$with_ext_funcs" = xyes ; then
14633         NCURSES_EXT_FUNCS=1
14634
14635 cat >>confdefs.h <<\EOF
14636 #define NCURSES_EXT_FUNCS 1
14637 EOF
14638
14639 cat >>confdefs.h <<\EOF
14640 #define HAVE_ASSUME_DEFAULT_COLORS 1
14641 EOF
14642
14643 cat >>confdefs.h <<\EOF
14644 #define HAVE_CURSES_VERSION 1
14645 EOF
14646
14647 cat >>confdefs.h <<\EOF
14648 #define HAVE_HAS_KEY 1
14649 EOF
14650
14651 cat >>confdefs.h <<\EOF
14652 #define HAVE_RESIZETERM 1
14653 EOF
14654
14655 cat >>confdefs.h <<\EOF
14656 #define HAVE_RESIZE_TERM 1
14657 EOF
14658
14659 cat >>confdefs.h <<\EOF
14660 #define HAVE_TERM_ENTRY_H 1
14661 EOF
14662
14663 cat >>confdefs.h <<\EOF
14664 #define HAVE_USE_DEFAULT_COLORS 1
14665 EOF
14666
14667 cat >>confdefs.h <<\EOF
14668 #define HAVE_USE_EXTENDED_NAMES 1
14669 EOF
14670
14671 cat >>confdefs.h <<\EOF
14672 #define HAVE_USE_SCREEN 1
14673 EOF
14674
14675 cat >>confdefs.h <<\EOF
14676 #define HAVE_USE_WINDOW 1
14677 EOF
14678
14679 cat >>confdefs.h <<\EOF
14680 #define HAVE_WRESIZE 1
14681 EOF
14682
14683         GENERATED_EXT_FUNCS=generated
14684         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14685 else
14686         NCURSES_EXT_FUNCS=0
14687         GENERATED_EXT_FUNCS=
14688 fi
14689
14690 echo "$as_me:14690: checking if you want to build with SCREEN extensions" >&5
14691 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14692
14693 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14694 if test "${enable_sp_funcs+set}" = set; then
14695   enableval="$enable_sp_funcs"
14696   with_sp_funcs=$enableval
14697 else
14698   with_sp_funcs=$cf_dft_ext_spfuncs
14699 fi;
14700 echo "$as_me:14700: result: $with_sp_funcs" >&5
14701 echo "${ECHO_T}$with_sp_funcs" >&6
14702 if test "x$with_sp_funcs" = xyes ; then
14703         NCURSES_SP_FUNCS=1
14704
14705 cat >>confdefs.h <<\EOF
14706 #define NCURSES_SP_FUNCS 1
14707 EOF
14708
14709 cat >>confdefs.h <<\EOF
14710 #define HAVE_TPUTS_SP 1
14711 EOF
14712
14713         GENERATED_SP_FUNCS=generated
14714 else
14715         NCURSES_SP_FUNCS=0
14716         GENERATED_SP_FUNCS=
14717 fi
14718
14719 echo "$as_me:14719: checking if you want to build with terminal-driver" >&5
14720 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14721
14722 # Check whether --enable-term-driver or --disable-term-driver was given.
14723 if test "${enable_term_driver+set}" = set; then
14724   enableval="$enable_term_driver"
14725   with_term_driver=$enableval
14726 else
14727   with_term_driver=no
14728 fi;
14729 echo "$as_me:14729: result: $with_term_driver" >&5
14730 echo "${ECHO_T}$with_term_driver" >&6
14731 if test "x$with_term_driver" = xyes ; then
14732
14733 cat >>confdefs.h <<\EOF
14734 #define USE_TERM_DRIVER 1
14735 EOF
14736
14737         if test "x$with_termlib" != xno ; then
14738                 { { echo "$as_me:14738: error: The term-driver option conflicts with the termlib option" >&5
14739 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14740    { (exit 1); exit 1; }; }
14741         fi
14742         if test "x$with_sp_funcs" != xyes ; then
14743                 { { echo "$as_me:14743: error: The term-driver option relies upon sp-funcs" >&5
14744 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14745    { (exit 1); exit 1; }; }
14746         fi
14747 fi
14748
14749 ###   use option --enable-const to turn on use of const beyond that in XSI.
14750 echo "$as_me:14750: checking for extended use of const keyword" >&5
14751 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14752
14753 # Check whether --enable-const or --disable-const was given.
14754 if test "${enable_const+set}" = set; then
14755   enableval="$enable_const"
14756   with_ext_const=$enableval
14757 else
14758   with_ext_const=$cf_dft_ext_const
14759 fi;
14760 echo "$as_me:14760: result: $with_ext_const" >&5
14761 echo "${ECHO_T}$with_ext_const" >&6
14762 NCURSES_CONST='/*nothing*/'
14763 if test "x$with_ext_const" = xyes ; then
14764         NCURSES_CONST=const
14765 fi
14766
14767 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14768 echo "$as_me:14768: checking if you want to use extended colors" >&5
14769 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14770
14771 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14772 if test "${enable_ext_colors+set}" = set; then
14773   enableval="$enable_ext_colors"
14774   with_ext_colors=$enableval
14775 else
14776   with_ext_colors=$cf_dft_ext_colors
14777 fi;
14778 echo "$as_me:14778: result: $with_ext_colors" >&5
14779 echo "${ECHO_T}$with_ext_colors" >&6
14780 NCURSES_EXT_COLORS=0
14781 if test "x$with_ext_colors" = xyes ; then
14782         if test "x$with_widec" != xyes ; then
14783                 { echo "$as_me:14783: WARNING: This option applies only to wide-character library" >&5
14784 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14785         else
14786                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14787
14788 if test "${with_abi_version+set}" != set; then
14789         case $cf_cv_rel_version in
14790         (5.*)
14791                 cf_cv_rel_version=6.0
14792                 cf_cv_abi_version=6
14793                 { echo "$as_me:14793: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14794 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14795                 ;;
14796         esac
14797 fi
14798
14799                 NCURSES_EXT_COLORS=1
14800
14801 cat >>confdefs.h <<\EOF
14802 #define NCURSES_EXT_COLORS 1
14803 EOF
14804
14805 cat >>confdefs.h <<\EOF
14806 #define HAVE_ALLOC_PAIR 1
14807 EOF
14808
14809 cat >>confdefs.h <<\EOF
14810 #define HAVE_INIT_EXTENDED_COLOR 1
14811 EOF
14812
14813 cat >>confdefs.h <<\EOF
14814 #define HAVE_RESET_COLOR_PAIRS 1
14815 EOF
14816
14817         fi
14818 fi
14819
14820 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14821 echo "$as_me:14821: checking if you want to use extended mouse encoding" >&5
14822 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14823
14824 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14825 if test "${enable_ext_mouse+set}" = set; then
14826   enableval="$enable_ext_mouse"
14827   with_ext_mouse=$enableval
14828 else
14829   with_ext_mouse=$cf_dft_ext_mouse
14830 fi;
14831 echo "$as_me:14831: result: $with_ext_mouse" >&5
14832 echo "${ECHO_T}$with_ext_mouse" >&6
14833 NCURSES_MOUSE_VERSION=1
14834 if test "x$with_ext_mouse" = xyes ; then
14835         NCURSES_MOUSE_VERSION=2
14836
14837 if test "${with_abi_version+set}" != set; then
14838         case $cf_cv_rel_version in
14839         (5.*)
14840                 cf_cv_rel_version=6.0
14841                 cf_cv_abi_version=6
14842                 { echo "$as_me:14842: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14843 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14844                 ;;
14845         esac
14846 fi
14847
14848 fi
14849
14850 ###   use option --enable-ext-putwin to turn on extended screendumps
14851 echo "$as_me:14851: checking if you want to use extended putwin/screendump" >&5
14852 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14853
14854 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14855 if test "${enable_ext_putwin+set}" = set; then
14856   enableval="$enable_ext_putwin"
14857   with_ext_putwin=$enableval
14858 else
14859   with_ext_putwin=$cf_dft_ext_putwin
14860 fi;
14861 echo "$as_me:14861: result: $with_ext_putwin" >&5
14862 echo "${ECHO_T}$with_ext_putwin" >&6
14863 if test "x$with_ext_putwin" = xyes ; then
14864
14865 cat >>confdefs.h <<\EOF
14866 #define NCURSES_EXT_PUTWIN 1
14867 EOF
14868
14869 fi
14870
14871 echo "$as_me:14871: checking if you want \$NCURSES_NO_PADDING code" >&5
14872 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14873
14874 # Check whether --enable-no-padding or --disable-no-padding was given.
14875 if test "${enable_no_padding+set}" = set; then
14876   enableval="$enable_no_padding"
14877   with_no_padding=$enableval
14878 else
14879   with_no_padding=$with_ext_funcs
14880 fi;
14881 echo "$as_me:14881: result: $with_no_padding" >&5
14882 echo "${ECHO_T}$with_no_padding" >&6
14883 test "x$with_no_padding" = xyes &&
14884 cat >>confdefs.h <<\EOF
14885 #define NCURSES_NO_PADDING 1
14886 EOF
14887
14888 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14889 echo "$as_me:14889: checking if you want SIGWINCH handler" >&5
14890 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14891
14892 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14893 if test "${enable_sigwinch+set}" = set; then
14894   enableval="$enable_sigwinch"
14895   with_sigwinch=$enableval
14896 else
14897   with_sigwinch=$with_ext_funcs
14898 fi;
14899 echo "$as_me:14899: result: $with_sigwinch" >&5
14900 echo "${ECHO_T}$with_sigwinch" >&6
14901 test "x$with_sigwinch" = xyes &&
14902 cat >>confdefs.h <<\EOF
14903 #define USE_SIGWINCH 1
14904 EOF
14905
14906 ###   use option --enable-tcap-names to allow user to define new capabilities
14907 echo "$as_me:14907: checking if you want user-definable terminal capabilities like termcap" >&5
14908 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14909
14910 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14911 if test "${enable_tcap_names+set}" = set; then
14912   enableval="$enable_tcap_names"
14913   with_tcap_names=$enableval
14914 else
14915   with_tcap_names=$with_ext_funcs
14916 fi;
14917 echo "$as_me:14917: result: $with_tcap_names" >&5
14918 echo "${ECHO_T}$with_tcap_names" >&6
14919 NCURSES_XNAMES=0
14920 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14921
14922 ##############################################################################
14923
14924 echo "$as_me:14924: checking if you want to link with the pthread library" >&5
14925 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14926
14927 # Check whether --with-pthread or --without-pthread was given.
14928 if test "${with_pthread+set}" = set; then
14929   withval="$with_pthread"
14930   with_pthread=$withval
14931 else
14932   with_pthread=no
14933 fi;
14934 echo "$as_me:14934: result: $with_pthread" >&5
14935 echo "${ECHO_T}$with_pthread" >&6
14936
14937 if test "$with_pthread" != no ; then
14938         echo "$as_me:14938: checking for pthread.h" >&5
14939 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14940 if test "${ac_cv_header_pthread_h+set}" = set; then
14941   echo $ECHO_N "(cached) $ECHO_C" >&6
14942 else
14943   cat >conftest.$ac_ext <<_ACEOF
14944 #line 14944 "configure"
14945 #include "confdefs.h"
14946 #include <pthread.h>
14947 _ACEOF
14948 if { (eval echo "$as_me:14948: \"$ac_cpp conftest.$ac_ext\"") >&5
14949   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14950   ac_status=$?
14951   egrep -v '^ *\+' conftest.er1 >conftest.err
14952   rm -f conftest.er1
14953   cat conftest.err >&5
14954   echo "$as_me:14954: \$? = $ac_status" >&5
14955   (exit $ac_status); } >/dev/null; then
14956   if test -s conftest.err; then
14957     ac_cpp_err=$ac_c_preproc_warn_flag
14958   else
14959     ac_cpp_err=
14960   fi
14961 else
14962   ac_cpp_err=yes
14963 fi
14964 if test -z "$ac_cpp_err"; then
14965   ac_cv_header_pthread_h=yes
14966 else
14967   echo "$as_me: failed program was:" >&5
14968   cat conftest.$ac_ext >&5
14969   ac_cv_header_pthread_h=no
14970 fi
14971 rm -f conftest.err conftest.$ac_ext
14972 fi
14973 echo "$as_me:14973: result: $ac_cv_header_pthread_h" >&5
14974 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14975 if test $ac_cv_header_pthread_h = yes; then
14976
14977 cat >>confdefs.h <<\EOF
14978 #define HAVE_PTHREADS_H 1
14979 EOF
14980
14981         for cf_lib_pthread in pthread c_r
14982         do
14983             echo "$as_me:14983: checking if we can link with the $cf_lib_pthread library" >&5
14984 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14985             cf_save_LIBS="$LIBS"
14986
14987 cf_add_libs="$LIBS"
14988 # reverse order
14989 cf_add_0lib=
14990 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14991 # filter duplicates
14992 for cf_add_1lib in $cf_add_0lib; do
14993         for cf_add_2lib in $cf_add_libs; do
14994                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14995                         cf_add_1lib=
14996                         break
14997                 fi
14998         done
14999         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15000 done
15001 LIBS="$cf_add_libs"
15002
15003             cat >conftest.$ac_ext <<_ACEOF
15004 #line 15004 "configure"
15005 #include "confdefs.h"
15006
15007 #include <pthread.h>
15008
15009 int
15010 main (void)
15011 {
15012
15013                 int rc = pthread_create(0,0,0,0);
15014                 int r2 = pthread_mutexattr_settype(0, 0);
15015
15016   ;
15017   return 0;
15018 }
15019 _ACEOF
15020 rm -f conftest.$ac_objext conftest$ac_exeext
15021 if { (eval echo "$as_me:15021: \"$ac_link\"") >&5
15022   (eval $ac_link) 2>&5
15023   ac_status=$?
15024   echo "$as_me:15024: \$? = $ac_status" >&5
15025   (exit $ac_status); } &&
15026          { ac_try='test -s conftest$ac_exeext'
15027   { (eval echo "$as_me:15027: \"$ac_try\"") >&5
15028   (eval $ac_try) 2>&5
15029   ac_status=$?
15030   echo "$as_me:15030: \$? = $ac_status" >&5
15031   (exit $ac_status); }; }; then
15032   with_pthread=yes
15033 else
15034   echo "$as_me: failed program was:" >&5
15035 cat conftest.$ac_ext >&5
15036 with_pthread=no
15037 fi
15038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15039             LIBS="$cf_save_LIBS"
15040             echo "$as_me:15040: result: $with_pthread" >&5
15041 echo "${ECHO_T}$with_pthread" >&6
15042             test "$with_pthread" = yes && break
15043         done
15044
15045         if test "$with_pthread" = yes ; then
15046
15047 cf_add_libs="$LIBS"
15048 # reverse order
15049 cf_add_0lib=
15050 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15051 # filter duplicates
15052 for cf_add_1lib in $cf_add_0lib; do
15053         for cf_add_2lib in $cf_add_libs; do
15054                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15055                         cf_add_1lib=
15056                         break
15057                 fi
15058         done
15059         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15060 done
15061 LIBS="$cf_add_libs"
15062
15063 cat >>confdefs.h <<\EOF
15064 #define HAVE_LIBPTHREADS 1
15065 EOF
15066
15067         else
15068             { { echo "$as_me:15068: error: Cannot link with pthread library" >&5
15069 echo "$as_me: error: Cannot link with pthread library" >&2;}
15070    { (exit 1); exit 1; }; }
15071         fi
15072
15073 fi
15074
15075 fi
15076
15077 if test "x$with_pthread" != xno; then
15078         echo "$as_me:15078: checking for pthread_kill" >&5
15079 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15080 if test "${ac_cv_func_pthread_kill+set}" = set; then
15081   echo $ECHO_N "(cached) $ECHO_C" >&6
15082 else
15083   cat >conftest.$ac_ext <<_ACEOF
15084 #line 15084 "configure"
15085 #include "confdefs.h"
15086 #define pthread_kill autoconf_temporary
15087 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15088 #undef pthread_kill
15089
15090 #ifdef __cplusplus
15091 extern "C"
15092 #endif
15093
15094 /* We use char because int might match the return type of a gcc2
15095    builtin and then its argument prototype would still apply.  */
15096 char pthread_kill (void);
15097
15098 int
15099 main (void)
15100 {
15101
15102 /* The GNU C library defines stubs for functions which it implements
15103     to always fail with ENOSYS.  Some functions are actually named
15104     something starting with __ and the normal name is an alias.  */
15105 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15106 #error found stub for pthread_kill
15107 #endif
15108
15109         return pthread_kill ();
15110   ;
15111   return 0;
15112 }
15113 _ACEOF
15114 rm -f conftest.$ac_objext conftest$ac_exeext
15115 if { (eval echo "$as_me:15115: \"$ac_link\"") >&5
15116   (eval $ac_link) 2>&5
15117   ac_status=$?
15118   echo "$as_me:15118: \$? = $ac_status" >&5
15119   (exit $ac_status); } &&
15120          { ac_try='test -s conftest$ac_exeext'
15121   { (eval echo "$as_me:15121: \"$ac_try\"") >&5
15122   (eval $ac_try) 2>&5
15123   ac_status=$?
15124   echo "$as_me:15124: \$? = $ac_status" >&5
15125   (exit $ac_status); }; }; then
15126   ac_cv_func_pthread_kill=yes
15127 else
15128   echo "$as_me: failed program was:" >&5
15129 cat conftest.$ac_ext >&5
15130 ac_cv_func_pthread_kill=no
15131 fi
15132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15133 fi
15134 echo "$as_me:15134: result: $ac_cv_func_pthread_kill" >&5
15135 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15136 if test $ac_cv_func_pthread_kill = yes; then
15137
15138                 echo "$as_me:15138: checking if you want to allow EINTR in wgetch with pthreads" >&5
15139 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15140
15141 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15142 if test "${enable_pthreads_eintr+set}" = set; then
15143   enableval="$enable_pthreads_eintr"
15144   use_pthreads_eintr=$enableval
15145 else
15146   use_pthreads_eintr=no
15147 fi;
15148                 echo "$as_me:15148: result: $use_pthreads_eintr" >&5
15149 echo "${ECHO_T}$use_pthreads_eintr" >&6
15150                 if test "x$use_pthreads_eintr" = xyes ; then
15151
15152 cat >>confdefs.h <<\EOF
15153 #define USE_PTHREADS_EINTR 1
15154 EOF
15155
15156                 fi
15157 fi
15158
15159         echo "$as_me:15159: checking if you want to use weak-symbols for pthreads" >&5
15160 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15161
15162 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15163 if test "${enable_weak_symbols+set}" = set; then
15164   enableval="$enable_weak_symbols"
15165   use_weak_symbols=$enableval
15166 else
15167   use_weak_symbols=no
15168 fi;
15169         echo "$as_me:15169: result: $use_weak_symbols" >&5
15170 echo "${ECHO_T}$use_weak_symbols" >&6
15171         if test "x$use_weak_symbols" = xyes ; then
15172
15173 echo "$as_me:15173: checking if $CC supports weak symbols" >&5
15174 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15175 if test "${cf_cv_weak_symbols+set}" = set; then
15176   echo $ECHO_N "(cached) $ECHO_C" >&6
15177 else
15178
15179 cat >conftest.$ac_ext <<_ACEOF
15180 #line 15180 "configure"
15181 #include "confdefs.h"
15182
15183 #include <stdio.h>
15184 int
15185 main (void)
15186 {
15187
15188 #if defined(__GNUC__)
15189 #  if defined __USE_ISOC99
15190 #    define _cat_pragma(exp)    _Pragma(#exp)
15191 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15192 #  else
15193 #    define _weak_pragma(exp)
15194 #  endif
15195 #  define _declare(name)        __extension__ extern __typeof__(name) name
15196 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15197 #endif
15198
15199 weak_symbol(fopen);
15200
15201   ;
15202   return 0;
15203 }
15204 _ACEOF
15205 rm -f conftest.$ac_objext
15206 if { (eval echo "$as_me:15206: \"$ac_compile\"") >&5
15207   (eval $ac_compile) 2>&5
15208   ac_status=$?
15209   echo "$as_me:15209: \$? = $ac_status" >&5
15210   (exit $ac_status); } &&
15211          { ac_try='test -s conftest.$ac_objext'
15212   { (eval echo "$as_me:15212: \"$ac_try\"") >&5
15213   (eval $ac_try) 2>&5
15214   ac_status=$?
15215   echo "$as_me:15215: \$? = $ac_status" >&5
15216   (exit $ac_status); }; }; then
15217   cf_cv_weak_symbols=yes
15218 else
15219   echo "$as_me: failed program was:" >&5
15220 cat conftest.$ac_ext >&5
15221 cf_cv_weak_symbols=no
15222 fi
15223 rm -f conftest.$ac_objext conftest.$ac_ext
15224
15225 fi
15226 echo "$as_me:15226: result: $cf_cv_weak_symbols" >&5
15227 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15228
15229         else
15230                 cf_cv_weak_symbols=no
15231         fi
15232
15233         if test "x$cf_cv_weak_symbols" = xyes ; then
15234
15235 cat >>confdefs.h <<\EOF
15236 #define USE_WEAK_SYMBOLS 1
15237 EOF
15238
15239         fi
15240 fi
15241
15242 PTHREAD=
15243 if test "x$with_pthread" = "xyes" ; then
15244
15245 cat >>confdefs.h <<\EOF
15246 #define USE_PTHREADS 1
15247 EOF
15248
15249         enable_reentrant=yes
15250         if test "x$cf_cv_weak_symbols" = xyes ; then
15251                 PTHREAD=-lpthread
15252
15253 cf_add_libs="$PRIVATE_LIBS"
15254 # reverse order
15255 cf_add_0lib=
15256 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15257 # filter duplicates
15258 for cf_add_1lib in $cf_add_0lib; do
15259         for cf_add_2lib in $cf_add_libs; do
15260                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15261                         cf_add_1lib=
15262                         break
15263                 fi
15264         done
15265         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15266 done
15267 PRIVATE_LIBS="$cf_add_libs"
15268
15269         fi
15270 fi
15271
15272 # Reentrant code has to be opaque; there's little advantage to making ncurses
15273 # opaque outside of that, so there is no --enable-opaque option.  We can use
15274 # this option without --with-pthreads, but this will be always set for
15275 # pthreads.
15276 echo "$as_me:15276: checking if you want reentrant code" >&5
15277 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15278
15279 # Check whether --enable-reentrant or --disable-reentrant was given.
15280 if test "${enable_reentrant+set}" = set; then
15281   enableval="$enable_reentrant"
15282   with_reentrant=$enableval
15283 else
15284   with_reentrant=no
15285 fi;
15286 echo "$as_me:15286: result: $with_reentrant" >&5
15287 echo "${ECHO_T}$with_reentrant" >&6
15288 if test "x$with_reentrant" = xyes ; then
15289         cf_cv_enable_reentrant=1
15290         cf_cv_enable_opaque="NCURSES_INTERNALS"
15291         NCURSES_SIZE_T=int
15292         if test "x$cf_cv_weak_symbols" = xyes ; then
15293
15294 # remove pthread library from $LIBS
15295 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15296
15297 cf_add_libs="$TEST_LIBS"
15298 # reverse order
15299 cf_add_0lib=
15300 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15301 # filter duplicates
15302 for cf_add_1lib in $cf_add_0lib; do
15303         for cf_add_2lib in $cf_add_libs; do
15304                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15305                         cf_add_1lib=
15306                         break
15307                 fi
15308         done
15309         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15310 done
15311 TEST_LIBS="$cf_add_libs"
15312
15313 cf_add_libs="$TEST_LIBS2"
15314 # reverse order
15315 cf_add_0lib=
15316 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15317 # filter duplicates
15318 for cf_add_1lib in $cf_add_0lib; do
15319         for cf_add_2lib in $cf_add_libs; do
15320                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15321                         cf_add_1lib=
15322                         break
15323                 fi
15324         done
15325         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15326 done
15327 TEST_LIBS2="$cf_add_libs"
15328
15329 cf_add_libs="$PRIVATE_LIBS"
15330 # reverse order
15331 cf_add_0lib=
15332 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15333 # filter duplicates
15334 for cf_add_1lib in $cf_add_0lib; do
15335         for cf_add_2lib in $cf_add_libs; do
15336                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15337                         cf_add_1lib=
15338                         break
15339                 fi
15340         done
15341         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15342 done
15343 PRIVATE_LIBS="$cf_add_libs"
15344
15345         else
15346                 # when not using weak symbols but with_reentrant,
15347                 # add 't' to the library suffix on all platforms
15348                 # except cygwin, where we only do that if ALSO
15349                 # compiling with full thread support.
15350                 case "$host" in
15351                 (*cygwin* | *msys*)
15352                         if test "$with_pthread" = "yes" ; then
15353                                 if test "x$disable_lib_suffixes" = "xno" ; then
15354                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15355                                 fi
15356                         fi ;;
15357                 (*)
15358                         if test "x$disable_lib_suffixes" = "xno" ; then
15359                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15360                         fi
15361                         ;;
15362                 esac
15363         fi
15364
15365 cat >>confdefs.h <<\EOF
15366 #define USE_REENTRANT 1
15367 EOF
15368
15369 if test "${with_abi_version+set}" != set; then
15370         case $cf_cv_rel_version in
15371         (5.*)
15372                 cf_cv_rel_version=6.0
15373                 cf_cv_abi_version=6
15374                 { echo "$as_me:15374: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15375 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15376                 ;;
15377         esac
15378 fi
15379
15380 else
15381         cf_cv_enable_reentrant=0
15382         cf_cv_enable_opaque="NCURSES_OPAQUE"
15383         NCURSES_SIZE_T=short
15384 fi
15385
15386 echo "$as_me:15386: checking if you want opaque curses-library structures" >&5
15387 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15388
15389 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15390 if test "${enable_opaque_curses+set}" = set; then
15391   enableval="$enable_opaque_curses"
15392   test "$enableval" != yes && enableval=no
15393         if test "$enableval" != "no" ; then
15394     enable_opaque_curses=yes
15395         else
15396
15397          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15398          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15399
15400         fi
15401 else
15402   enableval=no
15403
15404          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15405          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15406
15407 fi;
15408 echo "$as_me:15408: result: $enable_opaque_curses" >&5
15409 echo "${ECHO_T}$enable_opaque_curses" >&6
15410
15411 test "$cf_cv_enable_reentrant" = 1 && \
15412 test "$enable_opaque_curses" = no && \
15413 { { echo "$as_me:15413: error: reentrant configuration requires opaque library" >&5
15414 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15415    { (exit 1); exit 1; }; }
15416
15417 echo "$as_me:15417: checking if you want opaque form-library structures" >&5
15418 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15419
15420 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15421 if test "${enable_opaque_form+set}" = set; then
15422   enableval="$enable_opaque_form"
15423   enable_opaque_form=yes
15424 else
15425   enable_opaque_form=no
15426 fi;
15427 echo "$as_me:15427: result: $enable_opaque_form" >&5
15428 echo "${ECHO_T}$enable_opaque_form" >&6
15429
15430 echo "$as_me:15430: checking if you want opaque menu-library structures" >&5
15431 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15432
15433 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15434 if test "${enable_opaque_menu+set}" = set; then
15435   enableval="$enable_opaque_menu"
15436   enable_opaque_menu=yes
15437 else
15438   enable_opaque_menu=no
15439 fi;
15440 echo "$as_me:15440: result: $enable_opaque_menu" >&5
15441 echo "${ECHO_T}$enable_opaque_menu" >&6
15442
15443 echo "$as_me:15443: checking if you want opaque panel-library structures" >&5
15444 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15445
15446 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15447 if test "${enable_opaque_panel+set}" = set; then
15448   enableval="$enable_opaque_panel"
15449   enable_opaque_panel=yes
15450 else
15451   enable_opaque_panel=no
15452 fi;
15453 echo "$as_me:15453: result: $enable_opaque_panel" >&5
15454 echo "${ECHO_T}$enable_opaque_panel" >&6
15455
15456 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15457 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15458 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15459 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15460
15461 ### Allow using a different wrap-prefix
15462 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15463         echo "$as_me:15463: checking for prefix used to wrap public variables" >&5
15464 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15465
15466 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15467 if test "${with_wrap_prefix+set}" = set; then
15468   withval="$with_wrap_prefix"
15469   NCURSES_WRAP_PREFIX=$withval
15470 else
15471   NCURSES_WRAP_PREFIX=_nc_
15472 fi;
15473         echo "$as_me:15473: result: $NCURSES_WRAP_PREFIX" >&5
15474 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15475 else
15476         NCURSES_WRAP_PREFIX=_nc_
15477 fi
15478
15479 cat >>confdefs.h <<EOF
15480 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15481 EOF
15482
15483 ###############################################################################
15484 # These options are relatively safe to experiment with.
15485
15486 echo "$as_me:15486: checking if you want all development code" >&5
15487 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15488
15489 # Check whether --with-develop or --without-develop was given.
15490 if test "${with_develop+set}" = set; then
15491   withval="$with_develop"
15492   with_develop=$withval
15493 else
15494   with_develop=no
15495 fi;
15496 echo "$as_me:15496: result: $with_develop" >&5
15497 echo "${ECHO_T}$with_develop" >&6
15498
15499 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15500 echo "$as_me:15500: checking if you want hard-tabs code" >&5
15501 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15502
15503 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15504 if test "${enable_hard_tabs+set}" = set; then
15505   enableval="$enable_hard_tabs"
15506
15507 else
15508   enable_hard_tabs=$with_develop
15509 fi;
15510 echo "$as_me:15510: result: $enable_hard_tabs" >&5
15511 echo "${ECHO_T}$enable_hard_tabs" >&6
15512 test "x$enable_hard_tabs" = xyes &&
15513 cat >>confdefs.h <<\EOF
15514 #define USE_HARD_TABS 1
15515 EOF
15516
15517 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15518 echo "$as_me:15518: checking if you want limited support for xmc" >&5
15519 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15520
15521 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15522 if test "${enable_xmc_glitch+set}" = set; then
15523   enableval="$enable_xmc_glitch"
15524
15525 else
15526   enable_xmc_glitch=$with_develop
15527 fi;
15528 echo "$as_me:15528: result: $enable_xmc_glitch" >&5
15529 echo "${ECHO_T}$enable_xmc_glitch" >&6
15530 test "x$enable_xmc_glitch" = xyes &&
15531 cat >>confdefs.h <<\EOF
15532 #define USE_XMC_SUPPORT 1
15533 EOF
15534
15535 ###############################################################################
15536 # These are just experimental, probably should not be in a package:
15537
15538 echo "$as_me:15538: checking if you do not want to assume colors are white-on-black" >&5
15539 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15540
15541 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15542 if test "${enable_assumed_color+set}" = set; then
15543   enableval="$enable_assumed_color"
15544   with_assumed_color=$enableval
15545 else
15546   with_assumed_color=yes
15547 fi;
15548 echo "$as_me:15548: result: $with_assumed_color" >&5
15549 echo "${ECHO_T}$with_assumed_color" >&6
15550 test "x$with_assumed_color" = xyes &&
15551 cat >>confdefs.h <<\EOF
15552 #define USE_ASSUMED_COLOR 1
15553 EOF
15554
15555 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15556 echo "$as_me:15556: checking if you want hashmap scrolling-optimization code" >&5
15557 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15558
15559 # Check whether --enable-hashmap or --disable-hashmap was given.
15560 if test "${enable_hashmap+set}" = set; then
15561   enableval="$enable_hashmap"
15562   with_hashmap=$enableval
15563 else
15564   with_hashmap=yes
15565 fi;
15566 echo "$as_me:15566: result: $with_hashmap" >&5
15567 echo "${ECHO_T}$with_hashmap" >&6
15568 test "x$with_hashmap" = xyes &&
15569 cat >>confdefs.h <<\EOF
15570 #define USE_HASHMAP 1
15571 EOF
15572
15573 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15574 echo "$as_me:15574: checking if you want colorfgbg code" >&5
15575 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15576
15577 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15578 if test "${enable_colorfgbg+set}" = set; then
15579   enableval="$enable_colorfgbg"
15580   with_colorfgbg=$enableval
15581 else
15582   with_colorfgbg=no
15583 fi;
15584 echo "$as_me:15584: result: $with_colorfgbg" >&5
15585 echo "${ECHO_T}$with_colorfgbg" >&6
15586 test "x$with_colorfgbg" = xyes &&
15587 cat >>confdefs.h <<\EOF
15588 #define USE_COLORFGBG 1
15589 EOF
15590
15591 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15592 echo "$as_me:15592: checking if you want to use gcc -fvisibility option" >&5
15593 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15594
15595 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15596 if test "${enable_fvisibility+set}" = set; then
15597   enableval="$enable_fvisibility"
15598   cf_with_fvisibility=$enableval
15599 else
15600   cf_with_fvisibility=no
15601 fi;
15602 echo "$as_me:15602: result: $cf_with_fvisibility" >&5
15603 echo "${ECHO_T}$cf_with_fvisibility" >&6
15604
15605 NCURSES_IMPEXP=
15606 NCURSES_CXX_IMPEXP=
15607 if test "x$cf_with_fvisibility" = xyes; then
15608
15609 echo "$as_me:15609: checking if $CC -fvisibility=hidden option works" >&5
15610 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15611 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15612   echo $ECHO_N "(cached) $ECHO_C" >&6
15613 else
15614
15615     cf_save_cflags="$CFLAGS"
15616     CFLAGS="$CFLAGS -fvisibility=hidden"
15617     cat >conftest.$ac_ext <<_ACEOF
15618 #line 15618 "configure"
15619 #include "confdefs.h"
15620
15621 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15622
15623 int
15624 main (void)
15625 {
15626
15627         if (somefunc()) return 1;
15628
15629   ;
15630   return 0;
15631 }
15632 _ACEOF
15633 rm -f conftest.$ac_objext conftest$ac_exeext
15634 if { (eval echo "$as_me:15634: \"$ac_link\"") >&5
15635   (eval $ac_link) 2>&5
15636   ac_status=$?
15637   echo "$as_me:15637: \$? = $ac_status" >&5
15638   (exit $ac_status); } &&
15639          { ac_try='test -s conftest$ac_exeext'
15640   { (eval echo "$as_me:15640: \"$ac_try\"") >&5
15641   (eval $ac_try) 2>&5
15642   ac_status=$?
15643   echo "$as_me:15643: \$? = $ac_status" >&5
15644   (exit $ac_status); }; }; then
15645   cf_cv_fvisibility_hidden=yes
15646 else
15647   echo "$as_me: failed program was:" >&5
15648 cat conftest.$ac_ext >&5
15649 cf_cv_fvisibility_hidden=no
15650 fi
15651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15652     CFLAGS=$cf_save_cflags
15653
15654 fi
15655 echo "$as_me:15655: result: $cf_cv_fvisibility_hidden" >&5
15656 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15657
15658         if test "x$cf_cv_fvisibility_hidden" = xyes
15659         then
15660
15661 cf_fix_cppflags=no
15662 cf_new_cflags=
15663 cf_new_cppflags=
15664 cf_new_extra_cppflags=
15665
15666 for cf_add_cflags in -fvisibility=hidden
15667 do
15668 case $cf_fix_cppflags in
15669 (no)
15670         case $cf_add_cflags in
15671         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15672                 case $cf_add_cflags in
15673                 (-D*)
15674                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15675
15676                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15677                                 && test -z "${cf_tst_cflags}" \
15678                                 && cf_fix_cppflags=yes
15679
15680                         if test $cf_fix_cppflags = yes ; then
15681
15682         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15683         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15684
15685                                 continue
15686                         elif test "${cf_tst_cflags}" = "\"'" ; then
15687
15688         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15689         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15690
15691                                 continue
15692                         fi
15693                         ;;
15694                 esac
15695                 case "$CPPFLAGS" in
15696                 (*$cf_add_cflags)
15697                         ;;
15698                 (*)
15699                         case $cf_add_cflags in
15700                         (-D*)
15701                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15702
15703 CPPFLAGS=`echo "$CPPFLAGS" | \
15704         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15705                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15706
15707                                 ;;
15708                         esac
15709
15710         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15711         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15712
15713                         ;;
15714                 esac
15715                 ;;
15716         (*)
15717
15718         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15719         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15720
15721                 ;;
15722         esac
15723         ;;
15724 (yes)
15725
15726         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15727         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15728
15729         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15730
15731         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15732                 && test -z "${cf_tst_cflags}" \
15733                 && cf_fix_cppflags=no
15734         ;;
15735 esac
15736 done
15737
15738 if test -n "$cf_new_cflags" ; then
15739
15740         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15741         CFLAGS="${CFLAGS}$cf_new_cflags"
15742
15743 fi
15744
15745 if test -n "$cf_new_cppflags" ; then
15746
15747         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15748         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15749
15750 fi
15751
15752 if test -n "$cf_new_extra_cppflags" ; then
15753
15754         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15755         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15756
15757 fi
15758
15759                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15760         fi
15761         if test -n "$CXX"
15762         then
15763                 ac_ext=cc
15764 ac_cpp='$CXXCPP $CPPFLAGS'
15765 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15766 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15767 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15768 ac_main_return=return
15769
15770 echo "$as_me:15770: checking if $CXX -fvisibility=hidden option works" >&5
15771 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15772 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15773   echo $ECHO_N "(cached) $ECHO_C" >&6
15774 else
15775
15776     cf_save_cflags="$CXXFLAGS"
15777     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15778     cat >conftest.$ac_ext <<_ACEOF
15779 #line 15779 "configure"
15780 #include "confdefs.h"
15781
15782 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15783
15784 int
15785 main (void)
15786 {
15787
15788         if (somefunc()) return 1;
15789
15790   ;
15791   return 0;
15792 }
15793 _ACEOF
15794 rm -f conftest.$ac_objext conftest$ac_exeext
15795 if { (eval echo "$as_me:15795: \"$ac_link\"") >&5
15796   (eval $ac_link) 2>&5
15797   ac_status=$?
15798   echo "$as_me:15798: \$? = $ac_status" >&5
15799   (exit $ac_status); } &&
15800          { ac_try='test -s conftest$ac_exeext'
15801   { (eval echo "$as_me:15801: \"$ac_try\"") >&5
15802   (eval $ac_try) 2>&5
15803   ac_status=$?
15804   echo "$as_me:15804: \$? = $ac_status" >&5
15805   (exit $ac_status); }; }; then
15806   cf_cv_fvisibility_hidden2=yes
15807 else
15808   echo "$as_me: failed program was:" >&5
15809 cat conftest.$ac_ext >&5
15810 cf_cv_fvisibility_hidden2=no
15811 fi
15812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15813     CXXFLAGS=$cf_save_cflags
15814
15815 fi
15816 echo "$as_me:15816: result: $cf_cv_fvisibility_hidden2" >&5
15817 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15818
15819                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15820                 then
15821
15822 cf_save_CXXFLAGS="$CFLAGS"
15823 CFLAGS="$CXXFLAGS"
15824
15825 cf_fix_cppflags=no
15826 cf_new_cflags=
15827 cf_new_cppflags=
15828 cf_new_extra_cppflags=
15829
15830 for cf_add_cflags in -fvisibility=hidden
15831 do
15832 case $cf_fix_cppflags in
15833 (no)
15834         case $cf_add_cflags in
15835         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15836                 case $cf_add_cflags in
15837                 (-D*)
15838                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15839
15840                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15841                                 && test -z "${cf_tst_cflags}" \
15842                                 && cf_fix_cppflags=yes
15843
15844                         if test $cf_fix_cppflags = yes ; then
15845
15846         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15847         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15848
15849                                 continue
15850                         elif test "${cf_tst_cflags}" = "\"'" ; then
15851
15852         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15853         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15854
15855                                 continue
15856                         fi
15857                         ;;
15858                 esac
15859                 case "$CPPFLAGS" in
15860                 (*$cf_add_cflags)
15861                         ;;
15862                 (*)
15863                         case $cf_add_cflags in
15864                         (-D*)
15865                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15866
15867 CPPFLAGS=`echo "$CPPFLAGS" | \
15868         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15869                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15870
15871                                 ;;
15872                         esac
15873
15874         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15875         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15876
15877                         ;;
15878                 esac
15879                 ;;
15880         (*)
15881
15882         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15883         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15884
15885                 ;;
15886         esac
15887         ;;
15888 (yes)
15889
15890         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15891         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15892
15893         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15894
15895         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15896                 && test -z "${cf_tst_cflags}" \
15897                 && cf_fix_cppflags=no
15898         ;;
15899 esac
15900 done
15901
15902 if test -n "$cf_new_cflags" ; then
15903
15904         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15905         CFLAGS="${CFLAGS}$cf_new_cflags"
15906
15907 fi
15908
15909 if test -n "$cf_new_cppflags" ; then
15910
15911         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15912         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15913
15914 fi
15915
15916 if test -n "$cf_new_extra_cppflags" ; then
15917
15918         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15919         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15920
15921 fi
15922
15923 CXXFLAGS="$CFLAGS"
15924 CFLAGS="$cf_save_CXXFLAGS"
15925
15926                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15927                 fi
15928                 ac_ext=c
15929 ac_cpp='$CPP $CPPFLAGS'
15930 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15931 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15932 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15933 ac_main_return=return
15934
15935         fi
15936 fi
15937
15938 ###   use option --enable-interop to turn on use of bindings used for interop
15939 echo "$as_me:15939: checking if you want interop bindings" >&5
15940 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15941
15942 # Check whether --enable-interop or --disable-interop was given.
15943 if test "${enable_interop+set}" = set; then
15944   enableval="$enable_interop"
15945   with_exp_interop=$enableval
15946 else
15947   with_exp_interop=$cf_dft_interop
15948 fi;
15949 echo "$as_me:15949: result: $with_exp_interop" >&5
15950 echo "${ECHO_T}$with_exp_interop" >&6
15951
15952 NCURSES_INTEROP_FUNCS=0
15953 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15954
15955 echo "$as_me:15955: checking if you want experimental safe-sprintf code" >&5
15956 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15957
15958 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15959 if test "${enable_safe_sprintf+set}" = set; then
15960   enableval="$enable_safe_sprintf"
15961   with_safe_sprintf=$enableval
15962 else
15963   with_safe_sprintf=no
15964 fi;
15965 echo "$as_me:15965: result: $with_safe_sprintf" >&5
15966 echo "${ECHO_T}$with_safe_sprintf" >&6
15967
15968 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15969 # when hashmap is used scroll hints are useless
15970 if test "$with_hashmap" = no ; then
15971 echo "$as_me:15971: checking if you want to experiment without scrolling-hints code" >&5
15972 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15973
15974 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15975 if test "${enable_scroll_hints+set}" = set; then
15976   enableval="$enable_scroll_hints"
15977   with_scroll_hints=$enableval
15978 else
15979   with_scroll_hints=yes
15980 fi;
15981 echo "$as_me:15981: result: $with_scroll_hints" >&5
15982 echo "${ECHO_T}$with_scroll_hints" >&6
15983 test "x$with_scroll_hints" = xyes &&
15984 cat >>confdefs.h <<\EOF
15985 #define USE_SCROLL_HINTS 1
15986 EOF
15987
15988 fi
15989
15990 echo "$as_me:15990: checking if you want wgetch-events code" >&5
15991 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15992
15993 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15994 if test "${enable_wgetch_events+set}" = set; then
15995   enableval="$enable_wgetch_events"
15996   with_wgetch_events=$enableval
15997 else
15998   with_wgetch_events=no
15999 fi;
16000 echo "$as_me:16000: result: $with_wgetch_events" >&5
16001 echo "${ECHO_T}$with_wgetch_events" >&6
16002 if test "x$with_wgetch_events" = xyes ; then
16003
16004 cat >>confdefs.h <<\EOF
16005 #define NCURSES_WGETCH_EVENTS 1
16006 EOF
16007
16008         NCURSES_WGETCH_EVENTS=1
16009 else
16010         NCURSES_WGETCH_EVENTS=0
16011 fi
16012
16013 case $cf_cv_system_name in
16014 (*mingw32*|*mingw64*|*-msvc*)
16015         echo "$as_me:16015: checking if you want experimental-Windows driver" >&5
16016 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16017
16018 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16019 if test "${enable_exp_win32+set}" = set; then
16020   enableval="$enable_exp_win32"
16021   with_exp_win32=$enableval
16022 else
16023   with_exp_win32=no
16024 fi;
16025         echo "$as_me:16025: result: $with_exp_win32" >&5
16026 echo "${ECHO_T}$with_exp_win32" >&6
16027         if test "x$with_exp_win32" = xyes
16028         then
16029
16030 cat >>confdefs.h <<\EOF
16031 #define EXP_WIN32_DRIVER 1
16032 EOF
16033
16034                 EXP_WIN32_DRIVER=1
16035                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16036         else
16037                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16038                 EXP_WIN32_DRIVER=0
16039         fi
16040         ;;
16041 (*)
16042         EXP_WIN32_DRIVER=0
16043         INTERNALS_HDR=
16044         ;;
16045 esac
16046
16047 ###############################################################################
16048
16049 ###     use option --disable-echo to suppress full display compiling commands
16050
16051 echo "$as_me:16051: checking if you want to see long compiling messages" >&5
16052 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16053
16054 # Check whether --enable-echo or --disable-echo was given.
16055 if test "${enable_echo+set}" = set; then
16056   enableval="$enable_echo"
16057   test "$enableval" != no && enableval=yes
16058         if test "$enableval" != "yes" ; then
16059
16060         ECHO_LT='--silent'
16061         ECHO_LD='@echo linking $@;'
16062         RULE_CC='@echo compiling $<'
16063         SHOW_CC='@echo compiling $@'
16064         ECHO_CC='@'
16065
16066         else
16067
16068         ECHO_LT=''
16069         ECHO_LD=''
16070         RULE_CC=''
16071         SHOW_CC=''
16072         ECHO_CC=''
16073
16074         fi
16075 else
16076   enableval=yes
16077
16078         ECHO_LT=''
16079         ECHO_LD=''
16080         RULE_CC=''
16081         SHOW_CC=''
16082         ECHO_CC=''
16083
16084 fi;
16085 echo "$as_me:16085: result: $enableval" >&5
16086 echo "${ECHO_T}$enableval" >&6
16087
16088 if test "x$enable_echo" = xyes; then
16089         ECHO_LINK=
16090 else
16091         ECHO_LINK='@ echo linking $@ ... ;'
16092         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16093         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16094 fi
16095
16096 # --disable-stripping is used for debugging
16097
16098 echo "$as_me:16098: checking if you want to install stripped executables" >&5
16099 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16100
16101 # Check whether --enable-stripping or --disable-stripping was given.
16102 if test "${enable_stripping+set}" = set; then
16103   enableval="$enable_stripping"
16104   test "$enableval" != no && enableval=yes
16105         if test "$enableval" != "yes" ; then
16106     with_stripping=no
16107         else
16108                 with_stripping=yes
16109         fi
16110 else
16111   enableval=yes
16112         with_stripping=yes
16113
16114 fi;
16115 echo "$as_me:16115: result: $with_stripping" >&5
16116 echo "${ECHO_T}$with_stripping" >&6
16117
16118 if test "$with_stripping" = yes
16119 then
16120         INSTALL_OPT_S="-s"
16121 else
16122         INSTALL_OPT_S=
16123 fi
16124
16125 : ${INSTALL:=install}
16126 echo "$as_me:16126: checking if install accepts -p option" >&5
16127 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16128 if test "${cf_cv_install_p+set}" = set; then
16129   echo $ECHO_N "(cached) $ECHO_C" >&6
16130 else
16131
16132         rm -rf conftest*
16133         date >conftest.in
16134         mkdir conftest.out
16135         sleep 3
16136         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16137         then
16138                 if test -f conftest.out/conftest.in
16139                 then
16140                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16141                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16142                         if test -s conftest.err
16143                         then
16144                                 cf_cv_install_p=no
16145                         else
16146                                 cf_cv_install_p=yes
16147                         fi
16148                 else
16149                         cf_cv_install_p=no
16150                 fi
16151         else
16152                 cf_cv_install_p=no
16153         fi
16154         rm -rf conftest*
16155
16156 fi
16157 echo "$as_me:16157: result: $cf_cv_install_p" >&5
16158 echo "${ECHO_T}$cf_cv_install_p" >&6
16159
16160 echo "$as_me:16160: checking if install needs to be told about ownership" >&5
16161 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16162 case `$ac_config_guess` in
16163 (*minix)
16164         with_install_o=yes
16165         ;;
16166 (*)
16167         with_install_o=no
16168         ;;
16169 esac
16170
16171 echo "$as_me:16171: result: $with_install_o" >&5
16172 echo "${ECHO_T}$with_install_o" >&6
16173 if test "x$with_install_o" = xyes
16174 then
16175         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'`
16176 else
16177         INSTALL_OPT_O=
16178 fi
16179
16180 # If we're avoiding relinking of shared libraries during install, that is to
16181 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16182 # the install program has "-p" (for preserving timestamps).
16183 cf_cv_do_reranlib=yes
16184 if test "x$cf_cv_install_p" = xyes
16185 then
16186         if test "x$cf_cv_do_relink" != xyes
16187         then
16188                 cf_cv_do_reranlib=no
16189                 INSTALL_OPT_P="-p"
16190                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16191         fi
16192 fi
16193
16194 ###     use option --enable-warnings to turn on all gcc warnings
16195
16196 if ( test "$GCC" = yes || test "$GXX" = yes )
16197 then
16198
16199 if ( test "$GCC" = yes || test "$GXX" = yes )
16200 then
16201         case $CFLAGS in
16202         (*-Werror=*)
16203                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16204
16205 echo "${as_me:-configure}:16205: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16206
16207                 cf_temp_flags=
16208                 for cf_temp_scan in $CFLAGS
16209                 do
16210                         case "x$cf_temp_scan" in
16211                         (x-Werror=*)
16212
16213         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16214         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16215
16216                                 ;;
16217                         (*)
16218
16219         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16220         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16221
16222                                 ;;
16223                         esac
16224                 done
16225                 CFLAGS="$cf_temp_flags"
16226                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16227
16228 echo "${as_me:-configure}:16228: testing ... fixed $CFLAGS ..." 1>&5
16229
16230                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16231
16232 echo "${as_me:-configure}:16232: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16233
16234                 ;;
16235         esac
16236 fi
16237
16238 if ( test "$GCC" = yes || test "$GXX" = yes )
16239 then
16240         case $CPPFLAGS in
16241         (*-Werror=*)
16242                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16243
16244 echo "${as_me:-configure}:16244: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16245
16246                 cf_temp_flags=
16247                 for cf_temp_scan in $CPPFLAGS
16248                 do
16249                         case "x$cf_temp_scan" in
16250                         (x-Werror=*)
16251
16252         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16253         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16254
16255                                 ;;
16256                         (*)
16257
16258         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16259         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16260
16261                                 ;;
16262                         esac
16263                 done
16264                 CPPFLAGS="$cf_temp_flags"
16265                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16266
16267 echo "${as_me:-configure}:16267: testing ... fixed $CPPFLAGS ..." 1>&5
16268
16269                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16270
16271 echo "${as_me:-configure}:16271: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16272
16273                 ;;
16274         esac
16275 fi
16276
16277 if ( test "$GCC" = yes || test "$GXX" = yes )
16278 then
16279         case $LDFLAGS in
16280         (*-Werror=*)
16281                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16282
16283 echo "${as_me:-configure}:16283: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16284
16285                 cf_temp_flags=
16286                 for cf_temp_scan in $LDFLAGS
16287                 do
16288                         case "x$cf_temp_scan" in
16289                         (x-Werror=*)
16290
16291         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16292         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16293
16294                                 ;;
16295                         (*)
16296
16297         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16298         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16299
16300                                 ;;
16301                         esac
16302                 done
16303                 LDFLAGS="$cf_temp_flags"
16304                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16305
16306 echo "${as_me:-configure}:16306: testing ... fixed $LDFLAGS ..." 1>&5
16307
16308                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16309
16310 echo "${as_me:-configure}:16310: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16311
16312                 ;;
16313         esac
16314 fi
16315
16316 echo "$as_me:16316: checking if you want to turn on gcc warnings" >&5
16317 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16318
16319 # Check whether --enable-warnings or --disable-warnings was given.
16320 if test "${enable_warnings+set}" = set; then
16321   enableval="$enable_warnings"
16322   test "$enableval" != yes && enableval=no
16323         if test "$enableval" != "no" ; then
16324     with_warnings=yes
16325         else
16326                 with_warnings=no
16327         fi
16328 else
16329   enableval=no
16330         with_warnings=no
16331
16332 fi;
16333 echo "$as_me:16333: result: $with_warnings" >&5
16334 echo "${ECHO_T}$with_warnings" >&6
16335 if test "$with_warnings" = "yes"
16336 then
16337
16338 if test "x$have_x" = xyes; then
16339
16340 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16341 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16342 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16343 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16344 for cf_X_CFLAGS in $X_CFLAGS
16345 do
16346         case "x$cf_X_CFLAGS" in
16347         x-[IUD]*)
16348                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16349                 ;;
16350         *)
16351                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16352                 ;;
16353         esac
16354 done
16355
16356 cat >conftest.$ac_ext <<_ACEOF
16357 #line 16357 "configure"
16358 #include "confdefs.h"
16359
16360 #include <stdlib.h>
16361 #include <X11/Intrinsic.h>
16362
16363 int
16364 main (void)
16365 {
16366 String foo = malloc(1); (void)foo
16367   ;
16368   return 0;
16369 }
16370 _ACEOF
16371 rm -f conftest.$ac_objext
16372 if { (eval echo "$as_me:16372: \"$ac_compile\"") >&5
16373   (eval $ac_compile) 2>&5
16374   ac_status=$?
16375   echo "$as_me:16375: \$? = $ac_status" >&5
16376   (exit $ac_status); } &&
16377          { ac_try='test -s conftest.$ac_objext'
16378   { (eval echo "$as_me:16378: \"$ac_try\"") >&5
16379   (eval $ac_try) 2>&5
16380   ac_status=$?
16381   echo "$as_me:16381: \$? = $ac_status" >&5
16382   (exit $ac_status); }; }; then
16383
16384 echo "$as_me:16384: checking for X11/Xt const-feature" >&5
16385 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16386 if test "${cf_cv_const_x_string+set}" = set; then
16387   echo $ECHO_N "(cached) $ECHO_C" >&6
16388 else
16389
16390         cat >conftest.$ac_ext <<_ACEOF
16391 #line 16391 "configure"
16392 #include "confdefs.h"
16393
16394 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16395 #undef  XTSTRINGDEFINES /* X11R5 and later */
16396 #include <stdlib.h>
16397 #include <X11/Intrinsic.h>
16398
16399 int
16400 main (void)
16401 {
16402 String foo = malloc(1); *foo = 0
16403   ;
16404   return 0;
16405 }
16406 _ACEOF
16407 rm -f conftest.$ac_objext
16408 if { (eval echo "$as_me:16408: \"$ac_compile\"") >&5
16409   (eval $ac_compile) 2>&5
16410   ac_status=$?
16411   echo "$as_me:16411: \$? = $ac_status" >&5
16412   (exit $ac_status); } &&
16413          { ac_try='test -s conftest.$ac_objext'
16414   { (eval echo "$as_me:16414: \"$ac_try\"") >&5
16415   (eval $ac_try) 2>&5
16416   ac_status=$?
16417   echo "$as_me:16417: \$? = $ac_status" >&5
16418   (exit $ac_status); }; }; then
16419
16420                         cf_cv_const_x_string=no
16421
16422 else
16423   echo "$as_me: failed program was:" >&5
16424 cat conftest.$ac_ext >&5
16425
16426                         cf_cv_const_x_string=yes
16427
16428 fi
16429 rm -f conftest.$ac_objext conftest.$ac_ext
16430
16431 fi
16432 echo "$as_me:16432: result: $cf_cv_const_x_string" >&5
16433 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16434
16435 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16436 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16437 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16438
16439 case $cf_cv_const_x_string in
16440 (no)
16441
16442         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16443         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16444
16445         ;;
16446 (*)
16447
16448         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16449         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16450
16451         ;;
16452 esac
16453
16454 else
16455   echo "$as_me: failed program was:" >&5
16456 cat conftest.$ac_ext >&5
16457 fi
16458 rm -f conftest.$ac_objext conftest.$ac_ext
16459  fi
16460 cat > conftest.$ac_ext <<EOF
16461 #line 16461 "${as_me:-configure}"
16462 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16463 EOF
16464 if test "$INTEL_COMPILER" = yes
16465 then
16466 # The "-wdXXX" options suppress warnings:
16467 # remark #1419: external declaration in primary source file
16468 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16469 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16470 # remark #193: zero used for undefined preprocessing identifier
16471 # remark #593: variable "curs_sb_left_arrow" was set but never used
16472 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16473 # remark #869: parameter "tw" was never referenced
16474 # remark #981: operands are evaluated in unspecified order
16475 # warning #279: controlling expression is constant
16476
16477         { echo "$as_me:16477: checking for $CC warning options..." >&5
16478 echo "$as_me: checking for $CC warning options..." >&6;}
16479         cf_save_CFLAGS="$CFLAGS"
16480         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16481         for cf_opt in \
16482                 wd1419 \
16483                 wd1683 \
16484                 wd1684 \
16485                 wd193 \
16486                 wd593 \
16487                 wd279 \
16488                 wd810 \
16489                 wd869 \
16490                 wd981
16491         do
16492                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16493                 if { (eval echo "$as_me:16493: \"$ac_compile\"") >&5
16494   (eval $ac_compile) 2>&5
16495   ac_status=$?
16496   echo "$as_me:16496: \$? = $ac_status" >&5
16497   (exit $ac_status); }; then
16498                         test -n "$verbose" && echo "$as_me:16498: result: ... -$cf_opt" >&5
16499 echo "${ECHO_T}... -$cf_opt" >&6
16500                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16501                 fi
16502         done
16503         CFLAGS="$cf_save_CFLAGS"
16504 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16505 then
16506         { echo "$as_me:16506: checking for $CC warning options..." >&5
16507 echo "$as_me: checking for $CC warning options..." >&6;}
16508         cf_save_CFLAGS="$CFLAGS"
16509         cf_warn_CONST=""
16510         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16511         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16512         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16513         for cf_opt in W Wall \
16514                 Wbad-function-cast \
16515                 Wcast-align \
16516                 Wcast-qual \
16517                 Wdeclaration-after-statement \
16518                 Wextra \
16519                 Winline \
16520                 Wmissing-declarations \
16521                 Wmissing-prototypes \
16522                 Wnested-externs \
16523                 Wpointer-arith \
16524                 Wshadow \
16525                 Wstrict-prototypes \
16526                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16527         do
16528                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16529                 if { (eval echo "$as_me:16529: \"$ac_compile\"") >&5
16530   (eval $ac_compile) 2>&5
16531   ac_status=$?
16532   echo "$as_me:16532: \$? = $ac_status" >&5
16533   (exit $ac_status); }; then
16534                         test -n "$verbose" && echo "$as_me:16534: result: ... -$cf_opt" >&5
16535 echo "${ECHO_T}... -$cf_opt" >&6
16536                         case $cf_opt in
16537                         (Winline)
16538                                 case $GCC_VERSION in
16539                                 ([34].*)
16540                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16541
16542 echo "${as_me:-configure}:16542: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16543
16544                                         continue;;
16545                                 esac
16546                                 ;;
16547                         (Wpointer-arith)
16548                                 case $GCC_VERSION in
16549                                 ([12].*)
16550                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16551
16552 echo "${as_me:-configure}:16552: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16553
16554                                         continue;;
16555                                 esac
16556                                 ;;
16557                         esac
16558                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16559                 fi
16560         done
16561         CFLAGS="$cf_save_CFLAGS"
16562 fi
16563 rm -rf conftest*
16564
16565 fi
16566
16567 if ( test "$GCC" = yes || test "$GXX" = yes )
16568 then
16569 cat > conftest.i <<EOF
16570 #ifndef GCC_PRINTF
16571 #define GCC_PRINTF 0
16572 #endif
16573 #ifndef GCC_SCANF
16574 #define GCC_SCANF 0
16575 #endif
16576 #ifndef GCC_NORETURN
16577 #define GCC_NORETURN /* nothing */
16578 #endif
16579 #ifndef GCC_UNUSED
16580 #define GCC_UNUSED /* nothing */
16581 #endif
16582 EOF
16583 if test "$GCC" = yes
16584 then
16585         { echo "$as_me:16585: checking for $CC __attribute__ directives..." >&5
16586 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16587 cat > conftest.$ac_ext <<EOF
16588 #line 16588 "${as_me:-configure}"
16589 #include "confdefs.h"
16590 #include "conftest.h"
16591 #include "conftest.i"
16592 #if     GCC_PRINTF
16593 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16594 #else
16595 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16596 #endif
16597 #if     GCC_SCANF
16598 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16599 #else
16600 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16601 #endif
16602 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16603 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16604 extern void foo(void) GCC_NORETURN;
16605 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16606 EOF
16607         cf_printf_attribute=no
16608         cf_scanf_attribute=no
16609         for cf_attribute in scanf printf unused noreturn
16610         do
16611
16612 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16613
16614                 cf_directive="__attribute__(($cf_attribute))"
16615                 echo "checking for $CC $cf_directive" 1>&5
16616
16617                 case $cf_attribute in
16618                 (printf)
16619                         cf_printf_attribute=yes
16620                         cat >conftest.h <<EOF
16621 #define GCC_$cf_ATTRIBUTE 1
16622 EOF
16623                         ;;
16624                 (scanf)
16625                         cf_scanf_attribute=yes
16626                         cat >conftest.h <<EOF
16627 #define GCC_$cf_ATTRIBUTE 1
16628 EOF
16629                         ;;
16630                 (*)
16631                         cat >conftest.h <<EOF
16632 #define GCC_$cf_ATTRIBUTE $cf_directive
16633 EOF
16634                         ;;
16635                 esac
16636
16637                 if { (eval echo "$as_me:16637: \"$ac_compile\"") >&5
16638   (eval $ac_compile) 2>&5
16639   ac_status=$?
16640   echo "$as_me:16640: \$? = $ac_status" >&5
16641   (exit $ac_status); }; then
16642                         test -n "$verbose" && echo "$as_me:16642: result: ... $cf_attribute" >&5
16643 echo "${ECHO_T}... $cf_attribute" >&6
16644                         cat conftest.h >>confdefs.h
16645                         case $cf_attribute in
16646                         (noreturn)
16647
16648 cat >>confdefs.h <<EOF
16649 #define GCC_NORETURN $cf_directive
16650 EOF
16651
16652                                 ;;
16653                         (printf)
16654                                 cf_value='/* nothing */'
16655                                 if test "$cf_printf_attribute" != no ; then
16656                                         cf_value='__attribute__((format(printf,fmt,var)))'
16657
16658 cat >>confdefs.h <<\EOF
16659 #define GCC_PRINTF 1
16660 EOF
16661
16662                                 fi
16663
16664 cat >>confdefs.h <<EOF
16665 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16666 EOF
16667
16668                                 ;;
16669                         (scanf)
16670                                 cf_value='/* nothing */'
16671                                 if test "$cf_scanf_attribute" != no ; then
16672                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16673
16674 cat >>confdefs.h <<\EOF
16675 #define GCC_SCANF 1
16676 EOF
16677
16678                                 fi
16679
16680 cat >>confdefs.h <<EOF
16681 #define GCC_SCANFLIKE(fmt,var) $cf_value
16682 EOF
16683
16684                                 ;;
16685                         (unused)
16686
16687 cat >>confdefs.h <<EOF
16688 #define GCC_UNUSED $cf_directive
16689 EOF
16690
16691                                 ;;
16692                         esac
16693                 fi
16694         done
16695 else
16696         fgrep define conftest.i >>confdefs.h
16697 fi
16698 rm -rf conftest*
16699 fi
16700
16701 fi
16702
16703 if test "x$with_warnings" = "xyes"; then
16704
16705         ADAFLAGS="$ADAFLAGS -gnatg"
16706
16707         if test "x$cf_with_cxx" = xyes ; then
16708
16709 INTEL_CPLUSPLUS=no
16710
16711 if test "$GCC" = yes ; then
16712         case $host_os in
16713         (linux*|gnu*)
16714                 echo "$as_me:16714: checking if this is really Intel C++ compiler" >&5
16715 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16716                 cf_save_CFLAGS="$CXXFLAGS"
16717                 CXXFLAGS="$CXXFLAGS -no-gcc"
16718                 cat >conftest.$ac_ext <<_ACEOF
16719 #line 16719 "configure"
16720 #include "confdefs.h"
16721
16722 int
16723 main (void)
16724 {
16725
16726 #ifdef __INTEL_COMPILER
16727 #else
16728 make an error
16729 #endif
16730
16731   ;
16732   return 0;
16733 }
16734 _ACEOF
16735 rm -f conftest.$ac_objext
16736 if { (eval echo "$as_me:16736: \"$ac_compile\"") >&5
16737   (eval $ac_compile) 2>&5
16738   ac_status=$?
16739   echo "$as_me:16739: \$? = $ac_status" >&5
16740   (exit $ac_status); } &&
16741          { ac_try='test -s conftest.$ac_objext'
16742   { (eval echo "$as_me:16742: \"$ac_try\"") >&5
16743   (eval $ac_try) 2>&5
16744   ac_status=$?
16745   echo "$as_me:16745: \$? = $ac_status" >&5
16746   (exit $ac_status); }; }; then
16747   INTEL_CPLUSPLUS=yes
16748 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16749
16750 else
16751   echo "$as_me: failed program was:" >&5
16752 cat conftest.$ac_ext >&5
16753 fi
16754 rm -f conftest.$ac_objext conftest.$ac_ext
16755                 CXXFLAGS="$cf_save_CFLAGS"
16756                 echo "$as_me:16756: result: $INTEL_CPLUSPLUS" >&5
16757 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16758                 ;;
16759         esac
16760 fi
16761
16762 CLANG_CPLUSPLUS=no
16763
16764 if test "$GCC" = yes ; then
16765         echo "$as_me:16765: checking if this is really Clang C++ compiler" >&5
16766 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16767         cf_save_CFLAGS="$CXXFLAGS"
16768         cat >conftest.$ac_ext <<_ACEOF
16769 #line 16769 "configure"
16770 #include "confdefs.h"
16771
16772 int
16773 main (void)
16774 {
16775
16776 #ifdef __clang__
16777 #else
16778 make an error
16779 #endif
16780
16781   ;
16782   return 0;
16783 }
16784 _ACEOF
16785 rm -f conftest.$ac_objext
16786 if { (eval echo "$as_me:16786: \"$ac_compile\"") >&5
16787   (eval $ac_compile) 2>&5
16788   ac_status=$?
16789   echo "$as_me:16789: \$? = $ac_status" >&5
16790   (exit $ac_status); } &&
16791          { ac_try='test -s conftest.$ac_objext'
16792   { (eval echo "$as_me:16792: \"$ac_try\"") >&5
16793   (eval $ac_try) 2>&5
16794   ac_status=$?
16795   echo "$as_me:16795: \$? = $ac_status" >&5
16796   (exit $ac_status); }; }; then
16797   CLANG_CPLUSPLUS=yes
16798
16799 else
16800   echo "$as_me: failed program was:" >&5
16801 cat conftest.$ac_ext >&5
16802 fi
16803 rm -f conftest.$ac_objext conftest.$ac_ext
16804         CXXFLAGS="$cf_save_CFLAGS"
16805         echo "$as_me:16805: result: $CLANG_CPLUSPLUS" >&5
16806 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16807 fi
16808
16809 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16810         for cf_clang_opt in \
16811                 -Qunused-arguments \
16812                 -Wno-error=implicit-function-declaration
16813         do
16814                 echo "$as_me:16814: checking if option $cf_clang_opt works" >&5
16815 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16816                 cat >conftest.$ac_ext <<_ACEOF
16817 #line 16817 "configure"
16818 #include "confdefs.h"
16819
16820                         #include <stdio.h>
16821 int
16822 main (void)
16823 {
16824
16825                         printf("hello!\n");
16826   ;
16827   return 0;
16828 }
16829 _ACEOF
16830 rm -f conftest.$ac_objext conftest$ac_exeext
16831 if { (eval echo "$as_me:16831: \"$ac_link\"") >&5
16832   (eval $ac_link) 2>&5
16833   ac_status=$?
16834   echo "$as_me:16834: \$? = $ac_status" >&5
16835   (exit $ac_status); } &&
16836          { ac_try='test -s conftest$ac_exeext'
16837   { (eval echo "$as_me:16837: \"$ac_try\"") >&5
16838   (eval $ac_try) 2>&5
16839   ac_status=$?
16840   echo "$as_me:16840: \$? = $ac_status" >&5
16841   (exit $ac_status); }; }; then
16842
16843                         cf_clang_optok=yes
16844 else
16845   echo "$as_me: failed program was:" >&5
16846 cat conftest.$ac_ext >&5
16847
16848                         cf_clang_optok=no
16849 fi
16850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16851                 echo "$as_me:16851: result: $cf_clang_optok" >&5
16852 echo "${ECHO_T}$cf_clang_optok" >&6
16853                 if test $cf_clang_optok = yes; then
16854                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
16855
16856 echo "${as_me:-configure}:16856: testing adding option $cf_clang_opt ..." 1>&5
16857
16858         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16859         CFLAGS="${CFLAGS}$cf_clang_opt"
16860
16861                 fi
16862         done
16863 fi
16864
16865 ac_ext=cc
16866 ac_cpp='$CXXCPP $CPPFLAGS'
16867 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16868 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16869 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16870 ac_main_return=return
16871
16872 cat > conftest.$ac_ext <<EOF
16873 #line 16873 "configure"
16874 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16875 EOF
16876
16877 if test "$INTEL_CPLUSPLUS" = yes
16878 then
16879 # The "-wdXXX" options suppress warnings:
16880 # remark #1419: external declaration in primary source file
16881 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16882 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16883 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16884 # remark #193: zero used for undefined preprocessing identifier
16885 # remark #593: variable "curs_sb_left_arrow" was set but never used
16886 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16887 # remark #869: parameter "tw" was never referenced
16888 # remark #981: operands are evaluated in unspecified order
16889 # warning #269: invalid format string conversion
16890
16891         { echo "$as_me:16891: checking for $CC warning options..." >&5
16892 echo "$as_me: checking for $CC warning options..." >&6;}
16893         cf_save_CXXFLAGS="$CXXFLAGS"
16894         EXTRA_CXXFLAGS="-Wall"
16895         for cf_opt in \
16896                 wd1419 \
16897                 wd1682 \
16898                 wd1683 \
16899                 wd1684 \
16900                 wd193 \
16901                 wd279 \
16902                 wd593 \
16903                 wd810 \
16904                 wd869 \
16905                 wd981
16906         do
16907                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16908                 if { (eval echo "$as_me:16908: \"$ac_compile\"") >&5
16909   (eval $ac_compile) 2>&5
16910   ac_status=$?
16911   echo "$as_me:16911: \$? = $ac_status" >&5
16912   (exit $ac_status); }; then
16913                         test -n "$verbose" && echo "$as_me:16913: result: ... -$cf_opt" >&5
16914 echo "${ECHO_T}... -$cf_opt" >&6
16915                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16916                 fi
16917         done
16918         CXXFLAGS="$cf_save_CXXFLAGS"
16919
16920 elif test "$GXX" = yes
16921 then
16922         { echo "$as_me:16922: checking for $CXX warning options..." >&5
16923 echo "$as_me: checking for $CXX warning options..." >&6;}
16924         cf_save_CXXFLAGS="$CXXFLAGS"
16925         EXTRA_CXXFLAGS="-W -Wall"
16926         cf_gxx_extra_warnings=""
16927         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16928         case "$GCC_VERSION" in
16929         ([1-2].*)
16930                 ;;
16931         (*)
16932                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16933                 ;;
16934         esac
16935         for cf_opt in \
16936                 Wabi \
16937                 fabi-version=0 \
16938                 Wextra \
16939                 Wignored-qualifiers \
16940                 Wlogical-op \
16941                 Woverloaded-virtual \
16942                 Wsign-promo \
16943                 Wsynth \
16944                 Wold-style-cast \
16945                 Wcast-align \
16946                 Wcast-qual \
16947                 Wpointer-arith \
16948                 Wshadow \
16949                 Wundef $cf_gxx_extra_warnings Wno-unused
16950         do
16951                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16952                 if { (eval echo "$as_me:16952: \"$ac_compile\"") >&5
16953   (eval $ac_compile) 2>&5
16954   ac_status=$?
16955   echo "$as_me:16955: \$? = $ac_status" >&5
16956   (exit $ac_status); }; then
16957                         test -n "$verbose" && echo "$as_me:16957: result: ... -$cf_opt" >&5
16958 echo "${ECHO_T}... -$cf_opt" >&6
16959                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16960                 else
16961                         test -n "$verbose" && echo "$as_me:16961: result: ... no -$cf_opt" >&5
16962 echo "${ECHO_T}... no -$cf_opt" >&6
16963                 fi
16964         done
16965         CXXFLAGS="$cf_save_CXXFLAGS"
16966 fi
16967
16968 rm -rf conftest*
16969 ac_ext=c
16970 ac_cpp='$CPP $CPPFLAGS'
16971 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16972 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16973 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16974 ac_main_return=return
16975
16976         fi
16977 fi
16978
16979 echo "$as_me:16979: checking if you want to work around bogus compiler/loader warnings" >&5
16980 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16981
16982 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16983 if test "${enable_string_hacks+set}" = set; then
16984   enableval="$enable_string_hacks"
16985   with_string_hacks=$enableval
16986 else
16987   with_string_hacks=no
16988 fi;
16989 echo "$as_me:16989: result: $with_string_hacks" >&5
16990 echo "${ECHO_T}$with_string_hacks" >&6
16991
16992 if test "x$with_string_hacks" = "xyes"; then
16993
16994 cat >>confdefs.h <<\EOF
16995 #define USE_STRING_HACKS 1
16996 EOF
16997
16998         { echo "$as_me:16998: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16999 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17000         echo "$as_me:17000: checking for strlcat" >&5
17001 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17002 if test "${ac_cv_func_strlcat+set}" = set; then
17003   echo $ECHO_N "(cached) $ECHO_C" >&6
17004 else
17005   cat >conftest.$ac_ext <<_ACEOF
17006 #line 17006 "configure"
17007 #include "confdefs.h"
17008 #define strlcat autoconf_temporary
17009 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17010 #undef strlcat
17011
17012 #ifdef __cplusplus
17013 extern "C"
17014 #endif
17015
17016 /* We use char because int might match the return type of a gcc2
17017    builtin and then its argument prototype would still apply.  */
17018 char strlcat (void);
17019
17020 int
17021 main (void)
17022 {
17023
17024 /* The GNU C library defines stubs for functions which it implements
17025     to always fail with ENOSYS.  Some functions are actually named
17026     something starting with __ and the normal name is an alias.  */
17027 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17028 #error found stub for strlcat
17029 #endif
17030
17031         return strlcat ();
17032   ;
17033   return 0;
17034 }
17035 _ACEOF
17036 rm -f conftest.$ac_objext conftest$ac_exeext
17037 if { (eval echo "$as_me:17037: \"$ac_link\"") >&5
17038   (eval $ac_link) 2>&5
17039   ac_status=$?
17040   echo "$as_me:17040: \$? = $ac_status" >&5
17041   (exit $ac_status); } &&
17042          { ac_try='test -s conftest$ac_exeext'
17043   { (eval echo "$as_me:17043: \"$ac_try\"") >&5
17044   (eval $ac_try) 2>&5
17045   ac_status=$?
17046   echo "$as_me:17046: \$? = $ac_status" >&5
17047   (exit $ac_status); }; }; then
17048   ac_cv_func_strlcat=yes
17049 else
17050   echo "$as_me: failed program was:" >&5
17051 cat conftest.$ac_ext >&5
17052 ac_cv_func_strlcat=no
17053 fi
17054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17055 fi
17056 echo "$as_me:17056: result: $ac_cv_func_strlcat" >&5
17057 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17058 if test $ac_cv_func_strlcat = yes; then
17059
17060 cat >>confdefs.h <<\EOF
17061 #define HAVE_STRLCAT 1
17062 EOF
17063
17064 else
17065
17066                 echo "$as_me:17066: checking for strlcat in -lbsd" >&5
17067 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17068 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17069   echo $ECHO_N "(cached) $ECHO_C" >&6
17070 else
17071   ac_check_lib_save_LIBS=$LIBS
17072 LIBS="-lbsd  $LIBS"
17073 cat >conftest.$ac_ext <<_ACEOF
17074 #line 17074 "configure"
17075 #include "confdefs.h"
17076
17077 /* Override any gcc2 internal prototype to avoid an error.  */
17078 #ifdef __cplusplus
17079 extern "C"
17080 #endif
17081 /* We use char because int might match the return type of a gcc2
17082    builtin and then its argument prototype would still apply.  */
17083 char strlcat ();
17084 int
17085 main (void)
17086 {
17087 strlcat ();
17088   ;
17089   return 0;
17090 }
17091 _ACEOF
17092 rm -f conftest.$ac_objext conftest$ac_exeext
17093 if { (eval echo "$as_me:17093: \"$ac_link\"") >&5
17094   (eval $ac_link) 2>&5
17095   ac_status=$?
17096   echo "$as_me:17096: \$? = $ac_status" >&5
17097   (exit $ac_status); } &&
17098          { ac_try='test -s conftest$ac_exeext'
17099   { (eval echo "$as_me:17099: \"$ac_try\"") >&5
17100   (eval $ac_try) 2>&5
17101   ac_status=$?
17102   echo "$as_me:17102: \$? = $ac_status" >&5
17103   (exit $ac_status); }; }; then
17104   ac_cv_lib_bsd_strlcat=yes
17105 else
17106   echo "$as_me: failed program was:" >&5
17107 cat conftest.$ac_ext >&5
17108 ac_cv_lib_bsd_strlcat=no
17109 fi
17110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17111 LIBS=$ac_check_lib_save_LIBS
17112 fi
17113 echo "$as_me:17113: result: $ac_cv_lib_bsd_strlcat" >&5
17114 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17115 if test $ac_cv_lib_bsd_strlcat = yes; then
17116
17117 cf_add_libs="$LIBS"
17118 # reverse order
17119 cf_add_0lib=
17120 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17121 # filter duplicates
17122 for cf_add_1lib in $cf_add_0lib; do
17123         for cf_add_2lib in $cf_add_libs; do
17124                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17125                         cf_add_1lib=
17126                         break
17127                 fi
17128         done
17129         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17130 done
17131 LIBS="$cf_add_libs"
17132
17133 for ac_header in bsd/string.h
17134 do
17135 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17136 echo "$as_me:17136: checking for $ac_header" >&5
17137 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17138 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17139   echo $ECHO_N "(cached) $ECHO_C" >&6
17140 else
17141   cat >conftest.$ac_ext <<_ACEOF
17142 #line 17142 "configure"
17143 #include "confdefs.h"
17144 #include <$ac_header>
17145 _ACEOF
17146 if { (eval echo "$as_me:17146: \"$ac_cpp conftest.$ac_ext\"") >&5
17147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17148   ac_status=$?
17149   egrep -v '^ *\+' conftest.er1 >conftest.err
17150   rm -f conftest.er1
17151   cat conftest.err >&5
17152   echo "$as_me:17152: \$? = $ac_status" >&5
17153   (exit $ac_status); } >/dev/null; then
17154   if test -s conftest.err; then
17155     ac_cpp_err=$ac_c_preproc_warn_flag
17156   else
17157     ac_cpp_err=
17158   fi
17159 else
17160   ac_cpp_err=yes
17161 fi
17162 if test -z "$ac_cpp_err"; then
17163   eval "$as_ac_Header=yes"
17164 else
17165   echo "$as_me: failed program was:" >&5
17166   cat conftest.$ac_ext >&5
17167   eval "$as_ac_Header=no"
17168 fi
17169 rm -f conftest.err conftest.$ac_ext
17170 fi
17171 echo "$as_me:17171: result: `eval echo '${'$as_ac_Header'}'`" >&5
17172 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17173 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17174   cat >>confdefs.h <<EOF
17175 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17176 EOF
17177
17178 fi
17179 done
17180
17181 cat >>confdefs.h <<\EOF
17182 #define HAVE_STRLCAT 1
17183 EOF
17184
17185 fi
17186
17187 fi
17188
17189 for ac_func in strlcpy snprintf
17190 do
17191 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17192 echo "$as_me:17192: checking for $ac_func" >&5
17193 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17194 if eval "test \"\${$as_ac_var+set}\" = set"; then
17195   echo $ECHO_N "(cached) $ECHO_C" >&6
17196 else
17197   cat >conftest.$ac_ext <<_ACEOF
17198 #line 17198 "configure"
17199 #include "confdefs.h"
17200 #define $ac_func autoconf_temporary
17201 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17202 #undef $ac_func
17203
17204 #ifdef __cplusplus
17205 extern "C"
17206 #endif
17207
17208 /* We use char because int might match the return type of a gcc2
17209    builtin and then its argument prototype would still apply.  */
17210 char $ac_func (void);
17211
17212 int
17213 main (void)
17214 {
17215
17216 /* The GNU C library defines stubs for functions which it implements
17217     to always fail with ENOSYS.  Some functions are actually named
17218     something starting with __ and the normal name is an alias.  */
17219 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17220 #error found stub for $ac_func
17221 #endif
17222
17223         return $ac_func ();
17224   ;
17225   return 0;
17226 }
17227 _ACEOF
17228 rm -f conftest.$ac_objext conftest$ac_exeext
17229 if { (eval echo "$as_me:17229: \"$ac_link\"") >&5
17230   (eval $ac_link) 2>&5
17231   ac_status=$?
17232   echo "$as_me:17232: \$? = $ac_status" >&5
17233   (exit $ac_status); } &&
17234          { ac_try='test -s conftest$ac_exeext'
17235   { (eval echo "$as_me:17235: \"$ac_try\"") >&5
17236   (eval $ac_try) 2>&5
17237   ac_status=$?
17238   echo "$as_me:17238: \$? = $ac_status" >&5
17239   (exit $ac_status); }; }; then
17240   eval "$as_ac_var=yes"
17241 else
17242   echo "$as_me: failed program was:" >&5
17243 cat conftest.$ac_ext >&5
17244 eval "$as_ac_var=no"
17245 fi
17246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17247 fi
17248 echo "$as_me:17248: result: `eval echo '${'$as_ac_var'}'`" >&5
17249 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17250 if test `eval echo '${'$as_ac_var'}'` = yes; then
17251   cat >>confdefs.h <<EOF
17252 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17253 EOF
17254
17255 fi
17256 done
17257
17258 fi
17259
17260 ###     use option --enable-assertions to turn on generation of assertion code
17261 echo "$as_me:17261: checking if you want to enable runtime assertions" >&5
17262 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17263
17264 # Check whether --enable-assertions or --disable-assertions was given.
17265 if test "${enable_assertions+set}" = set; then
17266   enableval="$enable_assertions"
17267   with_assertions=$enableval
17268 else
17269   with_assertions=no
17270 fi;
17271 echo "$as_me:17271: result: $with_assertions" >&5
17272 echo "${ECHO_T}$with_assertions" >&6
17273 if test -n "$GCC"
17274 then
17275         if test "$with_assertions" = no
17276         then
17277                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17278         else
17279
17280         ADAFLAGS="$ADAFLAGS -gnata"
17281
17282         fi
17283 fi
17284
17285 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17286
17287 echo "$as_me:17287: checking if you want to use dmalloc for testing" >&5
17288 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17289
17290 # Check whether --with-dmalloc or --without-dmalloc was given.
17291 if test "${with_dmalloc+set}" = set; then
17292   withval="$with_dmalloc"
17293
17294 cat >>confdefs.h <<EOF
17295 #define USE_DMALLOC 1
17296 EOF
17297
17298         : ${with_cflags:=-g}
17299         : ${with_no_leaks:=yes}
17300          with_dmalloc=yes
17301 else
17302   with_dmalloc=
17303 fi;
17304 echo "$as_me:17304: result: ${with_dmalloc:-no}" >&5
17305 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17306
17307 case .$with_cflags in
17308 (.*-g*)
17309         case .$CFLAGS in
17310         (.*-g*)
17311                 ;;
17312         (*)
17313
17314 cf_fix_cppflags=no
17315 cf_new_cflags=
17316 cf_new_cppflags=
17317 cf_new_extra_cppflags=
17318
17319 for cf_add_cflags in -g
17320 do
17321 case $cf_fix_cppflags in
17322 (no)
17323         case $cf_add_cflags in
17324         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17325                 case $cf_add_cflags in
17326                 (-D*)
17327                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17328
17329                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17330                                 && test -z "${cf_tst_cflags}" \
17331                                 && cf_fix_cppflags=yes
17332
17333                         if test $cf_fix_cppflags = yes ; then
17334
17335         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17336         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17337
17338                                 continue
17339                         elif test "${cf_tst_cflags}" = "\"'" ; then
17340
17341         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17342         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17343
17344                                 continue
17345                         fi
17346                         ;;
17347                 esac
17348                 case "$CPPFLAGS" in
17349                 (*$cf_add_cflags)
17350                         ;;
17351                 (*)
17352                         case $cf_add_cflags in
17353                         (-D*)
17354                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17355
17356 CPPFLAGS=`echo "$CPPFLAGS" | \
17357         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17358                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17359
17360                                 ;;
17361                         esac
17362
17363         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17364         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17365
17366                         ;;
17367                 esac
17368                 ;;
17369         (*)
17370
17371         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17372         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17373
17374                 ;;
17375         esac
17376         ;;
17377 (yes)
17378
17379         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17380         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17381
17382         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17383
17384         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17385                 && test -z "${cf_tst_cflags}" \
17386                 && cf_fix_cppflags=no
17387         ;;
17388 esac
17389 done
17390
17391 if test -n "$cf_new_cflags" ; then
17392
17393         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17394         CFLAGS="${CFLAGS}$cf_new_cflags"
17395
17396 fi
17397
17398 if test -n "$cf_new_cppflags" ; then
17399
17400         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17401         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17402
17403 fi
17404
17405 if test -n "$cf_new_extra_cppflags" ; then
17406
17407         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17408         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17409
17410 fi
17411
17412                 ;;
17413         esac
17414         ;;
17415 esac
17416
17417 if test "$with_dmalloc" = yes ; then
17418         echo "$as_me:17418: checking for dmalloc.h" >&5
17419 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17420 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17421   echo $ECHO_N "(cached) $ECHO_C" >&6
17422 else
17423   cat >conftest.$ac_ext <<_ACEOF
17424 #line 17424 "configure"
17425 #include "confdefs.h"
17426 #include <dmalloc.h>
17427 _ACEOF
17428 if { (eval echo "$as_me:17428: \"$ac_cpp conftest.$ac_ext\"") >&5
17429   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17430   ac_status=$?
17431   egrep -v '^ *\+' conftest.er1 >conftest.err
17432   rm -f conftest.er1
17433   cat conftest.err >&5
17434   echo "$as_me:17434: \$? = $ac_status" >&5
17435   (exit $ac_status); } >/dev/null; then
17436   if test -s conftest.err; then
17437     ac_cpp_err=$ac_c_preproc_warn_flag
17438   else
17439     ac_cpp_err=
17440   fi
17441 else
17442   ac_cpp_err=yes
17443 fi
17444 if test -z "$ac_cpp_err"; then
17445   ac_cv_header_dmalloc_h=yes
17446 else
17447   echo "$as_me: failed program was:" >&5
17448   cat conftest.$ac_ext >&5
17449   ac_cv_header_dmalloc_h=no
17450 fi
17451 rm -f conftest.err conftest.$ac_ext
17452 fi
17453 echo "$as_me:17453: result: $ac_cv_header_dmalloc_h" >&5
17454 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17455 if test $ac_cv_header_dmalloc_h = yes; then
17456
17457 echo "$as_me:17457: checking for dmalloc_debug in -ldmalloc" >&5
17458 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17459 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17460   echo $ECHO_N "(cached) $ECHO_C" >&6
17461 else
17462   ac_check_lib_save_LIBS=$LIBS
17463 LIBS="-ldmalloc  $LIBS"
17464 cat >conftest.$ac_ext <<_ACEOF
17465 #line 17465 "configure"
17466 #include "confdefs.h"
17467
17468 /* Override any gcc2 internal prototype to avoid an error.  */
17469 #ifdef __cplusplus
17470 extern "C"
17471 #endif
17472 /* We use char because int might match the return type of a gcc2
17473    builtin and then its argument prototype would still apply.  */
17474 char dmalloc_debug ();
17475 int
17476 main (void)
17477 {
17478 dmalloc_debug ();
17479   ;
17480   return 0;
17481 }
17482 _ACEOF
17483 rm -f conftest.$ac_objext conftest$ac_exeext
17484 if { (eval echo "$as_me:17484: \"$ac_link\"") >&5
17485   (eval $ac_link) 2>&5
17486   ac_status=$?
17487   echo "$as_me:17487: \$? = $ac_status" >&5
17488   (exit $ac_status); } &&
17489          { ac_try='test -s conftest$ac_exeext'
17490   { (eval echo "$as_me:17490: \"$ac_try\"") >&5
17491   (eval $ac_try) 2>&5
17492   ac_status=$?
17493   echo "$as_me:17493: \$? = $ac_status" >&5
17494   (exit $ac_status); }; }; then
17495   ac_cv_lib_dmalloc_dmalloc_debug=yes
17496 else
17497   echo "$as_me: failed program was:" >&5
17498 cat conftest.$ac_ext >&5
17499 ac_cv_lib_dmalloc_dmalloc_debug=no
17500 fi
17501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17502 LIBS=$ac_check_lib_save_LIBS
17503 fi
17504 echo "$as_me:17504: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17505 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17506 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17507   cat >>confdefs.h <<EOF
17508 #define HAVE_LIBDMALLOC 1
17509 EOF
17510
17511   LIBS="-ldmalloc $LIBS"
17512
17513 fi
17514
17515 fi
17516
17517 fi
17518
17519 echo "$as_me:17519: checking if you want to use dbmalloc for testing" >&5
17520 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17521
17522 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17523 if test "${with_dbmalloc+set}" = set; then
17524   withval="$with_dbmalloc"
17525
17526 cat >>confdefs.h <<EOF
17527 #define USE_DBMALLOC 1
17528 EOF
17529
17530         : ${with_cflags:=-g}
17531         : ${with_no_leaks:=yes}
17532          with_dbmalloc=yes
17533 else
17534   with_dbmalloc=
17535 fi;
17536 echo "$as_me:17536: result: ${with_dbmalloc:-no}" >&5
17537 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17538
17539 case .$with_cflags in
17540 (.*-g*)
17541         case .$CFLAGS in
17542         (.*-g*)
17543                 ;;
17544         (*)
17545
17546 cf_fix_cppflags=no
17547 cf_new_cflags=
17548 cf_new_cppflags=
17549 cf_new_extra_cppflags=
17550
17551 for cf_add_cflags in -g
17552 do
17553 case $cf_fix_cppflags in
17554 (no)
17555         case $cf_add_cflags in
17556         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17557                 case $cf_add_cflags in
17558                 (-D*)
17559                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17560
17561                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17562                                 && test -z "${cf_tst_cflags}" \
17563                                 && cf_fix_cppflags=yes
17564
17565                         if test $cf_fix_cppflags = yes ; then
17566
17567         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17568         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17569
17570                                 continue
17571                         elif test "${cf_tst_cflags}" = "\"'" ; then
17572
17573         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17574         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17575
17576                                 continue
17577                         fi
17578                         ;;
17579                 esac
17580                 case "$CPPFLAGS" in
17581                 (*$cf_add_cflags)
17582                         ;;
17583                 (*)
17584                         case $cf_add_cflags in
17585                         (-D*)
17586                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17587
17588 CPPFLAGS=`echo "$CPPFLAGS" | \
17589         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17590                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17591
17592                                 ;;
17593                         esac
17594
17595         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17596         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17597
17598                         ;;
17599                 esac
17600                 ;;
17601         (*)
17602
17603         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17604         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17605
17606                 ;;
17607         esac
17608         ;;
17609 (yes)
17610
17611         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17612         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17613
17614         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17615
17616         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17617                 && test -z "${cf_tst_cflags}" \
17618                 && cf_fix_cppflags=no
17619         ;;
17620 esac
17621 done
17622
17623 if test -n "$cf_new_cflags" ; then
17624
17625         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17626         CFLAGS="${CFLAGS}$cf_new_cflags"
17627
17628 fi
17629
17630 if test -n "$cf_new_cppflags" ; then
17631
17632         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17633         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17634
17635 fi
17636
17637 if test -n "$cf_new_extra_cppflags" ; then
17638
17639         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17640         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17641
17642 fi
17643
17644                 ;;
17645         esac
17646         ;;
17647 esac
17648
17649 if test "$with_dbmalloc" = yes ; then
17650         echo "$as_me:17650: checking for dbmalloc.h" >&5
17651 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17652 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17653   echo $ECHO_N "(cached) $ECHO_C" >&6
17654 else
17655   cat >conftest.$ac_ext <<_ACEOF
17656 #line 17656 "configure"
17657 #include "confdefs.h"
17658 #include <dbmalloc.h>
17659 _ACEOF
17660 if { (eval echo "$as_me:17660: \"$ac_cpp conftest.$ac_ext\"") >&5
17661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17662   ac_status=$?
17663   egrep -v '^ *\+' conftest.er1 >conftest.err
17664   rm -f conftest.er1
17665   cat conftest.err >&5
17666   echo "$as_me:17666: \$? = $ac_status" >&5
17667   (exit $ac_status); } >/dev/null; then
17668   if test -s conftest.err; then
17669     ac_cpp_err=$ac_c_preproc_warn_flag
17670   else
17671     ac_cpp_err=
17672   fi
17673 else
17674   ac_cpp_err=yes
17675 fi
17676 if test -z "$ac_cpp_err"; then
17677   ac_cv_header_dbmalloc_h=yes
17678 else
17679   echo "$as_me: failed program was:" >&5
17680   cat conftest.$ac_ext >&5
17681   ac_cv_header_dbmalloc_h=no
17682 fi
17683 rm -f conftest.err conftest.$ac_ext
17684 fi
17685 echo "$as_me:17685: result: $ac_cv_header_dbmalloc_h" >&5
17686 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17687 if test $ac_cv_header_dbmalloc_h = yes; then
17688
17689 echo "$as_me:17689: checking for debug_malloc in -ldbmalloc" >&5
17690 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17691 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17692   echo $ECHO_N "(cached) $ECHO_C" >&6
17693 else
17694   ac_check_lib_save_LIBS=$LIBS
17695 LIBS="-ldbmalloc  $LIBS"
17696 cat >conftest.$ac_ext <<_ACEOF
17697 #line 17697 "configure"
17698 #include "confdefs.h"
17699
17700 /* Override any gcc2 internal prototype to avoid an error.  */
17701 #ifdef __cplusplus
17702 extern "C"
17703 #endif
17704 /* We use char because int might match the return type of a gcc2
17705    builtin and then its argument prototype would still apply.  */
17706 char debug_malloc ();
17707 int
17708 main (void)
17709 {
17710 debug_malloc ();
17711   ;
17712   return 0;
17713 }
17714 _ACEOF
17715 rm -f conftest.$ac_objext conftest$ac_exeext
17716 if { (eval echo "$as_me:17716: \"$ac_link\"") >&5
17717   (eval $ac_link) 2>&5
17718   ac_status=$?
17719   echo "$as_me:17719: \$? = $ac_status" >&5
17720   (exit $ac_status); } &&
17721          { ac_try='test -s conftest$ac_exeext'
17722   { (eval echo "$as_me:17722: \"$ac_try\"") >&5
17723   (eval $ac_try) 2>&5
17724   ac_status=$?
17725   echo "$as_me:17725: \$? = $ac_status" >&5
17726   (exit $ac_status); }; }; then
17727   ac_cv_lib_dbmalloc_debug_malloc=yes
17728 else
17729   echo "$as_me: failed program was:" >&5
17730 cat conftest.$ac_ext >&5
17731 ac_cv_lib_dbmalloc_debug_malloc=no
17732 fi
17733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17734 LIBS=$ac_check_lib_save_LIBS
17735 fi
17736 echo "$as_me:17736: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17737 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17738 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17739   cat >>confdefs.h <<EOF
17740 #define HAVE_LIBDBMALLOC 1
17741 EOF
17742
17743   LIBS="-ldbmalloc $LIBS"
17744
17745 fi
17746
17747 fi
17748
17749 fi
17750
17751 echo "$as_me:17751: checking if you want to use valgrind for testing" >&5
17752 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17753
17754 # Check whether --with-valgrind or --without-valgrind was given.
17755 if test "${with_valgrind+set}" = set; then
17756   withval="$with_valgrind"
17757
17758 cat >>confdefs.h <<EOF
17759 #define USE_VALGRIND 1
17760 EOF
17761
17762         : ${with_cflags:=-g}
17763         : ${with_no_leaks:=yes}
17764          with_valgrind=yes
17765 else
17766   with_valgrind=
17767 fi;
17768 echo "$as_me:17768: result: ${with_valgrind:-no}" >&5
17769 echo "${ECHO_T}${with_valgrind:-no}" >&6
17770
17771 case .$with_cflags in
17772 (.*-g*)
17773         case .$CFLAGS in
17774         (.*-g*)
17775                 ;;
17776         (*)
17777
17778 cf_fix_cppflags=no
17779 cf_new_cflags=
17780 cf_new_cppflags=
17781 cf_new_extra_cppflags=
17782
17783 for cf_add_cflags in -g
17784 do
17785 case $cf_fix_cppflags in
17786 (no)
17787         case $cf_add_cflags in
17788         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17789                 case $cf_add_cflags in
17790                 (-D*)
17791                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17792
17793                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17794                                 && test -z "${cf_tst_cflags}" \
17795                                 && cf_fix_cppflags=yes
17796
17797                         if test $cf_fix_cppflags = yes ; then
17798
17799         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17800         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17801
17802                                 continue
17803                         elif test "${cf_tst_cflags}" = "\"'" ; then
17804
17805         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17806         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17807
17808                                 continue
17809                         fi
17810                         ;;
17811                 esac
17812                 case "$CPPFLAGS" in
17813                 (*$cf_add_cflags)
17814                         ;;
17815                 (*)
17816                         case $cf_add_cflags in
17817                         (-D*)
17818                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17819
17820 CPPFLAGS=`echo "$CPPFLAGS" | \
17821         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17822                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17823
17824                                 ;;
17825                         esac
17826
17827         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17828         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17829
17830                         ;;
17831                 esac
17832                 ;;
17833         (*)
17834
17835         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17836         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17837
17838                 ;;
17839         esac
17840         ;;
17841 (yes)
17842
17843         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17844         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17845
17846         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17847
17848         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17849                 && test -z "${cf_tst_cflags}" \
17850                 && cf_fix_cppflags=no
17851         ;;
17852 esac
17853 done
17854
17855 if test -n "$cf_new_cflags" ; then
17856
17857         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17858         CFLAGS="${CFLAGS}$cf_new_cflags"
17859
17860 fi
17861
17862 if test -n "$cf_new_cppflags" ; then
17863
17864         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17865         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17866
17867 fi
17868
17869 if test -n "$cf_new_extra_cppflags" ; then
17870
17871         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17872         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17873
17874 fi
17875
17876                 ;;
17877         esac
17878         ;;
17879 esac
17880
17881 echo "$as_me:17881: checking if you want to perform memory-leak testing" >&5
17882 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17883
17884 # Check whether --enable-leaks or --disable-leaks was given.
17885 if test "${enable_leaks+set}" = set; then
17886   enableval="$enable_leaks"
17887   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17888 else
17889   : ${with_no_leaks:=no}
17890 fi;
17891 echo "$as_me:17891: result: $with_no_leaks" >&5
17892 echo "${ECHO_T}$with_no_leaks" >&6
17893
17894 if test "$with_no_leaks" = yes ; then
17895
17896 cat >>confdefs.h <<\EOF
17897 #define NO_LEAKS 1
17898 EOF
17899
17900 cat >>confdefs.h <<\EOF
17901 #define YY_NO_LEAKS 1
17902 EOF
17903
17904 fi
17905
17906 cat >>confdefs.h <<\EOF
17907 #define HAVE_NC_ALLOC_H 1
17908 EOF
17909
17910 ###     use option --enable-expanded to generate certain macros as functions
17911
17912 # Check whether --enable-expanded or --disable-expanded was given.
17913 if test "${enable_expanded+set}" = set; then
17914   enableval="$enable_expanded"
17915   test "x$enableval" = xyes &&
17916 cat >>confdefs.h <<\EOF
17917 #define NCURSES_EXPANDED 1
17918 EOF
17919
17920 fi;
17921
17922 ###     use option --disable-macros to suppress macros in favor of functions
17923
17924 # Check whether --enable-macros or --disable-macros was given.
17925 if test "${enable_macros+set}" = set; then
17926   enableval="$enable_macros"
17927   test "$enableval" = no &&
17928 cat >>confdefs.h <<\EOF
17929 #define NCURSES_NOMACROS 1
17930 EOF
17931
17932 fi;
17933
17934 # Normally we only add trace() to the debug-library.  Allow this to be
17935 # extended to all models of the ncurses library:
17936 cf_all_traces=no
17937 case "$CFLAGS $CPPFLAGS" in
17938 (*-DTRACE*)
17939         cf_all_traces=yes
17940         ;;
17941 esac
17942
17943 echo "$as_me:17943: checking whether to add trace feature to all models" >&5
17944 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17945
17946 # Check whether --with-trace or --without-trace was given.
17947 if test "${with_trace+set}" = set; then
17948   withval="$with_trace"
17949   cf_with_trace=$withval
17950 else
17951   cf_with_trace=$cf_all_traces
17952 fi;
17953 echo "$as_me:17953: result: $cf_with_trace" >&5
17954 echo "${ECHO_T}$cf_with_trace" >&6
17955
17956 if test "x$cf_with_trace" = xyes ; then
17957         LIB_TRACING=all
17958         ADA_TRACE=TRUE
17959
17960 cf_fix_cppflags=no
17961 cf_new_cflags=
17962 cf_new_cppflags=
17963 cf_new_extra_cppflags=
17964
17965 for cf_add_cflags in -DTRACE
17966 do
17967 case $cf_fix_cppflags in
17968 (no)
17969         case $cf_add_cflags in
17970         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17971                 case $cf_add_cflags in
17972                 (-D*)
17973                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17974
17975                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17976                                 && test -z "${cf_tst_cflags}" \
17977                                 && cf_fix_cppflags=yes
17978
17979                         if test $cf_fix_cppflags = yes ; then
17980
17981         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17982         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17983
17984                                 continue
17985                         elif test "${cf_tst_cflags}" = "\"'" ; then
17986
17987         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17988         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17989
17990                                 continue
17991                         fi
17992                         ;;
17993                 esac
17994                 case "$CPPFLAGS" in
17995                 (*$cf_add_cflags)
17996                         ;;
17997                 (*)
17998                         case $cf_add_cflags in
17999                         (-D*)
18000                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18001
18002 CPPFLAGS=`echo "$CPPFLAGS" | \
18003         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18004                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18005
18006                                 ;;
18007                         esac
18008
18009         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18010         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18011
18012                         ;;
18013                 esac
18014                 ;;
18015         (*)
18016
18017         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18018         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18019
18020                 ;;
18021         esac
18022         ;;
18023 (yes)
18024
18025         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18026         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18027
18028         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18029
18030         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18031                 && test -z "${cf_tst_cflags}" \
18032                 && cf_fix_cppflags=no
18033         ;;
18034 esac
18035 done
18036
18037 if test -n "$cf_new_cflags" ; then
18038
18039         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18040         CFLAGS="${CFLAGS}$cf_new_cflags"
18041
18042 fi
18043
18044 if test -n "$cf_new_cppflags" ; then
18045
18046         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18047         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18048
18049 fi
18050
18051 if test -n "$cf_new_extra_cppflags" ; then
18052
18053         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18054         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18055
18056 fi
18057
18058 cat >>confdefs.h <<\EOF
18059 #define HAVE__TRACEF 1
18060 EOF
18061
18062 else
18063         LIB_TRACING=DEBUG
18064         ADA_TRACE=FALSE
18065 fi
18066
18067 echo "$as_me:18067: checking if we want to use GNAT projects" >&5
18068 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18069
18070 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18071 if test "${enable_gnat_projects+set}" = set; then
18072   enableval="$enable_gnat_projects"
18073   test "$enableval" != no && enableval=yes
18074         if test "$enableval" != "yes" ; then
18075     enable_gnat_projects=no
18076         else
18077                 enable_gnat_projects=yes
18078         fi
18079 else
18080   enableval=yes
18081         enable_gnat_projects=yes
18082
18083 fi;
18084 echo "$as_me:18084: result: $enable_gnat_projects" >&5
18085 echo "${ECHO_T}$enable_gnat_projects" >&6
18086
18087 ###     Checks for libraries.
18088 case $cf_cv_system_name in
18089 (*mingw32*|*mingw64*)
18090         if test "x$with_exp_win32" = xyes ; then
18091         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18092         else
18093         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18094         fi
18095         # Note: WINVER may be a problem with Windows 10
18096         ;;
18097 (*)
18098 echo "$as_me:18098: checking for gettimeofday" >&5
18099 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18100 if test "${ac_cv_func_gettimeofday+set}" = set; then
18101   echo $ECHO_N "(cached) $ECHO_C" >&6
18102 else
18103   cat >conftest.$ac_ext <<_ACEOF
18104 #line 18104 "configure"
18105 #include "confdefs.h"
18106 #define gettimeofday autoconf_temporary
18107 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18108 #undef gettimeofday
18109
18110 #ifdef __cplusplus
18111 extern "C"
18112 #endif
18113
18114 /* We use char because int might match the return type of a gcc2
18115    builtin and then its argument prototype would still apply.  */
18116 char gettimeofday (void);
18117
18118 int
18119 main (void)
18120 {
18121
18122 /* The GNU C library defines stubs for functions which it implements
18123     to always fail with ENOSYS.  Some functions are actually named
18124     something starting with __ and the normal name is an alias.  */
18125 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18126 #error found stub for gettimeofday
18127 #endif
18128
18129         return gettimeofday ();
18130   ;
18131   return 0;
18132 }
18133 _ACEOF
18134 rm -f conftest.$ac_objext conftest$ac_exeext
18135 if { (eval echo "$as_me:18135: \"$ac_link\"") >&5
18136   (eval $ac_link) 2>&5
18137   ac_status=$?
18138   echo "$as_me:18138: \$? = $ac_status" >&5
18139   (exit $ac_status); } &&
18140          { ac_try='test -s conftest$ac_exeext'
18141   { (eval echo "$as_me:18141: \"$ac_try\"") >&5
18142   (eval $ac_try) 2>&5
18143   ac_status=$?
18144   echo "$as_me:18144: \$? = $ac_status" >&5
18145   (exit $ac_status); }; }; then
18146   ac_cv_func_gettimeofday=yes
18147 else
18148   echo "$as_me: failed program was:" >&5
18149 cat conftest.$ac_ext >&5
18150 ac_cv_func_gettimeofday=no
18151 fi
18152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18153 fi
18154 echo "$as_me:18154: result: $ac_cv_func_gettimeofday" >&5
18155 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18156 if test $ac_cv_func_gettimeofday = yes; then
18157
18158 cat >>confdefs.h <<\EOF
18159 #define HAVE_GETTIMEOFDAY 1
18160 EOF
18161
18162 else
18163
18164 echo "$as_me:18164: checking for gettimeofday in -lbsd" >&5
18165 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18166 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18167   echo $ECHO_N "(cached) $ECHO_C" >&6
18168 else
18169   ac_check_lib_save_LIBS=$LIBS
18170 LIBS="-lbsd  $LIBS"
18171 cat >conftest.$ac_ext <<_ACEOF
18172 #line 18172 "configure"
18173 #include "confdefs.h"
18174
18175 /* Override any gcc2 internal prototype to avoid an error.  */
18176 #ifdef __cplusplus
18177 extern "C"
18178 #endif
18179 /* We use char because int might match the return type of a gcc2
18180    builtin and then its argument prototype would still apply.  */
18181 char gettimeofday ();
18182 int
18183 main (void)
18184 {
18185 gettimeofday ();
18186   ;
18187   return 0;
18188 }
18189 _ACEOF
18190 rm -f conftest.$ac_objext conftest$ac_exeext
18191 if { (eval echo "$as_me:18191: \"$ac_link\"") >&5
18192   (eval $ac_link) 2>&5
18193   ac_status=$?
18194   echo "$as_me:18194: \$? = $ac_status" >&5
18195   (exit $ac_status); } &&
18196          { ac_try='test -s conftest$ac_exeext'
18197   { (eval echo "$as_me:18197: \"$ac_try\"") >&5
18198   (eval $ac_try) 2>&5
18199   ac_status=$?
18200   echo "$as_me:18200: \$? = $ac_status" >&5
18201   (exit $ac_status); }; }; then
18202   ac_cv_lib_bsd_gettimeofday=yes
18203 else
18204   echo "$as_me: failed program was:" >&5
18205 cat conftest.$ac_ext >&5
18206 ac_cv_lib_bsd_gettimeofday=no
18207 fi
18208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18209 LIBS=$ac_check_lib_save_LIBS
18210 fi
18211 echo "$as_me:18211: result: $ac_cv_lib_bsd_gettimeofday" >&5
18212 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18213 if test $ac_cv_lib_bsd_gettimeofday = yes; then
18214
18215 cat >>confdefs.h <<\EOF
18216 #define HAVE_GETTIMEOFDAY 1
18217 EOF
18218
18219 cf_add_libs="$LIBS"
18220 # reverse order
18221 cf_add_0lib=
18222 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18223 # filter duplicates
18224 for cf_add_1lib in $cf_add_0lib; do
18225         for cf_add_2lib in $cf_add_libs; do
18226                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18227                         cf_add_1lib=
18228                         break
18229                 fi
18230         done
18231         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18232 done
18233 LIBS="$cf_add_libs"
18234
18235 fi
18236
18237 fi
18238         ;;
18239 esac
18240
18241 echo "$as_me:18241: checking if -lm needed for math functions" >&5
18242 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18243 if test "${cf_cv_need_libm+set}" = set; then
18244   echo $ECHO_N "(cached) $ECHO_C" >&6
18245 else
18246
18247         cat >conftest.$ac_ext <<_ACEOF
18248 #line 18248 "configure"
18249 #include "confdefs.h"
18250
18251         #include <stdio.h>
18252         #include <stdlib.h>
18253         #include <math.h>
18254
18255 int
18256 main (void)
18257 {
18258 double x = rand(); printf("result = %g\n", pow(sin(x),x))
18259   ;
18260   return 0;
18261 }
18262 _ACEOF
18263 rm -f conftest.$ac_objext conftest$ac_exeext
18264 if { (eval echo "$as_me:18264: \"$ac_link\"") >&5
18265   (eval $ac_link) 2>&5
18266   ac_status=$?
18267   echo "$as_me:18267: \$? = $ac_status" >&5
18268   (exit $ac_status); } &&
18269          { ac_try='test -s conftest$ac_exeext'
18270   { (eval echo "$as_me:18270: \"$ac_try\"") >&5
18271   (eval $ac_try) 2>&5
18272   ac_status=$?
18273   echo "$as_me:18273: \$? = $ac_status" >&5
18274   (exit $ac_status); }; }; then
18275   cf_cv_need_libm=no
18276 else
18277   echo "$as_me: failed program was:" >&5
18278 cat conftest.$ac_ext >&5
18279 cf_cv_need_libm=yes
18280 fi
18281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18282 fi
18283 echo "$as_me:18283: result: $cf_cv_need_libm" >&5
18284 echo "${ECHO_T}$cf_cv_need_libm" >&6
18285 if test "$cf_cv_need_libm" = yes
18286 then
18287 MATH_LIB=-lm
18288 fi
18289
18290 ###     Checks for header files.
18291 echo "$as_me:18291: checking for ANSI C header files" >&5
18292 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18293 if test "${ac_cv_header_stdc+set}" = set; then
18294   echo $ECHO_N "(cached) $ECHO_C" >&6
18295 else
18296   cat >conftest.$ac_ext <<_ACEOF
18297 #line 18297 "configure"
18298 #include "confdefs.h"
18299 #include <stdlib.h>
18300 #include <stdarg.h>
18301 #include <string.h>
18302 #include <float.h>
18303
18304 _ACEOF
18305 if { (eval echo "$as_me:18305: \"$ac_cpp conftest.$ac_ext\"") >&5
18306   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18307   ac_status=$?
18308   egrep -v '^ *\+' conftest.er1 >conftest.err
18309   rm -f conftest.er1
18310   cat conftest.err >&5
18311   echo "$as_me:18311: \$? = $ac_status" >&5
18312   (exit $ac_status); } >/dev/null; then
18313   if test -s conftest.err; then
18314     ac_cpp_err=$ac_c_preproc_warn_flag
18315   else
18316     ac_cpp_err=
18317   fi
18318 else
18319   ac_cpp_err=yes
18320 fi
18321 if test -z "$ac_cpp_err"; then
18322   ac_cv_header_stdc=yes
18323 else
18324   echo "$as_me: failed program was:" >&5
18325   cat conftest.$ac_ext >&5
18326   ac_cv_header_stdc=no
18327 fi
18328 rm -f conftest.err conftest.$ac_ext
18329
18330 if test $ac_cv_header_stdc = yes; then
18331   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18332   cat >conftest.$ac_ext <<_ACEOF
18333 #line 18333 "configure"
18334 #include "confdefs.h"
18335 #include <string.h>
18336
18337 _ACEOF
18338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18339   egrep "memchr" >/dev/null 2>&1; then
18340   :
18341 else
18342   ac_cv_header_stdc=no
18343 fi
18344 rm -rf conftest*
18345
18346 fi
18347
18348 if test $ac_cv_header_stdc = yes; then
18349   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18350   cat >conftest.$ac_ext <<_ACEOF
18351 #line 18351 "configure"
18352 #include "confdefs.h"
18353 #include <stdlib.h>
18354
18355 _ACEOF
18356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18357   egrep "free" >/dev/null 2>&1; then
18358   :
18359 else
18360   ac_cv_header_stdc=no
18361 fi
18362 rm -rf conftest*
18363
18364 fi
18365
18366 if test $ac_cv_header_stdc = yes; then
18367   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18368   if test "$cross_compiling" = yes; then
18369   :
18370 else
18371   cat >conftest.$ac_ext <<_ACEOF
18372 #line 18372 "configure"
18373 #include "confdefs.h"
18374 #include <ctype.h>
18375 #if ((' ' & 0x0FF) == 0x020)
18376 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18377 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18378 #else
18379 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18380                      || ('j' <= (c) && (c) <= 'r') \
18381                      || ('s' <= (c) && (c) <= 'z'))
18382 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18383 #endif
18384
18385 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18386 int
18387 main (void)
18388 {
18389   int i;
18390   for (i = 0; i < 256; i++)
18391     if (XOR (islower (i), ISLOWER (i))
18392         || toupper (i) != TOUPPER (i))
18393       $ac_main_return(2);
18394   $ac_main_return (0);
18395 }
18396 _ACEOF
18397 rm -f conftest$ac_exeext
18398 if { (eval echo "$as_me:18398: \"$ac_link\"") >&5
18399   (eval $ac_link) 2>&5
18400   ac_status=$?
18401   echo "$as_me:18401: \$? = $ac_status" >&5
18402   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18403   { (eval echo "$as_me:18403: \"$ac_try\"") >&5
18404   (eval $ac_try) 2>&5
18405   ac_status=$?
18406   echo "$as_me:18406: \$? = $ac_status" >&5
18407   (exit $ac_status); }; }; then
18408   :
18409 else
18410   echo "$as_me: program exited with status $ac_status" >&5
18411 echo "$as_me: failed program was:" >&5
18412 cat conftest.$ac_ext >&5
18413 ac_cv_header_stdc=no
18414 fi
18415 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18416 fi
18417 fi
18418 fi
18419 echo "$as_me:18419: result: $ac_cv_header_stdc" >&5
18420 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18421 if test $ac_cv_header_stdc = yes; then
18422
18423 cat >>confdefs.h <<\EOF
18424 #define STDC_HEADERS 1
18425 EOF
18426
18427 fi
18428
18429 ac_header_dirent=no
18430 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18431   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18432 echo "$as_me:18432: checking for $ac_hdr that defines DIR" >&5
18433 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18434 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18435   echo $ECHO_N "(cached) $ECHO_C" >&6
18436 else
18437   cat >conftest.$ac_ext <<_ACEOF
18438 #line 18438 "configure"
18439 #include "confdefs.h"
18440 #include <sys/types.h>
18441 #include <$ac_hdr>
18442
18443 int
18444 main (void)
18445 {
18446 if ((DIR *) 0)
18447 return 0;
18448   ;
18449   return 0;
18450 }
18451 _ACEOF
18452 rm -f conftest.$ac_objext
18453 if { (eval echo "$as_me:18453: \"$ac_compile\"") >&5
18454   (eval $ac_compile) 2>&5
18455   ac_status=$?
18456   echo "$as_me:18456: \$? = $ac_status" >&5
18457   (exit $ac_status); } &&
18458          { ac_try='test -s conftest.$ac_objext'
18459   { (eval echo "$as_me:18459: \"$ac_try\"") >&5
18460   (eval $ac_try) 2>&5
18461   ac_status=$?
18462   echo "$as_me:18462: \$? = $ac_status" >&5
18463   (exit $ac_status); }; }; then
18464   eval "$as_ac_Header=yes"
18465 else
18466   echo "$as_me: failed program was:" >&5
18467 cat conftest.$ac_ext >&5
18468 eval "$as_ac_Header=no"
18469 fi
18470 rm -f conftest.$ac_objext conftest.$ac_ext
18471 fi
18472 echo "$as_me:18472: result: `eval echo '${'$as_ac_Header'}'`" >&5
18473 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18474 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18475   cat >>confdefs.h <<EOF
18476 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18477 EOF
18478
18479 ac_header_dirent=$ac_hdr; break
18480 fi
18481
18482 done
18483 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18484 if test $ac_header_dirent = dirent.h; then
18485   echo "$as_me:18485: checking for opendir in -ldir" >&5
18486 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18487 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18488   echo $ECHO_N "(cached) $ECHO_C" >&6
18489 else
18490   ac_check_lib_save_LIBS=$LIBS
18491 LIBS="-ldir  $LIBS"
18492 cat >conftest.$ac_ext <<_ACEOF
18493 #line 18493 "configure"
18494 #include "confdefs.h"
18495
18496 /* Override any gcc2 internal prototype to avoid an error.  */
18497 #ifdef __cplusplus
18498 extern "C"
18499 #endif
18500 /* We use char because int might match the return type of a gcc2
18501    builtin and then its argument prototype would still apply.  */
18502 char opendir ();
18503 int
18504 main (void)
18505 {
18506 opendir ();
18507   ;
18508   return 0;
18509 }
18510 _ACEOF
18511 rm -f conftest.$ac_objext conftest$ac_exeext
18512 if { (eval echo "$as_me:18512: \"$ac_link\"") >&5
18513   (eval $ac_link) 2>&5
18514   ac_status=$?
18515   echo "$as_me:18515: \$? = $ac_status" >&5
18516   (exit $ac_status); } &&
18517          { ac_try='test -s conftest$ac_exeext'
18518   { (eval echo "$as_me:18518: \"$ac_try\"") >&5
18519   (eval $ac_try) 2>&5
18520   ac_status=$?
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit $ac_status); }; }; then
18523   ac_cv_lib_dir_opendir=yes
18524 else
18525   echo "$as_me: failed program was:" >&5
18526 cat conftest.$ac_ext >&5
18527 ac_cv_lib_dir_opendir=no
18528 fi
18529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18530 LIBS=$ac_check_lib_save_LIBS
18531 fi
18532 echo "$as_me:18532: result: $ac_cv_lib_dir_opendir" >&5
18533 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18534 if test $ac_cv_lib_dir_opendir = yes; then
18535   LIBS="$LIBS -ldir"
18536 fi
18537
18538 else
18539   echo "$as_me:18539: checking for opendir in -lx" >&5
18540 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18541 if test "${ac_cv_lib_x_opendir+set}" = set; then
18542   echo $ECHO_N "(cached) $ECHO_C" >&6
18543 else
18544   ac_check_lib_save_LIBS=$LIBS
18545 LIBS="-lx  $LIBS"
18546 cat >conftest.$ac_ext <<_ACEOF
18547 #line 18547 "configure"
18548 #include "confdefs.h"
18549
18550 /* Override any gcc2 internal prototype to avoid an error.  */
18551 #ifdef __cplusplus
18552 extern "C"
18553 #endif
18554 /* We use char because int might match the return type of a gcc2
18555    builtin and then its argument prototype would still apply.  */
18556 char opendir ();
18557 int
18558 main (void)
18559 {
18560 opendir ();
18561   ;
18562   return 0;
18563 }
18564 _ACEOF
18565 rm -f conftest.$ac_objext conftest$ac_exeext
18566 if { (eval echo "$as_me:18566: \"$ac_link\"") >&5
18567   (eval $ac_link) 2>&5
18568   ac_status=$?
18569   echo "$as_me:18569: \$? = $ac_status" >&5
18570   (exit $ac_status); } &&
18571          { ac_try='test -s conftest$ac_exeext'
18572   { (eval echo "$as_me:18572: \"$ac_try\"") >&5
18573   (eval $ac_try) 2>&5
18574   ac_status=$?
18575   echo "$as_me:18575: \$? = $ac_status" >&5
18576   (exit $ac_status); }; }; then
18577   ac_cv_lib_x_opendir=yes
18578 else
18579   echo "$as_me: failed program was:" >&5
18580 cat conftest.$ac_ext >&5
18581 ac_cv_lib_x_opendir=no
18582 fi
18583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18584 LIBS=$ac_check_lib_save_LIBS
18585 fi
18586 echo "$as_me:18586: result: $ac_cv_lib_x_opendir" >&5
18587 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18588 if test $ac_cv_lib_x_opendir = yes; then
18589   LIBS="$LIBS -lx"
18590 fi
18591
18592 fi
18593
18594 echo "$as_me:18594: checking whether time.h and sys/time.h may both be included" >&5
18595 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18596 if test "${ac_cv_header_time+set}" = set; then
18597   echo $ECHO_N "(cached) $ECHO_C" >&6
18598 else
18599   cat >conftest.$ac_ext <<_ACEOF
18600 #line 18600 "configure"
18601 #include "confdefs.h"
18602 #include <sys/types.h>
18603 #include <sys/time.h>
18604 #include <time.h>
18605
18606 int
18607 main (void)
18608 {
18609 if ((struct tm *) 0)
18610 return 0;
18611   ;
18612   return 0;
18613 }
18614 _ACEOF
18615 rm -f conftest.$ac_objext
18616 if { (eval echo "$as_me:18616: \"$ac_compile\"") >&5
18617   (eval $ac_compile) 2>&5
18618   ac_status=$?
18619   echo "$as_me:18619: \$? = $ac_status" >&5
18620   (exit $ac_status); } &&
18621          { ac_try='test -s conftest.$ac_objext'
18622   { (eval echo "$as_me:18622: \"$ac_try\"") >&5
18623   (eval $ac_try) 2>&5
18624   ac_status=$?
18625   echo "$as_me:18625: \$? = $ac_status" >&5
18626   (exit $ac_status); }; }; then
18627   ac_cv_header_time=yes
18628 else
18629   echo "$as_me: failed program was:" >&5
18630 cat conftest.$ac_ext >&5
18631 ac_cv_header_time=no
18632 fi
18633 rm -f conftest.$ac_objext conftest.$ac_ext
18634 fi
18635 echo "$as_me:18635: result: $ac_cv_header_time" >&5
18636 echo "${ECHO_T}$ac_cv_header_time" >&6
18637 if test $ac_cv_header_time = yes; then
18638
18639 cat >>confdefs.h <<\EOF
18640 #define TIME_WITH_SYS_TIME 1
18641 EOF
18642
18643 fi
18644
18645 cf_regex_func=no
18646 cf_regex_libs=
18647 case $host_os in
18648 (mingw*)
18649         # -lsystre -ltre -lintl -liconv
18650         echo "$as_me:18650: checking for regcomp in -lsystre" >&5
18651 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18652 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18653   echo $ECHO_N "(cached) $ECHO_C" >&6
18654 else
18655   ac_check_lib_save_LIBS=$LIBS
18656 LIBS="-lsystre  $LIBS"
18657 cat >conftest.$ac_ext <<_ACEOF
18658 #line 18658 "configure"
18659 #include "confdefs.h"
18660
18661 /* Override any gcc2 internal prototype to avoid an error.  */
18662 #ifdef __cplusplus
18663 extern "C"
18664 #endif
18665 /* We use char because int might match the return type of a gcc2
18666    builtin and then its argument prototype would still apply.  */
18667 char regcomp ();
18668 int
18669 main (void)
18670 {
18671 regcomp ();
18672   ;
18673   return 0;
18674 }
18675 _ACEOF
18676 rm -f conftest.$ac_objext conftest$ac_exeext
18677 if { (eval echo "$as_me:18677: \"$ac_link\"") >&5
18678   (eval $ac_link) 2>&5
18679   ac_status=$?
18680   echo "$as_me:18680: \$? = $ac_status" >&5
18681   (exit $ac_status); } &&
18682          { ac_try='test -s conftest$ac_exeext'
18683   { (eval echo "$as_me:18683: \"$ac_try\"") >&5
18684   (eval $ac_try) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); }; }; then
18688   ac_cv_lib_systre_regcomp=yes
18689 else
18690   echo "$as_me: failed program was:" >&5
18691 cat conftest.$ac_ext >&5
18692 ac_cv_lib_systre_regcomp=no
18693 fi
18694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18695 LIBS=$ac_check_lib_save_LIBS
18696 fi
18697 echo "$as_me:18697: result: $ac_cv_lib_systre_regcomp" >&5
18698 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18699 if test $ac_cv_lib_systre_regcomp = yes; then
18700
18701                 echo "$as_me:18701: checking for libiconv_open in -liconv" >&5
18702 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18703 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18704   echo $ECHO_N "(cached) $ECHO_C" >&6
18705 else
18706   ac_check_lib_save_LIBS=$LIBS
18707 LIBS="-liconv  $LIBS"
18708 cat >conftest.$ac_ext <<_ACEOF
18709 #line 18709 "configure"
18710 #include "confdefs.h"
18711
18712 /* Override any gcc2 internal prototype to avoid an error.  */
18713 #ifdef __cplusplus
18714 extern "C"
18715 #endif
18716 /* We use char because int might match the return type of a gcc2
18717    builtin and then its argument prototype would still apply.  */
18718 char libiconv_open ();
18719 int
18720 main (void)
18721 {
18722 libiconv_open ();
18723   ;
18724   return 0;
18725 }
18726 _ACEOF
18727 rm -f conftest.$ac_objext conftest$ac_exeext
18728 if { (eval echo "$as_me:18728: \"$ac_link\"") >&5
18729   (eval $ac_link) 2>&5
18730   ac_status=$?
18731   echo "$as_me:18731: \$? = $ac_status" >&5
18732   (exit $ac_status); } &&
18733          { ac_try='test -s conftest$ac_exeext'
18734   { (eval echo "$as_me:18734: \"$ac_try\"") >&5
18735   (eval $ac_try) 2>&5
18736   ac_status=$?
18737   echo "$as_me:18737: \$? = $ac_status" >&5
18738   (exit $ac_status); }; }; then
18739   ac_cv_lib_iconv_libiconv_open=yes
18740 else
18741   echo "$as_me: failed program was:" >&5
18742 cat conftest.$ac_ext >&5
18743 ac_cv_lib_iconv_libiconv_open=no
18744 fi
18745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18746 LIBS=$ac_check_lib_save_LIBS
18747 fi
18748 echo "$as_me:18748: result: $ac_cv_lib_iconv_libiconv_open" >&5
18749 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18750 if test $ac_cv_lib_iconv_libiconv_open = yes; then
18751
18752 cf_add_libs="$LIBS"
18753 # reverse order
18754 cf_add_0lib=
18755 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18756 # filter duplicates
18757 for cf_add_1lib in $cf_add_0lib; do
18758         for cf_add_2lib in $cf_add_libs; do
18759                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18760                         cf_add_1lib=
18761                         break
18762                 fi
18763         done
18764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18765 done
18766 LIBS="$cf_add_libs"
18767
18768 fi
18769
18770                 echo "$as_me:18770: checking for libintl_gettext in -lintl" >&5
18771 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18772 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18773   echo $ECHO_N "(cached) $ECHO_C" >&6
18774 else
18775   ac_check_lib_save_LIBS=$LIBS
18776 LIBS="-lintl  $LIBS"
18777 cat >conftest.$ac_ext <<_ACEOF
18778 #line 18778 "configure"
18779 #include "confdefs.h"
18780
18781 /* Override any gcc2 internal prototype to avoid an error.  */
18782 #ifdef __cplusplus
18783 extern "C"
18784 #endif
18785 /* We use char because int might match the return type of a gcc2
18786    builtin and then its argument prototype would still apply.  */
18787 char libintl_gettext ();
18788 int
18789 main (void)
18790 {
18791 libintl_gettext ();
18792   ;
18793   return 0;
18794 }
18795 _ACEOF
18796 rm -f conftest.$ac_objext conftest$ac_exeext
18797 if { (eval echo "$as_me:18797: \"$ac_link\"") >&5
18798   (eval $ac_link) 2>&5
18799   ac_status=$?
18800   echo "$as_me:18800: \$? = $ac_status" >&5
18801   (exit $ac_status); } &&
18802          { ac_try='test -s conftest$ac_exeext'
18803   { (eval echo "$as_me:18803: \"$ac_try\"") >&5
18804   (eval $ac_try) 2>&5
18805   ac_status=$?
18806   echo "$as_me:18806: \$? = $ac_status" >&5
18807   (exit $ac_status); }; }; then
18808   ac_cv_lib_intl_libintl_gettext=yes
18809 else
18810   echo "$as_me: failed program was:" >&5
18811 cat conftest.$ac_ext >&5
18812 ac_cv_lib_intl_libintl_gettext=no
18813 fi
18814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18815 LIBS=$ac_check_lib_save_LIBS
18816 fi
18817 echo "$as_me:18817: result: $ac_cv_lib_intl_libintl_gettext" >&5
18818 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18819 if test $ac_cv_lib_intl_libintl_gettext = yes; then
18820
18821 cf_add_libs="$LIBS"
18822 # reverse order
18823 cf_add_0lib=
18824 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18825 # filter duplicates
18826 for cf_add_1lib in $cf_add_0lib; do
18827         for cf_add_2lib in $cf_add_libs; do
18828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18829                         cf_add_1lib=
18830                         break
18831                 fi
18832         done
18833         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18834 done
18835 LIBS="$cf_add_libs"
18836
18837 fi
18838
18839                 echo "$as_me:18839: checking for tre_regcomp in -ltre" >&5
18840 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
18841 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
18842   echo $ECHO_N "(cached) $ECHO_C" >&6
18843 else
18844   ac_check_lib_save_LIBS=$LIBS
18845 LIBS="-ltre  $LIBS"
18846 cat >conftest.$ac_ext <<_ACEOF
18847 #line 18847 "configure"
18848 #include "confdefs.h"
18849
18850 /* Override any gcc2 internal prototype to avoid an error.  */
18851 #ifdef __cplusplus
18852 extern "C"
18853 #endif
18854 /* We use char because int might match the return type of a gcc2
18855    builtin and then its argument prototype would still apply.  */
18856 char tre_regcomp ();
18857 int
18858 main (void)
18859 {
18860 tre_regcomp ();
18861   ;
18862   return 0;
18863 }
18864 _ACEOF
18865 rm -f conftest.$ac_objext conftest$ac_exeext
18866 if { (eval echo "$as_me:18866: \"$ac_link\"") >&5
18867   (eval $ac_link) 2>&5
18868   ac_status=$?
18869   echo "$as_me:18869: \$? = $ac_status" >&5
18870   (exit $ac_status); } &&
18871          { ac_try='test -s conftest$ac_exeext'
18872   { (eval echo "$as_me:18872: \"$ac_try\"") >&5
18873   (eval $ac_try) 2>&5
18874   ac_status=$?
18875   echo "$as_me:18875: \$? = $ac_status" >&5
18876   (exit $ac_status); }; }; then
18877   ac_cv_lib_tre_tre_regcomp=yes
18878 else
18879   echo "$as_me: failed program was:" >&5
18880 cat conftest.$ac_ext >&5
18881 ac_cv_lib_tre_tre_regcomp=no
18882 fi
18883 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18884 LIBS=$ac_check_lib_save_LIBS
18885 fi
18886 echo "$as_me:18886: result: $ac_cv_lib_tre_tre_regcomp" >&5
18887 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
18888 if test $ac_cv_lib_tre_tre_regcomp = yes; then
18889
18890 cf_add_libs="$LIBS"
18891 # reverse order
18892 cf_add_0lib=
18893 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18894 # filter duplicates
18895 for cf_add_1lib in $cf_add_0lib; do
18896         for cf_add_2lib in $cf_add_libs; do
18897                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18898                         cf_add_1lib=
18899                         break
18900                 fi
18901         done
18902         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18903 done
18904 LIBS="$cf_add_libs"
18905
18906 fi
18907
18908 cf_add_libs="$LIBS"
18909 # reverse order
18910 cf_add_0lib=
18911 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18912 # filter duplicates
18913 for cf_add_1lib in $cf_add_0lib; do
18914         for cf_add_2lib in $cf_add_libs; do
18915                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18916                         cf_add_1lib=
18917                         break
18918                 fi
18919         done
18920         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18921 done
18922 LIBS="$cf_add_libs"
18923
18924                 cf_regex_func=regcomp
18925
18926 else
18927
18928                 echo "$as_me:18928: checking for regcomp in -lgnurx" >&5
18929 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
18930 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
18931   echo $ECHO_N "(cached) $ECHO_C" >&6
18932 else
18933   ac_check_lib_save_LIBS=$LIBS
18934 LIBS="-lgnurx  $LIBS"
18935 cat >conftest.$ac_ext <<_ACEOF
18936 #line 18936 "configure"
18937 #include "confdefs.h"
18938
18939 /* Override any gcc2 internal prototype to avoid an error.  */
18940 #ifdef __cplusplus
18941 extern "C"
18942 #endif
18943 /* We use char because int might match the return type of a gcc2
18944    builtin and then its argument prototype would still apply.  */
18945 char regcomp ();
18946 int
18947 main (void)
18948 {
18949 regcomp ();
18950   ;
18951   return 0;
18952 }
18953 _ACEOF
18954 rm -f conftest.$ac_objext conftest$ac_exeext
18955 if { (eval echo "$as_me:18955: \"$ac_link\"") >&5
18956   (eval $ac_link) 2>&5
18957   ac_status=$?
18958   echo "$as_me:18958: \$? = $ac_status" >&5
18959   (exit $ac_status); } &&
18960          { ac_try='test -s conftest$ac_exeext'
18961   { (eval echo "$as_me:18961: \"$ac_try\"") >&5
18962   (eval $ac_try) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit $ac_status); }; }; then
18966   ac_cv_lib_gnurx_regcomp=yes
18967 else
18968   echo "$as_me: failed program was:" >&5
18969 cat conftest.$ac_ext >&5
18970 ac_cv_lib_gnurx_regcomp=no
18971 fi
18972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18973 LIBS=$ac_check_lib_save_LIBS
18974 fi
18975 echo "$as_me:18975: result: $ac_cv_lib_gnurx_regcomp" >&5
18976 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
18977 if test $ac_cv_lib_gnurx_regcomp = yes; then
18978
18979 cf_add_libs="$LIBS"
18980 # reverse order
18981 cf_add_0lib=
18982 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18983 # filter duplicates
18984 for cf_add_1lib in $cf_add_0lib; do
18985         for cf_add_2lib in $cf_add_libs; do
18986                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18987                         cf_add_1lib=
18988                         break
18989                 fi
18990         done
18991         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18992 done
18993 LIBS="$cf_add_libs"
18994
18995                         cf_regex_func=regcomp
18996 fi
18997
18998 fi
18999
19000         ;;
19001 (*)
19002         cf_regex_libs="regex re"
19003         echo "$as_me:19003: checking for regcomp" >&5
19004 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19005 if test "${ac_cv_func_regcomp+set}" = set; then
19006   echo $ECHO_N "(cached) $ECHO_C" >&6
19007 else
19008   cat >conftest.$ac_ext <<_ACEOF
19009 #line 19009 "configure"
19010 #include "confdefs.h"
19011 #define regcomp autoconf_temporary
19012 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19013 #undef regcomp
19014
19015 #ifdef __cplusplus
19016 extern "C"
19017 #endif
19018
19019 /* We use char because int might match the return type of a gcc2
19020    builtin and then its argument prototype would still apply.  */
19021 char regcomp (void);
19022
19023 int
19024 main (void)
19025 {
19026
19027 /* The GNU C library defines stubs for functions which it implements
19028     to always fail with ENOSYS.  Some functions are actually named
19029     something starting with __ and the normal name is an alias.  */
19030 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19031 #error found stub for regcomp
19032 #endif
19033
19034         return regcomp ();
19035   ;
19036   return 0;
19037 }
19038 _ACEOF
19039 rm -f conftest.$ac_objext conftest$ac_exeext
19040 if { (eval echo "$as_me:19040: \"$ac_link\"") >&5
19041   (eval $ac_link) 2>&5
19042   ac_status=$?
19043   echo "$as_me:19043: \$? = $ac_status" >&5
19044   (exit $ac_status); } &&
19045          { ac_try='test -s conftest$ac_exeext'
19046   { (eval echo "$as_me:19046: \"$ac_try\"") >&5
19047   (eval $ac_try) 2>&5
19048   ac_status=$?
19049   echo "$as_me:19049: \$? = $ac_status" >&5
19050   (exit $ac_status); }; }; then
19051   ac_cv_func_regcomp=yes
19052 else
19053   echo "$as_me: failed program was:" >&5
19054 cat conftest.$ac_ext >&5
19055 ac_cv_func_regcomp=no
19056 fi
19057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19058 fi
19059 echo "$as_me:19059: result: $ac_cv_func_regcomp" >&5
19060 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19061 if test $ac_cv_func_regcomp = yes; then
19062   cf_regex_func=regcomp
19063 else
19064
19065                 for cf_regex_lib in $cf_regex_libs
19066                 do
19067                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19068 echo "$as_me:19068: checking for regcomp in -l$cf_regex_lib" >&5
19069 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19070 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19071   echo $ECHO_N "(cached) $ECHO_C" >&6
19072 else
19073   ac_check_lib_save_LIBS=$LIBS
19074 LIBS="-l$cf_regex_lib  $LIBS"
19075 cat >conftest.$ac_ext <<_ACEOF
19076 #line 19076 "configure"
19077 #include "confdefs.h"
19078
19079 /* Override any gcc2 internal prototype to avoid an error.  */
19080 #ifdef __cplusplus
19081 extern "C"
19082 #endif
19083 /* We use char because int might match the return type of a gcc2
19084    builtin and then its argument prototype would still apply.  */
19085 char regcomp ();
19086 int
19087 main (void)
19088 {
19089 regcomp ();
19090   ;
19091   return 0;
19092 }
19093 _ACEOF
19094 rm -f conftest.$ac_objext conftest$ac_exeext
19095 if { (eval echo "$as_me:19095: \"$ac_link\"") >&5
19096   (eval $ac_link) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit $ac_status); } &&
19100          { ac_try='test -s conftest$ac_exeext'
19101   { (eval echo "$as_me:19101: \"$ac_try\"") >&5
19102   (eval $ac_try) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit $ac_status); }; }; then
19106   eval "$as_ac_Lib=yes"
19107 else
19108   echo "$as_me: failed program was:" >&5
19109 cat conftest.$ac_ext >&5
19110 eval "$as_ac_Lib=no"
19111 fi
19112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19113 LIBS=$ac_check_lib_save_LIBS
19114 fi
19115 echo "$as_me:19115: result: `eval echo '${'$as_ac_Lib'}'`" >&5
19116 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
19117 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
19118
19119 cf_add_libs="$LIBS"
19120 # reverse order
19121 cf_add_0lib=
19122 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19123 # filter duplicates
19124 for cf_add_1lib in $cf_add_0lib; do
19125         for cf_add_2lib in $cf_add_libs; do
19126                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19127                         cf_add_1lib=
19128                         break
19129                 fi
19130         done
19131         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19132 done
19133 LIBS="$cf_add_libs"
19134
19135                                         cf_regex_func=regcomp
19136                                         break
19137 fi
19138
19139                 done
19140
19141 fi
19142
19143         ;;
19144 esac
19145
19146 if test "$cf_regex_func" = no ; then
19147         echo "$as_me:19147: checking for compile" >&5
19148 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19149 if test "${ac_cv_func_compile+set}" = set; then
19150   echo $ECHO_N "(cached) $ECHO_C" >&6
19151 else
19152   cat >conftest.$ac_ext <<_ACEOF
19153 #line 19153 "configure"
19154 #include "confdefs.h"
19155 #define compile autoconf_temporary
19156 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19157 #undef compile
19158
19159 #ifdef __cplusplus
19160 extern "C"
19161 #endif
19162
19163 /* We use char because int might match the return type of a gcc2
19164    builtin and then its argument prototype would still apply.  */
19165 char compile (void);
19166
19167 int
19168 main (void)
19169 {
19170
19171 /* The GNU C library defines stubs for functions which it implements
19172     to always fail with ENOSYS.  Some functions are actually named
19173     something starting with __ and the normal name is an alias.  */
19174 #if defined (__stub_compile) || defined (__stub___compile)
19175 #error found stub for compile
19176 #endif
19177
19178         return compile ();
19179   ;
19180   return 0;
19181 }
19182 _ACEOF
19183 rm -f conftest.$ac_objext conftest$ac_exeext
19184 if { (eval echo "$as_me:19184: \"$ac_link\"") >&5
19185   (eval $ac_link) 2>&5
19186   ac_status=$?
19187   echo "$as_me:19187: \$? = $ac_status" >&5
19188   (exit $ac_status); } &&
19189          { ac_try='test -s conftest$ac_exeext'
19190   { (eval echo "$as_me:19190: \"$ac_try\"") >&5
19191   (eval $ac_try) 2>&5
19192   ac_status=$?
19193   echo "$as_me:19193: \$? = $ac_status" >&5
19194   (exit $ac_status); }; }; then
19195   ac_cv_func_compile=yes
19196 else
19197   echo "$as_me: failed program was:" >&5
19198 cat conftest.$ac_ext >&5
19199 ac_cv_func_compile=no
19200 fi
19201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19202 fi
19203 echo "$as_me:19203: result: $ac_cv_func_compile" >&5
19204 echo "${ECHO_T}$ac_cv_func_compile" >&6
19205 if test $ac_cv_func_compile = yes; then
19206   cf_regex_func=compile
19207 else
19208
19209                 echo "$as_me:19209: checking for compile in -lgen" >&5
19210 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19211 if test "${ac_cv_lib_gen_compile+set}" = set; then
19212   echo $ECHO_N "(cached) $ECHO_C" >&6
19213 else
19214   ac_check_lib_save_LIBS=$LIBS
19215 LIBS="-lgen  $LIBS"
19216 cat >conftest.$ac_ext <<_ACEOF
19217 #line 19217 "configure"
19218 #include "confdefs.h"
19219
19220 /* Override any gcc2 internal prototype to avoid an error.  */
19221 #ifdef __cplusplus
19222 extern "C"
19223 #endif
19224 /* We use char because int might match the return type of a gcc2
19225    builtin and then its argument prototype would still apply.  */
19226 char compile ();
19227 int
19228 main (void)
19229 {
19230 compile ();
19231   ;
19232   return 0;
19233 }
19234 _ACEOF
19235 rm -f conftest.$ac_objext conftest$ac_exeext
19236 if { (eval echo "$as_me:19236: \"$ac_link\"") >&5
19237   (eval $ac_link) 2>&5
19238   ac_status=$?
19239   echo "$as_me:19239: \$? = $ac_status" >&5
19240   (exit $ac_status); } &&
19241          { ac_try='test -s conftest$ac_exeext'
19242   { (eval echo "$as_me:19242: \"$ac_try\"") >&5
19243   (eval $ac_try) 2>&5
19244   ac_status=$?
19245   echo "$as_me:19245: \$? = $ac_status" >&5
19246   (exit $ac_status); }; }; then
19247   ac_cv_lib_gen_compile=yes
19248 else
19249   echo "$as_me: failed program was:" >&5
19250 cat conftest.$ac_ext >&5
19251 ac_cv_lib_gen_compile=no
19252 fi
19253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19254 LIBS=$ac_check_lib_save_LIBS
19255 fi
19256 echo "$as_me:19256: result: $ac_cv_lib_gen_compile" >&5
19257 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19258 if test $ac_cv_lib_gen_compile = yes; then
19259
19260 cf_add_libs="$LIBS"
19261 # reverse order
19262 cf_add_0lib=
19263 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19264 # filter duplicates
19265 for cf_add_1lib in $cf_add_0lib; do
19266         for cf_add_2lib in $cf_add_libs; do
19267                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19268                         cf_add_1lib=
19269                         break
19270                 fi
19271         done
19272         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19273 done
19274 LIBS="$cf_add_libs"
19275
19276                                 cf_regex_func=compile
19277 fi
19278
19279 fi
19280
19281 fi
19282
19283 if test "$cf_regex_func" = no ; then
19284         { echo "$as_me:19284: WARNING: cannot find regular expression library" >&5
19285 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19286 fi
19287
19288 echo "$as_me:19288: checking for regular-expression headers" >&5
19289 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19290 if test "${cf_cv_regex_hdrs+set}" = set; then
19291   echo $ECHO_N "(cached) $ECHO_C" >&6
19292 else
19293
19294 cf_cv_regex_hdrs=no
19295 case $cf_regex_func in
19296 (compile)
19297         for cf_regex_hdr in regexp.h regexpr.h
19298         do
19299                 cat >conftest.$ac_ext <<_ACEOF
19300 #line 19300 "configure"
19301 #include "confdefs.h"
19302 #include <$cf_regex_hdr>
19303 int
19304 main (void)
19305 {
19306
19307                         char *p = compile("", "", "", 0);
19308                         int x = step("", "");
19309                         (void)p;
19310                         (void)x;
19311
19312   ;
19313   return 0;
19314 }
19315 _ACEOF
19316 rm -f conftest.$ac_objext conftest$ac_exeext
19317 if { (eval echo "$as_me:19317: \"$ac_link\"") >&5
19318   (eval $ac_link) 2>&5
19319   ac_status=$?
19320   echo "$as_me:19320: \$? = $ac_status" >&5
19321   (exit $ac_status); } &&
19322          { ac_try='test -s conftest$ac_exeext'
19323   { (eval echo "$as_me:19323: \"$ac_try\"") >&5
19324   (eval $ac_try) 2>&5
19325   ac_status=$?
19326   echo "$as_me:19326: \$? = $ac_status" >&5
19327   (exit $ac_status); }; }; then
19328
19329                         cf_cv_regex_hdrs=$cf_regex_hdr
19330                         break
19331
19332 else
19333   echo "$as_me: failed program was:" >&5
19334 cat conftest.$ac_ext >&5
19335 fi
19336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19337         done
19338         ;;
19339 (*)
19340         for cf_regex_hdr in regex.h
19341         do
19342                 cat >conftest.$ac_ext <<_ACEOF
19343 #line 19343 "configure"
19344 #include "confdefs.h"
19345 #include <sys/types.h>
19346 #include <$cf_regex_hdr>
19347 int
19348 main (void)
19349 {
19350
19351                         regex_t *p = 0;
19352                         int x = regcomp(p, "", 0);
19353                         int y = regexec(p, "", 0, 0, 0);
19354                         (void)x;
19355                         (void)y;
19356                         regfree(p);
19357
19358   ;
19359   return 0;
19360 }
19361 _ACEOF
19362 rm -f conftest.$ac_objext conftest$ac_exeext
19363 if { (eval echo "$as_me:19363: \"$ac_link\"") >&5
19364   (eval $ac_link) 2>&5
19365   ac_status=$?
19366   echo "$as_me:19366: \$? = $ac_status" >&5
19367   (exit $ac_status); } &&
19368          { ac_try='test -s conftest$ac_exeext'
19369   { (eval echo "$as_me:19369: \"$ac_try\"") >&5
19370   (eval $ac_try) 2>&5
19371   ac_status=$?
19372   echo "$as_me:19372: \$? = $ac_status" >&5
19373   (exit $ac_status); }; }; then
19374
19375                         cf_cv_regex_hdrs=$cf_regex_hdr
19376                         break
19377
19378 else
19379   echo "$as_me: failed program was:" >&5
19380 cat conftest.$ac_ext >&5
19381 fi
19382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19383         done
19384         ;;
19385 esac
19386
19387 fi
19388 echo "$as_me:19388: result: $cf_cv_regex_hdrs" >&5
19389 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19390
19391 case $cf_cv_regex_hdrs in
19392         (no)            { echo "$as_me:19392: WARNING: no regular expression header found" >&5
19393 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19394         (regex.h)
19395 cat >>confdefs.h <<\EOF
19396 #define HAVE_REGEX_H_FUNCS 1
19397 EOF
19398  ;;
19399         (regexp.h)
19400 cat >>confdefs.h <<\EOF
19401 #define HAVE_REGEXP_H_FUNCS 1
19402 EOF
19403  ;;
19404         (regexpr.h)
19405 cat >>confdefs.h <<\EOF
19406 #define HAVE_REGEXPR_H_FUNCS 1
19407 EOF
19408  ;;
19409 esac
19410
19411 for ac_header in \
19412 fcntl.h \
19413 getopt.h \
19414 limits.h \
19415 locale.h \
19416 math.h \
19417 poll.h \
19418 sys/ioctl.h \
19419 sys/param.h \
19420 sys/poll.h \
19421 sys/select.h \
19422 sys/time.h \
19423 sys/times.h \
19424 ttyent.h \
19425 unistd.h \
19426 wctype.h \
19427
19428 do
19429 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19430 echo "$as_me:19430: checking for $ac_header" >&5
19431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19433   echo $ECHO_N "(cached) $ECHO_C" >&6
19434 else
19435   cat >conftest.$ac_ext <<_ACEOF
19436 #line 19436 "configure"
19437 #include "confdefs.h"
19438 #include <$ac_header>
19439 _ACEOF
19440 if { (eval echo "$as_me:19440: \"$ac_cpp conftest.$ac_ext\"") >&5
19441   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19442   ac_status=$?
19443   egrep -v '^ *\+' conftest.er1 >conftest.err
19444   rm -f conftest.er1
19445   cat conftest.err >&5
19446   echo "$as_me:19446: \$? = $ac_status" >&5
19447   (exit $ac_status); } >/dev/null; then
19448   if test -s conftest.err; then
19449     ac_cpp_err=$ac_c_preproc_warn_flag
19450   else
19451     ac_cpp_err=
19452   fi
19453 else
19454   ac_cpp_err=yes
19455 fi
19456 if test -z "$ac_cpp_err"; then
19457   eval "$as_ac_Header=yes"
19458 else
19459   echo "$as_me: failed program was:" >&5
19460   cat conftest.$ac_ext >&5
19461   eval "$as_ac_Header=no"
19462 fi
19463 rm -f conftest.err conftest.$ac_ext
19464 fi
19465 echo "$as_me:19465: result: `eval echo '${'$as_ac_Header'}'`" >&5
19466 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19467 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19468   cat >>confdefs.h <<EOF
19469 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19470 EOF
19471
19472 fi
19473 done
19474
19475 for ac_header in unistd.h getopt.h
19476 do
19477 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19478 echo "$as_me:19478: checking for $ac_header" >&5
19479 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19480 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19481   echo $ECHO_N "(cached) $ECHO_C" >&6
19482 else
19483   cat >conftest.$ac_ext <<_ACEOF
19484 #line 19484 "configure"
19485 #include "confdefs.h"
19486 #include <$ac_header>
19487 _ACEOF
19488 if { (eval echo "$as_me:19488: \"$ac_cpp conftest.$ac_ext\"") >&5
19489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19490   ac_status=$?
19491   egrep -v '^ *\+' conftest.er1 >conftest.err
19492   rm -f conftest.er1
19493   cat conftest.err >&5
19494   echo "$as_me:19494: \$? = $ac_status" >&5
19495   (exit $ac_status); } >/dev/null; then
19496   if test -s conftest.err; then
19497     ac_cpp_err=$ac_c_preproc_warn_flag
19498   else
19499     ac_cpp_err=
19500   fi
19501 else
19502   ac_cpp_err=yes
19503 fi
19504 if test -z "$ac_cpp_err"; then
19505   eval "$as_ac_Header=yes"
19506 else
19507   echo "$as_me: failed program was:" >&5
19508   cat conftest.$ac_ext >&5
19509   eval "$as_ac_Header=no"
19510 fi
19511 rm -f conftest.err conftest.$ac_ext
19512 fi
19513 echo "$as_me:19513: result: `eval echo '${'$as_ac_Header'}'`" >&5
19514 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19515 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19516   cat >>confdefs.h <<EOF
19517 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19518 EOF
19519
19520 fi
19521 done
19522
19523 echo "$as_me:19523: checking for header declaring getopt variables" >&5
19524 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19525 if test "${cf_cv_getopt_header+set}" = set; then
19526   echo $ECHO_N "(cached) $ECHO_C" >&6
19527 else
19528
19529 cf_cv_getopt_header=none
19530 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19531 do
19532 cat >conftest.$ac_ext <<_ACEOF
19533 #line 19533 "configure"
19534 #include "confdefs.h"
19535
19536 #include <$cf_header>
19537 int
19538 main (void)
19539 {
19540 int x = optind; char *y = optarg
19541   ;
19542   return 0;
19543 }
19544 _ACEOF
19545 rm -f conftest.$ac_objext
19546 if { (eval echo "$as_me:19546: \"$ac_compile\"") >&5
19547   (eval $ac_compile) 2>&5
19548   ac_status=$?
19549   echo "$as_me:19549: \$? = $ac_status" >&5
19550   (exit $ac_status); } &&
19551          { ac_try='test -s conftest.$ac_objext'
19552   { (eval echo "$as_me:19552: \"$ac_try\"") >&5
19553   (eval $ac_try) 2>&5
19554   ac_status=$?
19555   echo "$as_me:19555: \$? = $ac_status" >&5
19556   (exit $ac_status); }; }; then
19557   cf_cv_getopt_header=$cf_header
19558  break
19559 else
19560   echo "$as_me: failed program was:" >&5
19561 cat conftest.$ac_ext >&5
19562 fi
19563 rm -f conftest.$ac_objext conftest.$ac_ext
19564 done
19565
19566 fi
19567 echo "$as_me:19567: result: $cf_cv_getopt_header" >&5
19568 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19569 if test $cf_cv_getopt_header != none ; then
19570
19571 cat >>confdefs.h <<\EOF
19572 #define HAVE_GETOPT_HEADER 1
19573 EOF
19574
19575 fi
19576 if test $cf_cv_getopt_header = getopt.h ; then
19577
19578 cat >>confdefs.h <<\EOF
19579 #define NEED_GETOPT_H 1
19580 EOF
19581
19582 fi
19583
19584 echo "$as_me:19584: checking if external environ is declared" >&5
19585 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19586 if test "${cf_cv_dcl_environ+set}" = set; then
19587   echo $ECHO_N "(cached) $ECHO_C" >&6
19588 else
19589
19590     cat >conftest.$ac_ext <<_ACEOF
19591 #line 19591 "configure"
19592 #include "confdefs.h"
19593
19594 #ifdef HAVE_STDLIB_H
19595 #include <stdlib.h>
19596 #endif
19597 #include <unistd.h>
19598 int
19599 main (void)
19600 {
19601 int x = (int) environ
19602   ;
19603   return 0;
19604 }
19605 _ACEOF
19606 rm -f conftest.$ac_objext
19607 if { (eval echo "$as_me:19607: \"$ac_compile\"") >&5
19608   (eval $ac_compile) 2>&5
19609   ac_status=$?
19610   echo "$as_me:19610: \$? = $ac_status" >&5
19611   (exit $ac_status); } &&
19612          { ac_try='test -s conftest.$ac_objext'
19613   { (eval echo "$as_me:19613: \"$ac_try\"") >&5
19614   (eval $ac_try) 2>&5
19615   ac_status=$?
19616   echo "$as_me:19616: \$? = $ac_status" >&5
19617   (exit $ac_status); }; }; then
19618   cf_cv_dcl_environ=yes
19619 else
19620   echo "$as_me: failed program was:" >&5
19621 cat conftest.$ac_ext >&5
19622 cf_cv_dcl_environ=no
19623 fi
19624 rm -f conftest.$ac_objext conftest.$ac_ext
19625
19626 fi
19627 echo "$as_me:19627: result: $cf_cv_dcl_environ" >&5
19628 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19629
19630 if test "$cf_cv_dcl_environ" = no ; then
19631
19632 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19633
19634     cat >>confdefs.h <<EOF
19635 #define $cf_result 1
19636 EOF
19637
19638 fi
19639
19640 # It's possible (for near-UNIX clones) that the data doesn't exist
19641
19642 echo "$as_me:19642: checking if external environ exists" >&5
19643 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19644 if test "${cf_cv_have_environ+set}" = set; then
19645   echo $ECHO_N "(cached) $ECHO_C" >&6
19646 else
19647
19648         cat >conftest.$ac_ext <<_ACEOF
19649 #line 19649 "configure"
19650 #include "confdefs.h"
19651
19652 #undef environ
19653 extern int environ;
19654
19655 int
19656 main (void)
19657 {
19658 environ = 2
19659   ;
19660   return 0;
19661 }
19662 _ACEOF
19663 rm -f conftest.$ac_objext conftest$ac_exeext
19664 if { (eval echo "$as_me:19664: \"$ac_link\"") >&5
19665   (eval $ac_link) 2>&5
19666   ac_status=$?
19667   echo "$as_me:19667: \$? = $ac_status" >&5
19668   (exit $ac_status); } &&
19669          { ac_try='test -s conftest$ac_exeext'
19670   { (eval echo "$as_me:19670: \"$ac_try\"") >&5
19671   (eval $ac_try) 2>&5
19672   ac_status=$?
19673   echo "$as_me:19673: \$? = $ac_status" >&5
19674   (exit $ac_status); }; }; then
19675   cf_cv_have_environ=yes
19676 else
19677   echo "$as_me: failed program was:" >&5
19678 cat conftest.$ac_ext >&5
19679 cf_cv_have_environ=no
19680 fi
19681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19682
19683 fi
19684 echo "$as_me:19684: result: $cf_cv_have_environ" >&5
19685 echo "${ECHO_T}$cf_cv_have_environ" >&6
19686
19687 if test "$cf_cv_have_environ" = yes ; then
19688
19689 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19690
19691         cat >>confdefs.h <<EOF
19692 #define $cf_result 1
19693 EOF
19694
19695 fi
19696
19697 echo "$as_me:19697: checking for getenv" >&5
19698 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19699 if test "${ac_cv_func_getenv+set}" = set; then
19700   echo $ECHO_N "(cached) $ECHO_C" >&6
19701 else
19702   cat >conftest.$ac_ext <<_ACEOF
19703 #line 19703 "configure"
19704 #include "confdefs.h"
19705 #define getenv autoconf_temporary
19706 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19707 #undef getenv
19708
19709 #ifdef __cplusplus
19710 extern "C"
19711 #endif
19712
19713 /* We use char because int might match the return type of a gcc2
19714    builtin and then its argument prototype would still apply.  */
19715 char getenv (void);
19716
19717 int
19718 main (void)
19719 {
19720
19721 /* The GNU C library defines stubs for functions which it implements
19722     to always fail with ENOSYS.  Some functions are actually named
19723     something starting with __ and the normal name is an alias.  */
19724 #if defined (__stub_getenv) || defined (__stub___getenv)
19725 #error found stub for getenv
19726 #endif
19727
19728         return getenv ();
19729   ;
19730   return 0;
19731 }
19732 _ACEOF
19733 rm -f conftest.$ac_objext conftest$ac_exeext
19734 if { (eval echo "$as_me:19734: \"$ac_link\"") >&5
19735   (eval $ac_link) 2>&5
19736   ac_status=$?
19737   echo "$as_me:19737: \$? = $ac_status" >&5
19738   (exit $ac_status); } &&
19739          { ac_try='test -s conftest$ac_exeext'
19740   { (eval echo "$as_me:19740: \"$ac_try\"") >&5
19741   (eval $ac_try) 2>&5
19742   ac_status=$?
19743   echo "$as_me:19743: \$? = $ac_status" >&5
19744   (exit $ac_status); }; }; then
19745   ac_cv_func_getenv=yes
19746 else
19747   echo "$as_me: failed program was:" >&5
19748 cat conftest.$ac_ext >&5
19749 ac_cv_func_getenv=no
19750 fi
19751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19752 fi
19753 echo "$as_me:19753: result: $ac_cv_func_getenv" >&5
19754 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19755
19756 for ac_func in putenv setenv strdup
19757 do
19758 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19759 echo "$as_me:19759: checking for $ac_func" >&5
19760 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19761 if eval "test \"\${$as_ac_var+set}\" = set"; then
19762   echo $ECHO_N "(cached) $ECHO_C" >&6
19763 else
19764   cat >conftest.$ac_ext <<_ACEOF
19765 #line 19765 "configure"
19766 #include "confdefs.h"
19767 #define $ac_func autoconf_temporary
19768 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19769 #undef $ac_func
19770
19771 #ifdef __cplusplus
19772 extern "C"
19773 #endif
19774
19775 /* We use char because int might match the return type of a gcc2
19776    builtin and then its argument prototype would still apply.  */
19777 char $ac_func (void);
19778
19779 int
19780 main (void)
19781 {
19782
19783 /* The GNU C library defines stubs for functions which it implements
19784     to always fail with ENOSYS.  Some functions are actually named
19785     something starting with __ and the normal name is an alias.  */
19786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19787 #error found stub for $ac_func
19788 #endif
19789
19790         return $ac_func ();
19791   ;
19792   return 0;
19793 }
19794 _ACEOF
19795 rm -f conftest.$ac_objext conftest$ac_exeext
19796 if { (eval echo "$as_me:19796: \"$ac_link\"") >&5
19797   (eval $ac_link) 2>&5
19798   ac_status=$?
19799   echo "$as_me:19799: \$? = $ac_status" >&5
19800   (exit $ac_status); } &&
19801          { ac_try='test -s conftest$ac_exeext'
19802   { (eval echo "$as_me:19802: \"$ac_try\"") >&5
19803   (eval $ac_try) 2>&5
19804   ac_status=$?
19805   echo "$as_me:19805: \$? = $ac_status" >&5
19806   (exit $ac_status); }; }; then
19807   eval "$as_ac_var=yes"
19808 else
19809   echo "$as_me: failed program was:" >&5
19810 cat conftest.$ac_ext >&5
19811 eval "$as_ac_var=no"
19812 fi
19813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19814 fi
19815 echo "$as_me:19815: result: `eval echo '${'$as_ac_var'}'`" >&5
19816 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19817 if test `eval echo '${'$as_ac_var'}'` = yes; then
19818   cat >>confdefs.h <<EOF
19819 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19820 EOF
19821
19822 fi
19823 done
19824
19825 echo "$as_me:19825: checking if getenv returns consistent values" >&5
19826 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19827 if test "${cf_cv_consistent_getenv+set}" = set; then
19828   echo $ECHO_N "(cached) $ECHO_C" >&6
19829 else
19830
19831 if test "$cross_compiling" = yes; then
19832   cf_cv_consistent_getenv=unknown
19833 else
19834   cat >conftest.$ac_ext <<_ACEOF
19835 #line 19835 "configure"
19836 #include "confdefs.h"
19837
19838 #include <stdlib.h>
19839 #include <unistd.h>
19840 #include <stdio.h>
19841 #include <string.h>
19842 #include <sys/types.h>
19843
19844 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19845 extern char **environ;  /* POSIX, but some systems are not... */
19846 #endif
19847
19848 #if defined(HAVE_STRDUP)
19849 #define str_alloc(s) strdup(s)
19850 #else
19851 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19852 #endif
19853
19854 static void set_value(const char *name, const char *value)
19855 {
19856 #if defined(HAVE_SETENV)
19857         setenv(name, value, 1);
19858 #elif defined(HAVE_PUTENV)
19859         char buffer[1024];
19860         sprintf(buffer, "%s=%s", name, value);
19861         putenv(str_alloc(buffer));
19862 #else
19863 #error neither putenv/setenv found
19864 #endif
19865 }
19866 int main(void)
19867 {
19868         int pass;
19869         size_t numenv, limit, j;
19870         char **mynames;
19871         char **myvalues;
19872         char **mypointer;
19873         char *equals;
19874         for (numenv = 0; environ[numenv]; ++numenv) ;
19875         limit = numenv + 10;
19876         mynames = (char **) calloc(limit + 1, sizeof(char *));
19877         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19878         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19879 #if defined(HAVE_ENVIRON)
19880         for (j = 0; environ[j]; ++j) {
19881                 mynames[j] = str_alloc(environ[j]);
19882                 equals = strchr(mynames[j], '=');
19883                 if (equals != 0) {
19884                         *equals++ = '\0';
19885                         myvalues[j] = str_alloc(equals);
19886                 } else {
19887                         myvalues[j] = str_alloc("");
19888                 }
19889         }
19890 #endif
19891         for (j = numenv; j < limit; ++j) {
19892                 char name[80];
19893                 char value[80];
19894                 size_t found;
19895                 size_t k = 0;
19896                 do {
19897                         size_t jk;
19898                         found = 0;
19899                         sprintf(name, "TERM%lu", (unsigned long) k);
19900                         for (jk = 0; jk < j; ++jk) {
19901                                 if (!strcmp(name, mynames[jk])) {
19902                                         found = 1;
19903                                         ++k;
19904                                         break;
19905                                 }
19906                         }
19907                 } while (found);
19908                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19909                 set_value(name, value);
19910                 mynames[j] = str_alloc(name);
19911                 myvalues[j] = str_alloc(value);
19912         }
19913         for (pass = 0; pass < 3; ++pass) {
19914                 for (j = 0; j < limit; ++j) {
19915                         char *value = getenv(mynames[j]);
19916                         if (pass) {
19917                                 if (value == 0) {
19918                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19919                                         ${cf_cv_main_return:-return}(1);
19920                                 } else if (value != mypointer[j]) {
19921                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19922                                         ${cf_cv_main_return:-return}(1);
19923                                 } else if (strcmp(value, myvalues[j])) {
19924                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19925                                         ${cf_cv_main_return:-return}(1);
19926                                 }
19927                         } else {
19928                                 size_t k;
19929                                 mypointer[j] = value;
19930                                 for (k = 0; k < j; ++k) {
19931                                         if (mypointer[j] == mypointer[k]) {
19932                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19933                                                 ${cf_cv_main_return:-return}(1);
19934                                         }
19935                                 }
19936                         }
19937                 }
19938         }
19939         ${cf_cv_main_return:-return}(0);
19940 }
19941
19942 _ACEOF
19943 rm -f conftest$ac_exeext
19944 if { (eval echo "$as_me:19944: \"$ac_link\"") >&5
19945   (eval $ac_link) 2>&5
19946   ac_status=$?
19947   echo "$as_me:19947: \$? = $ac_status" >&5
19948   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19949   { (eval echo "$as_me:19949: \"$ac_try\"") >&5
19950   (eval $ac_try) 2>&5
19951   ac_status=$?
19952   echo "$as_me:19952: \$? = $ac_status" >&5
19953   (exit $ac_status); }; }; then
19954   cf_cv_consistent_getenv=yes
19955 else
19956   echo "$as_me: program exited with status $ac_status" >&5
19957 echo "$as_me: failed program was:" >&5
19958 cat conftest.$ac_ext >&5
19959 cf_cv_consistent_getenv=no
19960 fi
19961 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19962 fi
19963
19964 fi
19965 echo "$as_me:19965: result: $cf_cv_consistent_getenv" >&5
19966 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19967
19968 if test "x$cf_cv_consistent_getenv" = xno
19969 then
19970
19971 cat >>confdefs.h <<\EOF
19972 #define HAVE_CONSISTENT_GETENV 1
19973 EOF
19974
19975 fi
19976
19977 if test "x$cf_cv_consistent_getenv" = xno && \
19978         test "x$cf_with_trace" = xyes
19979 then
19980         { echo "$as_me:19980: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19981 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19982 fi
19983
19984 echo "$as_me:19984: checking if sys/time.h works with sys/select.h" >&5
19985 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19986 if test "${cf_cv_sys_time_select+set}" = set; then
19987   echo $ECHO_N "(cached) $ECHO_C" >&6
19988 else
19989
19990 cat >conftest.$ac_ext <<_ACEOF
19991 #line 19991 "configure"
19992 #include "confdefs.h"
19993
19994 #include <sys/types.h>
19995 #ifdef HAVE_SYS_TIME_H
19996 #include <sys/time.h>
19997 #endif
19998 #ifdef HAVE_SYS_SELECT_H
19999 #include <sys/select.h>
20000 #endif
20001
20002 int
20003 main (void)
20004 {
20005
20006   ;
20007   return 0;
20008 }
20009 _ACEOF
20010 rm -f conftest.$ac_objext
20011 if { (eval echo "$as_me:20011: \"$ac_compile\"") >&5
20012   (eval $ac_compile) 2>&5
20013   ac_status=$?
20014   echo "$as_me:20014: \$? = $ac_status" >&5
20015   (exit $ac_status); } &&
20016          { ac_try='test -s conftest.$ac_objext'
20017   { (eval echo "$as_me:20017: \"$ac_try\"") >&5
20018   (eval $ac_try) 2>&5
20019   ac_status=$?
20020   echo "$as_me:20020: \$? = $ac_status" >&5
20021   (exit $ac_status); }; }; then
20022   cf_cv_sys_time_select=yes
20023 else
20024   echo "$as_me: failed program was:" >&5
20025 cat conftest.$ac_ext >&5
20026 cf_cv_sys_time_select=no
20027 fi
20028 rm -f conftest.$ac_objext conftest.$ac_ext
20029
20030 fi
20031
20032 echo "$as_me:20032: result: $cf_cv_sys_time_select" >&5
20033 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20034 test "$cf_cv_sys_time_select" = yes &&
20035 cat >>confdefs.h <<\EOF
20036 #define HAVE_SYS_TIME_SELECT 1
20037 EOF
20038
20039 ###     checks for compiler characteristics
20040 ac_ext=c
20041 ac_cpp='$CPP $CPPFLAGS'
20042 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20043 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20044 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20045 ac_main_return=return
20046
20047 echo "$as_me:20047: checking for an ANSI C-conforming const" >&5
20048 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20049 if test "${ac_cv_c_const+set}" = set; then
20050   echo $ECHO_N "(cached) $ECHO_C" >&6
20051 else
20052   cat >conftest.$ac_ext <<_ACEOF
20053 #line 20053 "configure"
20054 #include "confdefs.h"
20055
20056 int
20057 main (void)
20058 {
20059 /* FIXME: Include the comments suggested by Paul. */
20060 #ifndef __cplusplus
20061   /* Ultrix mips cc rejects this.  */
20062   typedef int charset[2];
20063   const charset x;
20064   /* SunOS 4.1.1 cc rejects this.  */
20065   char const *const *ccp;
20066   char **p;
20067   /* NEC SVR4.0.2 mips cc rejects this.  */
20068   struct point {int x, y;};
20069   static struct point const zero = {0,0};
20070   /* AIX XL C 1.02.0.0 rejects this.
20071      It does not let you subtract one const X* pointer from another in
20072      an arm of an if-expression whose if-part is not a constant
20073      expression */
20074   const char *g = "string";
20075   ccp = &g + (g ? g-g : 0);
20076   /* HPUX 7.0 cc rejects these. */
20077   ++ccp;
20078   p = (char**) ccp;
20079   ccp = (char const *const *) p;
20080   { /* SCO 3.2v4 cc rejects this.  */
20081     char *t;
20082     char const *s = 0 ? (char *) 0 : (char const *) 0;
20083
20084     *t++ = 0;
20085   }
20086   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20087     int x[] = {25, 17};
20088     const int *foo = &x[0];
20089     ++foo;
20090   }
20091   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20092     typedef const int *iptr;
20093     iptr p = 0;
20094     ++p;
20095   }
20096   { /* AIX XL C 1.02.0.0 rejects this saying
20097        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20098     struct s { int j; const int *ap[3]; };
20099     struct s *b; b->j = 5;
20100   }
20101   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20102     const int foo = 10;
20103   }
20104 #endif
20105
20106   ;
20107   return 0;
20108 }
20109 _ACEOF
20110 rm -f conftest.$ac_objext
20111 if { (eval echo "$as_me:20111: \"$ac_compile\"") >&5
20112   (eval $ac_compile) 2>&5
20113   ac_status=$?
20114   echo "$as_me:20114: \$? = $ac_status" >&5
20115   (exit $ac_status); } &&
20116          { ac_try='test -s conftest.$ac_objext'
20117   { (eval echo "$as_me:20117: \"$ac_try\"") >&5
20118   (eval $ac_try) 2>&5
20119   ac_status=$?
20120   echo "$as_me:20120: \$? = $ac_status" >&5
20121   (exit $ac_status); }; }; then
20122   ac_cv_c_const=yes
20123 else
20124   echo "$as_me: failed program was:" >&5
20125 cat conftest.$ac_ext >&5
20126 ac_cv_c_const=no
20127 fi
20128 rm -f conftest.$ac_objext conftest.$ac_ext
20129 fi
20130 echo "$as_me:20130: result: $ac_cv_c_const" >&5
20131 echo "${ECHO_T}$ac_cv_c_const" >&6
20132 if test $ac_cv_c_const = no; then
20133
20134 cat >>confdefs.h <<\EOF
20135 #define const
20136 EOF
20137
20138 fi
20139
20140 echo "$as_me:20140: checking for inline" >&5
20141 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20142 if test "${ac_cv_c_inline+set}" = set; then
20143   echo $ECHO_N "(cached) $ECHO_C" >&6
20144 else
20145   ac_cv_c_inline=no
20146 for ac_kw in inline __inline__ __inline; do
20147   cat >conftest.$ac_ext <<_ACEOF
20148 #line 20148 "configure"
20149 #include "confdefs.h"
20150 #ifndef __cplusplus
20151 static $ac_kw int static_foo () {return 0; }
20152 $ac_kw int foo () {return 0; }
20153 #endif
20154
20155 _ACEOF
20156 rm -f conftest.$ac_objext
20157 if { (eval echo "$as_me:20157: \"$ac_compile\"") >&5
20158   (eval $ac_compile) 2>&5
20159   ac_status=$?
20160   echo "$as_me:20160: \$? = $ac_status" >&5
20161   (exit $ac_status); } &&
20162          { ac_try='test -s conftest.$ac_objext'
20163   { (eval echo "$as_me:20163: \"$ac_try\"") >&5
20164   (eval $ac_try) 2>&5
20165   ac_status=$?
20166   echo "$as_me:20166: \$? = $ac_status" >&5
20167   (exit $ac_status); }; }; then
20168   ac_cv_c_inline=$ac_kw; break
20169 else
20170   echo "$as_me: failed program was:" >&5
20171 cat conftest.$ac_ext >&5
20172 fi
20173 rm -f conftest.$ac_objext conftest.$ac_ext
20174 done
20175
20176 fi
20177 echo "$as_me:20177: result: $ac_cv_c_inline" >&5
20178 echo "${ECHO_T}$ac_cv_c_inline" >&6
20179 case $ac_cv_c_inline in
20180   inline | yes) ;;
20181   no)
20182 cat >>confdefs.h <<\EOF
20183 #define inline
20184 EOF
20185  ;;
20186   *)  cat >>confdefs.h <<EOF
20187 #define inline $ac_cv_c_inline
20188 EOF
20189  ;;
20190 esac
20191
20192 NCURSES_INLINE=
20193 if test "$ac_cv_c_inline" != no ; then
20194         NCURSES_INLINE=inline
20195         if test "$INTEL_COMPILER" = yes
20196         then
20197                 :
20198         elif test "$CLANG_COMPILER" = yes
20199         then
20200                 :
20201         elif test "$GCC" = yes
20202         then
20203                 echo "$as_me:20203: checking if $CC supports options to tune inlining" >&5
20204 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20205 if test "${cf_cv_gcc_inline+set}" = set; then
20206   echo $ECHO_N "(cached) $ECHO_C" >&6
20207 else
20208
20209                 cf_save_CFLAGS=$CFLAGS
20210                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20211                 cat >conftest.$ac_ext <<_ACEOF
20212 #line 20212 "configure"
20213 #include "confdefs.h"
20214 inline int foo(void) { return 1; }
20215 int
20216 main (void)
20217 {
20218 ${cf_cv_main_return:-return} foo()
20219   ;
20220   return 0;
20221 }
20222 _ACEOF
20223 rm -f conftest.$ac_objext
20224 if { (eval echo "$as_me:20224: \"$ac_compile\"") >&5
20225   (eval $ac_compile) 2>&5
20226   ac_status=$?
20227   echo "$as_me:20227: \$? = $ac_status" >&5
20228   (exit $ac_status); } &&
20229          { ac_try='test -s conftest.$ac_objext'
20230   { (eval echo "$as_me:20230: \"$ac_try\"") >&5
20231   (eval $ac_try) 2>&5
20232   ac_status=$?
20233   echo "$as_me:20233: \$? = $ac_status" >&5
20234   (exit $ac_status); }; }; then
20235   cf_cv_gcc_inline=yes
20236 else
20237   echo "$as_me: failed program was:" >&5
20238 cat conftest.$ac_ext >&5
20239 cf_cv_gcc_inline=no
20240 fi
20241 rm -f conftest.$ac_objext conftest.$ac_ext
20242                 CFLAGS=$cf_save_CFLAGS
20243
20244 fi
20245 echo "$as_me:20245: result: $cf_cv_gcc_inline" >&5
20246 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20247                 if test "$cf_cv_gcc_inline" = yes ; then
20248
20249 cf_fix_cppflags=no
20250 cf_new_cflags=
20251 cf_new_cppflags=
20252 cf_new_extra_cppflags=
20253
20254 for cf_add_cflags in --param max-inline-insns-single=1200
20255 do
20256 case $cf_fix_cppflags in
20257 (no)
20258         case $cf_add_cflags in
20259         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20260                 case $cf_add_cflags in
20261                 (-D*)
20262                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20263
20264                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20265                                 && test -z "${cf_tst_cflags}" \
20266                                 && cf_fix_cppflags=yes
20267
20268                         if test $cf_fix_cppflags = yes ; then
20269
20270         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20271         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20272
20273                                 continue
20274                         elif test "${cf_tst_cflags}" = "\"'" ; then
20275
20276         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20277         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20278
20279                                 continue
20280                         fi
20281                         ;;
20282                 esac
20283                 case "$CPPFLAGS" in
20284                 (*$cf_add_cflags)
20285                         ;;
20286                 (*)
20287                         case $cf_add_cflags in
20288                         (-D*)
20289                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20290
20291 CPPFLAGS=`echo "$CPPFLAGS" | \
20292         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20293                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20294
20295                                 ;;
20296                         esac
20297
20298         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20299         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20300
20301                         ;;
20302                 esac
20303                 ;;
20304         (*)
20305
20306         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20307         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20308
20309                 ;;
20310         esac
20311         ;;
20312 (yes)
20313
20314         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20315         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20316
20317         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20318
20319         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20320                 && test -z "${cf_tst_cflags}" \
20321                 && cf_fix_cppflags=no
20322         ;;
20323 esac
20324 done
20325
20326 if test -n "$cf_new_cflags" ; then
20327
20328         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20329         CFLAGS="${CFLAGS}$cf_new_cflags"
20330
20331 fi
20332
20333 if test -n "$cf_new_cppflags" ; then
20334
20335         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20336         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20337
20338 fi
20339
20340 if test -n "$cf_new_extra_cppflags" ; then
20341
20342         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20343         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20344
20345 fi
20346
20347                 fi
20348         fi
20349 fi
20350
20351 echo "$as_me:20351: checking for signal global datatype" >&5
20352 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20353 if test "${cf_cv_sig_atomic_t+set}" = set; then
20354   echo $ECHO_N "(cached) $ECHO_C" >&6
20355 else
20356
20357         for cf_type in \
20358                 "volatile sig_atomic_t" \
20359                 "sig_atomic_t" \
20360                 "int"
20361         do
20362         cat >conftest.$ac_ext <<_ACEOF
20363 #line 20363 "configure"
20364 #include "confdefs.h"
20365
20366 #include <sys/types.h>
20367 #include <signal.h>
20368 #include <stdio.h>
20369
20370 extern $cf_type x;
20371 $cf_type x;
20372 static void handler(int sig)
20373 {
20374         (void)sig;
20375         x = 5;
20376 }
20377 int
20378 main (void)
20379 {
20380 signal(SIGINT, handler);
20381                  x = 1
20382   ;
20383   return 0;
20384 }
20385 _ACEOF
20386 rm -f conftest.$ac_objext
20387 if { (eval echo "$as_me:20387: \"$ac_compile\"") >&5
20388   (eval $ac_compile) 2>&5
20389   ac_status=$?
20390   echo "$as_me:20390: \$? = $ac_status" >&5
20391   (exit $ac_status); } &&
20392          { ac_try='test -s conftest.$ac_objext'
20393   { (eval echo "$as_me:20393: \"$ac_try\"") >&5
20394   (eval $ac_try) 2>&5
20395   ac_status=$?
20396   echo "$as_me:20396: \$? = $ac_status" >&5
20397   (exit $ac_status); }; }; then
20398   cf_cv_sig_atomic_t=$cf_type
20399 else
20400   echo "$as_me: failed program was:" >&5
20401 cat conftest.$ac_ext >&5
20402 cf_cv_sig_atomic_t=no
20403 fi
20404 rm -f conftest.$ac_objext conftest.$ac_ext
20405                 test "$cf_cv_sig_atomic_t" != no && break
20406         done
20407
20408 fi
20409
20410 echo "$as_me:20410: result: $cf_cv_sig_atomic_t" >&5
20411 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20412 test "$cf_cv_sig_atomic_t" != no &&
20413 cat >>confdefs.h <<EOF
20414 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20415 EOF
20416
20417 if test $NCURSES_CHTYPE = auto ; then
20418
20419 echo "$as_me:20419: checking for type of chtype" >&5
20420 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20421 if test "${cf_cv_typeof_chtype+set}" = set; then
20422   echo $ECHO_N "(cached) $ECHO_C" >&6
20423 else
20424
20425                 if test "$cross_compiling" = yes; then
20426   cf_cv_typeof_chtype=long
20427 else
20428   cat >conftest.$ac_ext <<_ACEOF
20429 #line 20429 "configure"
20430 #include "confdefs.h"
20431
20432 #define WANT_BITS 31
20433 #include <stdio.h>
20434 int main(void)
20435 {
20436         FILE *fp = fopen("cf_test.out", "w");
20437         if (fp != 0) {
20438                 char *result = "long";
20439                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20440                         int n;
20441                         unsigned int x, y;
20442                         for (n = 0; n < WANT_BITS; n++) {
20443                                 x = (1 << n);
20444                                 y = (x >> n);
20445                                 if (y != 1 || x == 0) {
20446                                         x = 0;
20447                                         break;
20448                                 }
20449                         }
20450                         /*
20451                          * If x is nonzero, an int is big enough for the bits
20452                          * that we want.
20453                          */
20454                         result = (x != 0) ? "int" : "long";
20455                 }
20456                 fputs(result, fp);
20457                 fclose(fp);
20458         }
20459         ${cf_cv_main_return:-return}(0);
20460 }
20461
20462 _ACEOF
20463 rm -f conftest$ac_exeext
20464 if { (eval echo "$as_me:20464: \"$ac_link\"") >&5
20465   (eval $ac_link) 2>&5
20466   ac_status=$?
20467   echo "$as_me:20467: \$? = $ac_status" >&5
20468   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20469   { (eval echo "$as_me:20469: \"$ac_try\"") >&5
20470   (eval $ac_try) 2>&5
20471   ac_status=$?
20472   echo "$as_me:20472: \$? = $ac_status" >&5
20473   (exit $ac_status); }; }; then
20474   cf_cv_typeof_chtype=`cat cf_test.out`
20475 else
20476   echo "$as_me: program exited with status $ac_status" >&5
20477 echo "$as_me: failed program was:" >&5
20478 cat conftest.$ac_ext >&5
20479 cf_cv_typeof_chtype=long
20480 fi
20481 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20482 fi
20483                 rm -f cf_test.out
20484
20485 fi
20486
20487 echo "$as_me:20487: result: $cf_cv_typeof_chtype" >&5
20488 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20489
20490 cat >>confdefs.h <<EOF
20491 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20492 EOF
20493
20494 else
20495         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20496 fi
20497 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20498
20499 echo "$as_me:20499: checking if unsigned literals are legal" >&5
20500 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20501 if test "${cf_cv_unsigned_literals+set}" = set; then
20502   echo $ECHO_N "(cached) $ECHO_C" >&6
20503 else
20504
20505         cat >conftest.$ac_ext <<_ACEOF
20506 #line 20506 "configure"
20507 #include "confdefs.h"
20508
20509 int
20510 main (void)
20511 {
20512 long x = 1L + 1UL + 1U + 1
20513   ;
20514   return 0;
20515 }
20516 _ACEOF
20517 rm -f conftest.$ac_objext
20518 if { (eval echo "$as_me:20518: \"$ac_compile\"") >&5
20519   (eval $ac_compile) 2>&5
20520   ac_status=$?
20521   echo "$as_me:20521: \$? = $ac_status" >&5
20522   (exit $ac_status); } &&
20523          { ac_try='test -s conftest.$ac_objext'
20524   { (eval echo "$as_me:20524: \"$ac_try\"") >&5
20525   (eval $ac_try) 2>&5
20526   ac_status=$?
20527   echo "$as_me:20527: \$? = $ac_status" >&5
20528   (exit $ac_status); }; }; then
20529   cf_cv_unsigned_literals=yes
20530 else
20531   echo "$as_me: failed program was:" >&5
20532 cat conftest.$ac_ext >&5
20533 cf_cv_unsigned_literals=no
20534 fi
20535 rm -f conftest.$ac_objext conftest.$ac_ext
20536
20537 fi
20538
20539 echo "$as_me:20539: result: $cf_cv_unsigned_literals" >&5
20540 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20541
20542 cf_cv_1UL="1"
20543 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20544 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20545
20546 if test $NCURSES_MMASK_T = auto ; then
20547         cf_cv_typeof_mmask_t=long
20548 else
20549         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20550 fi
20551 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20552
20553 ###     Checks for external-data
20554
20555 echo "$as_me:20555: checking if external errno is declared" >&5
20556 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20557 if test "${cf_cv_dcl_errno+set}" = set; then
20558   echo $ECHO_N "(cached) $ECHO_C" >&6
20559 else
20560
20561         cat >conftest.$ac_ext <<_ACEOF
20562 #line 20562 "configure"
20563 #include "confdefs.h"
20564
20565 #ifdef HAVE_STDLIB_H
20566 #include <stdlib.h>
20567 #endif
20568 #include <stdio.h>
20569 #include <sys/types.h>
20570 #include <errno.h>
20571 int
20572 main (void)
20573 {
20574 int x = (int) errno; (void)x
20575   ;
20576   return 0;
20577 }
20578 _ACEOF
20579 rm -f conftest.$ac_objext
20580 if { (eval echo "$as_me:20580: \"$ac_compile\"") >&5
20581   (eval $ac_compile) 2>&5
20582   ac_status=$?
20583   echo "$as_me:20583: \$? = $ac_status" >&5
20584   (exit $ac_status); } &&
20585          { ac_try='test -s conftest.$ac_objext'
20586   { (eval echo "$as_me:20586: \"$ac_try\"") >&5
20587   (eval $ac_try) 2>&5
20588   ac_status=$?
20589   echo "$as_me:20589: \$? = $ac_status" >&5
20590   (exit $ac_status); }; }; then
20591   cf_cv_dcl_errno=yes
20592 else
20593   echo "$as_me: failed program was:" >&5
20594 cat conftest.$ac_ext >&5
20595 cf_cv_dcl_errno=no
20596 fi
20597 rm -f conftest.$ac_objext conftest.$ac_ext
20598
20599 fi
20600 echo "$as_me:20600: result: $cf_cv_dcl_errno" >&5
20601 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20602
20603 if test "$cf_cv_dcl_errno" = no ; then
20604
20605 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20606
20607         cat >>confdefs.h <<EOF
20608 #define $cf_result 1
20609 EOF
20610
20611 fi
20612
20613 # It's possible (for near-UNIX clones) that the data doesn't exist
20614
20615 echo "$as_me:20615: checking if external errno exists" >&5
20616 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20617 if test "${cf_cv_have_errno+set}" = set; then
20618   echo $ECHO_N "(cached) $ECHO_C" >&6
20619 else
20620
20621         cat >conftest.$ac_ext <<_ACEOF
20622 #line 20622 "configure"
20623 #include "confdefs.h"
20624
20625 #undef errno
20626 extern int errno;
20627
20628 int
20629 main (void)
20630 {
20631 errno = 2
20632   ;
20633   return 0;
20634 }
20635 _ACEOF
20636 rm -f conftest.$ac_objext conftest$ac_exeext
20637 if { (eval echo "$as_me:20637: \"$ac_link\"") >&5
20638   (eval $ac_link) 2>&5
20639   ac_status=$?
20640   echo "$as_me:20640: \$? = $ac_status" >&5
20641   (exit $ac_status); } &&
20642          { ac_try='test -s conftest$ac_exeext'
20643   { (eval echo "$as_me:20643: \"$ac_try\"") >&5
20644   (eval $ac_try) 2>&5
20645   ac_status=$?
20646   echo "$as_me:20646: \$? = $ac_status" >&5
20647   (exit $ac_status); }; }; then
20648   cf_cv_have_errno=yes
20649 else
20650   echo "$as_me: failed program was:" >&5
20651 cat conftest.$ac_ext >&5
20652 cf_cv_have_errno=no
20653 fi
20654 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20655
20656 fi
20657 echo "$as_me:20657: result: $cf_cv_have_errno" >&5
20658 echo "${ECHO_T}$cf_cv_have_errno" >&6
20659
20660 if test "$cf_cv_have_errno" = yes ; then
20661
20662 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20663
20664         cat >>confdefs.h <<EOF
20665 #define $cf_result 1
20666 EOF
20667
20668 fi
20669
20670 echo "$as_me:20670: checking if data-only library module links" >&5
20671 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20672 if test "${cf_cv_link_dataonly+set}" = set; then
20673   echo $ECHO_N "(cached) $ECHO_C" >&6
20674 else
20675
20676         rm -f conftest.a
20677         cat >conftest.$ac_ext <<EOF
20678 #line 20678 "configure"
20679 int     testdata[3] = { 123, 456, 789 };
20680 EOF
20681         if { (eval echo "$as_me:20681: \"$ac_compile\"") >&5
20682   (eval $ac_compile) 2>&5
20683   ac_status=$?
20684   echo "$as_me:20684: \$? = $ac_status" >&5
20685   (exit $ac_status); } ; then
20686                 mv conftest.o data.o && \
20687                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20688         fi
20689         rm -f conftest.$ac_ext data.o
20690         cat >conftest.$ac_ext <<EOF
20691 #line 20691 "configure"
20692 int     testfunc(void)
20693 {
20694 #if defined(NeXT)
20695         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20696 #else
20697         extern int testdata[3];
20698         return testdata[0] == 123
20699            &&  testdata[1] == 456
20700            &&  testdata[2] == 789;
20701 #endif
20702 }
20703 EOF
20704         if { (eval echo "$as_me:20704: \"$ac_compile\"") >&5
20705   (eval $ac_compile) 2>&5
20706   ac_status=$?
20707   echo "$as_me:20707: \$? = $ac_status" >&5
20708   (exit $ac_status); }; then
20709                 mv conftest.o func.o && \
20710                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20711         fi
20712         rm -f conftest.$ac_ext func.o
20713         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20714         cf_saveLIBS="$LIBS"
20715         LIBS="conftest.a $LIBS"
20716         if test "$cross_compiling" = yes; then
20717   cf_cv_link_dataonly=unknown
20718 else
20719   cat >conftest.$ac_ext <<_ACEOF
20720 #line 20720 "configure"
20721 #include "confdefs.h"
20722
20723         int main(void)
20724         {
20725                 extern int testfunc();
20726                 ${cf_cv_main_return:-return} (!testfunc());
20727         }
20728
20729 _ACEOF
20730 rm -f conftest$ac_exeext
20731 if { (eval echo "$as_me:20731: \"$ac_link\"") >&5
20732   (eval $ac_link) 2>&5
20733   ac_status=$?
20734   echo "$as_me:20734: \$? = $ac_status" >&5
20735   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20736   { (eval echo "$as_me:20736: \"$ac_try\"") >&5
20737   (eval $ac_try) 2>&5
20738   ac_status=$?
20739   echo "$as_me:20739: \$? = $ac_status" >&5
20740   (exit $ac_status); }; }; then
20741   cf_cv_link_dataonly=yes
20742 else
20743   echo "$as_me: program exited with status $ac_status" >&5
20744 echo "$as_me: failed program was:" >&5
20745 cat conftest.$ac_ext >&5
20746 cf_cv_link_dataonly=no
20747 fi
20748 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20749 fi
20750         LIBS="$cf_saveLIBS"
20751
20752 fi
20753
20754 echo "$as_me:20754: result: $cf_cv_link_dataonly" >&5
20755 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20756
20757 if test "$cf_cv_link_dataonly" = no ; then
20758
20759 cat >>confdefs.h <<\EOF
20760 #define BROKEN_LINKER 1
20761 EOF
20762
20763         BROKEN_LINKER=1
20764 fi
20765
20766 ###     Checks for library functions.
20767
20768 for ac_func in \
20769 getcwd \
20770 getegid \
20771 geteuid \
20772 getopt \
20773 getttynam \
20774 issetugid \
20775 localeconv \
20776 poll \
20777 putenv \
20778 remove \
20779 select \
20780 setbuf \
20781 setbuffer \
20782 setenv \
20783 setvbuf \
20784 sigaction \
20785 sigvec \
20786 snprintf \
20787 strdup \
20788 strstr \
20789 sysconf \
20790 tcgetpgrp \
20791 times \
20792 tsearch \
20793 vsnprintf \
20794
20795 do
20796 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20797 echo "$as_me:20797: checking for $ac_func" >&5
20798 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20799 if eval "test \"\${$as_ac_var+set}\" = set"; then
20800   echo $ECHO_N "(cached) $ECHO_C" >&6
20801 else
20802   cat >conftest.$ac_ext <<_ACEOF
20803 #line 20803 "configure"
20804 #include "confdefs.h"
20805 #define $ac_func autoconf_temporary
20806 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20807 #undef $ac_func
20808
20809 #ifdef __cplusplus
20810 extern "C"
20811 #endif
20812
20813 /* We use char because int might match the return type of a gcc2
20814    builtin and then its argument prototype would still apply.  */
20815 char $ac_func (void);
20816
20817 int
20818 main (void)
20819 {
20820
20821 /* The GNU C library defines stubs for functions which it implements
20822     to always fail with ENOSYS.  Some functions are actually named
20823     something starting with __ and the normal name is an alias.  */
20824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20825 #error found stub for $ac_func
20826 #endif
20827
20828         return $ac_func ();
20829   ;
20830   return 0;
20831 }
20832 _ACEOF
20833 rm -f conftest.$ac_objext conftest$ac_exeext
20834 if { (eval echo "$as_me:20834: \"$ac_link\"") >&5
20835   (eval $ac_link) 2>&5
20836   ac_status=$?
20837   echo "$as_me:20837: \$? = $ac_status" >&5
20838   (exit $ac_status); } &&
20839          { ac_try='test -s conftest$ac_exeext'
20840   { (eval echo "$as_me:20840: \"$ac_try\"") >&5
20841   (eval $ac_try) 2>&5
20842   ac_status=$?
20843   echo "$as_me:20843: \$? = $ac_status" >&5
20844   (exit $ac_status); }; }; then
20845   eval "$as_ac_var=yes"
20846 else
20847   echo "$as_me: failed program was:" >&5
20848 cat conftest.$ac_ext >&5
20849 eval "$as_ac_var=no"
20850 fi
20851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20852 fi
20853 echo "$as_me:20853: result: `eval echo '${'$as_ac_var'}'`" >&5
20854 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20855 if test `eval echo '${'$as_ac_var'}'` = yes; then
20856   cat >>confdefs.h <<EOF
20857 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20858 EOF
20859
20860 fi
20861 done
20862
20863 if test "x$ac_cv_func_getopt" = xno && \
20864    test "x$cf_with_progs$cf_with_tests" != xnono; then
20865         { { echo "$as_me:20865: error: getopt is required for building programs" >&5
20866 echo "$as_me: error: getopt is required for building programs" >&2;}
20867    { (exit 1); exit 1; }; }
20868 fi
20869
20870 if test "x$with_safe_sprintf" = xyes
20871 then
20872         if test "x$ac_cv_func_vsnprintf" = xyes
20873         then
20874                 { echo "$as_me:20874: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20875 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20876         else
20877
20878 cat >>confdefs.h <<\EOF
20879 #define USE_SAFE_SPRINTF 1
20880 EOF
20881
20882         fi
20883 fi
20884
20885 if test "x$with_getcap" = "xyes" ; then
20886
20887 echo "$as_me:20887: checking for terminal-capability database functions" >&5
20888 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20889 if test "${cf_cv_cgetent+set}" = set; then
20890   echo $ECHO_N "(cached) $ECHO_C" >&6
20891 else
20892
20893 cat >conftest.$ac_ext <<_ACEOF
20894 #line 20894 "configure"
20895 #include "confdefs.h"
20896
20897 #include <stdlib.h>
20898 int
20899 main (void)
20900 {
20901
20902         char temp[128];
20903         char *buf = temp;
20904         char *db_array = temp;
20905         cgetent(&buf, &db_array, "vt100");
20906         cgetcap(buf, "tc", '=');
20907         cgetmatch(buf, "tc");
20908
20909   ;
20910   return 0;
20911 }
20912 _ACEOF
20913 rm -f conftest.$ac_objext conftest$ac_exeext
20914 if { (eval echo "$as_me:20914: \"$ac_link\"") >&5
20915   (eval $ac_link) 2>&5
20916   ac_status=$?
20917   echo "$as_me:20917: \$? = $ac_status" >&5
20918   (exit $ac_status); } &&
20919          { ac_try='test -s conftest$ac_exeext'
20920   { (eval echo "$as_me:20920: \"$ac_try\"") >&5
20921   (eval $ac_try) 2>&5
20922   ac_status=$?
20923   echo "$as_me:20923: \$? = $ac_status" >&5
20924   (exit $ac_status); }; }; then
20925   cf_cv_cgetent=yes
20926 else
20927   echo "$as_me: failed program was:" >&5
20928 cat conftest.$ac_ext >&5
20929 cf_cv_cgetent=no
20930 fi
20931 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20932
20933 fi
20934 echo "$as_me:20934: result: $cf_cv_cgetent" >&5
20935 echo "${ECHO_T}$cf_cv_cgetent" >&6
20936
20937 if test "$cf_cv_cgetent" = yes
20938 then
20939
20940 cat >>confdefs.h <<\EOF
20941 #define HAVE_BSD_CGETENT 1
20942 EOF
20943
20944 echo "$as_me:20944: checking if cgetent uses const parameter" >&5
20945 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20946 if test "${cf_cv_cgetent_const+set}" = set; then
20947   echo $ECHO_N "(cached) $ECHO_C" >&6
20948 else
20949
20950 cat >conftest.$ac_ext <<_ACEOF
20951 #line 20951 "configure"
20952 #include "confdefs.h"
20953
20954 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20955 #include <stdlib.h>
20956 int
20957 main (void)
20958 {
20959
20960         char temp[128];
20961         char *buf = temp;
20962 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20963         const char *db_array = temp;
20964         cgetent(&buf, &db_array, "vt100");
20965 #endif
20966         cgetcap(buf, "tc", '=');
20967         cgetmatch(buf, "tc");
20968
20969   ;
20970   return 0;
20971 }
20972 _ACEOF
20973 rm -f conftest.$ac_objext conftest$ac_exeext
20974 if { (eval echo "$as_me:20974: \"$ac_link\"") >&5
20975   (eval $ac_link) 2>&5
20976   ac_status=$?
20977   echo "$as_me:20977: \$? = $ac_status" >&5
20978   (exit $ac_status); } &&
20979          { ac_try='test -s conftest$ac_exeext'
20980   { (eval echo "$as_me:20980: \"$ac_try\"") >&5
20981   (eval $ac_try) 2>&5
20982   ac_status=$?
20983   echo "$as_me:20983: \$? = $ac_status" >&5
20984   (exit $ac_status); }; }; then
20985   cf_cv_cgetent_const=yes
20986 else
20987   echo "$as_me: failed program was:" >&5
20988 cat conftest.$ac_ext >&5
20989 cf_cv_cgetent_const=no
20990 fi
20991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20992
20993 fi
20994 echo "$as_me:20994: result: $cf_cv_cgetent_const" >&5
20995 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20996         if test "$cf_cv_cgetent_const" = yes
20997         then
20998
20999 cat >>confdefs.h <<EOF
21000 #define CGETENT_CONST const
21001 EOF
21002
21003         fi
21004 fi
21005
21006 fi
21007
21008 echo "$as_me:21008: checking for isascii" >&5
21009 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21010 if test "${cf_cv_have_isascii+set}" = set; then
21011   echo $ECHO_N "(cached) $ECHO_C" >&6
21012 else
21013
21014         cat >conftest.$ac_ext <<_ACEOF
21015 #line 21015 "configure"
21016 #include "confdefs.h"
21017 #include <ctype.h>
21018 int
21019 main (void)
21020 {
21021 int x = isascii(' ')
21022   ;
21023   return 0;
21024 }
21025 _ACEOF
21026 rm -f conftest.$ac_objext conftest$ac_exeext
21027 if { (eval echo "$as_me:21027: \"$ac_link\"") >&5
21028   (eval $ac_link) 2>&5
21029   ac_status=$?
21030   echo "$as_me:21030: \$? = $ac_status" >&5
21031   (exit $ac_status); } &&
21032          { ac_try='test -s conftest$ac_exeext'
21033   { (eval echo "$as_me:21033: \"$ac_try\"") >&5
21034   (eval $ac_try) 2>&5
21035   ac_status=$?
21036   echo "$as_me:21036: \$? = $ac_status" >&5
21037   (exit $ac_status); }; }; then
21038   cf_cv_have_isascii=yes
21039 else
21040   echo "$as_me: failed program was:" >&5
21041 cat conftest.$ac_ext >&5
21042 cf_cv_have_isascii=no
21043 fi
21044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21045
21046 fi
21047 echo "$as_me:21047: result: $cf_cv_have_isascii" >&5
21048 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21049 test "$cf_cv_have_isascii" = yes &&
21050 cat >>confdefs.h <<\EOF
21051 #define HAVE_ISASCII 1
21052 EOF
21053
21054 if test "$ac_cv_func_sigaction" = yes; then
21055 echo "$as_me:21055: checking whether sigaction needs _POSIX_SOURCE" >&5
21056 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21057 cat >conftest.$ac_ext <<_ACEOF
21058 #line 21058 "configure"
21059 #include "confdefs.h"
21060
21061 #include <sys/types.h>
21062 #include <signal.h>
21063 int
21064 main (void)
21065 {
21066 struct sigaction act
21067   ;
21068   return 0;
21069 }
21070 _ACEOF
21071 rm -f conftest.$ac_objext
21072 if { (eval echo "$as_me:21072: \"$ac_compile\"") >&5
21073   (eval $ac_compile) 2>&5
21074   ac_status=$?
21075   echo "$as_me:21075: \$? = $ac_status" >&5
21076   (exit $ac_status); } &&
21077          { ac_try='test -s conftest.$ac_objext'
21078   { (eval echo "$as_me:21078: \"$ac_try\"") >&5
21079   (eval $ac_try) 2>&5
21080   ac_status=$?
21081   echo "$as_me:21081: \$? = $ac_status" >&5
21082   (exit $ac_status); }; }; then
21083   sigact_bad=no
21084 else
21085   echo "$as_me: failed program was:" >&5
21086 cat conftest.$ac_ext >&5
21087
21088 cat >conftest.$ac_ext <<_ACEOF
21089 #line 21089 "configure"
21090 #include "confdefs.h"
21091
21092 #define _POSIX_SOURCE
21093 #include <sys/types.h>
21094 #include <signal.h>
21095 int
21096 main (void)
21097 {
21098 struct sigaction act
21099   ;
21100   return 0;
21101 }
21102 _ACEOF
21103 rm -f conftest.$ac_objext
21104 if { (eval echo "$as_me:21104: \"$ac_compile\"") >&5
21105   (eval $ac_compile) 2>&5
21106   ac_status=$?
21107   echo "$as_me:21107: \$? = $ac_status" >&5
21108   (exit $ac_status); } &&
21109          { ac_try='test -s conftest.$ac_objext'
21110   { (eval echo "$as_me:21110: \"$ac_try\"") >&5
21111   (eval $ac_try) 2>&5
21112   ac_status=$?
21113   echo "$as_me:21113: \$? = $ac_status" >&5
21114   (exit $ac_status); }; }; then
21115   sigact_bad=yes
21116
21117 cat >>confdefs.h <<\EOF
21118 #define _POSIX_SOURCE 1
21119 EOF
21120
21121 else
21122   echo "$as_me: failed program was:" >&5
21123 cat conftest.$ac_ext >&5
21124 sigact_bad=unknown
21125 fi
21126 rm -f conftest.$ac_objext conftest.$ac_ext
21127 fi
21128 rm -f conftest.$ac_objext conftest.$ac_ext
21129 echo "$as_me:21129: result: $sigact_bad" >&5
21130 echo "${ECHO_T}$sigact_bad" >&6
21131 fi
21132
21133 echo "$as_me:21133: checking if nanosleep really works" >&5
21134 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21135 if test "${cf_cv_func_nanosleep+set}" = set; then
21136   echo $ECHO_N "(cached) $ECHO_C" >&6
21137 else
21138
21139 if test "$cross_compiling" = yes; then
21140   cf_cv_func_nanosleep=unknown
21141 else
21142   cat >conftest.$ac_ext <<_ACEOF
21143 #line 21143 "configure"
21144 #include "confdefs.h"
21145
21146 #include <stdio.h>
21147 #include <errno.h>
21148 #include <time.h>
21149
21150 #ifdef HAVE_SYS_TIME_H
21151 #include <sys/time.h>
21152 #endif
21153
21154 int main(void) {
21155         struct timespec ts1, ts2;
21156         int code;
21157         ts1.tv_sec  = 0;
21158         ts1.tv_nsec = 750000000;
21159         ts2.tv_sec  = 0;
21160         ts2.tv_nsec = 0;
21161         errno = 0;
21162         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21163         ${cf_cv_main_return:-return}(code != 0);
21164 }
21165
21166 _ACEOF
21167 rm -f conftest$ac_exeext
21168 if { (eval echo "$as_me:21168: \"$ac_link\"") >&5
21169   (eval $ac_link) 2>&5
21170   ac_status=$?
21171   echo "$as_me:21171: \$? = $ac_status" >&5
21172   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21173   { (eval echo "$as_me:21173: \"$ac_try\"") >&5
21174   (eval $ac_try) 2>&5
21175   ac_status=$?
21176   echo "$as_me:21176: \$? = $ac_status" >&5
21177   (exit $ac_status); }; }; then
21178   cf_cv_func_nanosleep=yes
21179 else
21180   echo "$as_me: program exited with status $ac_status" >&5
21181 echo "$as_me: failed program was:" >&5
21182 cat conftest.$ac_ext >&5
21183 cf_cv_func_nanosleep=no
21184 fi
21185 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21186 fi
21187 fi
21188 echo "$as_me:21188: result: $cf_cv_func_nanosleep" >&5
21189 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21190
21191 test "$cf_cv_func_nanosleep" = "yes" &&
21192 cat >>confdefs.h <<\EOF
21193 #define HAVE_NANOSLEEP 1
21194 EOF
21195
21196 for ac_header in \
21197 termio.h \
21198 termios.h \
21199 unistd.h \
21200 sys/ioctl.h \
21201 sys/termio.h \
21202
21203 do
21204 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21205 echo "$as_me:21205: checking for $ac_header" >&5
21206 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21207 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21208   echo $ECHO_N "(cached) $ECHO_C" >&6
21209 else
21210   cat >conftest.$ac_ext <<_ACEOF
21211 #line 21211 "configure"
21212 #include "confdefs.h"
21213 #include <$ac_header>
21214 _ACEOF
21215 if { (eval echo "$as_me:21215: \"$ac_cpp conftest.$ac_ext\"") >&5
21216   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21217   ac_status=$?
21218   egrep -v '^ *\+' conftest.er1 >conftest.err
21219   rm -f conftest.er1
21220   cat conftest.err >&5
21221   echo "$as_me:21221: \$? = $ac_status" >&5
21222   (exit $ac_status); } >/dev/null; then
21223   if test -s conftest.err; then
21224     ac_cpp_err=$ac_c_preproc_warn_flag
21225   else
21226     ac_cpp_err=
21227   fi
21228 else
21229   ac_cpp_err=yes
21230 fi
21231 if test -z "$ac_cpp_err"; then
21232   eval "$as_ac_Header=yes"
21233 else
21234   echo "$as_me: failed program was:" >&5
21235   cat conftest.$ac_ext >&5
21236   eval "$as_ac_Header=no"
21237 fi
21238 rm -f conftest.err conftest.$ac_ext
21239 fi
21240 echo "$as_me:21240: result: `eval echo '${'$as_ac_Header'}'`" >&5
21241 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21242 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21243   cat >>confdefs.h <<EOF
21244 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21245 EOF
21246
21247 fi
21248 done
21249
21250 if test "$ac_cv_header_termios_h" = yes ; then
21251         case "$CFLAGS $CPPFLAGS" in
21252         (*-D_POSIX_SOURCE*)
21253                 termios_bad=dunno ;;
21254         (*)     termios_bad=maybe ;;
21255         esac
21256         if test "$termios_bad" = maybe ; then
21257         echo "$as_me:21257: checking whether termios.h needs _POSIX_SOURCE" >&5
21258 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21259         cat >conftest.$ac_ext <<_ACEOF
21260 #line 21260 "configure"
21261 #include "confdefs.h"
21262 #include <termios.h>
21263 int
21264 main (void)
21265 {
21266 struct termios foo; int x = foo.c_iflag = 1; (void)x
21267   ;
21268   return 0;
21269 }
21270 _ACEOF
21271 rm -f conftest.$ac_objext
21272 if { (eval echo "$as_me:21272: \"$ac_compile\"") >&5
21273   (eval $ac_compile) 2>&5
21274   ac_status=$?
21275   echo "$as_me:21275: \$? = $ac_status" >&5
21276   (exit $ac_status); } &&
21277          { ac_try='test -s conftest.$ac_objext'
21278   { (eval echo "$as_me:21278: \"$ac_try\"") >&5
21279   (eval $ac_try) 2>&5
21280   ac_status=$?
21281   echo "$as_me:21281: \$? = $ac_status" >&5
21282   (exit $ac_status); }; }; then
21283   termios_bad=no
21284 else
21285   echo "$as_me: failed program was:" >&5
21286 cat conftest.$ac_ext >&5
21287
21288                 cat >conftest.$ac_ext <<_ACEOF
21289 #line 21289 "configure"
21290 #include "confdefs.h"
21291
21292 #define _POSIX_SOURCE
21293 #include <termios.h>
21294 int
21295 main (void)
21296 {
21297 struct termios foo; int x = foo.c_iflag = 2; (void)x
21298   ;
21299   return 0;
21300 }
21301 _ACEOF
21302 rm -f conftest.$ac_objext
21303 if { (eval echo "$as_me:21303: \"$ac_compile\"") >&5
21304   (eval $ac_compile) 2>&5
21305   ac_status=$?
21306   echo "$as_me:21306: \$? = $ac_status" >&5
21307   (exit $ac_status); } &&
21308          { ac_try='test -s conftest.$ac_objext'
21309   { (eval echo "$as_me:21309: \"$ac_try\"") >&5
21310   (eval $ac_try) 2>&5
21311   ac_status=$?
21312   echo "$as_me:21312: \$? = $ac_status" >&5
21313   (exit $ac_status); }; }; then
21314   termios_bad=unknown
21315 else
21316   echo "$as_me: failed program was:" >&5
21317 cat conftest.$ac_ext >&5
21318 termios_bad=yes
21319 cat >>confdefs.h <<\EOF
21320 #define _POSIX_SOURCE 1
21321 EOF
21322
21323 fi
21324 rm -f conftest.$ac_objext conftest.$ac_ext
21325
21326 fi
21327 rm -f conftest.$ac_objext conftest.$ac_ext
21328         echo "$as_me:21328: result: $termios_bad" >&5
21329 echo "${ECHO_T}$termios_bad" >&6
21330         fi
21331 fi
21332
21333 echo "$as_me:21333: checking for tcgetattr" >&5
21334 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21335 if test "${cf_cv_have_tcgetattr+set}" = set; then
21336   echo $ECHO_N "(cached) $ECHO_C" >&6
21337 else
21338
21339 cat >conftest.$ac_ext <<_ACEOF
21340 #line 21340 "configure"
21341 #include "confdefs.h"
21342
21343 #include <sys/types.h>
21344 #ifdef HAVE_UNISTD_H
21345 #include <unistd.h>
21346 #endif
21347 #ifdef HAVE_TERMIOS_H
21348 #include <termios.h>
21349 #define TTY struct termios
21350 #else
21351 #ifdef HAVE_TERMIO_H
21352 #include <termio.h>
21353 #define TTY struct termio
21354 #endif
21355 #endif
21356
21357 int
21358 main (void)
21359 {
21360
21361 TTY foo;
21362 tcgetattr(1, &foo);
21363   ;
21364   return 0;
21365 }
21366 _ACEOF
21367 rm -f conftest.$ac_objext conftest$ac_exeext
21368 if { (eval echo "$as_me:21368: \"$ac_link\"") >&5
21369   (eval $ac_link) 2>&5
21370   ac_status=$?
21371   echo "$as_me:21371: \$? = $ac_status" >&5
21372   (exit $ac_status); } &&
21373          { ac_try='test -s conftest$ac_exeext'
21374   { (eval echo "$as_me:21374: \"$ac_try\"") >&5
21375   (eval $ac_try) 2>&5
21376   ac_status=$?
21377   echo "$as_me:21377: \$? = $ac_status" >&5
21378   (exit $ac_status); }; }; then
21379   cf_cv_have_tcgetattr=yes
21380 else
21381   echo "$as_me: failed program was:" >&5
21382 cat conftest.$ac_ext >&5
21383 cf_cv_have_tcgetattr=no
21384 fi
21385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21386 fi
21387 echo "$as_me:21387: result: $cf_cv_have_tcgetattr" >&5
21388 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21389 test "$cf_cv_have_tcgetattr" = yes &&
21390 cat >>confdefs.h <<\EOF
21391 #define HAVE_TCGETATTR 1
21392 EOF
21393
21394 echo "$as_me:21394: checking for vsscanf function or workaround" >&5
21395 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21396 if test "${cf_cv_func_vsscanf+set}" = set; then
21397   echo $ECHO_N "(cached) $ECHO_C" >&6
21398 else
21399
21400 cat >conftest.$ac_ext <<_ACEOF
21401 #line 21401 "configure"
21402 #include "confdefs.h"
21403
21404 #include <stdarg.h>
21405 #include <stdio.h>
21406 int
21407 main (void)
21408 {
21409
21410         va_list ap;
21411         vsscanf("from", "%d", ap)
21412   ;
21413   return 0;
21414 }
21415 _ACEOF
21416 rm -f conftest.$ac_objext conftest$ac_exeext
21417 if { (eval echo "$as_me:21417: \"$ac_link\"") >&5
21418   (eval $ac_link) 2>&5
21419   ac_status=$?
21420   echo "$as_me:21420: \$? = $ac_status" >&5
21421   (exit $ac_status); } &&
21422          { ac_try='test -s conftest$ac_exeext'
21423   { (eval echo "$as_me:21423: \"$ac_try\"") >&5
21424   (eval $ac_try) 2>&5
21425   ac_status=$?
21426   echo "$as_me:21426: \$? = $ac_status" >&5
21427   (exit $ac_status); }; }; then
21428   cf_cv_func_vsscanf=vsscanf
21429 else
21430   echo "$as_me: failed program was:" >&5
21431 cat conftest.$ac_ext >&5
21432
21433 cat >conftest.$ac_ext <<_ACEOF
21434 #line 21434 "configure"
21435 #include "confdefs.h"
21436
21437 #include <stdarg.h>
21438 #include <stdio.h>
21439 int
21440 main (void)
21441 {
21442
21443         FILE strbuf;
21444         char *str = "from";
21445
21446         strbuf._flag = _IOREAD;
21447         strbuf._ptr = strbuf._base = (unsigned char *) str;
21448         strbuf._cnt = strlen(str);
21449         strbuf._file = _NFILE;
21450         return (vfscanf(&strbuf, "%d", ap))
21451   ;
21452   return 0;
21453 }
21454 _ACEOF
21455 rm -f conftest.$ac_objext conftest$ac_exeext
21456 if { (eval echo "$as_me:21456: \"$ac_link\"") >&5
21457   (eval $ac_link) 2>&5
21458   ac_status=$?
21459   echo "$as_me:21459: \$? = $ac_status" >&5
21460   (exit $ac_status); } &&
21461          { ac_try='test -s conftest$ac_exeext'
21462   { (eval echo "$as_me:21462: \"$ac_try\"") >&5
21463   (eval $ac_try) 2>&5
21464   ac_status=$?
21465   echo "$as_me:21465: \$? = $ac_status" >&5
21466   (exit $ac_status); }; }; then
21467   cf_cv_func_vsscanf=vfscanf
21468 else
21469   echo "$as_me: failed program was:" >&5
21470 cat conftest.$ac_ext >&5
21471
21472 cat >conftest.$ac_ext <<_ACEOF
21473 #line 21473 "configure"
21474 #include "confdefs.h"
21475
21476 #include <stdarg.h>
21477 #include <stdio.h>
21478 int
21479 main (void)
21480 {
21481
21482         FILE strbuf;
21483         char *str = "from";
21484
21485         strbuf._flag = _IOREAD;
21486         strbuf._ptr = strbuf._base = (unsigned char *) str;
21487         strbuf._cnt = strlen(str);
21488         strbuf._file = _NFILE;
21489         return (_doscan(&strbuf, "%d", ap))
21490   ;
21491   return 0;
21492 }
21493 _ACEOF
21494 rm -f conftest.$ac_objext conftest$ac_exeext
21495 if { (eval echo "$as_me:21495: \"$ac_link\"") >&5
21496   (eval $ac_link) 2>&5
21497   ac_status=$?
21498   echo "$as_me:21498: \$? = $ac_status" >&5
21499   (exit $ac_status); } &&
21500          { ac_try='test -s conftest$ac_exeext'
21501   { (eval echo "$as_me:21501: \"$ac_try\"") >&5
21502   (eval $ac_try) 2>&5
21503   ac_status=$?
21504   echo "$as_me:21504: \$? = $ac_status" >&5
21505   (exit $ac_status); }; }; then
21506   cf_cv_func_vsscanf=_doscan
21507 else
21508   echo "$as_me: failed program was:" >&5
21509 cat conftest.$ac_ext >&5
21510
21511 cf_cv_func_vsscanf=no
21512 fi
21513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21514 fi
21515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21516 fi
21517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21518 fi
21519 echo "$as_me:21519: result: $cf_cv_func_vsscanf" >&5
21520 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21521
21522 case $cf_cv_func_vsscanf in
21523 (vsscanf)
21524 cat >>confdefs.h <<\EOF
21525 #define HAVE_VSSCANF 1
21526 EOF
21527 ;;
21528 (vfscanf)
21529 cat >>confdefs.h <<\EOF
21530 #define HAVE_VFSCANF 1
21531 EOF
21532 ;;
21533 (_doscan)
21534 cat >>confdefs.h <<\EOF
21535 #define HAVE__DOSCAN 1
21536 EOF
21537 ;;
21538 esac
21539
21540 for ac_header in \
21541 unistd.h \
21542
21543 do
21544 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21545 echo "$as_me:21545: checking for $ac_header" >&5
21546 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21548   echo $ECHO_N "(cached) $ECHO_C" >&6
21549 else
21550   cat >conftest.$ac_ext <<_ACEOF
21551 #line 21551 "configure"
21552 #include "confdefs.h"
21553 #include <$ac_header>
21554 _ACEOF
21555 if { (eval echo "$as_me:21555: \"$ac_cpp conftest.$ac_ext\"") >&5
21556   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21557   ac_status=$?
21558   egrep -v '^ *\+' conftest.er1 >conftest.err
21559   rm -f conftest.er1
21560   cat conftest.err >&5
21561   echo "$as_me:21561: \$? = $ac_status" >&5
21562   (exit $ac_status); } >/dev/null; then
21563   if test -s conftest.err; then
21564     ac_cpp_err=$ac_c_preproc_warn_flag
21565   else
21566     ac_cpp_err=
21567   fi
21568 else
21569   ac_cpp_err=yes
21570 fi
21571 if test -z "$ac_cpp_err"; then
21572   eval "$as_ac_Header=yes"
21573 else
21574   echo "$as_me: failed program was:" >&5
21575   cat conftest.$ac_ext >&5
21576   eval "$as_ac_Header=no"
21577 fi
21578 rm -f conftest.err conftest.$ac_ext
21579 fi
21580 echo "$as_me:21580: result: `eval echo '${'$as_ac_Header'}'`" >&5
21581 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21582 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21583   cat >>confdefs.h <<EOF
21584 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21585 EOF
21586
21587 fi
21588 done
21589
21590 echo "$as_me:21590: checking for working mkstemp" >&5
21591 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21592 if test "${cf_cv_func_mkstemp+set}" = set; then
21593   echo $ECHO_N "(cached) $ECHO_C" >&6
21594 else
21595
21596 rm -rf conftest*
21597 if test "$cross_compiling" = yes; then
21598   cf_cv_func_mkstemp=maybe
21599 else
21600   cat >conftest.$ac_ext <<_ACEOF
21601 #line 21601 "configure"
21602 #include "confdefs.h"
21603
21604 #include <sys/types.h>
21605 #ifdef HAVE_UNISTD_H
21606 #include <unistd.h>
21607 #endif
21608 #include <stdlib.h>
21609 #include <stdio.h>
21610 #include <string.h>
21611 #include <sys/stat.h>
21612 int main(void)
21613 {
21614         char *tmpl = "conftestXXXXXX";
21615         char name[2][80];
21616         int n;
21617         int result = 0;
21618         int fd;
21619         struct stat sb;
21620
21621         umask(077);
21622         for (n = 0; n < 2; ++n) {
21623                 strcpy(name[n], tmpl);
21624                 if ((fd = mkstemp(name[n])) >= 0) {
21625                         if (!strcmp(name[n], tmpl)
21626                          || stat(name[n], &sb) != 0
21627                          || (sb.st_mode & S_IFMT) != S_IFREG
21628                          || (sb.st_mode & 077) != 0) {
21629                                 result = 1;
21630                         }
21631                         close(fd);
21632                 }
21633         }
21634         if (result == 0
21635          && !strcmp(name[0], name[1]))
21636                 result = 1;
21637         ${cf_cv_main_return:-return}(result);
21638 }
21639
21640 _ACEOF
21641 rm -f conftest$ac_exeext
21642 if { (eval echo "$as_me:21642: \"$ac_link\"") >&5
21643   (eval $ac_link) 2>&5
21644   ac_status=$?
21645   echo "$as_me:21645: \$? = $ac_status" >&5
21646   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21647   { (eval echo "$as_me:21647: \"$ac_try\"") >&5
21648   (eval $ac_try) 2>&5
21649   ac_status=$?
21650   echo "$as_me:21650: \$? = $ac_status" >&5
21651   (exit $ac_status); }; }; then
21652   cf_cv_func_mkstemp=yes
21653
21654 else
21655   echo "$as_me: program exited with status $ac_status" >&5
21656 echo "$as_me: failed program was:" >&5
21657 cat conftest.$ac_ext >&5
21658 cf_cv_func_mkstemp=no
21659
21660 fi
21661 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21662 fi
21663
21664 fi
21665 echo "$as_me:21665: result: $cf_cv_func_mkstemp" >&5
21666 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21667 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21668         echo "$as_me:21668: checking for mkstemp" >&5
21669 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21670 if test "${ac_cv_func_mkstemp+set}" = set; then
21671   echo $ECHO_N "(cached) $ECHO_C" >&6
21672 else
21673   cat >conftest.$ac_ext <<_ACEOF
21674 #line 21674 "configure"
21675 #include "confdefs.h"
21676 #define mkstemp autoconf_temporary
21677 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21678 #undef mkstemp
21679
21680 #ifdef __cplusplus
21681 extern "C"
21682 #endif
21683
21684 /* We use char because int might match the return type of a gcc2
21685    builtin and then its argument prototype would still apply.  */
21686 char mkstemp (void);
21687
21688 int
21689 main (void)
21690 {
21691
21692 /* The GNU C library defines stubs for functions which it implements
21693     to always fail with ENOSYS.  Some functions are actually named
21694     something starting with __ and the normal name is an alias.  */
21695 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21696 #error found stub for mkstemp
21697 #endif
21698
21699         return mkstemp ();
21700   ;
21701   return 0;
21702 }
21703 _ACEOF
21704 rm -f conftest.$ac_objext conftest$ac_exeext
21705 if { (eval echo "$as_me:21705: \"$ac_link\"") >&5
21706   (eval $ac_link) 2>&5
21707   ac_status=$?
21708   echo "$as_me:21708: \$? = $ac_status" >&5
21709   (exit $ac_status); } &&
21710          { ac_try='test -s conftest$ac_exeext'
21711   { (eval echo "$as_me:21711: \"$ac_try\"") >&5
21712   (eval $ac_try) 2>&5
21713   ac_status=$?
21714   echo "$as_me:21714: \$? = $ac_status" >&5
21715   (exit $ac_status); }; }; then
21716   ac_cv_func_mkstemp=yes
21717 else
21718   echo "$as_me: failed program was:" >&5
21719 cat conftest.$ac_ext >&5
21720 ac_cv_func_mkstemp=no
21721 fi
21722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21723 fi
21724 echo "$as_me:21724: result: $ac_cv_func_mkstemp" >&5
21725 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21726
21727 fi
21728 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21729
21730 cat >>confdefs.h <<\EOF
21731 #define HAVE_MKSTEMP 1
21732 EOF
21733
21734 fi
21735
21736 # setup for prototype of fallback for vsscanf()
21737
21738 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21739         HAVE_VSSCANF=1
21740 else
21741         HAVE_VSSCANF=0
21742 fi
21743
21744 if test "x$cross_compiling" = xyes ; then
21745         { echo "$as_me:21745: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21746 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21747 else
21748         echo "$as_me:21748: checking whether setvbuf arguments are reversed" >&5
21749 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21750 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21751   echo $ECHO_N "(cached) $ECHO_C" >&6
21752 else
21753   if test "$cross_compiling" = yes; then
21754   { { echo "$as_me:21754: error: cannot run test program while cross compiling" >&5
21755 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21756    { (exit 1); exit 1; }; }
21757 else
21758   cat >conftest.$ac_ext <<_ACEOF
21759 #line 21759 "configure"
21760 #include "confdefs.h"
21761 #include <stdio.h>
21762 /* If setvbuf has the reversed format, exit 0. */
21763 int
21764 main (void)
21765 {
21766   /* This call has the arguments reversed.
21767      A reversed system may check and see that the address of main
21768      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21769   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21770     $ac_main_return(1);
21771   putc('\r', stdout);
21772   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21773 }
21774 _ACEOF
21775 rm -f conftest$ac_exeext
21776 if { (eval echo "$as_me:21776: \"$ac_link\"") >&5
21777   (eval $ac_link) 2>&5
21778   ac_status=$?
21779   echo "$as_me:21779: \$? = $ac_status" >&5
21780   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21781   { (eval echo "$as_me:21781: \"$ac_try\"") >&5
21782   (eval $ac_try) 2>&5
21783   ac_status=$?
21784   echo "$as_me:21784: \$? = $ac_status" >&5
21785   (exit $ac_status); }; }; then
21786   ac_cv_func_setvbuf_reversed=yes
21787 else
21788   echo "$as_me: program exited with status $ac_status" >&5
21789 echo "$as_me: failed program was:" >&5
21790 cat conftest.$ac_ext >&5
21791 ac_cv_func_setvbuf_reversed=no
21792 fi
21793 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21794 fi
21795 rm -f core core.* *.core
21796 fi
21797 echo "$as_me:21797: result: $ac_cv_func_setvbuf_reversed" >&5
21798 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21799 if test $ac_cv_func_setvbuf_reversed = yes; then
21800
21801 cat >>confdefs.h <<\EOF
21802 #define SETVBUF_REVERSED 1
21803 EOF
21804
21805 fi
21806
21807 fi
21808 echo "$as_me:21808: checking for intptr_t" >&5
21809 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21810 if test "${ac_cv_type_intptr_t+set}" = set; then
21811   echo $ECHO_N "(cached) $ECHO_C" >&6
21812 else
21813   cat >conftest.$ac_ext <<_ACEOF
21814 #line 21814 "configure"
21815 #include "confdefs.h"
21816 $ac_includes_default
21817 int
21818 main (void)
21819 {
21820 if ((intptr_t *) 0)
21821   return 0;
21822 if (sizeof (intptr_t))
21823   return 0;
21824   ;
21825   return 0;
21826 }
21827 _ACEOF
21828 rm -f conftest.$ac_objext
21829 if { (eval echo "$as_me:21829: \"$ac_compile\"") >&5
21830   (eval $ac_compile) 2>&5
21831   ac_status=$?
21832   echo "$as_me:21832: \$? = $ac_status" >&5
21833   (exit $ac_status); } &&
21834          { ac_try='test -s conftest.$ac_objext'
21835   { (eval echo "$as_me:21835: \"$ac_try\"") >&5
21836   (eval $ac_try) 2>&5
21837   ac_status=$?
21838   echo "$as_me:21838: \$? = $ac_status" >&5
21839   (exit $ac_status); }; }; then
21840   ac_cv_type_intptr_t=yes
21841 else
21842   echo "$as_me: failed program was:" >&5
21843 cat conftest.$ac_ext >&5
21844 ac_cv_type_intptr_t=no
21845 fi
21846 rm -f conftest.$ac_objext conftest.$ac_ext
21847 fi
21848 echo "$as_me:21848: result: $ac_cv_type_intptr_t" >&5
21849 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21850 if test $ac_cv_type_intptr_t = yes; then
21851   :
21852 else
21853
21854 cat >>confdefs.h <<EOF
21855 #define intptr_t long
21856 EOF
21857
21858 fi
21859
21860 echo "$as_me:21860: checking for ssize_t" >&5
21861 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21862 if test "${ac_cv_type_ssize_t+set}" = set; then
21863   echo $ECHO_N "(cached) $ECHO_C" >&6
21864 else
21865   cat >conftest.$ac_ext <<_ACEOF
21866 #line 21866 "configure"
21867 #include "confdefs.h"
21868 $ac_includes_default
21869 int
21870 main (void)
21871 {
21872 if ((ssize_t *) 0)
21873   return 0;
21874 if (sizeof (ssize_t))
21875   return 0;
21876   ;
21877   return 0;
21878 }
21879 _ACEOF
21880 rm -f conftest.$ac_objext
21881 if { (eval echo "$as_me:21881: \"$ac_compile\"") >&5
21882   (eval $ac_compile) 2>&5
21883   ac_status=$?
21884   echo "$as_me:21884: \$? = $ac_status" >&5
21885   (exit $ac_status); } &&
21886          { ac_try='test -s conftest.$ac_objext'
21887   { (eval echo "$as_me:21887: \"$ac_try\"") >&5
21888   (eval $ac_try) 2>&5
21889   ac_status=$?
21890   echo "$as_me:21890: \$? = $ac_status" >&5
21891   (exit $ac_status); }; }; then
21892   ac_cv_type_ssize_t=yes
21893 else
21894   echo "$as_me: failed program was:" >&5
21895 cat conftest.$ac_ext >&5
21896 ac_cv_type_ssize_t=no
21897 fi
21898 rm -f conftest.$ac_objext conftest.$ac_ext
21899 fi
21900 echo "$as_me:21900: result: $ac_cv_type_ssize_t" >&5
21901 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21902 if test $ac_cv_type_ssize_t = yes; then
21903   :
21904 else
21905
21906 cat >>confdefs.h <<EOF
21907 #define ssize_t int
21908 EOF
21909
21910 fi
21911
21912 echo "$as_me:21912: checking for type sigaction_t" >&5
21913 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21914 if test "${cf_cv_type_sigaction+set}" = set; then
21915   echo $ECHO_N "(cached) $ECHO_C" >&6
21916 else
21917
21918         cat >conftest.$ac_ext <<_ACEOF
21919 #line 21919 "configure"
21920 #include "confdefs.h"
21921
21922 #include <signal.h>
21923 int
21924 main (void)
21925 {
21926 sigaction_t x
21927   ;
21928   return 0;
21929 }
21930 _ACEOF
21931 rm -f conftest.$ac_objext
21932 if { (eval echo "$as_me:21932: \"$ac_compile\"") >&5
21933   (eval $ac_compile) 2>&5
21934   ac_status=$?
21935   echo "$as_me:21935: \$? = $ac_status" >&5
21936   (exit $ac_status); } &&
21937          { ac_try='test -s conftest.$ac_objext'
21938   { (eval echo "$as_me:21938: \"$ac_try\"") >&5
21939   (eval $ac_try) 2>&5
21940   ac_status=$?
21941   echo "$as_me:21941: \$? = $ac_status" >&5
21942   (exit $ac_status); }; }; then
21943   cf_cv_type_sigaction=yes
21944 else
21945   echo "$as_me: failed program was:" >&5
21946 cat conftest.$ac_ext >&5
21947 cf_cv_type_sigaction=no
21948 fi
21949 rm -f conftest.$ac_objext conftest.$ac_ext
21950 fi
21951
21952 echo "$as_me:21952: result: $cf_cv_type_sigaction" >&5
21953 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21954 test "$cf_cv_type_sigaction" = yes &&
21955 cat >>confdefs.h <<\EOF
21956 #define HAVE_TYPE_SIGACTION 1
21957 EOF
21958
21959 echo "$as_me:21959: checking declaration of size-change" >&5
21960 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21961 if test "${cf_cv_sizechange+set}" = set; then
21962   echo $ECHO_N "(cached) $ECHO_C" >&6
21963 else
21964
21965         cf_cv_sizechange=unknown
21966         cf_save_CPPFLAGS="$CPPFLAGS"
21967
21968 for cf_opts in "" "NEED_PTEM_H"
21969 do
21970
21971         CPPFLAGS="$cf_save_CPPFLAGS"
21972         if test -n "$cf_opts"
21973         then
21974
21975         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21976         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21977
21978         fi
21979         cat >conftest.$ac_ext <<_ACEOF
21980 #line 21980 "configure"
21981 #include "confdefs.h"
21982 #include <sys/types.h>
21983 #ifdef HAVE_TERMIOS_H
21984 #include <termios.h>
21985 #else
21986 #ifdef HAVE_TERMIO_H
21987 #include <termio.h>
21988 #endif
21989 #endif
21990
21991 #ifdef NEED_PTEM_H
21992 /* This is a workaround for SCO:  they neglected to define struct winsize in
21993  * termios.h -- it's only in termio.h and ptem.h
21994  */
21995 #include <sys/stream.h>
21996 #include <sys/ptem.h>
21997 #endif
21998
21999 #ifdef HAVE_SYS_IOCTL_H
22000 #include <sys/ioctl.h>
22001 #endif
22002
22003 int
22004 main (void)
22005 {
22006
22007 #ifdef TIOCGSIZE
22008         struct ttysize win;     /* SunOS 3.0... */
22009         int y = win.ts_lines = 2;
22010         int x = win.ts_cols = 1;
22011         (void)y;
22012         (void)x;
22013 #else
22014 #ifdef TIOCGWINSZ
22015         struct winsize win;     /* everything else */
22016         int y = win.ws_row = 2;
22017         int x = win.ws_col = 1;
22018         (void)y;
22019         (void)x;
22020 #else
22021         no TIOCGSIZE or TIOCGWINSZ
22022 #endif /* TIOCGWINSZ */
22023 #endif /* TIOCGSIZE */
22024
22025   ;
22026   return 0;
22027 }
22028 _ACEOF
22029 rm -f conftest.$ac_objext
22030 if { (eval echo "$as_me:22030: \"$ac_compile\"") >&5
22031   (eval $ac_compile) 2>&5
22032   ac_status=$?
22033   echo "$as_me:22033: \$? = $ac_status" >&5
22034   (exit $ac_status); } &&
22035          { ac_try='test -s conftest.$ac_objext'
22036   { (eval echo "$as_me:22036: \"$ac_try\"") >&5
22037   (eval $ac_try) 2>&5
22038   ac_status=$?
22039   echo "$as_me:22039: \$? = $ac_status" >&5
22040   (exit $ac_status); }; }; then
22041   cf_cv_sizechange=yes
22042 else
22043   echo "$as_me: failed program was:" >&5
22044 cat conftest.$ac_ext >&5
22045 cf_cv_sizechange=no
22046 fi
22047 rm -f conftest.$ac_objext conftest.$ac_ext
22048
22049         CPPFLAGS="$cf_save_CPPFLAGS"
22050         if test "$cf_cv_sizechange" = yes ; then
22051                 echo "size-change succeeded ($cf_opts)" >&5
22052                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22053                 break
22054         fi
22055 done
22056
22057 fi
22058 echo "$as_me:22058: result: $cf_cv_sizechange" >&5
22059 echo "${ECHO_T}$cf_cv_sizechange" >&6
22060 if test "$cf_cv_sizechange" != no ; then
22061
22062 cat >>confdefs.h <<\EOF
22063 #define HAVE_SIZECHANGE 1
22064 EOF
22065
22066         case $cf_cv_sizechange in
22067         (NEED*)
22068                 cat >>confdefs.h <<EOF
22069 #define $cf_cv_sizechange  1
22070 EOF
22071
22072                 ;;
22073         esac
22074 fi
22075
22076 echo "$as_me:22076: checking for memmove" >&5
22077 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22078 if test "${ac_cv_func_memmove+set}" = set; then
22079   echo $ECHO_N "(cached) $ECHO_C" >&6
22080 else
22081   cat >conftest.$ac_ext <<_ACEOF
22082 #line 22082 "configure"
22083 #include "confdefs.h"
22084 #define memmove autoconf_temporary
22085 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22086 #undef memmove
22087
22088 #ifdef __cplusplus
22089 extern "C"
22090 #endif
22091
22092 /* We use char because int might match the return type of a gcc2
22093    builtin and then its argument prototype would still apply.  */
22094 char memmove (void);
22095
22096 int
22097 main (void)
22098 {
22099
22100 /* The GNU C library defines stubs for functions which it implements
22101     to always fail with ENOSYS.  Some functions are actually named
22102     something starting with __ and the normal name is an alias.  */
22103 #if defined (__stub_memmove) || defined (__stub___memmove)
22104 #error found stub for memmove
22105 #endif
22106
22107         return memmove ();
22108   ;
22109   return 0;
22110 }
22111 _ACEOF
22112 rm -f conftest.$ac_objext conftest$ac_exeext
22113 if { (eval echo "$as_me:22113: \"$ac_link\"") >&5
22114   (eval $ac_link) 2>&5
22115   ac_status=$?
22116   echo "$as_me:22116: \$? = $ac_status" >&5
22117   (exit $ac_status); } &&
22118          { ac_try='test -s conftest$ac_exeext'
22119   { (eval echo "$as_me:22119: \"$ac_try\"") >&5
22120   (eval $ac_try) 2>&5
22121   ac_status=$?
22122   echo "$as_me:22122: \$? = $ac_status" >&5
22123   (exit $ac_status); }; }; then
22124   ac_cv_func_memmove=yes
22125 else
22126   echo "$as_me: failed program was:" >&5
22127 cat conftest.$ac_ext >&5
22128 ac_cv_func_memmove=no
22129 fi
22130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22131 fi
22132 echo "$as_me:22132: result: $ac_cv_func_memmove" >&5
22133 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22134 if test $ac_cv_func_memmove = yes; then
22135   :
22136 else
22137
22138 echo "$as_me:22138: checking for bcopy" >&5
22139 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22140 if test "${ac_cv_func_bcopy+set}" = set; then
22141   echo $ECHO_N "(cached) $ECHO_C" >&6
22142 else
22143   cat >conftest.$ac_ext <<_ACEOF
22144 #line 22144 "configure"
22145 #include "confdefs.h"
22146 #define bcopy autoconf_temporary
22147 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22148 #undef bcopy
22149
22150 #ifdef __cplusplus
22151 extern "C"
22152 #endif
22153
22154 /* We use char because int might match the return type of a gcc2
22155    builtin and then its argument prototype would still apply.  */
22156 char bcopy (void);
22157
22158 int
22159 main (void)
22160 {
22161
22162 /* The GNU C library defines stubs for functions which it implements
22163     to always fail with ENOSYS.  Some functions are actually named
22164     something starting with __ and the normal name is an alias.  */
22165 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22166 #error found stub for bcopy
22167 #endif
22168
22169         return bcopy ();
22170   ;
22171   return 0;
22172 }
22173 _ACEOF
22174 rm -f conftest.$ac_objext conftest$ac_exeext
22175 if { (eval echo "$as_me:22175: \"$ac_link\"") >&5
22176   (eval $ac_link) 2>&5
22177   ac_status=$?
22178   echo "$as_me:22178: \$? = $ac_status" >&5
22179   (exit $ac_status); } &&
22180          { ac_try='test -s conftest$ac_exeext'
22181   { (eval echo "$as_me:22181: \"$ac_try\"") >&5
22182   (eval $ac_try) 2>&5
22183   ac_status=$?
22184   echo "$as_me:22184: \$? = $ac_status" >&5
22185   (exit $ac_status); }; }; then
22186   ac_cv_func_bcopy=yes
22187 else
22188   echo "$as_me: failed program was:" >&5
22189 cat conftest.$ac_ext >&5
22190 ac_cv_func_bcopy=no
22191 fi
22192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22193 fi
22194 echo "$as_me:22194: result: $ac_cv_func_bcopy" >&5
22195 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22196 if test $ac_cv_func_bcopy = yes; then
22197
22198         echo "$as_me:22198: checking if bcopy does overlapping moves" >&5
22199 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22200 if test "${cf_cv_good_bcopy+set}" = set; then
22201   echo $ECHO_N "(cached) $ECHO_C" >&6
22202 else
22203
22204                 if test "$cross_compiling" = yes; then
22205   cf_cv_good_bcopy=unknown
22206 else
22207   cat >conftest.$ac_ext <<_ACEOF
22208 #line 22208 "configure"
22209 #include "confdefs.h"
22210
22211 int main(void) {
22212         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22213         char temp[40];
22214         bcopy(data, temp, sizeof(data));
22215         bcopy(temp+10, temp, 15);
22216         bcopy(temp+5, temp+15, 10);
22217         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22218 }
22219
22220 _ACEOF
22221 rm -f conftest$ac_exeext
22222 if { (eval echo "$as_me:22222: \"$ac_link\"") >&5
22223   (eval $ac_link) 2>&5
22224   ac_status=$?
22225   echo "$as_me:22225: \$? = $ac_status" >&5
22226   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22227   { (eval echo "$as_me:22227: \"$ac_try\"") >&5
22228   (eval $ac_try) 2>&5
22229   ac_status=$?
22230   echo "$as_me:22230: \$? = $ac_status" >&5
22231   (exit $ac_status); }; }; then
22232   cf_cv_good_bcopy=yes
22233 else
22234   echo "$as_me: program exited with status $ac_status" >&5
22235 echo "$as_me: failed program was:" >&5
22236 cat conftest.$ac_ext >&5
22237 cf_cv_good_bcopy=no
22238 fi
22239 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22240 fi
22241
22242 fi
22243 echo "$as_me:22243: result: $cf_cv_good_bcopy" >&5
22244 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22245
22246 else
22247   cf_cv_good_bcopy=no
22248 fi
22249
22250         if test "$cf_cv_good_bcopy" = yes ; then
22251
22252 cat >>confdefs.h <<\EOF
22253 #define USE_OK_BCOPY 1
22254 EOF
22255
22256         else
22257
22258 cat >>confdefs.h <<\EOF
22259 #define USE_MY_MEMMOVE 1
22260 EOF
22261
22262         fi
22263
22264 fi
22265
22266 tty 2>&1 >/dev/null || {
22267 for ac_func in posix_openpt
22268 do
22269 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22270 echo "$as_me:22270: checking for $ac_func" >&5
22271 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22272 if eval "test \"\${$as_ac_var+set}\" = set"; then
22273   echo $ECHO_N "(cached) $ECHO_C" >&6
22274 else
22275   cat >conftest.$ac_ext <<_ACEOF
22276 #line 22276 "configure"
22277 #include "confdefs.h"
22278 #define $ac_func autoconf_temporary
22279 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22280 #undef $ac_func
22281
22282 #ifdef __cplusplus
22283 extern "C"
22284 #endif
22285
22286 /* We use char because int might match the return type of a gcc2
22287    builtin and then its argument prototype would still apply.  */
22288 char $ac_func (void);
22289
22290 int
22291 main (void)
22292 {
22293
22294 /* The GNU C library defines stubs for functions which it implements
22295     to always fail with ENOSYS.  Some functions are actually named
22296     something starting with __ and the normal name is an alias.  */
22297 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22298 #error found stub for $ac_func
22299 #endif
22300
22301         return $ac_func ();
22302   ;
22303   return 0;
22304 }
22305 _ACEOF
22306 rm -f conftest.$ac_objext conftest$ac_exeext
22307 if { (eval echo "$as_me:22307: \"$ac_link\"") >&5
22308   (eval $ac_link) 2>&5
22309   ac_status=$?
22310   echo "$as_me:22310: \$? = $ac_status" >&5
22311   (exit $ac_status); } &&
22312          { ac_try='test -s conftest$ac_exeext'
22313   { (eval echo "$as_me:22313: \"$ac_try\"") >&5
22314   (eval $ac_try) 2>&5
22315   ac_status=$?
22316   echo "$as_me:22316: \$? = $ac_status" >&5
22317   (exit $ac_status); }; }; then
22318   eval "$as_ac_var=yes"
22319 else
22320   echo "$as_me: failed program was:" >&5
22321 cat conftest.$ac_ext >&5
22322 eval "$as_ac_var=no"
22323 fi
22324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22325 fi
22326 echo "$as_me:22326: result: `eval echo '${'$as_ac_var'}'`" >&5
22327 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22328 if test `eval echo '${'$as_ac_var'}'` = yes; then
22329   cat >>confdefs.h <<EOF
22330 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22331 EOF
22332
22333 fi
22334 done
22335  }
22336 echo "$as_me:22336: checking if poll really works" >&5
22337 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22338 if test "${cf_cv_working_poll+set}" = set; then
22339   echo $ECHO_N "(cached) $ECHO_C" >&6
22340 else
22341
22342 if test "$cross_compiling" = yes; then
22343   cf_cv_working_poll=unknown
22344 else
22345   cat >conftest.$ac_ext <<_ACEOF
22346 #line 22346 "configure"
22347 #include "confdefs.h"
22348
22349 #include <stdlib.h>
22350 #include <stdio.h>
22351 #include <unistd.h>
22352 #include <fcntl.h>
22353 #ifdef HAVE_POLL_H
22354 #include <poll.h>
22355 #else
22356 #include <sys/poll.h>
22357 #endif
22358 int main(void) {
22359         struct pollfd myfds;
22360         int ret;
22361
22362         /* check for Darwin bug with respect to "devices" */
22363         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22364         if (myfds.fd < 0)
22365                 myfds.fd = 0;
22366         myfds.events = POLLIN;
22367         myfds.revents = 0;
22368
22369         ret = poll(&myfds, 1, 100);
22370
22371         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22372                 ret = -1;
22373         } else {
22374                 int fd = 0;
22375                 if (!isatty(fd)) {
22376                         fd = open("/dev/tty", 2);       /* O_RDWR */
22377                 }
22378 #ifdef HAVE_POSIX_OPENPT
22379                 if (fd < 0) {
22380                         fd = posix_openpt(O_RDWR);
22381                 }
22382 #endif
22383
22384                 if (fd >= 0) {
22385                         /* also check with standard input */
22386                         myfds.fd = fd;
22387                         myfds.events = POLLIN;
22388                         myfds.revents = 0;
22389                         ret = poll(&myfds, 1, 100);
22390                 } else {
22391                         ret = -1;
22392                 }
22393         }
22394         ${cf_cv_main_return:-return}(ret < 0);
22395 }
22396 _ACEOF
22397 rm -f conftest$ac_exeext
22398 if { (eval echo "$as_me:22398: \"$ac_link\"") >&5
22399   (eval $ac_link) 2>&5
22400   ac_status=$?
22401   echo "$as_me:22401: \$? = $ac_status" >&5
22402   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22403   { (eval echo "$as_me:22403: \"$ac_try\"") >&5
22404   (eval $ac_try) 2>&5
22405   ac_status=$?
22406   echo "$as_me:22406: \$? = $ac_status" >&5
22407   (exit $ac_status); }; }; then
22408   cf_cv_working_poll=yes
22409 else
22410   echo "$as_me: program exited with status $ac_status" >&5
22411 echo "$as_me: failed program was:" >&5
22412 cat conftest.$ac_ext >&5
22413 cf_cv_working_poll=no
22414 fi
22415 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22416 fi
22417 fi
22418 echo "$as_me:22418: result: $cf_cv_working_poll" >&5
22419 echo "${ECHO_T}$cf_cv_working_poll" >&6
22420 test "$cf_cv_working_poll" = "yes" &&
22421 cat >>confdefs.h <<\EOF
22422 #define HAVE_WORKING_POLL 1
22423 EOF
22424
22425 echo "$as_me:22425: checking for va_copy" >&5
22426 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22427 if test "${cf_cv_have_va_copy+set}" = set; then
22428   echo $ECHO_N "(cached) $ECHO_C" >&6
22429 else
22430
22431 cat >conftest.$ac_ext <<_ACEOF
22432 #line 22432 "configure"
22433 #include "confdefs.h"
22434
22435 #include <stdarg.h>
22436
22437 int
22438 main (void)
22439 {
22440
22441         static va_list dst;
22442         static va_list src;
22443         va_copy(dst, src)
22444   ;
22445   return 0;
22446 }
22447 _ACEOF
22448 rm -f conftest.$ac_objext conftest$ac_exeext
22449 if { (eval echo "$as_me:22449: \"$ac_link\"") >&5
22450   (eval $ac_link) 2>&5
22451   ac_status=$?
22452   echo "$as_me:22452: \$? = $ac_status" >&5
22453   (exit $ac_status); } &&
22454          { ac_try='test -s conftest$ac_exeext'
22455   { (eval echo "$as_me:22455: \"$ac_try\"") >&5
22456   (eval $ac_try) 2>&5
22457   ac_status=$?
22458   echo "$as_me:22458: \$? = $ac_status" >&5
22459   (exit $ac_status); }; }; then
22460   cf_cv_have_va_copy=yes
22461 else
22462   echo "$as_me: failed program was:" >&5
22463 cat conftest.$ac_ext >&5
22464 cf_cv_have_va_copy=no
22465 fi
22466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22467 fi
22468 echo "$as_me:22468: result: $cf_cv_have_va_copy" >&5
22469 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22470
22471 if test "$cf_cv_have_va_copy" = yes;
22472 then
22473
22474 cat >>confdefs.h <<\EOF
22475 #define HAVE_VA_COPY 1
22476 EOF
22477
22478 else # !cf_cv_have_va_copy
22479
22480 echo "$as_me:22480: checking for __va_copy" >&5
22481 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22482 if test "${cf_cv_have___va_copy+set}" = set; then
22483   echo $ECHO_N "(cached) $ECHO_C" >&6
22484 else
22485
22486 cat >conftest.$ac_ext <<_ACEOF
22487 #line 22487 "configure"
22488 #include "confdefs.h"
22489
22490 #include <stdarg.h>
22491
22492 int
22493 main (void)
22494 {
22495
22496         static va_list dst;
22497         static va_list src;
22498         __va_copy(dst, src)
22499   ;
22500   return 0;
22501 }
22502 _ACEOF
22503 rm -f conftest.$ac_objext conftest$ac_exeext
22504 if { (eval echo "$as_me:22504: \"$ac_link\"") >&5
22505   (eval $ac_link) 2>&5
22506   ac_status=$?
22507   echo "$as_me:22507: \$? = $ac_status" >&5
22508   (exit $ac_status); } &&
22509          { ac_try='test -s conftest$ac_exeext'
22510   { (eval echo "$as_me:22510: \"$ac_try\"") >&5
22511   (eval $ac_try) 2>&5
22512   ac_status=$?
22513   echo "$as_me:22513: \$? = $ac_status" >&5
22514   (exit $ac_status); }; }; then
22515   cf_cv_have___va_copy=yes
22516 else
22517   echo "$as_me: failed program was:" >&5
22518 cat conftest.$ac_ext >&5
22519 cf_cv_have___va_copy=no
22520 fi
22521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22522 fi
22523 echo "$as_me:22523: result: $cf_cv_have___va_copy" >&5
22524 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22525
22526 if test "$cf_cv_have___va_copy" = yes
22527 then
22528
22529 cat >>confdefs.h <<\EOF
22530 #define HAVE___VA_COPY 1
22531 EOF
22532
22533 else # !cf_cv_have___va_copy
22534
22535 echo "$as_me:22535: checking for __builtin_va_copy" >&5
22536 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22537 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22538   echo $ECHO_N "(cached) $ECHO_C" >&6
22539 else
22540
22541 cat >conftest.$ac_ext <<_ACEOF
22542 #line 22542 "configure"
22543 #include "confdefs.h"
22544
22545 #include <stdarg.h>
22546
22547 int
22548 main (void)
22549 {
22550
22551         static va_list dst;
22552         static va_list src;
22553         __builtin_va_copy(dst, src)
22554   ;
22555   return 0;
22556 }
22557 _ACEOF
22558 rm -f conftest.$ac_objext conftest$ac_exeext
22559 if { (eval echo "$as_me:22559: \"$ac_link\"") >&5
22560   (eval $ac_link) 2>&5
22561   ac_status=$?
22562   echo "$as_me:22562: \$? = $ac_status" >&5
22563   (exit $ac_status); } &&
22564          { ac_try='test -s conftest$ac_exeext'
22565   { (eval echo "$as_me:22565: \"$ac_try\"") >&5
22566   (eval $ac_try) 2>&5
22567   ac_status=$?
22568   echo "$as_me:22568: \$? = $ac_status" >&5
22569   (exit $ac_status); }; }; then
22570   cf_cv_have___builtin_va_copy=yes
22571 else
22572   echo "$as_me: failed program was:" >&5
22573 cat conftest.$ac_ext >&5
22574 cf_cv_have___builtin_va_copy=no
22575 fi
22576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22577 fi
22578 echo "$as_me:22578: result: $cf_cv_have___builtin_va_copy" >&5
22579 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22580
22581 test "$cf_cv_have___builtin_va_copy" = yes &&
22582
22583 cat >>confdefs.h <<\EOF
22584 #define HAVE___BUILTIN_VA_COPY 1
22585 EOF
22586
22587 fi # cf_cv_have___va_copy
22588
22589 fi # cf_cv_have_va_copy
22590
22591 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22592 (*yes*)
22593         ;;
22594
22595 (*)
22596         echo "$as_me:22596: checking if we can simply copy va_list" >&5
22597 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22598 if test "${cf_cv_pointer_va_list+set}" = set; then
22599   echo $ECHO_N "(cached) $ECHO_C" >&6
22600 else
22601
22602 cat >conftest.$ac_ext <<_ACEOF
22603 #line 22603 "configure"
22604 #include "confdefs.h"
22605
22606 #include <stdarg.h>
22607
22608 int
22609 main (void)
22610 {
22611
22612         va_list dst;
22613         va_list src;
22614         dst = src
22615   ;
22616   return 0;
22617 }
22618 _ACEOF
22619 rm -f conftest.$ac_objext conftest$ac_exeext
22620 if { (eval echo "$as_me:22620: \"$ac_link\"") >&5
22621   (eval $ac_link) 2>&5
22622   ac_status=$?
22623   echo "$as_me:22623: \$? = $ac_status" >&5
22624   (exit $ac_status); } &&
22625          { ac_try='test -s conftest$ac_exeext'
22626   { (eval echo "$as_me:22626: \"$ac_try\"") >&5
22627   (eval $ac_try) 2>&5
22628   ac_status=$?
22629   echo "$as_me:22629: \$? = $ac_status" >&5
22630   (exit $ac_status); }; }; then
22631   cf_cv_pointer_va_list=yes
22632 else
22633   echo "$as_me: failed program was:" >&5
22634 cat conftest.$ac_ext >&5
22635 cf_cv_pointer_va_list=no
22636 fi
22637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22638 fi
22639 echo "$as_me:22639: result: $cf_cv_pointer_va_list" >&5
22640 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22641
22642         if test "$cf_cv_pointer_va_list" = no
22643         then
22644                 echo "$as_me:22644: checking if we can copy va_list indirectly" >&5
22645 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22646 if test "${cf_cv_array_va_list+set}" = set; then
22647   echo $ECHO_N "(cached) $ECHO_C" >&6
22648 else
22649
22650 cat >conftest.$ac_ext <<_ACEOF
22651 #line 22651 "configure"
22652 #include "confdefs.h"
22653
22654 #include <stdarg.h>
22655
22656 int
22657 main (void)
22658 {
22659
22660         va_list dst;
22661         va_list src;
22662         *dst = *src
22663   ;
22664   return 0;
22665 }
22666 _ACEOF
22667 rm -f conftest.$ac_objext conftest$ac_exeext
22668 if { (eval echo "$as_me:22668: \"$ac_link\"") >&5
22669   (eval $ac_link) 2>&5
22670   ac_status=$?
22671   echo "$as_me:22671: \$? = $ac_status" >&5
22672   (exit $ac_status); } &&
22673          { ac_try='test -s conftest$ac_exeext'
22674   { (eval echo "$as_me:22674: \"$ac_try\"") >&5
22675   (eval $ac_try) 2>&5
22676   ac_status=$?
22677   echo "$as_me:22677: \$? = $ac_status" >&5
22678   (exit $ac_status); }; }; then
22679   cf_cv_array_va_list=yes
22680 else
22681   echo "$as_me: failed program was:" >&5
22682 cat conftest.$ac_ext >&5
22683 cf_cv_array_va_list=no
22684 fi
22685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22686 fi
22687 echo "$as_me:22687: result: $cf_cv_array_va_list" >&5
22688 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22689                 test "$cf_cv_array_va_list" = yes &&
22690 cat >>confdefs.h <<\EOF
22691 #define ARRAY_VA_LIST 1
22692 EOF
22693
22694         fi
22695         ;;
22696 esac
22697
22698 echo "$as_me:22698: checking for pid_t" >&5
22699 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22700 if test "${ac_cv_type_pid_t+set}" = set; then
22701   echo $ECHO_N "(cached) $ECHO_C" >&6
22702 else
22703   cat >conftest.$ac_ext <<_ACEOF
22704 #line 22704 "configure"
22705 #include "confdefs.h"
22706 $ac_includes_default
22707 int
22708 main (void)
22709 {
22710 if ((pid_t *) 0)
22711   return 0;
22712 if (sizeof (pid_t))
22713   return 0;
22714   ;
22715   return 0;
22716 }
22717 _ACEOF
22718 rm -f conftest.$ac_objext
22719 if { (eval echo "$as_me:22719: \"$ac_compile\"") >&5
22720   (eval $ac_compile) 2>&5
22721   ac_status=$?
22722   echo "$as_me:22722: \$? = $ac_status" >&5
22723   (exit $ac_status); } &&
22724          { ac_try='test -s conftest.$ac_objext'
22725   { (eval echo "$as_me:22725: \"$ac_try\"") >&5
22726   (eval $ac_try) 2>&5
22727   ac_status=$?
22728   echo "$as_me:22728: \$? = $ac_status" >&5
22729   (exit $ac_status); }; }; then
22730   ac_cv_type_pid_t=yes
22731 else
22732   echo "$as_me: failed program was:" >&5
22733 cat conftest.$ac_ext >&5
22734 ac_cv_type_pid_t=no
22735 fi
22736 rm -f conftest.$ac_objext conftest.$ac_ext
22737 fi
22738 echo "$as_me:22738: result: $ac_cv_type_pid_t" >&5
22739 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22740 if test $ac_cv_type_pid_t = yes; then
22741   :
22742 else
22743
22744 cat >>confdefs.h <<EOF
22745 #define pid_t int
22746 EOF
22747
22748 fi
22749
22750 for ac_header in unistd.h vfork.h
22751 do
22752 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22753 echo "$as_me:22753: checking for $ac_header" >&5
22754 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22755 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22756   echo $ECHO_N "(cached) $ECHO_C" >&6
22757 else
22758   cat >conftest.$ac_ext <<_ACEOF
22759 #line 22759 "configure"
22760 #include "confdefs.h"
22761 #include <$ac_header>
22762 _ACEOF
22763 if { (eval echo "$as_me:22763: \"$ac_cpp conftest.$ac_ext\"") >&5
22764   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22765   ac_status=$?
22766   egrep -v '^ *\+' conftest.er1 >conftest.err
22767   rm -f conftest.er1
22768   cat conftest.err >&5
22769   echo "$as_me:22769: \$? = $ac_status" >&5
22770   (exit $ac_status); } >/dev/null; then
22771   if test -s conftest.err; then
22772     ac_cpp_err=$ac_c_preproc_warn_flag
22773   else
22774     ac_cpp_err=
22775   fi
22776 else
22777   ac_cpp_err=yes
22778 fi
22779 if test -z "$ac_cpp_err"; then
22780   eval "$as_ac_Header=yes"
22781 else
22782   echo "$as_me: failed program was:" >&5
22783   cat conftest.$ac_ext >&5
22784   eval "$as_ac_Header=no"
22785 fi
22786 rm -f conftest.err conftest.$ac_ext
22787 fi
22788 echo "$as_me:22788: result: `eval echo '${'$as_ac_Header'}'`" >&5
22789 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22790 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22791   cat >>confdefs.h <<EOF
22792 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22793 EOF
22794
22795 fi
22796 done
22797
22798 for ac_func in fork vfork
22799 do
22800 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22801 echo "$as_me:22801: checking for $ac_func" >&5
22802 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22803 if eval "test \"\${$as_ac_var+set}\" = set"; then
22804   echo $ECHO_N "(cached) $ECHO_C" >&6
22805 else
22806   cat >conftest.$ac_ext <<_ACEOF
22807 #line 22807 "configure"
22808 #include "confdefs.h"
22809 #define $ac_func autoconf_temporary
22810 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22811 #undef $ac_func
22812
22813 #ifdef __cplusplus
22814 extern "C"
22815 #endif
22816
22817 /* We use char because int might match the return type of a gcc2
22818    builtin and then its argument prototype would still apply.  */
22819 char $ac_func (void);
22820
22821 int
22822 main (void)
22823 {
22824
22825 /* The GNU C library defines stubs for functions which it implements
22826     to always fail with ENOSYS.  Some functions are actually named
22827     something starting with __ and the normal name is an alias.  */
22828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22829 #error found stub for $ac_func
22830 #endif
22831
22832         return $ac_func ();
22833   ;
22834   return 0;
22835 }
22836 _ACEOF
22837 rm -f conftest.$ac_objext conftest$ac_exeext
22838 if { (eval echo "$as_me:22838: \"$ac_link\"") >&5
22839   (eval $ac_link) 2>&5
22840   ac_status=$?
22841   echo "$as_me:22841: \$? = $ac_status" >&5
22842   (exit $ac_status); } &&
22843          { ac_try='test -s conftest$ac_exeext'
22844   { (eval echo "$as_me:22844: \"$ac_try\"") >&5
22845   (eval $ac_try) 2>&5
22846   ac_status=$?
22847   echo "$as_me:22847: \$? = $ac_status" >&5
22848   (exit $ac_status); }; }; then
22849   eval "$as_ac_var=yes"
22850 else
22851   echo "$as_me: failed program was:" >&5
22852 cat conftest.$ac_ext >&5
22853 eval "$as_ac_var=no"
22854 fi
22855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22856 fi
22857 echo "$as_me:22857: result: `eval echo '${'$as_ac_var'}'`" >&5
22858 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22859 if test `eval echo '${'$as_ac_var'}'` = yes; then
22860   cat >>confdefs.h <<EOF
22861 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22862 EOF
22863
22864 fi
22865 done
22866
22867 ac_cv_func_fork_works=$ac_cv_func_fork
22868 if test "x$ac_cv_func_fork" = xyes; then
22869   echo "$as_me:22869: checking for working fork" >&5
22870 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22871 if test "${ac_cv_func_fork_works+set}" = set; then
22872   echo $ECHO_N "(cached) $ECHO_C" >&6
22873 else
22874   if test "$cross_compiling" = yes; then
22875   ac_cv_func_fork_works=cross
22876 else
22877   cat >conftest.$ac_ext <<_ACEOF
22878 /* By Rüdiger Kuhlmann. */
22879       #include <sys/types.h>
22880       #if HAVE_UNISTD_H
22881       # include <unistd.h>
22882       #endif
22883       /* Some systems only have a dummy stub for fork() */
22884       int main (void)
22885       {
22886         if (fork() < 0)
22887           $ac_main_return (1);
22888         $ac_main_return (0);
22889       }
22890 _ACEOF
22891 rm -f conftest$ac_exeext
22892 if { (eval echo "$as_me:22892: \"$ac_link\"") >&5
22893   (eval $ac_link) 2>&5
22894   ac_status=$?
22895   echo "$as_me:22895: \$? = $ac_status" >&5
22896   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22897   { (eval echo "$as_me:22897: \"$ac_try\"") >&5
22898   (eval $ac_try) 2>&5
22899   ac_status=$?
22900   echo "$as_me:22900: \$? = $ac_status" >&5
22901   (exit $ac_status); }; }; then
22902   ac_cv_func_fork_works=yes
22903 else
22904   echo "$as_me: program exited with status $ac_status" >&5
22905 echo "$as_me: failed program was:" >&5
22906 cat conftest.$ac_ext >&5
22907 ac_cv_func_fork_works=no
22908 fi
22909 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22910 fi
22911 fi
22912 echo "$as_me:22912: result: $ac_cv_func_fork_works" >&5
22913 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22914
22915 fi
22916 if test "x$ac_cv_func_fork_works" = xcross; then
22917   case $host in
22918     *-*-amigaos* | *-*-msdosdjgpp*)
22919       # Override, as these systems have only a dummy fork() stub
22920       ac_cv_func_fork_works=no
22921       ;;
22922     *)
22923       ac_cv_func_fork_works=yes
22924       ;;
22925   esac
22926   { echo "$as_me:22926: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22927 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22928 fi
22929 ac_cv_func_vfork_works=$ac_cv_func_vfork
22930 if test "x$ac_cv_func_vfork" = xyes; then
22931   echo "$as_me:22931: checking for working vfork" >&5
22932 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22933 if test "${ac_cv_func_vfork_works+set}" = set; then
22934   echo $ECHO_N "(cached) $ECHO_C" >&6
22935 else
22936   if test "$cross_compiling" = yes; then
22937   ac_cv_func_vfork_works=cross
22938 else
22939   cat >conftest.$ac_ext <<_ACEOF
22940 #line 22940 "configure"
22941 #include "confdefs.h"
22942 /* Thanks to Paul Eggert for this test.  */
22943 #include <stdio.h>
22944 #include <sys/types.h>
22945 #include <sys/stat.h>
22946 #if HAVE_UNISTD_H
22947 # include <unistd.h>
22948 #endif
22949 #if HAVE_VFORK_H
22950 # include <vfork.h>
22951 #endif
22952 /* On some sparc systems, changes by the child to local and incoming
22953    argument registers are propagated back to the parent.  The compiler
22954    is told about this with #include <vfork.h>, but some compilers
22955    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22956    static variable whose address is put into a register that is
22957    clobbered by the vfork.  */
22958 static
22959 #ifdef __cplusplus
22960 sparc_address_test (int arg)
22961 # else
22962 sparc_address_test (arg) int arg;
22963 #endif
22964 {
22965   static pid_t child;
22966   if (!child) {
22967     child = vfork ();
22968     if (child < 0) {
22969       perror ("vfork");
22970       _exit(2);
22971     }
22972     if (!child) {
22973       arg = getpid();
22974       write(-1, "", 0);
22975       _exit (arg);
22976     }
22977   }
22978 }
22979
22980 int
22981 main (void)
22982 {
22983   pid_t parent = getpid ();
22984   pid_t child;
22985
22986   sparc_address_test ();
22987
22988   child = vfork ();
22989
22990   if (child == 0) {
22991     /* Here is another test for sparc vfork register problems.  This
22992        test uses lots of local variables, at least as many local
22993        variables as main has allocated so far including compiler
22994        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22995        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22996        reuse the register of parent for one of the local variables,
22997        since it will think that parent can't possibly be used any more
22998        in this routine.  Assigning to the local variable will thus
22999        munge parent in the parent process.  */
23000     pid_t
23001       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23002       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23003     /* Convince the compiler that p..p7 are live; otherwise, it might
23004        use the same hardware register for all 8 local variables.  */
23005     if (p != p1 || p != p2 || p != p3 || p != p4
23006         || p != p5 || p != p6 || p != p7)
23007       _exit(1);
23008
23009     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23010        from child file descriptors.  If the child closes a descriptor
23011        before it execs or exits, this munges the parent's descriptor
23012        as well.  Test for this by closing stdout in the child.  */
23013     _exit(close(fileno(stdout)) != 0);
23014   } else {
23015     int status;
23016     struct stat st;
23017
23018     while (wait(&status) != child)
23019       ;
23020     $ac_main_return(
23021          /* Was there some problem with vforking?  */
23022          child < 0
23023
23024          /* Did the child fail?  (This shouldn't happen.)  */
23025          || status
23026
23027          /* Did the vfork/compiler bug occur?  */
23028          || parent != getpid()
23029
23030          /* Did the file descriptor bug occur?  */
23031          || fstat(fileno(stdout), &st) != 0
23032          );
23033   }
23034 }
23035 _ACEOF
23036 rm -f conftest$ac_exeext
23037 if { (eval echo "$as_me:23037: \"$ac_link\"") >&5
23038   (eval $ac_link) 2>&5
23039   ac_status=$?
23040   echo "$as_me:23040: \$? = $ac_status" >&5
23041   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23042   { (eval echo "$as_me:23042: \"$ac_try\"") >&5
23043   (eval $ac_try) 2>&5
23044   ac_status=$?
23045   echo "$as_me:23045: \$? = $ac_status" >&5
23046   (exit $ac_status); }; }; then
23047   ac_cv_func_vfork_works=yes
23048 else
23049   echo "$as_me: program exited with status $ac_status" >&5
23050 echo "$as_me: failed program was:" >&5
23051 cat conftest.$ac_ext >&5
23052 ac_cv_func_vfork_works=no
23053 fi
23054 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23055 fi
23056 fi
23057 echo "$as_me:23057: result: $ac_cv_func_vfork_works" >&5
23058 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23059
23060 fi;
23061 if test "x$ac_cv_func_fork_works" = xcross; then
23062   ac_cv_func_vfork_works=ac_cv_func_vfork
23063   { echo "$as_me:23063: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23064 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23065 fi
23066
23067 if test "x$ac_cv_func_vfork_works" = xyes; then
23068
23069 cat >>confdefs.h <<\EOF
23070 #define HAVE_WORKING_VFORK 1
23071 EOF
23072
23073 else
23074
23075 cat >>confdefs.h <<\EOF
23076 #define vfork fork
23077 EOF
23078
23079 fi
23080 if test "x$ac_cv_func_fork_works" = xyes; then
23081
23082 cat >>confdefs.h <<\EOF
23083 #define HAVE_WORKING_FORK 1
23084 EOF
23085
23086 fi
23087
23088 echo "$as_me:23088: checking if fopen accepts explicit binary mode" >&5
23089 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23090 if test "${cf_cv_fopen_bin_r+set}" = set; then
23091   echo $ECHO_N "(cached) $ECHO_C" >&6
23092 else
23093
23094         if test "$cross_compiling" = yes; then
23095   cf_cv_fopen_bin_r=unknown
23096 else
23097   cat >conftest.$ac_ext <<_ACEOF
23098 #line 23098 "configure"
23099 #include "confdefs.h"
23100
23101 #include <stdio.h>
23102 int main(void) {
23103         FILE *fp = fopen("conftest.tmp", "wb");
23104         int rc = 0;
23105         if (fp != 0) {
23106                 int p, q;
23107                 for (p = 0; p < 256; ++p) {
23108                         fputc(p, fp);
23109                 }
23110                 fclose(fp);
23111                 fp = fopen("conftest.tmp", "rb");
23112                 if (fp != 0) {
23113                         for (p = 0; p < 256; ++p) {
23114                                 q = fgetc(fp);
23115                                 if (q != p) {
23116                                         rc = 1;
23117                                         break;
23118                                 }
23119                         }
23120                 } else {
23121                         rc = 1;
23122                 }
23123         } else {
23124                 rc = 1;
23125         }
23126         ${cf_cv_main_return:-return} (rc);
23127 }
23128
23129 _ACEOF
23130 rm -f conftest$ac_exeext
23131 if { (eval echo "$as_me:23131: \"$ac_link\"") >&5
23132   (eval $ac_link) 2>&5
23133   ac_status=$?
23134   echo "$as_me:23134: \$? = $ac_status" >&5
23135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23136   { (eval echo "$as_me:23136: \"$ac_try\"") >&5
23137   (eval $ac_try) 2>&5
23138   ac_status=$?
23139   echo "$as_me:23139: \$? = $ac_status" >&5
23140   (exit $ac_status); }; }; then
23141   cf_cv_fopen_bin_r=yes
23142 else
23143   echo "$as_me: program exited with status $ac_status" >&5
23144 echo "$as_me: failed program was:" >&5
23145 cat conftest.$ac_ext >&5
23146 cf_cv_fopen_bin_r=no
23147 fi
23148 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23149 fi
23150
23151 fi
23152 echo "$as_me:23152: result: $cf_cv_fopen_bin_r" >&5
23153 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23154 test "x$cf_cv_fopen_bin_r" != xno &&
23155 cat >>confdefs.h <<\EOF
23156 #define USE_FOPEN_BIN_R 1
23157 EOF
23158
23159 # special check for test/ditto.c
23160
23161 echo "$as_me:23161: checking for openpty in -lutil" >&5
23162 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23163 if test "${ac_cv_lib_util_openpty+set}" = set; then
23164   echo $ECHO_N "(cached) $ECHO_C" >&6
23165 else
23166   ac_check_lib_save_LIBS=$LIBS
23167 LIBS="-lutil  $LIBS"
23168 cat >conftest.$ac_ext <<_ACEOF
23169 #line 23169 "configure"
23170 #include "confdefs.h"
23171
23172 /* Override any gcc2 internal prototype to avoid an error.  */
23173 #ifdef __cplusplus
23174 extern "C"
23175 #endif
23176 /* We use char because int might match the return type of a gcc2
23177    builtin and then its argument prototype would still apply.  */
23178 char openpty ();
23179 int
23180 main (void)
23181 {
23182 openpty ();
23183   ;
23184   return 0;
23185 }
23186 _ACEOF
23187 rm -f conftest.$ac_objext conftest$ac_exeext
23188 if { (eval echo "$as_me:23188: \"$ac_link\"") >&5
23189   (eval $ac_link) 2>&5
23190   ac_status=$?
23191   echo "$as_me:23191: \$? = $ac_status" >&5
23192   (exit $ac_status); } &&
23193          { ac_try='test -s conftest$ac_exeext'
23194   { (eval echo "$as_me:23194: \"$ac_try\"") >&5
23195   (eval $ac_try) 2>&5
23196   ac_status=$?
23197   echo "$as_me:23197: \$? = $ac_status" >&5
23198   (exit $ac_status); }; }; then
23199   ac_cv_lib_util_openpty=yes
23200 else
23201   echo "$as_me: failed program was:" >&5
23202 cat conftest.$ac_ext >&5
23203 ac_cv_lib_util_openpty=no
23204 fi
23205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23206 LIBS=$ac_check_lib_save_LIBS
23207 fi
23208 echo "$as_me:23208: result: $ac_cv_lib_util_openpty" >&5
23209 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23210 if test $ac_cv_lib_util_openpty = yes; then
23211   cf_cv_lib_util=yes
23212 else
23213   cf_cv_lib_util=no
23214 fi
23215
23216 echo "$as_me:23216: checking for openpty header" >&5
23217 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23218 if test "${cf_cv_func_openpty+set}" = set; then
23219   echo $ECHO_N "(cached) $ECHO_C" >&6
23220 else
23221
23222         cf_save_LIBS="$LIBS"
23223         test $cf_cv_lib_util = yes && {
23224 cf_add_libs="$LIBS"
23225 # reverse order
23226 cf_add_0lib=
23227 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23228 # filter duplicates
23229 for cf_add_1lib in $cf_add_0lib; do
23230         for cf_add_2lib in $cf_add_libs; do
23231                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23232                         cf_add_1lib=
23233                         break
23234                 fi
23235         done
23236         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23237 done
23238 LIBS="$cf_add_libs"
23239  }
23240         for cf_header in pty.h libutil.h util.h
23241         do
23242         cat >conftest.$ac_ext <<_ACEOF
23243 #line 23243 "configure"
23244 #include "confdefs.h"
23245
23246 #include <$cf_header>
23247
23248 int
23249 main (void)
23250 {
23251
23252         int x = openpty((int *)0, (int *)0, (char *)0,
23253                                    (struct termios *)0, (struct winsize *)0);
23254
23255   ;
23256   return 0;
23257 }
23258 _ACEOF
23259 rm -f conftest.$ac_objext conftest$ac_exeext
23260 if { (eval echo "$as_me:23260: \"$ac_link\"") >&5
23261   (eval $ac_link) 2>&5
23262   ac_status=$?
23263   echo "$as_me:23263: \$? = $ac_status" >&5
23264   (exit $ac_status); } &&
23265          { ac_try='test -s conftest$ac_exeext'
23266   { (eval echo "$as_me:23266: \"$ac_try\"") >&5
23267   (eval $ac_try) 2>&5
23268   ac_status=$?
23269   echo "$as_me:23269: \$? = $ac_status" >&5
23270   (exit $ac_status); }; }; then
23271
23272                 cf_cv_func_openpty=$cf_header
23273                 break
23274
23275 else
23276   echo "$as_me: failed program was:" >&5
23277 cat conftest.$ac_ext >&5
23278
23279                 cf_cv_func_openpty=no
23280
23281 fi
23282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23283         done
23284         LIBS="$cf_save_LIBS"
23285
23286 fi
23287 echo "$as_me:23287: result: $cf_cv_func_openpty" >&5
23288 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23289
23290 if test "$cf_cv_func_openpty" != no ; then
23291
23292 cat >>confdefs.h <<EOF
23293 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23294 EOF
23295
23296 cat >>confdefs.h <<\EOF
23297 #define USE_XTERM_PTY 1
23298 EOF
23299
23300         if test "x$cf_cv_lib_util" = xyes ; then
23301
23302 cf_add_libs="$TEST_LIBS"
23303 # reverse order
23304 cf_add_0lib=
23305 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23306 # filter duplicates
23307 for cf_add_1lib in $cf_add_0lib; do
23308         for cf_add_2lib in $cf_add_libs; do
23309                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23310                         cf_add_1lib=
23311                         break
23312                 fi
23313         done
23314         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23315 done
23316 TEST_LIBS="$cf_add_libs"
23317
23318         fi
23319 fi
23320
23321 if test "$with_hashed_db" != no ; then
23322
23323 cat >>confdefs.h <<\EOF
23324 #define USE_HASHED_DB 1
23325 EOF
23326
23327 case $with_hashed_db in
23328 (yes|*able*)
23329         ;;
23330 (*)
23331         if test -d "$with_hashed_db" ; then
23332
23333 if test -n "$with_hashed_db/include" ; then
23334   for cf_add_incdir in $with_hashed_db/include
23335   do
23336         while test $cf_add_incdir != /usr/include
23337         do
23338           if test -d $cf_add_incdir
23339           then
23340                 cf_have_incdir=no
23341                 if test -n "$CFLAGS$CPPFLAGS" ; then
23342                   # a loop is needed to ensure we can add subdirs of existing dirs
23343                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23344                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23345                           cf_have_incdir=yes; break
23346                         fi
23347                   done
23348                 fi
23349
23350                 if test "$cf_have_incdir" = no ; then
23351                   if test "$cf_add_incdir" = /usr/local/include ; then
23352                         if test "$GCC" = yes
23353                         then
23354                           cf_save_CPPFLAGS=$CPPFLAGS
23355
23356         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23357         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23358
23359                           cat >conftest.$ac_ext <<_ACEOF
23360 #line 23360 "configure"
23361 #include "confdefs.h"
23362 #include <stdio.h>
23363 int
23364 main (void)
23365 {
23366 printf("Hello")
23367   ;
23368   return 0;
23369 }
23370 _ACEOF
23371 rm -f conftest.$ac_objext
23372 if { (eval echo "$as_me:23372: \"$ac_compile\"") >&5
23373   (eval $ac_compile) 2>&5
23374   ac_status=$?
23375   echo "$as_me:23375: \$? = $ac_status" >&5
23376   (exit $ac_status); } &&
23377          { ac_try='test -s conftest.$ac_objext'
23378   { (eval echo "$as_me:23378: \"$ac_try\"") >&5
23379   (eval $ac_try) 2>&5
23380   ac_status=$?
23381   echo "$as_me:23381: \$? = $ac_status" >&5
23382   (exit $ac_status); }; }; then
23383   :
23384 else
23385   echo "$as_me: failed program was:" >&5
23386 cat conftest.$ac_ext >&5
23387 cf_have_incdir=yes
23388 fi
23389 rm -f conftest.$ac_objext conftest.$ac_ext
23390                           CPPFLAGS=$cf_save_CPPFLAGS
23391                         fi
23392                   fi
23393                 fi
23394
23395                 if test "$cf_have_incdir" = no ; then
23396                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23397
23398 echo "${as_me:-configure}:23398: testing adding $cf_add_incdir to include-path ..." 1>&5
23399
23400                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23401
23402                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
23403                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23404                   cf_add_incdir="$cf_top_incdir"
23405                 else
23406                   break
23407                 fi
23408           else
23409                 break
23410           fi
23411         done
23412   done
23413 fi
23414
23415 if test -n "$with_hashed_db/lib" ; then
23416         for cf_add_libdir in $with_hashed_db/lib
23417         do
23418                 if test $cf_add_libdir = /usr/lib ; then
23419                         :
23420                 elif test -d $cf_add_libdir
23421                 then
23422                         cf_have_libdir=no
23423                         if test -n "$LDFLAGS$LIBS" ; then
23424                                 # a loop is needed to ensure we can add subdirs of existing dirs
23425                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23426                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23427                                                 cf_have_libdir=yes; break
23428                                         fi
23429                                 done
23430                         fi
23431                         if test "$cf_have_libdir" = no ; then
23432                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23433
23434 echo "${as_me:-configure}:23434: testing adding $cf_add_libdir to library-path ..." 1>&5
23435
23436                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23437                         fi
23438                 fi
23439         done
23440 fi
23441
23442         else
23443                 case "$with_hashed_db" in
23444                 (./*|../*|/*)
23445                         { echo "$as_me:23445: WARNING: no such directory $with_hashed_db" >&5
23446 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23447                         ;;
23448                 (*)
23449
23450 cf_search=
23451
23452 test "x$prefix" != "xNONE" && \
23453 test -d "$prefix" && \
23454  {
23455         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23456         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
23457         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23458         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23459         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23460         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23461 }
23462
23463 for cf_subdir_prefix in \
23464         /usr \
23465         /usr/local \
23466         /usr/pkg \
23467         /opt \
23468         /opt/local \
23469         $HOME
23470 do
23471
23472 test "x$cf_subdir_prefix" != "x$prefix" && \
23473 test -d "$cf_subdir_prefix" && \
23474 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
23475         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23476         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
23477         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23478         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23479         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23480         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"
23481 }
23482
23483 done
23484
23485         for cf_item in $cf_search
23486         do
23487                 case $cf_item in
23488                 (*/$with_hashed_db)
23489
23490 if test -n "$cf_item" ; then
23491   for cf_add_incdir in $cf_item
23492   do
23493         while test $cf_add_incdir != /usr/include
23494         do
23495           if test -d $cf_add_incdir
23496           then
23497                 cf_have_incdir=no
23498                 if test -n "$CFLAGS$CPPFLAGS" ; then
23499                   # a loop is needed to ensure we can add subdirs of existing dirs
23500                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23501                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23502                           cf_have_incdir=yes; break
23503                         fi
23504                   done
23505                 fi
23506
23507                 if test "$cf_have_incdir" = no ; then
23508                   if test "$cf_add_incdir" = /usr/local/include ; then
23509                         if test "$GCC" = yes
23510                         then
23511                           cf_save_CPPFLAGS=$CPPFLAGS
23512
23513         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23514         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23515
23516                           cat >conftest.$ac_ext <<_ACEOF
23517 #line 23517 "configure"
23518 #include "confdefs.h"
23519 #include <stdio.h>
23520 int
23521 main (void)
23522 {
23523 printf("Hello")
23524   ;
23525   return 0;
23526 }
23527 _ACEOF
23528 rm -f conftest.$ac_objext
23529 if { (eval echo "$as_me:23529: \"$ac_compile\"") >&5
23530   (eval $ac_compile) 2>&5
23531   ac_status=$?
23532   echo "$as_me:23532: \$? = $ac_status" >&5
23533   (exit $ac_status); } &&
23534          { ac_try='test -s conftest.$ac_objext'
23535   { (eval echo "$as_me:23535: \"$ac_try\"") >&5
23536   (eval $ac_try) 2>&5
23537   ac_status=$?
23538   echo "$as_me:23538: \$? = $ac_status" >&5
23539   (exit $ac_status); }; }; then
23540   :
23541 else
23542   echo "$as_me: failed program was:" >&5
23543 cat conftest.$ac_ext >&5
23544 cf_have_incdir=yes
23545 fi
23546 rm -f conftest.$ac_objext conftest.$ac_ext
23547                           CPPFLAGS=$cf_save_CPPFLAGS
23548                         fi
23549                   fi
23550                 fi
23551
23552                 if test "$cf_have_incdir" = no ; then
23553                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23554
23555 echo "${as_me:-configure}:23555: testing adding $cf_add_incdir to include-path ..." 1>&5
23556
23557                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23558
23559                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
23560                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23561                   cf_add_incdir="$cf_top_incdir"
23562                 else
23563                   break
23564                 fi
23565           else
23566                 break
23567           fi
23568         done
23569   done
23570 fi
23571
23572                         ;;
23573                 esac
23574         done
23575
23576 cf_search=
23577
23578 test "x$prefix" != "xNONE" && \
23579 test -d "$prefix" && \
23580  {
23581         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23582         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
23583         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23584         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23585         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23586         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23587 }
23588
23589 for cf_subdir_prefix in \
23590         /usr \
23591         /usr/local \
23592         /usr/pkg \
23593         /opt \
23594         /opt/local \
23595         $HOME
23596 do
23597
23598 test "x$cf_subdir_prefix" != "x$prefix" && \
23599 test -d "$cf_subdir_prefix" && \
23600 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
23601         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23602         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23603         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23604         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23605         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23606         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"
23607 }
23608
23609 done
23610
23611         for cf_item in $cf_search
23612         do
23613                 case $cf_item in
23614                 (*/$with_hashed_db)
23615
23616 if test -n "$cf_item" ; then
23617         for cf_add_libdir in $cf_item
23618         do
23619                 if test $cf_add_libdir = /usr/lib ; then
23620                         :
23621                 elif test -d $cf_add_libdir
23622                 then
23623                         cf_have_libdir=no
23624                         if test -n "$LDFLAGS$LIBS" ; then
23625                                 # a loop is needed to ensure we can add subdirs of existing dirs
23626                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23627                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23628                                                 cf_have_libdir=yes; break
23629                                         fi
23630                                 done
23631                         fi
23632                         if test "$cf_have_libdir" = no ; then
23633                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23634
23635 echo "${as_me:-configure}:23635: testing adding $cf_add_libdir to library-path ..." 1>&5
23636
23637                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23638                         fi
23639                 fi
23640         done
23641 fi
23642
23643                         ;;
23644                 esac
23645         done
23646
23647                         ;;
23648                 esac
23649         fi
23650 esac
23651
23652 echo "$as_me:23652: checking for db.h" >&5
23653 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23654 if test "${ac_cv_header_db_h+set}" = set; then
23655   echo $ECHO_N "(cached) $ECHO_C" >&6
23656 else
23657   cat >conftest.$ac_ext <<_ACEOF
23658 #line 23658 "configure"
23659 #include "confdefs.h"
23660 #include <db.h>
23661 _ACEOF
23662 if { (eval echo "$as_me:23662: \"$ac_cpp conftest.$ac_ext\"") >&5
23663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23664   ac_status=$?
23665   egrep -v '^ *\+' conftest.er1 >conftest.err
23666   rm -f conftest.er1
23667   cat conftest.err >&5
23668   echo "$as_me:23668: \$? = $ac_status" >&5
23669   (exit $ac_status); } >/dev/null; then
23670   if test -s conftest.err; then
23671     ac_cpp_err=$ac_c_preproc_warn_flag
23672   else
23673     ac_cpp_err=
23674   fi
23675 else
23676   ac_cpp_err=yes
23677 fi
23678 if test -z "$ac_cpp_err"; then
23679   ac_cv_header_db_h=yes
23680 else
23681   echo "$as_me: failed program was:" >&5
23682   cat conftest.$ac_ext >&5
23683   ac_cv_header_db_h=no
23684 fi
23685 rm -f conftest.err conftest.$ac_ext
23686 fi
23687 echo "$as_me:23687: result: $ac_cv_header_db_h" >&5
23688 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23689 if test $ac_cv_header_db_h = yes; then
23690
23691 echo "$as_me:23691: checking for version of db" >&5
23692 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23693 if test "${cf_cv_hashed_db_version+set}" = set; then
23694   echo $ECHO_N "(cached) $ECHO_C" >&6
23695 else
23696
23697 cf_cv_hashed_db_version=unknown
23698
23699 for cf_db_version in 1 2 3 4 5 6
23700 do
23701
23702 echo "${as_me:-configure}:23702: testing checking for db version $cf_db_version ..." 1>&5
23703
23704         cat >conftest.$ac_ext <<_ACEOF
23705 #line 23705 "configure"
23706 #include "confdefs.h"
23707
23708 $ac_includes_default
23709 #include <db.h>
23710
23711 #ifdef DB_VERSION_MAJOR
23712         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23713 #if $cf_db_version == DB_VERSION_MAJOR
23714         /* ok */
23715 #else
23716         make an error
23717 #endif
23718 #else
23719 #if $cf_db_version == 1
23720         /* ok: assuming this is DB 1.8.5 */
23721 #else
23722         make an error
23723 #endif
23724 #endif
23725
23726 int
23727 main (void)
23728 {
23729 DBT *foo = 0
23730   ;
23731   return 0;
23732 }
23733 _ACEOF
23734 rm -f conftest.$ac_objext
23735 if { (eval echo "$as_me:23735: \"$ac_compile\"") >&5
23736   (eval $ac_compile) 2>&5
23737   ac_status=$?
23738   echo "$as_me:23738: \$? = $ac_status" >&5
23739   (exit $ac_status); } &&
23740          { ac_try='test -s conftest.$ac_objext'
23741   { (eval echo "$as_me:23741: \"$ac_try\"") >&5
23742   (eval $ac_try) 2>&5
23743   ac_status=$?
23744   echo "$as_me:23744: \$? = $ac_status" >&5
23745   (exit $ac_status); }; }; then
23746
23747         cf_cv_hashed_db_version=$cf_db_version
23748         break
23749
23750 else
23751   echo "$as_me: failed program was:" >&5
23752 cat conftest.$ac_ext >&5
23753 fi
23754 rm -f conftest.$ac_objext conftest.$ac_ext
23755 done
23756
23757 fi
23758 echo "$as_me:23758: result: $cf_cv_hashed_db_version" >&5
23759 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23760
23761 if test "$cf_cv_hashed_db_version" = unknown ; then
23762         { { echo "$as_me:23762: error: Cannot determine version of db" >&5
23763 echo "$as_me: error: Cannot determine version of db" >&2;}
23764    { (exit 1); exit 1; }; }
23765 else
23766
23767 echo "$as_me:23767: checking for db libraries" >&5
23768 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23769 if test "${cf_cv_hashed_db_libs+set}" = set; then
23770   echo $ECHO_N "(cached) $ECHO_C" >&6
23771 else
23772
23773 cf_cv_hashed_db_libs=unknown
23774 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23775 do
23776         cf_save_libs="$LIBS"
23777         if test -n "$cf_db_libs"; then
23778
23779 cf_add_libs="$LIBS"
23780 # reverse order
23781 cf_add_0lib=
23782 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23783 # filter duplicates
23784 for cf_add_1lib in $cf_add_0lib; do
23785         for cf_add_2lib in $cf_add_libs; do
23786                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23787                         cf_add_1lib=
23788                         break
23789                 fi
23790         done
23791         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23792 done
23793 LIBS="$cf_add_libs"
23794
23795         fi
23796
23797 echo "${as_me:-configure}:23797: testing checking for library "$cf_db_libs" ..." 1>&5
23798
23799         cat >conftest.$ac_ext <<_ACEOF
23800 #line 23800 "configure"
23801 #include "confdefs.h"
23802
23803 $ac_includes_default
23804 #include <db.h>
23805
23806 int
23807 main (void)
23808 {
23809
23810         char *path = "/tmp/foo";
23811 #ifdef DB_VERSION_MAJOR
23812 #if DB_VERSION_MAJOR >= 4
23813         DB *result = 0;
23814         db_create(&result, NULL, 0);
23815         result->open(result,
23816                 NULL,
23817                 path,
23818                 path,
23819                 DB_HASH,
23820                 DB_CREATE,
23821                 0644);
23822 #elif DB_VERSION_MAJOR >= 3
23823         DB *result = 0;
23824         db_create(&result, NULL, 0);
23825         result->open(result,
23826                 path,
23827                 path,
23828                 DB_HASH,
23829                 DB_CREATE,
23830                 0644);
23831 #elif DB_VERSION_MAJOR >= 2
23832         DB *result = 0;
23833         db_open(path,
23834                 DB_HASH,
23835                 DB_CREATE,
23836                 0644,
23837                 (DB_ENV *) 0,
23838                 (DB_INFO *) 0,
23839                 &result);
23840 #endif /* DB_VERSION_MAJOR */
23841 #else
23842         DB *result = dbopen(path,
23843                      2,
23844                      0644,
23845                      DB_HASH,
23846                      0);
23847 #endif
23848         ${cf_cv_main_return:-return}(result != 0)
23849
23850   ;
23851   return 0;
23852 }
23853 _ACEOF
23854 rm -f conftest.$ac_objext conftest$ac_exeext
23855 if { (eval echo "$as_me:23855: \"$ac_link\"") >&5
23856   (eval $ac_link) 2>&5
23857   ac_status=$?
23858   echo "$as_me:23858: \$? = $ac_status" >&5
23859   (exit $ac_status); } &&
23860          { ac_try='test -s conftest$ac_exeext'
23861   { (eval echo "$as_me:23861: \"$ac_try\"") >&5
23862   (eval $ac_try) 2>&5
23863   ac_status=$?
23864   echo "$as_me:23864: \$? = $ac_status" >&5
23865   (exit $ac_status); }; }; then
23866
23867         if test -n "$cf_db_libs" ; then
23868                 cf_cv_hashed_db_libs=$cf_db_libs
23869         else
23870                 cf_cv_hashed_db_libs=default
23871         fi
23872         LIBS="$cf_save_libs"
23873         break
23874
23875 else
23876   echo "$as_me: failed program was:" >&5
23877 cat conftest.$ac_ext >&5
23878 fi
23879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23880         LIBS="$cf_save_libs"
23881 done
23882
23883 fi
23884 echo "$as_me:23884: result: $cf_cv_hashed_db_libs" >&5
23885 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23886
23887         if test "$cf_cv_hashed_db_libs" = unknown ; then
23888                 { { echo "$as_me:23888: error: Cannot determine library for db" >&5
23889 echo "$as_me: error: Cannot determine library for db" >&2;}
23890    { (exit 1); exit 1; }; }
23891         elif test "$cf_cv_hashed_db_libs" != default ; then
23892
23893 cf_add_libs="$LIBS"
23894 # reverse order
23895 cf_add_0lib=
23896 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23897 # filter duplicates
23898 for cf_add_1lib in $cf_add_0lib; do
23899         for cf_add_2lib in $cf_add_libs; do
23900                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23901                         cf_add_1lib=
23902                         break
23903                 fi
23904         done
23905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23906 done
23907 LIBS="$cf_add_libs"
23908
23909         fi
23910 fi
23911
23912 else
23913
23914         { { echo "$as_me:23914: error: Cannot find db.h" >&5
23915 echo "$as_me: error: Cannot find db.h" >&2;}
23916    { (exit 1); exit 1; }; }
23917
23918 fi
23919
23920 fi
23921
23922 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23923         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23924         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23925 fi
23926
23927 # Just in case, check if the C compiler has a bool type.
23928
23929 echo "$as_me:23929: checking if we should include stdbool.h" >&5
23930 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23931
23932 if test "${cf_cv_header_stdbool_h+set}" = set; then
23933   echo $ECHO_N "(cached) $ECHO_C" >&6
23934 else
23935
23936         cat >conftest.$ac_ext <<_ACEOF
23937 #line 23937 "configure"
23938 #include "confdefs.h"
23939
23940 int
23941 main (void)
23942 {
23943 bool foo = false
23944   ;
23945   return 0;
23946 }
23947 _ACEOF
23948 rm -f conftest.$ac_objext
23949 if { (eval echo "$as_me:23949: \"$ac_compile\"") >&5
23950   (eval $ac_compile) 2>&5
23951   ac_status=$?
23952   echo "$as_me:23952: \$? = $ac_status" >&5
23953   (exit $ac_status); } &&
23954          { ac_try='test -s conftest.$ac_objext'
23955   { (eval echo "$as_me:23955: \"$ac_try\"") >&5
23956   (eval $ac_try) 2>&5
23957   ac_status=$?
23958   echo "$as_me:23958: \$? = $ac_status" >&5
23959   (exit $ac_status); }; }; then
23960   cf_cv_header_stdbool_h=0
23961 else
23962   echo "$as_me: failed program was:" >&5
23963 cat conftest.$ac_ext >&5
23964 cat >conftest.$ac_ext <<_ACEOF
23965 #line 23965 "configure"
23966 #include "confdefs.h"
23967
23968 #ifndef __BEOS__
23969 #include <stdbool.h>
23970 #endif
23971
23972 int
23973 main (void)
23974 {
23975 bool foo = false
23976   ;
23977   return 0;
23978 }
23979 _ACEOF
23980 rm -f conftest.$ac_objext
23981 if { (eval echo "$as_me:23981: \"$ac_compile\"") >&5
23982   (eval $ac_compile) 2>&5
23983   ac_status=$?
23984   echo "$as_me:23984: \$? = $ac_status" >&5
23985   (exit $ac_status); } &&
23986          { ac_try='test -s conftest.$ac_objext'
23987   { (eval echo "$as_me:23987: \"$ac_try\"") >&5
23988   (eval $ac_try) 2>&5
23989   ac_status=$?
23990   echo "$as_me:23990: \$? = $ac_status" >&5
23991   (exit $ac_status); }; }; then
23992   cf_cv_header_stdbool_h=1
23993 else
23994   echo "$as_me: failed program was:" >&5
23995 cat conftest.$ac_ext >&5
23996 cf_cv_header_stdbool_h=0
23997 fi
23998 rm -f conftest.$ac_objext conftest.$ac_ext
23999 fi
24000 rm -f conftest.$ac_objext conftest.$ac_ext
24001 fi
24002
24003 if test "$cf_cv_header_stdbool_h" = 1
24004 then    echo "$as_me:24004: result: yes" >&5
24005 echo "${ECHO_T}yes" >&6
24006 else    echo "$as_me:24006: result: no" >&5
24007 echo "${ECHO_T}no" >&6
24008 fi
24009
24010 echo "$as_me:24010: checking for builtin bool type" >&5
24011 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24012
24013 if test "${cf_cv_cc_bool_type+set}" = set; then
24014   echo $ECHO_N "(cached) $ECHO_C" >&6
24015 else
24016
24017         cat >conftest.$ac_ext <<_ACEOF
24018 #line 24018 "configure"
24019 #include "confdefs.h"
24020
24021 #include <stdio.h>
24022 #include <sys/types.h>
24023
24024 int
24025 main (void)
24026 {
24027 bool x = false
24028   ;
24029   return 0;
24030 }
24031 _ACEOF
24032 rm -f conftest.$ac_objext
24033 if { (eval echo "$as_me:24033: \"$ac_compile\"") >&5
24034   (eval $ac_compile) 2>&5
24035   ac_status=$?
24036   echo "$as_me:24036: \$? = $ac_status" >&5
24037   (exit $ac_status); } &&
24038          { ac_try='test -s conftest.$ac_objext'
24039   { (eval echo "$as_me:24039: \"$ac_try\"") >&5
24040   (eval $ac_try) 2>&5
24041   ac_status=$?
24042   echo "$as_me:24042: \$? = $ac_status" >&5
24043   (exit $ac_status); }; }; then
24044   cf_cv_cc_bool_type=1
24045 else
24046   echo "$as_me: failed program was:" >&5
24047 cat conftest.$ac_ext >&5
24048 cf_cv_cc_bool_type=0
24049 fi
24050 rm -f conftest.$ac_objext conftest.$ac_ext
24051
24052 fi
24053
24054 if test "$cf_cv_cc_bool_type" = 1
24055 then    echo "$as_me:24055: result: yes" >&5
24056 echo "${ECHO_T}yes" >&6
24057 else    echo "$as_me:24057: result: no" >&5
24058 echo "${ECHO_T}no" >&6
24059 fi
24060
24061 # Check for C++ compiler characteristics (and ensure that it's there!)
24062 if test -n "$CXX" ; then
24063         ac_ext=cc
24064 ac_cpp='$CXXCPP $CPPFLAGS'
24065 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24066 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24067 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24068 ac_main_return=return
24069
24070 if test -n "$GXX" ; then
24071
24072         cf_save="$LIBS"
24073         LIBS="$LIBS $CXXLIBS"
24074         echo "$as_me:24074: checking if we already have C++ library" >&5
24075 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24076         cat >conftest.$ac_ext <<_ACEOF
24077 #line 24077 "configure"
24078 #include "confdefs.h"
24079
24080                         #include <iostream>
24081 int
24082 main (void)
24083 {
24084
24085                         std::cout << "Hello World!" << std::endl;
24086   ;
24087   return 0;
24088 }
24089 _ACEOF
24090 rm -f conftest.$ac_objext conftest$ac_exeext
24091 if { (eval echo "$as_me:24091: \"$ac_link\"") >&5
24092   (eval $ac_link) 2>&5
24093   ac_status=$?
24094   echo "$as_me:24094: \$? = $ac_status" >&5
24095   (exit $ac_status); } &&
24096          { ac_try='test -s conftest$ac_exeext'
24097   { (eval echo "$as_me:24097: \"$ac_try\"") >&5
24098   (eval $ac_try) 2>&5
24099   ac_status=$?
24100   echo "$as_me:24100: \$? = $ac_status" >&5
24101   (exit $ac_status); }; }; then
24102   cf_have_libstdcpp=yes
24103 else
24104   echo "$as_me: failed program was:" >&5
24105 cat conftest.$ac_ext >&5
24106 cf_have_libstdcpp=no
24107 fi
24108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24109         echo "$as_me:24109: result: $cf_have_libstdcpp" >&5
24110 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24111         LIBS="$cf_save"
24112
24113         if test $cf_have_libstdcpp != yes
24114         then
24115                 case $cf_cv_system_name in
24116                 (os2*)
24117                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24118                                 cf_stdcpp_libname=stdcpp
24119                         else
24120                                 cf_stdcpp_libname=stdc++
24121                         fi
24122                         ;;
24123                 (*)
24124                         cf_stdcpp_libname=stdc++
24125                         ;;
24126                 esac
24127
24128                 echo "$as_me:24128: checking for library $cf_stdcpp_libname" >&5
24129 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24130 if test "${cf_cv_libstdcpp+set}" = set; then
24131   echo $ECHO_N "(cached) $ECHO_C" >&6
24132 else
24133
24134                         cf_save="$LIBS"
24135                         LIBS="$LIBS $CXXLIBS"
24136
24137 cf_add_libs="$LIBS"
24138 # reverse order
24139 cf_add_0lib=
24140 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24141 # filter duplicates
24142 for cf_add_1lib in $cf_add_0lib; do
24143         for cf_add_2lib in $cf_add_libs; do
24144                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24145                         cf_add_1lib=
24146                         break
24147                 fi
24148         done
24149         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24150 done
24151 LIBS="$cf_add_libs"
24152
24153                 cat >conftest.$ac_ext <<_ACEOF
24154 #line 24154 "configure"
24155 #include "confdefs.h"
24156
24157                                 #include <iostream>
24158 int
24159 main (void)
24160 {
24161
24162                                 std::cout << "Hello World!" << std::endl;
24163   ;
24164   return 0;
24165 }
24166 _ACEOF
24167 rm -f conftest.$ac_objext conftest$ac_exeext
24168 if { (eval echo "$as_me:24168: \"$ac_link\"") >&5
24169   (eval $ac_link) 2>&5
24170   ac_status=$?
24171   echo "$as_me:24171: \$? = $ac_status" >&5
24172   (exit $ac_status); } &&
24173          { ac_try='test -s conftest$ac_exeext'
24174   { (eval echo "$as_me:24174: \"$ac_try\"") >&5
24175   (eval $ac_try) 2>&5
24176   ac_status=$?
24177   echo "$as_me:24177: \$? = $ac_status" >&5
24178   (exit $ac_status); }; }; then
24179   cf_cv_libstdcpp=yes
24180 else
24181   echo "$as_me: failed program was:" >&5
24182 cat conftest.$ac_ext >&5
24183 cf_cv_libstdcpp=no
24184 fi
24185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24186                         LIBS="$cf_save"
24187
24188 fi
24189 echo "$as_me:24189: result: $cf_cv_libstdcpp" >&5
24190 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24191                 test "$cf_cv_libstdcpp" = yes && {
24192 cf_add_libs="$CXXLIBS"
24193 # reverse order
24194 cf_add_0lib=
24195 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24196 # filter duplicates
24197 for cf_add_1lib in $cf_add_0lib; do
24198         for cf_add_2lib in $cf_add_libs; do
24199                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24200                         cf_add_1lib=
24201                         break
24202                 fi
24203         done
24204         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24205 done
24206 CXXLIBS="$cf_add_libs"
24207  }
24208         fi
24209 fi
24210
24211         echo "$as_me:24211: checking whether $CXX understands -c and -o together" >&5
24212 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24213 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24214   echo $ECHO_N "(cached) $ECHO_C" >&6
24215 else
24216
24217 cat > conftest.$ac_ext <<CF_EOF
24218 int main(void)
24219 {
24220         ${cf_cv_main_return:-return}(0);
24221 }
24222 CF_EOF
24223 # We do the test twice because some compilers refuse to overwrite an
24224 # existing .o file with -o, though they will create one.
24225 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24226 if { (eval echo "$as_me:24226: \"$ac_try\"") >&5
24227   (eval $ac_try) 2>&5
24228   ac_status=$?
24229   echo "$as_me:24229: \$? = $ac_status" >&5
24230   (exit $ac_status); } &&
24231   test -f conftest2.$ac_objext && { (eval echo "$as_me:24231: \"$ac_try\"") >&5
24232   (eval $ac_try) 2>&5
24233   ac_status=$?
24234   echo "$as_me:24234: \$? = $ac_status" >&5
24235   (exit $ac_status); };
24236 then
24237   eval cf_cv_prog_CXX_c_o=yes
24238 else
24239   eval cf_cv_prog_CXX_c_o=no
24240 fi
24241 rm -rf conftest*
24242
24243 fi
24244 if test $cf_cv_prog_CXX_c_o = yes; then
24245   echo "$as_me:24245: result: yes" >&5
24246 echo "${ECHO_T}yes" >&6
24247 else
24248   echo "$as_me:24248: result: no" >&5
24249 echo "${ECHO_T}no" >&6
24250 fi
24251
24252         case $GXX_VERSION in
24253         (1.*|2.[0-6]*|[1-9][0-9].*)
24254                 cf_cxx_library=yes
24255                 ;;
24256         (*-2.7*|2.7*)
24257
24258 cf_cxx_library=unknown
24259 case $cf_cv_system_name in
24260 (os2*)
24261         cf_gpp_libname=gpp
24262         ;;
24263 (*)
24264         cf_gpp_libname=g++
24265         ;;
24266 esac
24267 if test "$GXX" = yes; then
24268         echo "$as_me:24268: checking for lib$cf_gpp_libname" >&5
24269 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24270         cf_save="$LIBS"
24271
24272 cf_add_libs="$LIBS"
24273 # reverse order
24274 cf_add_0lib=
24275 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24276 # filter duplicates
24277 for cf_add_1lib in $cf_add_0lib; do
24278         for cf_add_2lib in $cf_add_libs; do
24279                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24280                         cf_add_1lib=
24281                         break
24282                 fi
24283         done
24284         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24285 done
24286 LIBS="$cf_add_libs"
24287
24288         cat >conftest.$ac_ext <<_ACEOF
24289 #line 24289 "configure"
24290 #include "confdefs.h"
24291
24292 #include <$cf_gpp_libname/builtin.h>
24293
24294 int
24295 main (void)
24296 {
24297 two_arg_error_handler_t foo2 = lib_error_handler
24298   ;
24299   return 0;
24300 }
24301 _ACEOF
24302 rm -f conftest.$ac_objext conftest$ac_exeext
24303 if { (eval echo "$as_me:24303: \"$ac_link\"") >&5
24304   (eval $ac_link) 2>&5
24305   ac_status=$?
24306   echo "$as_me:24306: \$? = $ac_status" >&5
24307   (exit $ac_status); } &&
24308          { ac_try='test -s conftest$ac_exeext'
24309   { (eval echo "$as_me:24309: \"$ac_try\"") >&5
24310   (eval $ac_try) 2>&5
24311   ac_status=$?
24312   echo "$as_me:24312: \$? = $ac_status" >&5
24313   (exit $ac_status); }; }; then
24314   cf_cxx_library=yes
24315
24316 cf_add_libs="$CXXLIBS"
24317 # reverse order
24318 cf_add_0lib=
24319 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24320 # filter duplicates
24321 for cf_add_1lib in $cf_add_0lib; do
24322         for cf_add_2lib in $cf_add_libs; do
24323                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24324                         cf_add_1lib=
24325                         break
24326                 fi
24327         done
24328         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24329 done
24330 CXXLIBS="$cf_add_libs"
24331
24332          if test "$cf_gpp_libname" = cpp ; then
24333
24334 cat >>confdefs.h <<\EOF
24335 #define HAVE_GPP_BUILTIN_H 1
24336 EOF
24337
24338          else
24339
24340 cat >>confdefs.h <<\EOF
24341 #define HAVE_GXX_BUILTIN_H 1
24342 EOF
24343
24344          fi
24345 else
24346   echo "$as_me: failed program was:" >&5
24347 cat conftest.$ac_ext >&5
24348 cat >conftest.$ac_ext <<_ACEOF
24349 #line 24349 "configure"
24350 #include "confdefs.h"
24351
24352 #include <builtin.h>
24353
24354 int
24355 main (void)
24356 {
24357 two_arg_error_handler_t foo2 = lib_error_handler
24358   ;
24359   return 0;
24360 }
24361 _ACEOF
24362 rm -f conftest.$ac_objext conftest$ac_exeext
24363 if { (eval echo "$as_me:24363: \"$ac_link\"") >&5
24364   (eval $ac_link) 2>&5
24365   ac_status=$?
24366   echo "$as_me:24366: \$? = $ac_status" >&5
24367   (exit $ac_status); } &&
24368          { ac_try='test -s conftest$ac_exeext'
24369   { (eval echo "$as_me:24369: \"$ac_try\"") >&5
24370   (eval $ac_try) 2>&5
24371   ac_status=$?
24372   echo "$as_me:24372: \$? = $ac_status" >&5
24373   (exit $ac_status); }; }; then
24374   cf_cxx_library=yes
24375
24376 cf_add_libs="$CXXLIBS"
24377 # reverse order
24378 cf_add_0lib=
24379 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24380 # filter duplicates
24381 for cf_add_1lib in $cf_add_0lib; do
24382         for cf_add_2lib in $cf_add_libs; do
24383                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24384                         cf_add_1lib=
24385                         break
24386                 fi
24387         done
24388         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24389 done
24390 CXXLIBS="$cf_add_libs"
24391
24392 cat >>confdefs.h <<\EOF
24393 #define HAVE_BUILTIN_H 1
24394 EOF
24395
24396 else
24397   echo "$as_me: failed program was:" >&5
24398 cat conftest.$ac_ext >&5
24399 cf_cxx_library=no
24400 fi
24401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24402 fi
24403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24404         LIBS="$cf_save"
24405         echo "$as_me:24405: result: $cf_cxx_library" >&5
24406 echo "${ECHO_T}$cf_cxx_library" >&6
24407 fi
24408
24409                 ;;
24410         (*)
24411                 cf_cxx_library=no
24412                 ;;
24413         esac
24414
24415         ac_ext=cc
24416 ac_cpp='$CXXCPP $CPPFLAGS'
24417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24419 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24420 ac_main_return=return
24421 echo "$as_me:24421: checking how to run the C++ preprocessor" >&5
24422 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24423 if test -z "$CXXCPP"; then
24424   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24425   echo $ECHO_N "(cached) $ECHO_C" >&6
24426 else
24427       # Double quotes because CXXCPP needs to be expanded
24428     for CXXCPP in "$CXX -E" "/lib/cpp"
24429     do
24430       ac_preproc_ok=false
24431 for ac_cxx_preproc_warn_flag in '' yes
24432 do
24433   # Use a header file that comes with gcc, so configuring glibc
24434   # with a fresh cross-compiler works.
24435   # On the NeXT, cc -E runs the code through the compiler's parser,
24436   # not just through cpp. "Syntax error" is here to catch this case.
24437   cat >conftest.$ac_ext <<_ACEOF
24438 #line 24438 "configure"
24439 #include "confdefs.h"
24440 #include <assert.h>
24441                      Syntax error
24442 _ACEOF
24443 if { (eval echo "$as_me:24443: \"$ac_cpp conftest.$ac_ext\"") >&5
24444   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24445   ac_status=$?
24446   egrep -v '^ *\+' conftest.er1 >conftest.err
24447   rm -f conftest.er1
24448   cat conftest.err >&5
24449   echo "$as_me:24449: \$? = $ac_status" >&5
24450   (exit $ac_status); } >/dev/null; then
24451   if test -s conftest.err; then
24452     ac_cpp_err=$ac_cxx_preproc_warn_flag
24453   else
24454     ac_cpp_err=
24455   fi
24456 else
24457   ac_cpp_err=yes
24458 fi
24459 if test -z "$ac_cpp_err"; then
24460   :
24461 else
24462   echo "$as_me: failed program was:" >&5
24463   cat conftest.$ac_ext >&5
24464   # Broken: fails on valid input.
24465 continue
24466 fi
24467 rm -f conftest.err conftest.$ac_ext
24468
24469   # OK, works on sane cases.  Now check whether non-existent headers
24470   # can be detected and how.
24471   cat >conftest.$ac_ext <<_ACEOF
24472 #line 24472 "configure"
24473 #include "confdefs.h"
24474 #include <ac_nonexistent.h>
24475 _ACEOF
24476 if { (eval echo "$as_me:24476: \"$ac_cpp conftest.$ac_ext\"") >&5
24477   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24478   ac_status=$?
24479   egrep -v '^ *\+' conftest.er1 >conftest.err
24480   rm -f conftest.er1
24481   cat conftest.err >&5
24482   echo "$as_me:24482: \$? = $ac_status" >&5
24483   (exit $ac_status); } >/dev/null; then
24484   if test -s conftest.err; then
24485     ac_cpp_err=$ac_cxx_preproc_warn_flag
24486   else
24487     ac_cpp_err=
24488   fi
24489 else
24490   ac_cpp_err=yes
24491 fi
24492 if test -z "$ac_cpp_err"; then
24493   # Broken: success on invalid input.
24494 continue
24495 else
24496   echo "$as_me: failed program was:" >&5
24497   cat conftest.$ac_ext >&5
24498   # Passes both tests.
24499 ac_preproc_ok=:
24500 break
24501 fi
24502 rm -f conftest.err conftest.$ac_ext
24503
24504 done
24505 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24506 rm -f conftest.err conftest.$ac_ext
24507 if $ac_preproc_ok; then
24508   break
24509 fi
24510
24511     done
24512     ac_cv_prog_CXXCPP=$CXXCPP
24513
24514 fi
24515   CXXCPP=$ac_cv_prog_CXXCPP
24516 else
24517   ac_cv_prog_CXXCPP=$CXXCPP
24518 fi
24519 echo "$as_me:24519: result: $CXXCPP" >&5
24520 echo "${ECHO_T}$CXXCPP" >&6
24521 ac_preproc_ok=false
24522 for ac_cxx_preproc_warn_flag in '' yes
24523 do
24524   # Use a header file that comes with gcc, so configuring glibc
24525   # with a fresh cross-compiler works.
24526   # On the NeXT, cc -E runs the code through the compiler's parser,
24527   # not just through cpp. "Syntax error" is here to catch this case.
24528   cat >conftest.$ac_ext <<_ACEOF
24529 #line 24529 "configure"
24530 #include "confdefs.h"
24531 #include <assert.h>
24532                      Syntax error
24533 _ACEOF
24534 if { (eval echo "$as_me:24534: \"$ac_cpp conftest.$ac_ext\"") >&5
24535   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24536   ac_status=$?
24537   egrep -v '^ *\+' conftest.er1 >conftest.err
24538   rm -f conftest.er1
24539   cat conftest.err >&5
24540   echo "$as_me:24540: \$? = $ac_status" >&5
24541   (exit $ac_status); } >/dev/null; then
24542   if test -s conftest.err; then
24543     ac_cpp_err=$ac_cxx_preproc_warn_flag
24544   else
24545     ac_cpp_err=
24546   fi
24547 else
24548   ac_cpp_err=yes
24549 fi
24550 if test -z "$ac_cpp_err"; then
24551   :
24552 else
24553   echo "$as_me: failed program was:" >&5
24554   cat conftest.$ac_ext >&5
24555   # Broken: fails on valid input.
24556 continue
24557 fi
24558 rm -f conftest.err conftest.$ac_ext
24559
24560   # OK, works on sane cases.  Now check whether non-existent headers
24561   # can be detected and how.
24562   cat >conftest.$ac_ext <<_ACEOF
24563 #line 24563 "configure"
24564 #include "confdefs.h"
24565 #include <ac_nonexistent.h>
24566 _ACEOF
24567 if { (eval echo "$as_me:24567: \"$ac_cpp conftest.$ac_ext\"") >&5
24568   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24569   ac_status=$?
24570   egrep -v '^ *\+' conftest.er1 >conftest.err
24571   rm -f conftest.er1
24572   cat conftest.err >&5
24573   echo "$as_me:24573: \$? = $ac_status" >&5
24574   (exit $ac_status); } >/dev/null; then
24575   if test -s conftest.err; then
24576     ac_cpp_err=$ac_cxx_preproc_warn_flag
24577   else
24578     ac_cpp_err=
24579   fi
24580 else
24581   ac_cpp_err=yes
24582 fi
24583 if test -z "$ac_cpp_err"; then
24584   # Broken: success on invalid input.
24585 continue
24586 else
24587   echo "$as_me: failed program was:" >&5
24588   cat conftest.$ac_ext >&5
24589   # Passes both tests.
24590 ac_preproc_ok=:
24591 break
24592 fi
24593 rm -f conftest.err conftest.$ac_ext
24594
24595 done
24596 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24597 rm -f conftest.err conftest.$ac_ext
24598 if $ac_preproc_ok; then
24599   :
24600 else
24601   { { echo "$as_me:24601: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24602 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24603    { (exit 1); exit 1; }; }
24604 fi
24605
24606 ac_ext=cc
24607 ac_cpp='$CXXCPP $CPPFLAGS'
24608 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24609 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24610 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24611 ac_main_return=return
24612
24613 for ac_header in typeinfo
24614 do
24615 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24616 echo "$as_me:24616: checking for $ac_header" >&5
24617 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24618 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24619   echo $ECHO_N "(cached) $ECHO_C" >&6
24620 else
24621   cat >conftest.$ac_ext <<_ACEOF
24622 #line 24622 "configure"
24623 #include "confdefs.h"
24624 #include <$ac_header>
24625 _ACEOF
24626 if { (eval echo "$as_me:24626: \"$ac_cpp conftest.$ac_ext\"") >&5
24627   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24628   ac_status=$?
24629   egrep -v '^ *\+' conftest.er1 >conftest.err
24630   rm -f conftest.er1
24631   cat conftest.err >&5
24632   echo "$as_me:24632: \$? = $ac_status" >&5
24633   (exit $ac_status); } >/dev/null; then
24634   if test -s conftest.err; then
24635     ac_cpp_err=$ac_cxx_preproc_warn_flag
24636   else
24637     ac_cpp_err=
24638   fi
24639 else
24640   ac_cpp_err=yes
24641 fi
24642 if test -z "$ac_cpp_err"; then
24643   eval "$as_ac_Header=yes"
24644 else
24645   echo "$as_me: failed program was:" >&5
24646   cat conftest.$ac_ext >&5
24647   eval "$as_ac_Header=no"
24648 fi
24649 rm -f conftest.err conftest.$ac_ext
24650 fi
24651 echo "$as_me:24651: result: `eval echo '${'$as_ac_Header'}'`" >&5
24652 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24653 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24654   cat >>confdefs.h <<EOF
24655 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24656 EOF
24657
24658 fi
24659 done
24660
24661 for ac_header in iostream
24662 do
24663 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24664 echo "$as_me:24664: checking for $ac_header" >&5
24665 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24666 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24667   echo $ECHO_N "(cached) $ECHO_C" >&6
24668 else
24669   cat >conftest.$ac_ext <<_ACEOF
24670 #line 24670 "configure"
24671 #include "confdefs.h"
24672 #include <$ac_header>
24673 _ACEOF
24674 if { (eval echo "$as_me:24674: \"$ac_cpp conftest.$ac_ext\"") >&5
24675   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24676   ac_status=$?
24677   egrep -v '^ *\+' conftest.er1 >conftest.err
24678   rm -f conftest.er1
24679   cat conftest.err >&5
24680   echo "$as_me:24680: \$? = $ac_status" >&5
24681   (exit $ac_status); } >/dev/null; then
24682   if test -s conftest.err; then
24683     ac_cpp_err=$ac_cxx_preproc_warn_flag
24684   else
24685     ac_cpp_err=
24686   fi
24687 else
24688   ac_cpp_err=yes
24689 fi
24690 if test -z "$ac_cpp_err"; then
24691   eval "$as_ac_Header=yes"
24692 else
24693   echo "$as_me: failed program was:" >&5
24694   cat conftest.$ac_ext >&5
24695   eval "$as_ac_Header=no"
24696 fi
24697 rm -f conftest.err conftest.$ac_ext
24698 fi
24699 echo "$as_me:24699: result: `eval echo '${'$as_ac_Header'}'`" >&5
24700 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24701 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24702   cat >>confdefs.h <<EOF
24703 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24704 EOF
24705
24706 fi
24707 done
24708
24709 if test x"$ac_cv_header_iostream" = xyes ; then
24710         echo "$as_me:24710: checking if iostream uses std-namespace" >&5
24711 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24712         cat >conftest.$ac_ext <<_ACEOF
24713 #line 24713 "configure"
24714 #include "confdefs.h"
24715
24716 #include <iostream>
24717 using std::endl;
24718 using std::cerr;
24719 int
24720 main (void)
24721 {
24722
24723 cerr << "testing" << endl;
24724
24725   ;
24726   return 0;
24727 }
24728 _ACEOF
24729 rm -f conftest.$ac_objext
24730 if { (eval echo "$as_me:24730: \"$ac_compile\"") >&5
24731   (eval $ac_compile) 2>&5
24732   ac_status=$?
24733   echo "$as_me:24733: \$? = $ac_status" >&5
24734   (exit $ac_status); } &&
24735          { ac_try='test -s conftest.$ac_objext'
24736   { (eval echo "$as_me:24736: \"$ac_try\"") >&5
24737   (eval $ac_try) 2>&5
24738   ac_status=$?
24739   echo "$as_me:24739: \$? = $ac_status" >&5
24740   (exit $ac_status); }; }; then
24741   cf_iostream_namespace=yes
24742 else
24743   echo "$as_me: failed program was:" >&5
24744 cat conftest.$ac_ext >&5
24745 cf_iostream_namespace=no
24746 fi
24747 rm -f conftest.$ac_objext conftest.$ac_ext
24748         echo "$as_me:24748: result: $cf_iostream_namespace" >&5
24749 echo "${ECHO_T}$cf_iostream_namespace" >&6
24750         if test "$cf_iostream_namespace" = yes ; then
24751
24752 cat >>confdefs.h <<\EOF
24753 #define IOSTREAM_NAMESPACE 1
24754 EOF
24755
24756         fi
24757 fi
24758
24759 echo "$as_me:24759: checking if we should include stdbool.h" >&5
24760 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24761
24762 if test "${cf_cv_header_stdbool_h+set}" = set; then
24763   echo $ECHO_N "(cached) $ECHO_C" >&6
24764 else
24765
24766         cat >conftest.$ac_ext <<_ACEOF
24767 #line 24767 "configure"
24768 #include "confdefs.h"
24769
24770 int
24771 main (void)
24772 {
24773 bool foo = false
24774   ;
24775   return 0;
24776 }
24777 _ACEOF
24778 rm -f conftest.$ac_objext
24779 if { (eval echo "$as_me:24779: \"$ac_compile\"") >&5
24780   (eval $ac_compile) 2>&5
24781   ac_status=$?
24782   echo "$as_me:24782: \$? = $ac_status" >&5
24783   (exit $ac_status); } &&
24784          { ac_try='test -s conftest.$ac_objext'
24785   { (eval echo "$as_me:24785: \"$ac_try\"") >&5
24786   (eval $ac_try) 2>&5
24787   ac_status=$?
24788   echo "$as_me:24788: \$? = $ac_status" >&5
24789   (exit $ac_status); }; }; then
24790   cf_cv_header_stdbool_h=0
24791 else
24792   echo "$as_me: failed program was:" >&5
24793 cat conftest.$ac_ext >&5
24794 cat >conftest.$ac_ext <<_ACEOF
24795 #line 24795 "configure"
24796 #include "confdefs.h"
24797
24798 #ifndef __BEOS__
24799 #include <stdbool.h>
24800 #endif
24801
24802 int
24803 main (void)
24804 {
24805 bool foo = false
24806   ;
24807   return 0;
24808 }
24809 _ACEOF
24810 rm -f conftest.$ac_objext
24811 if { (eval echo "$as_me:24811: \"$ac_compile\"") >&5
24812   (eval $ac_compile) 2>&5
24813   ac_status=$?
24814   echo "$as_me:24814: \$? = $ac_status" >&5
24815   (exit $ac_status); } &&
24816          { ac_try='test -s conftest.$ac_objext'
24817   { (eval echo "$as_me:24817: \"$ac_try\"") >&5
24818   (eval $ac_try) 2>&5
24819   ac_status=$?
24820   echo "$as_me:24820: \$? = $ac_status" >&5
24821   (exit $ac_status); }; }; then
24822   cf_cv_header_stdbool_h=1
24823 else
24824   echo "$as_me: failed program was:" >&5
24825 cat conftest.$ac_ext >&5
24826 cf_cv_header_stdbool_h=0
24827 fi
24828 rm -f conftest.$ac_objext conftest.$ac_ext
24829 fi
24830 rm -f conftest.$ac_objext conftest.$ac_ext
24831 fi
24832
24833 if test "$cf_cv_header_stdbool_h" = 1
24834 then    echo "$as_me:24834: result: yes" >&5
24835 echo "${ECHO_T}yes" >&6
24836 else    echo "$as_me:24836: result: no" >&5
24837 echo "${ECHO_T}no" >&6
24838 fi
24839
24840 echo "$as_me:24840: checking for builtin bool type" >&5
24841 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24842
24843 if test "${cf_cv_builtin_bool+set}" = set; then
24844   echo $ECHO_N "(cached) $ECHO_C" >&6
24845 else
24846
24847         cat >conftest.$ac_ext <<_ACEOF
24848 #line 24848 "configure"
24849 #include "confdefs.h"
24850
24851 #include <stdio.h>
24852 #include <sys/types.h>
24853
24854 int
24855 main (void)
24856 {
24857 bool x = false
24858   ;
24859   return 0;
24860 }
24861 _ACEOF
24862 rm -f conftest.$ac_objext
24863 if { (eval echo "$as_me:24863: \"$ac_compile\"") >&5
24864   (eval $ac_compile) 2>&5
24865   ac_status=$?
24866   echo "$as_me:24866: \$? = $ac_status" >&5
24867   (exit $ac_status); } &&
24868          { ac_try='test -s conftest.$ac_objext'
24869   { (eval echo "$as_me:24869: \"$ac_try\"") >&5
24870   (eval $ac_try) 2>&5
24871   ac_status=$?
24872   echo "$as_me:24872: \$? = $ac_status" >&5
24873   (exit $ac_status); }; }; then
24874   cf_cv_builtin_bool=1
24875 else
24876   echo "$as_me: failed program was:" >&5
24877 cat conftest.$ac_ext >&5
24878 cf_cv_builtin_bool=0
24879 fi
24880 rm -f conftest.$ac_objext conftest.$ac_ext
24881
24882 fi
24883
24884 if test "$cf_cv_builtin_bool" = 1
24885 then    echo "$as_me:24885: result: yes" >&5
24886 echo "${ECHO_T}yes" >&6
24887 else    echo "$as_me:24887: result: no" >&5
24888 echo "${ECHO_T}no" >&6
24889 fi
24890
24891 echo "$as_me:24891: checking for bool" >&5
24892 echo $ECHO_N "checking for bool... $ECHO_C" >&6
24893 if test "${ac_cv_type_bool+set}" = set; then
24894   echo $ECHO_N "(cached) $ECHO_C" >&6
24895 else
24896   cat >conftest.$ac_ext <<_ACEOF
24897 #line 24897 "configure"
24898 #include "confdefs.h"
24899
24900 #include <stdlib.h>
24901 #include <stdio.h>
24902
24903 #if defined(__cplusplus)
24904
24905 #ifdef HAVE_GXX_BUILTIN_H
24906 #include <g++/builtin.h>
24907 #elif HAVE_GPP_BUILTIN_H
24908 #include <gpp/builtin.h>
24909 #elif HAVE_BUILTIN_H
24910 #include <builtin.h>
24911 #endif
24912
24913 #else
24914
24915 #if $cf_cv_header_stdbool_h
24916 #include <stdbool.h>
24917 #endif
24918
24919 #endif
24920
24921 int
24922 main (void)
24923 {
24924 if ((bool *) 0)
24925   return 0;
24926 if (sizeof (bool))
24927   return 0;
24928   ;
24929   return 0;
24930 }
24931 _ACEOF
24932 rm -f conftest.$ac_objext
24933 if { (eval echo "$as_me:24933: \"$ac_compile\"") >&5
24934   (eval $ac_compile) 2>&5
24935   ac_status=$?
24936   echo "$as_me:24936: \$? = $ac_status" >&5
24937   (exit $ac_status); } &&
24938          { ac_try='test -s conftest.$ac_objext'
24939   { (eval echo "$as_me:24939: \"$ac_try\"") >&5
24940   (eval $ac_try) 2>&5
24941   ac_status=$?
24942   echo "$as_me:24942: \$? = $ac_status" >&5
24943   (exit $ac_status); }; }; then
24944   ac_cv_type_bool=yes
24945 else
24946   echo "$as_me: failed program was:" >&5
24947 cat conftest.$ac_ext >&5
24948 ac_cv_type_bool=no
24949 fi
24950 rm -f conftest.$ac_objext conftest.$ac_ext
24951 fi
24952 echo "$as_me:24952: result: $ac_cv_type_bool" >&5
24953 echo "${ECHO_T}$ac_cv_type_bool" >&6
24954
24955 echo "$as_me:24955: checking size of bool" >&5
24956 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
24957 if test "${ac_cv_sizeof_bool+set}" = set; then
24958   echo $ECHO_N "(cached) $ECHO_C" >&6
24959 else
24960   if test "$ac_cv_type_bool" = yes; then
24961   if test "$cross_compiling" = yes; then
24962   # Depending upon the size, compute the lo and hi bounds.
24963 cat >conftest.$ac_ext <<_ACEOF
24964 #line 24964 "configure"
24965 #include "confdefs.h"
24966
24967 #include <stdlib.h>
24968 #include <stdio.h>
24969
24970 #if defined(__cplusplus)
24971
24972 #ifdef HAVE_GXX_BUILTIN_H
24973 #include <g++/builtin.h>
24974 #elif HAVE_GPP_BUILTIN_H
24975 #include <gpp/builtin.h>
24976 #elif HAVE_BUILTIN_H
24977 #include <builtin.h>
24978 #endif
24979
24980 #else
24981
24982 #if $cf_cv_header_stdbool_h
24983 #include <stdbool.h>
24984 #endif
24985
24986 #endif
24987
24988 int
24989 main (void)
24990 {
24991 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
24992   ;
24993   return 0;
24994 }
24995 _ACEOF
24996 rm -f conftest.$ac_objext
24997 if { (eval echo "$as_me:24997: \"$ac_compile\"") >&5
24998   (eval $ac_compile) 2>&5
24999   ac_status=$?
25000   echo "$as_me:25000: \$? = $ac_status" >&5
25001   (exit $ac_status); } &&
25002          { ac_try='test -s conftest.$ac_objext'
25003   { (eval echo "$as_me:25003: \"$ac_try\"") >&5
25004   (eval $ac_try) 2>&5
25005   ac_status=$?
25006   echo "$as_me:25006: \$? = $ac_status" >&5
25007   (exit $ac_status); }; }; then
25008   ac_lo=0 ac_mid=0
25009   while :; do
25010     cat >conftest.$ac_ext <<_ACEOF
25011 #line 25011 "configure"
25012 #include "confdefs.h"
25013
25014 #include <stdlib.h>
25015 #include <stdio.h>
25016
25017 #if defined(__cplusplus)
25018
25019 #ifdef HAVE_GXX_BUILTIN_H
25020 #include <g++/builtin.h>
25021 #elif HAVE_GPP_BUILTIN_H
25022 #include <gpp/builtin.h>
25023 #elif HAVE_BUILTIN_H
25024 #include <builtin.h>
25025 #endif
25026
25027 #else
25028
25029 #if $cf_cv_header_stdbool_h
25030 #include <stdbool.h>
25031 #endif
25032
25033 #endif
25034
25035 int
25036 main (void)
25037 {
25038 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25039   ;
25040   return 0;
25041 }
25042 _ACEOF
25043 rm -f conftest.$ac_objext
25044 if { (eval echo "$as_me:25044: \"$ac_compile\"") >&5
25045   (eval $ac_compile) 2>&5
25046   ac_status=$?
25047   echo "$as_me:25047: \$? = $ac_status" >&5
25048   (exit $ac_status); } &&
25049          { ac_try='test -s conftest.$ac_objext'
25050   { (eval echo "$as_me:25050: \"$ac_try\"") >&5
25051   (eval $ac_try) 2>&5
25052   ac_status=$?
25053   echo "$as_me:25053: \$? = $ac_status" >&5
25054   (exit $ac_status); }; }; then
25055   ac_hi=$ac_mid; break
25056 else
25057   echo "$as_me: failed program was:" >&5
25058 cat conftest.$ac_ext >&5
25059 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25060 fi
25061 rm -f conftest.$ac_objext conftest.$ac_ext
25062   done
25063 else
25064   echo "$as_me: failed program was:" >&5
25065 cat conftest.$ac_ext >&5
25066 ac_hi=-1 ac_mid=-1
25067   while :; do
25068     cat >conftest.$ac_ext <<_ACEOF
25069 #line 25069 "configure"
25070 #include "confdefs.h"
25071
25072 #include <stdlib.h>
25073 #include <stdio.h>
25074
25075 #if defined(__cplusplus)
25076
25077 #ifdef HAVE_GXX_BUILTIN_H
25078 #include <g++/builtin.h>
25079 #elif HAVE_GPP_BUILTIN_H
25080 #include <gpp/builtin.h>
25081 #elif HAVE_BUILTIN_H
25082 #include <builtin.h>
25083 #endif
25084
25085 #else
25086
25087 #if $cf_cv_header_stdbool_h
25088 #include <stdbool.h>
25089 #endif
25090
25091 #endif
25092
25093 int
25094 main (void)
25095 {
25096 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25097   ;
25098   return 0;
25099 }
25100 _ACEOF
25101 rm -f conftest.$ac_objext
25102 if { (eval echo "$as_me:25102: \"$ac_compile\"") >&5
25103   (eval $ac_compile) 2>&5
25104   ac_status=$?
25105   echo "$as_me:25105: \$? = $ac_status" >&5
25106   (exit $ac_status); } &&
25107          { ac_try='test -s conftest.$ac_objext'
25108   { (eval echo "$as_me:25108: \"$ac_try\"") >&5
25109   (eval $ac_try) 2>&5
25110   ac_status=$?
25111   echo "$as_me:25111: \$? = $ac_status" >&5
25112   (exit $ac_status); }; }; then
25113   ac_lo=$ac_mid; break
25114 else
25115   echo "$as_me: failed program was:" >&5
25116 cat conftest.$ac_ext >&5
25117 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25118 fi
25119 rm -f conftest.$ac_objext conftest.$ac_ext
25120   done
25121 fi
25122 rm -f conftest.$ac_objext conftest.$ac_ext
25123 # Binary search between lo and hi bounds.
25124 while test "x$ac_lo" != "x$ac_hi"; do
25125   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25126   cat >conftest.$ac_ext <<_ACEOF
25127 #line 25127 "configure"
25128 #include "confdefs.h"
25129
25130 #include <stdlib.h>
25131 #include <stdio.h>
25132
25133 #if defined(__cplusplus)
25134
25135 #ifdef HAVE_GXX_BUILTIN_H
25136 #include <g++/builtin.h>
25137 #elif HAVE_GPP_BUILTIN_H
25138 #include <gpp/builtin.h>
25139 #elif HAVE_BUILTIN_H
25140 #include <builtin.h>
25141 #endif
25142
25143 #else
25144
25145 #if $cf_cv_header_stdbool_h
25146 #include <stdbool.h>
25147 #endif
25148
25149 #endif
25150
25151 int
25152 main (void)
25153 {
25154 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25155   ;
25156   return 0;
25157 }
25158 _ACEOF
25159 rm -f conftest.$ac_objext
25160 if { (eval echo "$as_me:25160: \"$ac_compile\"") >&5
25161   (eval $ac_compile) 2>&5
25162   ac_status=$?
25163   echo "$as_me:25163: \$? = $ac_status" >&5
25164   (exit $ac_status); } &&
25165          { ac_try='test -s conftest.$ac_objext'
25166   { (eval echo "$as_me:25166: \"$ac_try\"") >&5
25167   (eval $ac_try) 2>&5
25168   ac_status=$?
25169   echo "$as_me:25169: \$? = $ac_status" >&5
25170   (exit $ac_status); }; }; then
25171   ac_hi=$ac_mid
25172 else
25173   echo "$as_me: failed program was:" >&5
25174 cat conftest.$ac_ext >&5
25175 ac_lo=`expr $ac_mid + 1`
25176 fi
25177 rm -f conftest.$ac_objext conftest.$ac_ext
25178 done
25179 ac_cv_sizeof_bool=$ac_lo
25180 else
25181   if test "$cross_compiling" = yes; then
25182   { { echo "$as_me:25182: error: cannot run test program while cross compiling" >&5
25183 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25184    { (exit 1); exit 1; }; }
25185 else
25186   cat >conftest.$ac_ext <<_ACEOF
25187 #line 25187 "configure"
25188 #include "confdefs.h"
25189
25190 #include <stdlib.h>
25191 #include <stdio.h>
25192
25193 #if defined(__cplusplus)
25194
25195 #ifdef HAVE_GXX_BUILTIN_H
25196 #include <g++/builtin.h>
25197 #elif HAVE_GPP_BUILTIN_H
25198 #include <gpp/builtin.h>
25199 #elif HAVE_BUILTIN_H
25200 #include <builtin.h>
25201 #endif
25202
25203 #else
25204
25205 #if $cf_cv_header_stdbool_h
25206 #include <stdbool.h>
25207 #endif
25208
25209 #endif
25210
25211 int
25212 main (void)
25213 {
25214 FILE *f = fopen ("conftest.val", "w");
25215 if (!f)
25216   $ac_main_return (1);
25217 fprintf (f, "%d", (sizeof (bool)));
25218 fclose (f);
25219   ;
25220   return 0;
25221 }
25222 _ACEOF
25223 rm -f conftest$ac_exeext
25224 if { (eval echo "$as_me:25224: \"$ac_link\"") >&5
25225   (eval $ac_link) 2>&5
25226   ac_status=$?
25227   echo "$as_me:25227: \$? = $ac_status" >&5
25228   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25229   { (eval echo "$as_me:25229: \"$ac_try\"") >&5
25230   (eval $ac_try) 2>&5
25231   ac_status=$?
25232   echo "$as_me:25232: \$? = $ac_status" >&5
25233   (exit $ac_status); }; }; then
25234   ac_cv_sizeof_bool=`cat conftest.val`
25235 else
25236   echo "$as_me: program exited with status $ac_status" >&5
25237 echo "$as_me: failed program was:" >&5
25238 cat conftest.$ac_ext >&5
25239 fi
25240 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25241 fi
25242 fi
25243 rm -f conftest.val
25244 else
25245   ac_cv_sizeof_bool=0
25246 fi
25247 fi
25248 echo "$as_me:25248: result: $ac_cv_sizeof_bool" >&5
25249 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25250 cat >>confdefs.h <<EOF
25251 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25252 EOF
25253
25254 echo "$as_me:25254: checking for type of bool" >&5
25255 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25256 if test "${cf_cv_type_of_bool+set}" = set; then
25257   echo $ECHO_N "(cached) $ECHO_C" >&6
25258 else
25259
25260         rm -f cf_test.out
25261         if test "$cross_compiling" = yes; then
25262
25263                 case x$ac_cv_sizeof_bool in
25264                 (x1) cf_cv_type_of_bool="unsigned char";;
25265                 (x2) cf_cv_type_of_bool="unsigned short";;
25266                 (x4) cf_cv_type_of_bool="unsigned int";;
25267                 (x8) cf_cv_type_of_bool="unsigned long";;
25268                 (*)  cf_cv_type_of_bool=unknown;;
25269                 esac
25270
25271 else
25272   cat >conftest.$ac_ext <<_ACEOF
25273 #line 25273 "configure"
25274 #include "confdefs.h"
25275
25276 #include <stdlib.h>
25277 #include <stdio.h>
25278
25279 #if defined(__cplusplus)
25280
25281 #ifdef HAVE_GXX_BUILTIN_H
25282 #include <g++/builtin.h>
25283 #elif HAVE_GPP_BUILTIN_H
25284 #include <gpp/builtin.h>
25285 #elif HAVE_BUILTIN_H
25286 #include <builtin.h>
25287 #endif
25288
25289 #else
25290
25291 #if $cf_cv_header_stdbool_h
25292 #include <stdbool.h>
25293 #endif
25294
25295 #endif
25296
25297 int main(void)
25298 {
25299         FILE *fp = fopen("cf_test.out", "w");
25300         if (fp != 0) {
25301                 bool x = true;
25302                 if ((bool)(-x) >= 0)
25303                         fputs("unsigned ", fp);
25304                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25305                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25306                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25307                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25308                 fclose(fp);
25309         }
25310         ${cf_cv_main_return:-return}(0);
25311 }
25312
25313 _ACEOF
25314 rm -f conftest$ac_exeext
25315 if { (eval echo "$as_me:25315: \"$ac_link\"") >&5
25316   (eval $ac_link) 2>&5
25317   ac_status=$?
25318   echo "$as_me:25318: \$? = $ac_status" >&5
25319   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25320   { (eval echo "$as_me:25320: \"$ac_try\"") >&5
25321   (eval $ac_try) 2>&5
25322   ac_status=$?
25323   echo "$as_me:25323: \$? = $ac_status" >&5
25324   (exit $ac_status); }; }; then
25325   cf_cv_type_of_bool=`cat cf_test.out`
25326                  if test -z "$cf_cv_type_of_bool"; then
25327                    cf_cv_type_of_bool=unknown
25328                  fi
25329 else
25330   echo "$as_me: program exited with status $ac_status" >&5
25331 echo "$as_me: failed program was:" >&5
25332 cat conftest.$ac_ext >&5
25333 cf_cv_type_of_bool=unknown
25334 fi
25335 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25336 fi
25337         rm -f cf_test.out
25338
25339 fi
25340 echo "$as_me:25340: result: $cf_cv_type_of_bool" >&5
25341 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25342
25343 if test "$cf_cv_type_of_bool" = unknown ; then
25344         case .$NCURSES_BOOL in
25345         (.auto|.) NCURSES_BOOL=unsigned;;
25346         esac
25347         { echo "$as_me:25347: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25348 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25349         cf_cv_type_of_bool=$NCURSES_BOOL
25350 fi
25351
25352 echo "$as_me:25352: checking for special defines needed for etip.h" >&5
25353 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25354 cf_save_CXXFLAGS="$CXXFLAGS"
25355 cf_result="none"
25356
25357 # etip.h includes ncurses.h which includes ncurses_dll.h
25358 # But ncurses_dll.h is generated - fix here.
25359 test -d include || mkdir include
25360 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
25361
25362 for cf_math in "" MATH_H
25363 do
25364 for cf_excp in "" MATH_EXCEPTION
25365 do
25366         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25367         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25368         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25369 cat >conftest.$ac_ext <<_ACEOF
25370 #line 25370 "configure"
25371 #include "confdefs.h"
25372
25373 #include <etip.h.in>
25374
25375 int
25376 main (void)
25377 {
25378
25379   ;
25380   return 0;
25381 }
25382 _ACEOF
25383 rm -f conftest.$ac_objext
25384 if { (eval echo "$as_me:25384: \"$ac_compile\"") >&5
25385   (eval $ac_compile) 2>&5
25386   ac_status=$?
25387   echo "$as_me:25387: \$? = $ac_status" >&5
25388   (exit $ac_status); } &&
25389          { ac_try='test -s conftest.$ac_objext'
25390   { (eval echo "$as_me:25390: \"$ac_try\"") >&5
25391   (eval $ac_try) 2>&5
25392   ac_status=$?
25393   echo "$as_me:25393: \$? = $ac_status" >&5
25394   (exit $ac_status); }; }; then
25395
25396         test -n "$cf_math" && cat >>confdefs.h <<EOF
25397 #define ETIP_NEEDS_${cf_math} 1
25398 EOF
25399
25400         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25401 #define ETIP_NEEDS_${cf_excp} 1
25402 EOF
25403
25404         cf_result="$cf_math $cf_excp"
25405         break 2
25406
25407 else
25408   echo "$as_me: failed program was:" >&5
25409 cat conftest.$ac_ext >&5
25410 fi
25411 rm -f conftest.$ac_objext conftest.$ac_ext
25412 done
25413 done
25414 echo "$as_me:25414: result: $cf_result" >&5
25415 echo "${ECHO_T}$cf_result" >&6
25416 CXXFLAGS="$cf_save_CXXFLAGS"
25417
25418 if test -n "$CXX"; then
25419 echo "$as_me:25419: checking if $CXX accepts parameter initialization" >&5
25420 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25421 if test "${cf_cv_cpp_param_init+set}" = set; then
25422   echo $ECHO_N "(cached) $ECHO_C" >&6
25423 else
25424
25425         ac_ext=cc
25426 ac_cpp='$CXXCPP $CPPFLAGS'
25427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25428 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25430 ac_main_return=return
25431
25432         if test "$cross_compiling" = yes; then
25433   cf_cv_cpp_param_init=unknown
25434 else
25435   cat >conftest.$ac_ext <<_ACEOF
25436 #line 25436 "configure"
25437 #include "confdefs.h"
25438
25439 class TEST {
25440 private:
25441         int value;
25442 public:
25443         TEST(int x = 1);
25444         ~TEST();
25445 };
25446
25447 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25448 {
25449         value = x;
25450 }
25451 int main(void) { }
25452
25453 _ACEOF
25454 rm -f conftest$ac_exeext
25455 if { (eval echo "$as_me:25455: \"$ac_link\"") >&5
25456   (eval $ac_link) 2>&5
25457   ac_status=$?
25458   echo "$as_me:25458: \$? = $ac_status" >&5
25459   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25460   { (eval echo "$as_me:25460: \"$ac_try\"") >&5
25461   (eval $ac_try) 2>&5
25462   ac_status=$?
25463   echo "$as_me:25463: \$? = $ac_status" >&5
25464   (exit $ac_status); }; }; then
25465   cf_cv_cpp_param_init=yes
25466 else
25467   echo "$as_me: program exited with status $ac_status" >&5
25468 echo "$as_me: failed program was:" >&5
25469 cat conftest.$ac_ext >&5
25470 cf_cv_cpp_param_init=no
25471 fi
25472 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25473 fi
25474         ac_ext=cc
25475 ac_cpp='$CXXCPP $CPPFLAGS'
25476 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25477 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25478 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25479 ac_main_return=return
25480
25481 fi
25482 echo "$as_me:25482: result: $cf_cv_cpp_param_init" >&5
25483 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25484 fi
25485 test "$cf_cv_cpp_param_init" = yes &&
25486 cat >>confdefs.h <<\EOF
25487 #define CPP_HAS_PARAM_INIT 1
25488 EOF
25489
25490 if test -n "$CXX"; then
25491
25492 echo "$as_me:25492: checking if $CXX accepts static_cast" >&5
25493 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25494 if test "${cf_cv_cpp_static_cast+set}" = set; then
25495   echo $ECHO_N "(cached) $ECHO_C" >&6
25496 else
25497
25498         ac_ext=cc
25499 ac_cpp='$CXXCPP $CPPFLAGS'
25500 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25501 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25502 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25503 ac_main_return=return
25504
25505         cat >conftest.$ac_ext <<_ACEOF
25506 #line 25506 "configure"
25507 #include "confdefs.h"
25508
25509 class NCursesPanel
25510 {
25511 public:
25512   NCursesPanel(int nlines,
25513                int ncols,
25514                int begin_y = 0,
25515                int begin_x = 0)
25516   {
25517   }
25518   NCursesPanel();
25519   ~NCursesPanel();
25520 };
25521
25522 template<class T> class NCursesUserPanel : public NCursesPanel
25523 {
25524 public:
25525   NCursesUserPanel (int nlines,
25526                     int ncols,
25527                     int begin_y = 0,
25528                     int begin_x = 0,
25529                     const T* p_UserData = static_cast<T*>(0))
25530     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25531   {
25532   };
25533   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25534   {
25535   };
25536
25537   virtual ~NCursesUserPanel() {};
25538 };
25539
25540 int
25541 main (void)
25542 {
25543
25544         const char* p_UserData = static_cast<char*>(0)
25545   ;
25546   return 0;
25547 }
25548 _ACEOF
25549 rm -f conftest.$ac_objext
25550 if { (eval echo "$as_me:25550: \"$ac_compile\"") >&5
25551   (eval $ac_compile) 2>&5
25552   ac_status=$?
25553   echo "$as_me:25553: \$? = $ac_status" >&5
25554   (exit $ac_status); } &&
25555          { ac_try='test -s conftest.$ac_objext'
25556   { (eval echo "$as_me:25556: \"$ac_try\"") >&5
25557   (eval $ac_try) 2>&5
25558   ac_status=$?
25559   echo "$as_me:25559: \$? = $ac_status" >&5
25560   (exit $ac_status); }; }; then
25561   cf_cv_cpp_static_cast=yes
25562 else
25563   echo "$as_me: failed program was:" >&5
25564 cat conftest.$ac_ext >&5
25565 cf_cv_cpp_static_cast=no
25566 fi
25567 rm -f conftest.$ac_objext conftest.$ac_ext
25568
25569         ac_ext=cc
25570 ac_cpp='$CXXCPP $CPPFLAGS'
25571 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25572 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25573 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25574 ac_main_return=return
25575
25576 fi
25577 echo "$as_me:25577: result: $cf_cv_cpp_static_cast" >&5
25578 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25579
25580 fi
25581
25582 test "$cf_cv_cpp_static_cast" = yes &&
25583 cat >>confdefs.h <<\EOF
25584 #define CPP_HAS_STATIC_CAST 1
25585 EOF
25586
25587         CXX_AR='$(AR)'
25588         CXX_ARFLAGS='$(ARFLAGS)'
25589         case $cf_cv_system_name in
25590         (irix*)
25591             if test "$GXX" != yes ; then
25592                 CXX_AR='$(CXX)'
25593                 CXX_ARFLAGS='-ar -o'
25594             fi
25595             ;;
25596         (sco3.2v5*)
25597             CXXLDFLAGS="-u main"
25598             ;;
25599         (solaris2*)
25600             if test "$GXX" != yes ; then
25601                 CXX_AR='$(CXX)'
25602                 CXX_ARFLAGS='-xar -o'
25603             fi
25604             ;;
25605         esac
25606
25607 else
25608         cf_cxx_library=no
25609         cf_cv_builtin_bool=1
25610
25611         # Just because we are not configuring against C++ right now does not
25612         # mean that a user will not want to use C++.  Some distributors disable
25613         # the C++ portion of this configuration as a shortcut (or just to avoid
25614         # compiling the demo in the c++ directory).  So we need a reasonable
25615         # default for the 'bool' type.
25616         #
25617         # Caveat: since the storage of the bool type is not standardized, it
25618         # may change.
25619
25620         if test "$NCURSES_BOOL" != auto ; then
25621                 cf_cv_type_of_bool=$NCURSES_BOOL
25622                 cf_cv_header_stdbool_h=0
25623         else
25624                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25625
25626 echo "$as_me:25626: checking for bool" >&5
25627 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25628 if test "${ac_cv_type_bool+set}" = set; then
25629   echo $ECHO_N "(cached) $ECHO_C" >&6
25630 else
25631   cat >conftest.$ac_ext <<_ACEOF
25632 #line 25632 "configure"
25633 #include "confdefs.h"
25634
25635 #include <stdlib.h>
25636 #include <stdio.h>
25637
25638 #if defined(__cplusplus)
25639
25640 #ifdef HAVE_GXX_BUILTIN_H
25641 #include <g++/builtin.h>
25642 #elif HAVE_GPP_BUILTIN_H
25643 #include <gpp/builtin.h>
25644 #elif HAVE_BUILTIN_H
25645 #include <builtin.h>
25646 #endif
25647
25648 #else
25649
25650 #if $cf_cv_header_stdbool_h
25651 #include <stdbool.h>
25652 #endif
25653
25654 #endif
25655
25656 int
25657 main (void)
25658 {
25659 if ((bool *) 0)
25660   return 0;
25661 if (sizeof (bool))
25662   return 0;
25663   ;
25664   return 0;
25665 }
25666 _ACEOF
25667 rm -f conftest.$ac_objext
25668 if { (eval echo "$as_me:25668: \"$ac_compile\"") >&5
25669   (eval $ac_compile) 2>&5
25670   ac_status=$?
25671   echo "$as_me:25671: \$? = $ac_status" >&5
25672   (exit $ac_status); } &&
25673          { ac_try='test -s conftest.$ac_objext'
25674   { (eval echo "$as_me:25674: \"$ac_try\"") >&5
25675   (eval $ac_try) 2>&5
25676   ac_status=$?
25677   echo "$as_me:25677: \$? = $ac_status" >&5
25678   (exit $ac_status); }; }; then
25679   ac_cv_type_bool=yes
25680 else
25681   echo "$as_me: failed program was:" >&5
25682 cat conftest.$ac_ext >&5
25683 ac_cv_type_bool=no
25684 fi
25685 rm -f conftest.$ac_objext conftest.$ac_ext
25686 fi
25687 echo "$as_me:25687: result: $ac_cv_type_bool" >&5
25688 echo "${ECHO_T}$ac_cv_type_bool" >&6
25689
25690 echo "$as_me:25690: checking size of bool" >&5
25691 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25692 if test "${ac_cv_sizeof_bool+set}" = set; then
25693   echo $ECHO_N "(cached) $ECHO_C" >&6
25694 else
25695   if test "$ac_cv_type_bool" = yes; then
25696   if test "$cross_compiling" = yes; then
25697   # Depending upon the size, compute the lo and hi bounds.
25698 cat >conftest.$ac_ext <<_ACEOF
25699 #line 25699 "configure"
25700 #include "confdefs.h"
25701
25702 #include <stdlib.h>
25703 #include <stdio.h>
25704
25705 #if defined(__cplusplus)
25706
25707 #ifdef HAVE_GXX_BUILTIN_H
25708 #include <g++/builtin.h>
25709 #elif HAVE_GPP_BUILTIN_H
25710 #include <gpp/builtin.h>
25711 #elif HAVE_BUILTIN_H
25712 #include <builtin.h>
25713 #endif
25714
25715 #else
25716
25717 #if $cf_cv_header_stdbool_h
25718 #include <stdbool.h>
25719 #endif
25720
25721 #endif
25722
25723 int
25724 main (void)
25725 {
25726 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25727   ;
25728   return 0;
25729 }
25730 _ACEOF
25731 rm -f conftest.$ac_objext
25732 if { (eval echo "$as_me:25732: \"$ac_compile\"") >&5
25733   (eval $ac_compile) 2>&5
25734   ac_status=$?
25735   echo "$as_me:25735: \$? = $ac_status" >&5
25736   (exit $ac_status); } &&
25737          { ac_try='test -s conftest.$ac_objext'
25738   { (eval echo "$as_me:25738: \"$ac_try\"") >&5
25739   (eval $ac_try) 2>&5
25740   ac_status=$?
25741   echo "$as_me:25741: \$? = $ac_status" >&5
25742   (exit $ac_status); }; }; then
25743   ac_lo=0 ac_mid=0
25744   while :; do
25745     cat >conftest.$ac_ext <<_ACEOF
25746 #line 25746 "configure"
25747 #include "confdefs.h"
25748
25749 #include <stdlib.h>
25750 #include <stdio.h>
25751
25752 #if defined(__cplusplus)
25753
25754 #ifdef HAVE_GXX_BUILTIN_H
25755 #include <g++/builtin.h>
25756 #elif HAVE_GPP_BUILTIN_H
25757 #include <gpp/builtin.h>
25758 #elif HAVE_BUILTIN_H
25759 #include <builtin.h>
25760 #endif
25761
25762 #else
25763
25764 #if $cf_cv_header_stdbool_h
25765 #include <stdbool.h>
25766 #endif
25767
25768 #endif
25769
25770 int
25771 main (void)
25772 {
25773 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25774   ;
25775   return 0;
25776 }
25777 _ACEOF
25778 rm -f conftest.$ac_objext
25779 if { (eval echo "$as_me:25779: \"$ac_compile\"") >&5
25780   (eval $ac_compile) 2>&5
25781   ac_status=$?
25782   echo "$as_me:25782: \$? = $ac_status" >&5
25783   (exit $ac_status); } &&
25784          { ac_try='test -s conftest.$ac_objext'
25785   { (eval echo "$as_me:25785: \"$ac_try\"") >&5
25786   (eval $ac_try) 2>&5
25787   ac_status=$?
25788   echo "$as_me:25788: \$? = $ac_status" >&5
25789   (exit $ac_status); }; }; then
25790   ac_hi=$ac_mid; break
25791 else
25792   echo "$as_me: failed program was:" >&5
25793 cat conftest.$ac_ext >&5
25794 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25795 fi
25796 rm -f conftest.$ac_objext conftest.$ac_ext
25797   done
25798 else
25799   echo "$as_me: failed program was:" >&5
25800 cat conftest.$ac_ext >&5
25801 ac_hi=-1 ac_mid=-1
25802   while :; do
25803     cat >conftest.$ac_ext <<_ACEOF
25804 #line 25804 "configure"
25805 #include "confdefs.h"
25806
25807 #include <stdlib.h>
25808 #include <stdio.h>
25809
25810 #if defined(__cplusplus)
25811
25812 #ifdef HAVE_GXX_BUILTIN_H
25813 #include <g++/builtin.h>
25814 #elif HAVE_GPP_BUILTIN_H
25815 #include <gpp/builtin.h>
25816 #elif HAVE_BUILTIN_H
25817 #include <builtin.h>
25818 #endif
25819
25820 #else
25821
25822 #if $cf_cv_header_stdbool_h
25823 #include <stdbool.h>
25824 #endif
25825
25826 #endif
25827
25828 int
25829 main (void)
25830 {
25831 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25832   ;
25833   return 0;
25834 }
25835 _ACEOF
25836 rm -f conftest.$ac_objext
25837 if { (eval echo "$as_me:25837: \"$ac_compile\"") >&5
25838   (eval $ac_compile) 2>&5
25839   ac_status=$?
25840   echo "$as_me:25840: \$? = $ac_status" >&5
25841   (exit $ac_status); } &&
25842          { ac_try='test -s conftest.$ac_objext'
25843   { (eval echo "$as_me:25843: \"$ac_try\"") >&5
25844   (eval $ac_try) 2>&5
25845   ac_status=$?
25846   echo "$as_me:25846: \$? = $ac_status" >&5
25847   (exit $ac_status); }; }; then
25848   ac_lo=$ac_mid; break
25849 else
25850   echo "$as_me: failed program was:" >&5
25851 cat conftest.$ac_ext >&5
25852 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25853 fi
25854 rm -f conftest.$ac_objext conftest.$ac_ext
25855   done
25856 fi
25857 rm -f conftest.$ac_objext conftest.$ac_ext
25858 # Binary search between lo and hi bounds.
25859 while test "x$ac_lo" != "x$ac_hi"; do
25860   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25861   cat >conftest.$ac_ext <<_ACEOF
25862 #line 25862 "configure"
25863 #include "confdefs.h"
25864
25865 #include <stdlib.h>
25866 #include <stdio.h>
25867
25868 #if defined(__cplusplus)
25869
25870 #ifdef HAVE_GXX_BUILTIN_H
25871 #include <g++/builtin.h>
25872 #elif HAVE_GPP_BUILTIN_H
25873 #include <gpp/builtin.h>
25874 #elif HAVE_BUILTIN_H
25875 #include <builtin.h>
25876 #endif
25877
25878 #else
25879
25880 #if $cf_cv_header_stdbool_h
25881 #include <stdbool.h>
25882 #endif
25883
25884 #endif
25885
25886 int
25887 main (void)
25888 {
25889 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25890   ;
25891   return 0;
25892 }
25893 _ACEOF
25894 rm -f conftest.$ac_objext
25895 if { (eval echo "$as_me:25895: \"$ac_compile\"") >&5
25896   (eval $ac_compile) 2>&5
25897   ac_status=$?
25898   echo "$as_me:25898: \$? = $ac_status" >&5
25899   (exit $ac_status); } &&
25900          { ac_try='test -s conftest.$ac_objext'
25901   { (eval echo "$as_me:25901: \"$ac_try\"") >&5
25902   (eval $ac_try) 2>&5
25903   ac_status=$?
25904   echo "$as_me:25904: \$? = $ac_status" >&5
25905   (exit $ac_status); }; }; then
25906   ac_hi=$ac_mid
25907 else
25908   echo "$as_me: failed program was:" >&5
25909 cat conftest.$ac_ext >&5
25910 ac_lo=`expr $ac_mid + 1`
25911 fi
25912 rm -f conftest.$ac_objext conftest.$ac_ext
25913 done
25914 ac_cv_sizeof_bool=$ac_lo
25915 else
25916   if test "$cross_compiling" = yes; then
25917   { { echo "$as_me:25917: error: cannot run test program while cross compiling" >&5
25918 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25919    { (exit 1); exit 1; }; }
25920 else
25921   cat >conftest.$ac_ext <<_ACEOF
25922 #line 25922 "configure"
25923 #include "confdefs.h"
25924
25925 #include <stdlib.h>
25926 #include <stdio.h>
25927
25928 #if defined(__cplusplus)
25929
25930 #ifdef HAVE_GXX_BUILTIN_H
25931 #include <g++/builtin.h>
25932 #elif HAVE_GPP_BUILTIN_H
25933 #include <gpp/builtin.h>
25934 #elif HAVE_BUILTIN_H
25935 #include <builtin.h>
25936 #endif
25937
25938 #else
25939
25940 #if $cf_cv_header_stdbool_h
25941 #include <stdbool.h>
25942 #endif
25943
25944 #endif
25945
25946 int
25947 main (void)
25948 {
25949 FILE *f = fopen ("conftest.val", "w");
25950 if (!f)
25951   $ac_main_return (1);
25952 fprintf (f, "%d", (sizeof (bool)));
25953 fclose (f);
25954   ;
25955   return 0;
25956 }
25957 _ACEOF
25958 rm -f conftest$ac_exeext
25959 if { (eval echo "$as_me:25959: \"$ac_link\"") >&5
25960   (eval $ac_link) 2>&5
25961   ac_status=$?
25962   echo "$as_me:25962: \$? = $ac_status" >&5
25963   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25964   { (eval echo "$as_me:25964: \"$ac_try\"") >&5
25965   (eval $ac_try) 2>&5
25966   ac_status=$?
25967   echo "$as_me:25967: \$? = $ac_status" >&5
25968   (exit $ac_status); }; }; then
25969   ac_cv_sizeof_bool=`cat conftest.val`
25970 else
25971   echo "$as_me: program exited with status $ac_status" >&5
25972 echo "$as_me: failed program was:" >&5
25973 cat conftest.$ac_ext >&5
25974 fi
25975 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25976 fi
25977 fi
25978 rm -f conftest.val
25979 else
25980   ac_cv_sizeof_bool=0
25981 fi
25982 fi
25983 echo "$as_me:25983: result: $ac_cv_sizeof_bool" >&5
25984 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25985 cat >>confdefs.h <<EOF
25986 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25987 EOF
25988
25989 echo "$as_me:25989: checking for type of bool" >&5
25990 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25991 if test "${cf_cv_type_of_bool+set}" = set; then
25992   echo $ECHO_N "(cached) $ECHO_C" >&6
25993 else
25994
25995         rm -f cf_test.out
25996         if test "$cross_compiling" = yes; then
25997
25998                 case x$ac_cv_sizeof_bool in
25999                 (x1) cf_cv_type_of_bool="unsigned char";;
26000                 (x2) cf_cv_type_of_bool="unsigned short";;
26001                 (x4) cf_cv_type_of_bool="unsigned int";;
26002                 (x8) cf_cv_type_of_bool="unsigned long";;
26003                 (*)  cf_cv_type_of_bool=unknown;;
26004                 esac
26005
26006 else
26007   cat >conftest.$ac_ext <<_ACEOF
26008 #line 26008 "configure"
26009 #include "confdefs.h"
26010
26011 #include <stdlib.h>
26012 #include <stdio.h>
26013
26014 #if defined(__cplusplus)
26015
26016 #ifdef HAVE_GXX_BUILTIN_H
26017 #include <g++/builtin.h>
26018 #elif HAVE_GPP_BUILTIN_H
26019 #include <gpp/builtin.h>
26020 #elif HAVE_BUILTIN_H
26021 #include <builtin.h>
26022 #endif
26023
26024 #else
26025
26026 #if $cf_cv_header_stdbool_h
26027 #include <stdbool.h>
26028 #endif
26029
26030 #endif
26031
26032 int main(void)
26033 {
26034         FILE *fp = fopen("cf_test.out", "w");
26035         if (fp != 0) {
26036                 bool x = true;
26037                 if ((bool)(-x) >= 0)
26038                         fputs("unsigned ", fp);
26039                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26040                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26041                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26042                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26043                 fclose(fp);
26044         }
26045         ${cf_cv_main_return:-return}(0);
26046 }
26047
26048 _ACEOF
26049 rm -f conftest$ac_exeext
26050 if { (eval echo "$as_me:26050: \"$ac_link\"") >&5
26051   (eval $ac_link) 2>&5
26052   ac_status=$?
26053   echo "$as_me:26053: \$? = $ac_status" >&5
26054   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26055   { (eval echo "$as_me:26055: \"$ac_try\"") >&5
26056   (eval $ac_try) 2>&5
26057   ac_status=$?
26058   echo "$as_me:26058: \$? = $ac_status" >&5
26059   (exit $ac_status); }; }; then
26060   cf_cv_type_of_bool=`cat cf_test.out`
26061                  if test -z "$cf_cv_type_of_bool"; then
26062                    cf_cv_type_of_bool=unknown
26063                  fi
26064 else
26065   echo "$as_me: program exited with status $ac_status" >&5
26066 echo "$as_me: failed program was:" >&5
26067 cat conftest.$ac_ext >&5
26068 cf_cv_type_of_bool=unknown
26069 fi
26070 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26071 fi
26072         rm -f cf_test.out
26073
26074 fi
26075 echo "$as_me:26075: result: $cf_cv_type_of_bool" >&5
26076 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26077
26078 if test "$cf_cv_type_of_bool" = unknown ; then
26079         case .$NCURSES_BOOL in
26080         (.auto|.) NCURSES_BOOL=unsigned;;
26081         esac
26082         { echo "$as_me:26082: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26083 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26084         cf_cv_type_of_bool=$NCURSES_BOOL
26085 fi
26086
26087                 else
26088                         echo "$as_me:26088: checking for fallback type of bool" >&5
26089 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26090                         case "$host_cpu" in
26091                         (i?86)  cf_cv_type_of_bool=char ;;
26092                         (*)     cf_cv_type_of_bool=int  ;;
26093                         esac
26094                         echo "$as_me:26094: result: $cf_cv_type_of_bool" >&5
26095 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26096                 fi
26097         fi
26098 fi
26099
26100 # If the C compiler did not declare bool, and we did not determine that the C++
26101 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26102 # ncurses library use the same type as C++ bool.  Note that this allows one to
26103 # specify the type of bool in a configure-script option and postpone
26104 # integration with the C++ compiler provided that the types are compatible.
26105 USE_CXX_BOOL=1
26106 if test $cf_cv_cc_bool_type = 1
26107 then
26108         # oops: C has a bool.  Unlikely, but C++ could differ.
26109         USE_CXX_BOOL=0
26110 elif test $cf_cv_builtin_bool = 0
26111 then
26112         # C++ has no bool
26113         USE_CXX_BOOL=0
26114 else
26115         # this is the normal case
26116         USE_CXX_BOOL='defined(__cplusplus)'
26117 fi
26118
26119 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26120
26121         if test "$cf_with_ada" != "no" ; then
26122                 if test "$with_libtool" != "no"; then
26123                         { echo "$as_me:26123: WARNING: libtool does not support Ada - disabling feature" >&5
26124 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26125                         cf_with_ada=no
26126                 fi
26127         fi
26128
26129         if test "$cf_with_ada" != "no" ; then
26130
26131 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26132 do
26133
26134 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26135
26136         unset ac_cv_path_cf_TEMP_gnat
26137         unset cf_TEMP_gnat
26138         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26139 set dummy $cf_prog_gnat; ac_word=$2
26140 echo "$as_me:26140: checking for $ac_word" >&5
26141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26142 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26143   echo $ECHO_N "(cached) $ECHO_C" >&6
26144 else
26145   case $cf_TEMP_gnat in
26146   [\\/]* | ?:[\\/]*)
26147   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26148   ;;
26149   *)
26150   ac_save_IFS=$IFS; IFS=$ac_path_separator
26151 ac_dummy="$PATH"
26152 for ac_dir in $ac_dummy; do
26153   IFS=$ac_save_IFS
26154   test -z "$ac_dir" && ac_dir=.
26155   if $as_executable_p "$ac_dir/$ac_word"; then
26156    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26157    echo "$as_me:26157: found $ac_dir/$ac_word" >&5
26158    break
26159 fi
26160 done
26161
26162   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26163   ;;
26164 esac
26165 fi
26166 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26167
26168 if test -n "$cf_TEMP_gnat"; then
26169   echo "$as_me:26169: result: $cf_TEMP_gnat" >&5
26170 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26171 else
26172   echo "$as_me:26172: result: no" >&5
26173 echo "${ECHO_T}no" >&6
26174 fi
26175
26176         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
26177
26178         if test "x$cf_TEMP_gnat" != xno; then
26179                 unset cf_cv_gnat_version
26180                 unset cf_TEMP_gnat
26181
26182 echo "$as_me:26182: checking for $cf_prog_gnat version" >&5
26183 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26184 if test "${cf_cv_gnat_version+set}" = set; then
26185   echo $ECHO_N "(cached) $ECHO_C" >&6
26186 else
26187
26188 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26189         grep '[0-9].[0-9][0-9]*' |\
26190         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26191
26192 fi
26193 echo "$as_me:26193: result: $cf_cv_gnat_version" >&5
26194 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26195 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26196 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26197
26198         fi
26199         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
26200
26201         unset cf_TEMP_gnat
26202         unset cf_cv_gnat_version
26203         unset ac_cv_path_cf_TEMP_gnat
26204 done
26205
26206 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26207         cf_ada_make=
26208         cf_cv_prog_gnat_correct=no
26209 else
26210         cf_ada_make=gnatmake
26211         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26212                 # gprconfig is newer than gnatmake; we can continue...
26213                 cf_ada_config="##"
26214         else
26215                 rm -rf conftest* *~conftest*
26216                 if mkdir conftest.src
26217                 then
26218                         cf_ada_config=""
26219                         cd conftest.src
26220                         for cf_gprconfig in Ada C
26221                         do
26222                                 echo "$as_me:26222: checking for gprconfig name for $cf_gprconfig" >&5
26223 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26224                                 if test $cf_gprconfig = C
26225                                 then
26226                                         for cf_gprconfig_param in \
26227                                                 $cf_gprconfig,,,,GNATGCC \
26228                                                 $cf_gprconfig,,,,GCC \
26229                                                 $cf_gprconfig
26230                                         do
26231                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26232                                                 test -n "$cf_gprconfig_value" && break
26233                                         done
26234                                 else
26235                                         cf_gprconfig_param=$cf_gprconfig
26236                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26237                                 fi
26238                                 if test -n "$cf_gprconfig_value"
26239                                 then
26240                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
26241                                         echo "$as_me:26241: result: $cf_gprconfig_value" >&5
26242 echo "${ECHO_T}$cf_gprconfig_value" >&6
26243                                 else
26244                                         echo "$as_me:26244: result: missing" >&5
26245 echo "${ECHO_T}missing" >&6
26246                                         cf_ada_config="#"
26247                                         break
26248                                 fi
26249                         done
26250                         cd ..
26251                         rm -rf conftest* *~conftest*
26252                 fi
26253         fi
26254         if test "x$cf_ada_config" != "x#"
26255         then
26256
26257 echo "$as_me:26257: checking for gnat version" >&5
26258 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26259 if test "${cf_cv_gnat_version+set}" = set; then
26260   echo $ECHO_N "(cached) $ECHO_C" >&6
26261 else
26262
26263 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26264         grep '[0-9].[0-9][0-9]*' |\
26265         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26266
26267 fi
26268 echo "$as_me:26268: result: $cf_cv_gnat_version" >&5
26269 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26270 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26271
26272 case $cf_cv_gnat_version in
26273 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26274         cf_cv_prog_gnat_correct=yes
26275         ;;
26276 (*)
26277         { echo "$as_me:26277: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26278 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26279         cf_cv_prog_gnat_correct=no
26280         ;;
26281 esac
26282
26283                 # Extract the first word of "m4", so it can be a program name with args.
26284 set dummy m4; ac_word=$2
26285 echo "$as_me:26285: checking for $ac_word" >&5
26286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26287 if test "${ac_cv_prog_M4_exists+set}" = set; then
26288   echo $ECHO_N "(cached) $ECHO_C" >&6
26289 else
26290   if test -n "$M4_exists"; then
26291   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26292 else
26293   ac_save_IFS=$IFS; IFS=$ac_path_separator
26294 ac_dummy="$PATH"
26295 for ac_dir in $ac_dummy; do
26296   IFS=$ac_save_IFS
26297   test -z "$ac_dir" && ac_dir=.
26298   $as_executable_p "$ac_dir/$ac_word" || continue
26299 ac_cv_prog_M4_exists="yes"
26300 echo "$as_me:26300: found $ac_dir/$ac_word" >&5
26301 break
26302 done
26303
26304   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26305 fi
26306 fi
26307 M4_exists=$ac_cv_prog_M4_exists
26308 if test -n "$M4_exists"; then
26309   echo "$as_me:26309: result: $M4_exists" >&5
26310 echo "${ECHO_T}$M4_exists" >&6
26311 else
26312   echo "$as_me:26312: result: no" >&5
26313 echo "${ECHO_T}no" >&6
26314 fi
26315
26316                 if test "$ac_cv_prog_M4_exists" = no; then
26317                         cf_cv_prog_gnat_correct=no
26318                         { echo "$as_me:26318: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26319 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26320                 fi
26321                 if test "$cf_cv_prog_gnat_correct" = yes; then
26322                         echo "$as_me:26322: checking if GNAT works" >&5
26323 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26324
26325 rm -rf conftest* *~conftest*
26326 cat >>conftest.ads <<CF_EOF
26327 procedure conftest;
26328 CF_EOF
26329 cat >>conftest.adb <<CF_EOF
26330 with Text_IO;
26331 with GNAT.OS_Lib;
26332 procedure conftest is
26333 begin
26334    Text_IO.Put ("Hello World");
26335    Text_IO.New_Line;
26336    GNAT.OS_Lib.OS_Exit (0);
26337 end conftest;
26338 CF_EOF
26339 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26340    if ( ./conftest 1>&5 2>&1 ) ; then
26341       cf_cv_prog_gnat_correct=yes
26342    else
26343       cf_cv_prog_gnat_correct=no
26344    fi
26345 else
26346    cf_cv_prog_gnat_correct=no
26347 fi
26348 rm -rf conftest* *~conftest*
26349
26350                         echo "$as_me:26350: result: $cf_cv_prog_gnat_correct" >&5
26351 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26352                 fi
26353         else
26354                 cf_cv_prog_gnat_correct=no
26355         fi
26356 fi
26357
26358                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26359
26360         ADAFLAGS="$ADAFLAGS -gnatpn"
26361
26362         echo "$as_me:26362: checking optimization options for ADAFLAGS" >&5
26363 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26364         case "$CFLAGS" in
26365         (*-g*)
26366
26367         ADAFLAGS="$ADAFLAGS -g"
26368
26369                 ;;
26370         esac
26371         case "$CFLAGS" in
26372         (*-O*)
26373                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26374
26375         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26376
26377                 ;;
26378         esac
26379         echo "$as_me:26379: result: $ADAFLAGS" >&5
26380 echo "${ECHO_T}$ADAFLAGS" >&6
26381
26382 echo "$as_me:26382: checking if GNATPREP supports -T option" >&5
26383 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26384 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26385   echo $ECHO_N "(cached) $ECHO_C" >&6
26386 else
26387
26388 cf_cv_gnatprep_opt_t=no
26389 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26390
26391 fi
26392 echo "$as_me:26392: result: $cf_cv_gnatprep_opt_t" >&5
26393 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26394 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26395
26396 echo "$as_me:26396: checking if GNAT supports generics" >&5
26397 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26398 case $cf_cv_gnat_version in
26399 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26400         cf_gnat_generics=yes
26401         ;;
26402 (*)
26403         cf_gnat_generics=no
26404         ;;
26405 esac
26406 echo "$as_me:26406: result: $cf_gnat_generics" >&5
26407 echo "${ECHO_T}$cf_gnat_generics" >&6
26408
26409 if test "$cf_gnat_generics" = yes
26410 then
26411         cf_compile_generics=generics
26412         cf_generic_objects="\${GENOBJS}"
26413 else
26414         cf_compile_generics=
26415         cf_generic_objects=
26416 fi
26417
26418 echo "$as_me:26418: checking if GNAT supports SIGINT" >&5
26419 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26420 if test "${cf_cv_gnat_sigint+set}" = set; then
26421   echo $ECHO_N "(cached) $ECHO_C" >&6
26422 else
26423
26424 rm -rf conftest* *~conftest*
26425 cat >>conftest.ads <<CF_EOF
26426 with Ada.Interrupts.Names;
26427
26428 package ConfTest is
26429
26430    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26431    pragma Unreserve_All_Interrupts;
26432    pragma Warnings (On);
26433
26434    protected Process is
26435       procedure Stop;
26436       function Continue return Boolean;
26437       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26438    private
26439       Done : Boolean := False;
26440    end Process;
26441
26442 end ConfTest;
26443 CF_EOF
26444 cat >>conftest.adb <<CF_EOF
26445 package body ConfTest is
26446    protected body Process is
26447       procedure Stop is
26448       begin
26449          Done := True;
26450       end Stop;
26451       function Continue return Boolean is
26452       begin
26453          return not Done;
26454       end Continue;
26455    end Process;
26456 end ConfTest;
26457 CF_EOF
26458 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26459       cf_cv_gnat_sigint=yes
26460 else
26461    cf_cv_gnat_sigint=no
26462 fi
26463 rm -rf conftest* *~conftest*
26464
26465 fi
26466 echo "$as_me:26466: result: $cf_cv_gnat_sigint" >&5
26467 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26468
26469 if test $cf_cv_gnat_sigint = yes ; then
26470         USE_GNAT_SIGINT=""
26471 else
26472         USE_GNAT_SIGINT="#"
26473 fi
26474
26475 cf_gnat_libraries=no
26476 cf_gnat_projects=no
26477
26478 if test "$enable_gnat_projects" != no ; then
26479 echo "$as_me:26479: checking if GNAT supports project files" >&5
26480 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26481 case $cf_cv_gnat_version in
26482 (3.[0-9]*)
26483         ;;
26484 (*)
26485         case $cf_cv_system_name in
26486         (cygwin*|msys*)
26487                 ;;
26488         (*)
26489                 rm -rf conftest* *~conftest*
26490                 if mkdir conftest.src conftest.bin conftest.lib
26491                 then
26492                         cd conftest.src
26493                         rm -rf conftest* *~conftest*
26494                         cat >>library.gpr <<CF_EOF
26495 project Library is
26496   Kind := External ("LIB_KIND");
26497   for Library_Name use "ConfTest";
26498   for Object_Dir use ".";
26499   for Library_ALI_Dir use External("LIBRARY_DIR");
26500   for Library_Version use External ("SONAME");
26501   for Library_Kind use Kind;
26502   for Library_Dir use External("BUILD_DIR");
26503   Source_Dir := External ("SOURCE_DIR");
26504   for Source_Dirs use (Source_Dir);
26505 end Library;
26506 CF_EOF
26507                         cat >>confpackage.ads <<CF_EOF
26508 package ConfPackage is
26509    procedure conftest;
26510 end ConfPackage;
26511 CF_EOF
26512                         cat >>confpackage.adb <<CF_EOF
26513 with Text_IO;
26514 package body ConfPackage is
26515    procedure conftest is
26516    begin
26517       Text_IO.Put ("Hello World");
26518       Text_IO.New_Line;
26519    end conftest;
26520 end ConfPackage;
26521 CF_EOF
26522                         if ( $cf_ada_make $ADAFLAGS \
26523                                         -Plibrary.gpr \
26524                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
26525                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
26526                                         -XSOURCE_DIR=`pwd` \
26527                                         -XSONAME=libConfTest.so.1 \
26528                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26529                                 cf_gnat_projects=yes
26530                         fi
26531                         cd ..
26532                 fi
26533                 if test -f conftest.lib/confpackage.ali
26534                 then
26535                         cf_gnat_libraries=yes
26536                 fi
26537                 rm -rf conftest* *~conftest*
26538                 ;;
26539         esac
26540         ;;
26541 esac
26542 echo "$as_me:26542: result: $cf_gnat_projects" >&5
26543 echo "${ECHO_T}$cf_gnat_projects" >&6
26544 fi # enable_gnat_projects
26545
26546 if test $cf_gnat_projects = yes
26547 then
26548         echo "$as_me:26548: checking if GNAT supports libraries" >&5
26549 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26550         echo "$as_me:26550: result: $cf_gnat_libraries" >&5
26551 echo "${ECHO_T}$cf_gnat_libraries" >&6
26552 fi
26553
26554 if test "$cf_gnat_projects" = yes
26555 then
26556         USE_OLD_MAKERULES="#"
26557         USE_GNAT_PROJECTS=""
26558 else
26559         USE_OLD_MAKERULES=""
26560         USE_GNAT_PROJECTS="#"
26561 fi
26562
26563 if test "$cf_gnat_libraries" = yes
26564 then
26565         USE_GNAT_LIBRARIES=""
26566 else
26567         USE_GNAT_LIBRARIES="#"
26568 fi
26569
26570 echo "$as_me:26570: checking for ada-compiler" >&5
26571 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26572
26573 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26574 if test "${with_ada_compiler+set}" = set; then
26575   withval="$with_ada_compiler"
26576   cf_ada_compiler=$withval
26577 else
26578   cf_ada_compiler=gnatmake
26579 fi;
26580
26581 echo "$as_me:26581: result: $cf_ada_compiler" >&5
26582 echo "${ECHO_T}$cf_ada_compiler" >&6
26583
26584                         cf_ada_package=terminal_interface
26585
26586 echo "$as_me:26586: checking for ada-include" >&5
26587 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26588
26589 # Check whether --with-ada-include or --without-ada-include was given.
26590 if test "${with_ada_include+set}" = set; then
26591   withval="$with_ada_include"
26592
26593 else
26594   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26595 fi; if test -n "$prefix/share/ada/adainclude" ; then
26596
26597 if test "x$prefix" != xNONE; then
26598         cf_path_syntax="$prefix"
26599 else
26600         cf_path_syntax="$ac_default_prefix"
26601 fi
26602
26603 case ".$withval" in
26604 (.\$\(*\)*|.\'*\'*)
26605         ;;
26606 (..|./*|.\\*)
26607         ;;
26608 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26609         ;;
26610 (.\${*prefix}*|.\${*dir}*)
26611         eval withval="$withval"
26612         case ".$withval" in
26613         (.NONE/*)
26614                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26615                 ;;
26616         esac
26617         ;;
26618 (.no|.NONE/*)
26619         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26620         ;;
26621 (*)
26622         { { echo "$as_me:26622: error: expected a pathname, not \"$withval\"" >&5
26623 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26624    { (exit 1); exit 1; }; }
26625         ;;
26626 esac
26627
26628 fi
26629 eval ADA_INCLUDE="$withval"
26630
26631 echo "$as_me:26631: result: $ADA_INCLUDE" >&5
26632 echo "${ECHO_T}$ADA_INCLUDE" >&6
26633
26634 echo "$as_me:26634: checking for ada-objects" >&5
26635 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26636
26637 # Check whether --with-ada-objects or --without-ada-objects was given.
26638 if test "${with_ada_objects+set}" = set; then
26639   withval="$with_ada_objects"
26640
26641 else
26642   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26643 fi; if test -n "$prefix/lib/ada/adalib" ; then
26644
26645 if test "x$prefix" != xNONE; then
26646         cf_path_syntax="$prefix"
26647 else
26648         cf_path_syntax="$ac_default_prefix"
26649 fi
26650
26651 case ".$withval" in
26652 (.\$\(*\)*|.\'*\'*)
26653         ;;
26654 (..|./*|.\\*)
26655         ;;
26656 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26657         ;;
26658 (.\${*prefix}*|.\${*dir}*)
26659         eval withval="$withval"
26660         case ".$withval" in
26661         (.NONE/*)
26662                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26663                 ;;
26664         esac
26665         ;;
26666 (.no|.NONE/*)
26667         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26668         ;;
26669 (*)
26670         { { echo "$as_me:26670: error: expected a pathname, not \"$withval\"" >&5
26671 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26672    { (exit 1); exit 1; }; }
26673         ;;
26674 esac
26675
26676 fi
26677 eval ADA_OBJECTS="$withval"
26678
26679 echo "$as_me:26679: result: $ADA_OBJECTS" >&5
26680 echo "${ECHO_T}$ADA_OBJECTS" >&6
26681
26682 echo "$as_me:26682: checking if an Ada95 shared-library should be built" >&5
26683 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26684
26685 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26686 if test "${with_ada_sharedlib+set}" = set; then
26687   withval="$with_ada_sharedlib"
26688   with_ada_sharedlib=$withval
26689 else
26690   with_ada_sharedlib=no
26691 fi;
26692 echo "$as_me:26692: result: $with_ada_sharedlib" >&5
26693 echo "${ECHO_T}$with_ada_sharedlib" >&6
26694
26695 if test "x$with_ada_sharedlib" != xno
26696 then
26697         if test "x$cf_gnat_projects" != xyes
26698         then
26699                 { echo "$as_me:26699: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26700 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26701                 with_ada_sharedlib=no
26702         fi
26703 fi
26704
26705 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26706 MAKE_ADA_SHAREDLIB="#"
26707
26708 if test "x$with_ada_sharedlib" != xno
26709 then
26710         MAKE_ADA_SHAREDLIB=
26711         if test "x$with_ada_sharedlib" != xyes
26712         then
26713                 ADA_SHAREDLIB="$with_ada_sharedlib"
26714         fi
26715 fi
26716
26717                         # allow the Ada binding to be renamed
26718
26719 echo "$as_me:26719: checking for ada-libname" >&5
26720 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26721
26722 # Check whether --with-ada-libname or --without-ada-libname was given.
26723 if test "${with_ada_libname+set}" = set; then
26724   withval="$with_ada_libname"
26725   ADA_LIBNAME=$withval
26726 else
26727   ADA_LIBNAME=AdaCurses
26728 fi;
26729 case "x$ADA_LIBNAME" in
26730 (x|xyes|xno)
26731         ADA_LIBNAME=AdaCurses
26732         ;;
26733 esac
26734
26735 echo "$as_me:26735: result: $ADA_LIBNAME" >&5
26736 echo "${ECHO_T}$ADA_LIBNAME" >&6
26737
26738                 fi
26739         fi
26740 else
26741         cf_with_ada=no
26742 fi
26743
26744 # do this "late" to avoid conflict with header-checks
26745 if test "x$with_widec" = xyes ; then
26746         echo "$as_me:26746: checking for wchar_t" >&5
26747 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26748 if test "${ac_cv_type_wchar_t+set}" = set; then
26749   echo $ECHO_N "(cached) $ECHO_C" >&6
26750 else
26751   cat >conftest.$ac_ext <<_ACEOF
26752 #line 26752 "configure"
26753 #include "confdefs.h"
26754 $ac_includes_default
26755 int
26756 main (void)
26757 {
26758 if ((wchar_t *) 0)
26759   return 0;
26760 if (sizeof (wchar_t))
26761   return 0;
26762   ;
26763   return 0;
26764 }
26765 _ACEOF
26766 rm -f conftest.$ac_objext
26767 if { (eval echo "$as_me:26767: \"$ac_compile\"") >&5
26768   (eval $ac_compile) 2>&5
26769   ac_status=$?
26770   echo "$as_me:26770: \$? = $ac_status" >&5
26771   (exit $ac_status); } &&
26772          { ac_try='test -s conftest.$ac_objext'
26773   { (eval echo "$as_me:26773: \"$ac_try\"") >&5
26774   (eval $ac_try) 2>&5
26775   ac_status=$?
26776   echo "$as_me:26776: \$? = $ac_status" >&5
26777   (exit $ac_status); }; }; then
26778   ac_cv_type_wchar_t=yes
26779 else
26780   echo "$as_me: failed program was:" >&5
26781 cat conftest.$ac_ext >&5
26782 ac_cv_type_wchar_t=no
26783 fi
26784 rm -f conftest.$ac_objext conftest.$ac_ext
26785 fi
26786 echo "$as_me:26786: result: $ac_cv_type_wchar_t" >&5
26787 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26788
26789 echo "$as_me:26789: checking size of wchar_t" >&5
26790 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26791 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26792   echo $ECHO_N "(cached) $ECHO_C" >&6
26793 else
26794   if test "$ac_cv_type_wchar_t" = yes; then
26795   if test "$cross_compiling" = yes; then
26796   # Depending upon the size, compute the lo and hi bounds.
26797 cat >conftest.$ac_ext <<_ACEOF
26798 #line 26798 "configure"
26799 #include "confdefs.h"
26800 $ac_includes_default
26801 int
26802 main (void)
26803 {
26804 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26805   ;
26806   return 0;
26807 }
26808 _ACEOF
26809 rm -f conftest.$ac_objext
26810 if { (eval echo "$as_me:26810: \"$ac_compile\"") >&5
26811   (eval $ac_compile) 2>&5
26812   ac_status=$?
26813   echo "$as_me:26813: \$? = $ac_status" >&5
26814   (exit $ac_status); } &&
26815          { ac_try='test -s conftest.$ac_objext'
26816   { (eval echo "$as_me:26816: \"$ac_try\"") >&5
26817   (eval $ac_try) 2>&5
26818   ac_status=$?
26819   echo "$as_me:26819: \$? = $ac_status" >&5
26820   (exit $ac_status); }; }; then
26821   ac_lo=0 ac_mid=0
26822   while :; do
26823     cat >conftest.$ac_ext <<_ACEOF
26824 #line 26824 "configure"
26825 #include "confdefs.h"
26826 $ac_includes_default
26827 int
26828 main (void)
26829 {
26830 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26831   ;
26832   return 0;
26833 }
26834 _ACEOF
26835 rm -f conftest.$ac_objext
26836 if { (eval echo "$as_me:26836: \"$ac_compile\"") >&5
26837   (eval $ac_compile) 2>&5
26838   ac_status=$?
26839   echo "$as_me:26839: \$? = $ac_status" >&5
26840   (exit $ac_status); } &&
26841          { ac_try='test -s conftest.$ac_objext'
26842   { (eval echo "$as_me:26842: \"$ac_try\"") >&5
26843   (eval $ac_try) 2>&5
26844   ac_status=$?
26845   echo "$as_me:26845: \$? = $ac_status" >&5
26846   (exit $ac_status); }; }; then
26847   ac_hi=$ac_mid; break
26848 else
26849   echo "$as_me: failed program was:" >&5
26850 cat conftest.$ac_ext >&5
26851 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
26852 fi
26853 rm -f conftest.$ac_objext conftest.$ac_ext
26854   done
26855 else
26856   echo "$as_me: failed program was:" >&5
26857 cat conftest.$ac_ext >&5
26858 ac_hi=-1 ac_mid=-1
26859   while :; do
26860     cat >conftest.$ac_ext <<_ACEOF
26861 #line 26861 "configure"
26862 #include "confdefs.h"
26863 $ac_includes_default
26864 int
26865 main (void)
26866 {
26867 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
26868   ;
26869   return 0;
26870 }
26871 _ACEOF
26872 rm -f conftest.$ac_objext
26873 if { (eval echo "$as_me:26873: \"$ac_compile\"") >&5
26874   (eval $ac_compile) 2>&5
26875   ac_status=$?
26876   echo "$as_me:26876: \$? = $ac_status" >&5
26877   (exit $ac_status); } &&
26878          { ac_try='test -s conftest.$ac_objext'
26879   { (eval echo "$as_me:26879: \"$ac_try\"") >&5
26880   (eval $ac_try) 2>&5
26881   ac_status=$?
26882   echo "$as_me:26882: \$? = $ac_status" >&5
26883   (exit $ac_status); }; }; then
26884   ac_lo=$ac_mid; break
26885 else
26886   echo "$as_me: failed program was:" >&5
26887 cat conftest.$ac_ext >&5
26888 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
26889 fi
26890 rm -f conftest.$ac_objext conftest.$ac_ext
26891   done
26892 fi
26893 rm -f conftest.$ac_objext conftest.$ac_ext
26894 # Binary search between lo and hi bounds.
26895 while test "x$ac_lo" != "x$ac_hi"; do
26896   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26897   cat >conftest.$ac_ext <<_ACEOF
26898 #line 26898 "configure"
26899 #include "confdefs.h"
26900 $ac_includes_default
26901 int
26902 main (void)
26903 {
26904 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26905   ;
26906   return 0;
26907 }
26908 _ACEOF
26909 rm -f conftest.$ac_objext
26910 if { (eval echo "$as_me:26910: \"$ac_compile\"") >&5
26911   (eval $ac_compile) 2>&5
26912   ac_status=$?
26913   echo "$as_me:26913: \$? = $ac_status" >&5
26914   (exit $ac_status); } &&
26915          { ac_try='test -s conftest.$ac_objext'
26916   { (eval echo "$as_me:26916: \"$ac_try\"") >&5
26917   (eval $ac_try) 2>&5
26918   ac_status=$?
26919   echo "$as_me:26919: \$? = $ac_status" >&5
26920   (exit $ac_status); }; }; then
26921   ac_hi=$ac_mid
26922 else
26923   echo "$as_me: failed program was:" >&5
26924 cat conftest.$ac_ext >&5
26925 ac_lo=`expr $ac_mid + 1`
26926 fi
26927 rm -f conftest.$ac_objext conftest.$ac_ext
26928 done
26929 ac_cv_sizeof_wchar_t=$ac_lo
26930 else
26931   if test "$cross_compiling" = yes; then
26932   { { echo "$as_me:26932: error: cannot run test program while cross compiling" >&5
26933 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26934    { (exit 1); exit 1; }; }
26935 else
26936   cat >conftest.$ac_ext <<_ACEOF
26937 #line 26937 "configure"
26938 #include "confdefs.h"
26939 $ac_includes_default
26940 int
26941 main (void)
26942 {
26943 FILE *f = fopen ("conftest.val", "w");
26944 if (!f)
26945   $ac_main_return (1);
26946 fprintf (f, "%d", (sizeof (wchar_t)));
26947 fclose (f);
26948   ;
26949   return 0;
26950 }
26951 _ACEOF
26952 rm -f conftest$ac_exeext
26953 if { (eval echo "$as_me:26953: \"$ac_link\"") >&5
26954   (eval $ac_link) 2>&5
26955   ac_status=$?
26956   echo "$as_me:26956: \$? = $ac_status" >&5
26957   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26958   { (eval echo "$as_me:26958: \"$ac_try\"") >&5
26959   (eval $ac_try) 2>&5
26960   ac_status=$?
26961   echo "$as_me:26961: \$? = $ac_status" >&5
26962   (exit $ac_status); }; }; then
26963   ac_cv_sizeof_wchar_t=`cat conftest.val`
26964 else
26965   echo "$as_me: program exited with status $ac_status" >&5
26966 echo "$as_me: failed program was:" >&5
26967 cat conftest.$ac_ext >&5
26968 fi
26969 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26970 fi
26971 fi
26972 rm -f conftest.val
26973 else
26974   ac_cv_sizeof_wchar_t=0
26975 fi
26976 fi
26977 echo "$as_me:26977: result: $ac_cv_sizeof_wchar_t" >&5
26978 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
26979 cat >>confdefs.h <<EOF
26980 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
26981 EOF
26982
26983         # cross-compiling to mingw can run into the problem that attempting to
26984         # link with the regex library fails, causing the test to not set this to
26985         # a number.  "recent" autoconf does not address this problem either -TD
26986         if test -z "$ac_cv_sizeof_wchar_t"
26987         then
26988                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
26989
26990 echo "${as_me:-configure}:26990: testing test failed (assume 2) ..." 1>&5
26991
26992                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
26993                 mv confdefs.tmp confdefs.h
26994                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
26995         fi
26996 fi
26997
26998 ### Construct the ncurses library-subsets, if any, from this set of keywords:
26999 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27000 ###
27001 ### ticlib modules may be a separate library, otherwise contained in termlib.
27002 ### termlib modules may be a separate library, otherwise contained in ncurses.
27003 ###
27004 ### The of "+" or " " between the tokens controls the way the script
27005 ### chooses to split module lists into libraries.
27006 ###
27007 ### (see CF_LIB_RULES).
27008 echo "$as_me:27008: checking for library subsets" >&5
27009 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27010 LIB_SUBSETS=
27011
27012 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27013         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27014         if test "$with_ticlib" != no ; then
27015                 LIB_SUBSETS="${LIB_SUBSETS} "
27016         else
27017                 LIB_SUBSETS="${LIB_SUBSETS}+"
27018         fi
27019 fi
27020
27021 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27022 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27023
27024 if test "$with_termlib" != no ; then
27025         LIB_SUBSETS="${LIB_SUBSETS} "
27026 else
27027         LIB_SUBSETS="${LIB_SUBSETS}+"
27028 fi
27029
27030 LIB_SUBSETS="${LIB_SUBSETS}base"
27031
27032 # Most term-driver calls are to tinfo, but some like init_pair are to the
27033 # base library (so it resides in base).
27034 if test "$with_term_driver" != no ; then
27035         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27036         case $cf_cv_system_name in
27037         (*mingw32*|*mingw64*)
27038                 if test "x$with_exp_win32" = xyes ; then
27039                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27040                 else
27041                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27042                 fi
27043                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27044                 ;;
27045         (*)
27046                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27047                 ;;
27048         esac
27049 elif test "x$with_exp_win32" = xyes ; then
27050         case $cf_cv_system_name in
27051         (*mingw32*|*mingw64*)
27052                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27053                 ;;
27054         (*)
27055                 ;;
27056         esac
27057 fi
27058
27059 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27060 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27061
27062 echo "$as_me:27062: result: $LIB_SUBSETS" >&5
27063 echo "${ECHO_T}$LIB_SUBSETS" >&6
27064
27065 ### Construct the list of include-directories to be generated
27066
27067 if test "$srcdir" != "."; then
27068         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27069 fi
27070 CPPFLAGS="-I../include $CPPFLAGS"
27071 if test "$srcdir" != "."; then
27072         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27073 fi
27074 CPPFLAGS="-I. $CPPFLAGS"
27075
27076 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27077 if test "$srcdir" != "."; then
27078         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27079 fi
27080 if test "$GCC" != yes; then
27081         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27082 elif test "$includedir" != "/usr/include"; then
27083         if test "$includedir" = '${prefix}/include' ; then
27084                 if test x$prefix != x/usr ; then
27085                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27086                 fi
27087         else
27088                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27089         fi
27090 fi
27091
27092 ### Build up pieces for makefile rules
27093 echo "$as_me:27093: checking default library suffix" >&5
27094 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27095
27096         case $DFT_LWR_MODEL in
27097         (libtool) DFT_ARG_SUFFIX=''   ;;
27098         (normal)  DFT_ARG_SUFFIX=''   ;;
27099         (debug)   DFT_ARG_SUFFIX='_g' ;;
27100         (profile) DFT_ARG_SUFFIX='_p' ;;
27101         (shared)  DFT_ARG_SUFFIX=''   ;;
27102         esac
27103         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27104 echo "$as_me:27104: result: $DFT_ARG_SUFFIX" >&5
27105 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27106
27107 echo "$as_me:27107: checking default library-dependency suffix" >&5
27108 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27109
27110         case X$DFT_LWR_MODEL in
27111         (Xlibtool)
27112                 DFT_LIB_SUFFIX='.la'
27113                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27114                 ;;
27115         (Xdebug)
27116                 case $cf_cv_system_name in
27117                 (*-msvc*)
27118                         DFT_LIB_SUFFIX='_g.lib'
27119                         ;;
27120                 (*)
27121                         DFT_LIB_SUFFIX='_g.a'
27122                         ;;
27123                 esac
27124                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27125                 ;;
27126         (Xprofile)
27127                 case $cf_cv_system_name in
27128                 (*-msvc*)
27129                         DFT_LIB_SUFFIX='_p.lib'
27130                         ;;
27131                 (*)
27132                         DFT_LIB_SUFFIX='_p.a'
27133                         ;;
27134                 esac
27135                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27136                 ;;
27137         (Xshared)
27138                 case $cf_cv_system_name in
27139                 (aix[5-7]*)
27140                         DFT_LIB_SUFFIX='.so'
27141                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27142                         ;;
27143                 (*-msvc*)
27144                         DFT_LIB_SUFFIX='.dll'
27145                         DFT_DEP_SUFFIX='.dll.lib'
27146                         ;;
27147                 (cygwin*|msys*|mingw*)
27148                         DFT_LIB_SUFFIX='.dll'
27149                         DFT_DEP_SUFFIX='.dll.a'
27150                         ;;
27151                 (darwin*)
27152                         DFT_LIB_SUFFIX='.dylib'
27153                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27154                         ;;
27155                 (hpux*)
27156                         case $target in
27157                         (ia64*)
27158                                 DFT_LIB_SUFFIX='.so'
27159                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27160                                 ;;
27161                         (*)
27162                                 DFT_LIB_SUFFIX='.sl'
27163                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27164                                 ;;
27165                         esac
27166                         ;;
27167                 (*)
27168                         DFT_LIB_SUFFIX='.so'
27169                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27170                         ;;
27171                 esac
27172                 ;;
27173         (*)
27174                 case $target in
27175                 (*-msvc*)
27176                         DFT_LIB_SUFFIX='.lib'
27177                         ;;
27178                 (*)
27179                         DFT_LIB_SUFFIX='.a'
27180                         ;;
27181                 esac
27182                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27183                 ;;
27184         esac
27185         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27186         then
27187                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27188                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27189         fi
27190 echo "$as_me:27190: result: $DFT_DEP_SUFFIX" >&5
27191 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27192
27193 echo "$as_me:27193: checking default object directory" >&5
27194 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27195
27196         case $DFT_LWR_MODEL in
27197         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27198         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27199         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27200         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27201         (shared)
27202                 case $cf_cv_system_name in
27203                 (cygwin|msys)
27204                         DFT_OBJ_SUBDIR='objects' ;;
27205                 (*)
27206                         DFT_OBJ_SUBDIR='obj_s' ;;
27207                 esac
27208         esac
27209 echo "$as_me:27209: result: $DFT_OBJ_SUBDIR" >&5
27210 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27211
27212 if test "x$cf_with_cxx" = xyes ; then
27213 echo "$as_me:27213: checking c++ library-dependency suffix" >&5
27214 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27215 if test "$with_libtool" != "no"; then
27216         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27217         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27218 elif test "$with_shared_cxx" != "no"; then
27219         # also for g++ users...
27220         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27221 else
27222         # we normally make a static library because C/C++ library rules differ
27223
27224         case Xnormal in
27225         (Xlibtool)
27226                 CXX_LIB_SUFFIX='.la'
27227                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27228                 ;;
27229         (Xdebug)
27230                 case $cf_cv_system_name in
27231                 (*-msvc*)
27232                         CXX_LIB_SUFFIX='_g.lib'
27233                         ;;
27234                 (*)
27235                         CXX_LIB_SUFFIX='_g.a'
27236                         ;;
27237                 esac
27238                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27239                 ;;
27240         (Xprofile)
27241                 case $cf_cv_system_name in
27242                 (*-msvc*)
27243                         CXX_LIB_SUFFIX='_p.lib'
27244                         ;;
27245                 (*)
27246                         CXX_LIB_SUFFIX='_p.a'
27247                         ;;
27248                 esac
27249                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27250                 ;;
27251         (Xshared)
27252                 case $cf_cv_system_name in
27253                 (aix[5-7]*)
27254                         CXX_LIB_SUFFIX='.so'
27255                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27256                         ;;
27257                 (*-msvc*)
27258                         CXX_LIB_SUFFIX='.dll'
27259                         CXX_DEP_SUFFIX='.dll.lib'
27260                         ;;
27261                 (cygwin*|msys*|mingw*)
27262                         CXX_LIB_SUFFIX='.dll'
27263                         CXX_DEP_SUFFIX='.dll.a'
27264                         ;;
27265                 (darwin*)
27266                         CXX_LIB_SUFFIX='.dylib'
27267                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27268                         ;;
27269                 (hpux*)
27270                         case $target in
27271                         (ia64*)
27272                                 CXX_LIB_SUFFIX='.so'
27273                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27274                                 ;;
27275                         (*)
27276                                 CXX_LIB_SUFFIX='.sl'
27277                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27278                                 ;;
27279                         esac
27280                         ;;
27281                 (*)
27282                         CXX_LIB_SUFFIX='.so'
27283                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27284                         ;;
27285                 esac
27286                 ;;
27287         (*)
27288                 case $target in
27289                 (*-msvc*)
27290                         CXX_LIB_SUFFIX='.lib'
27291                         ;;
27292                 (*)
27293                         CXX_LIB_SUFFIX='.a'
27294                         ;;
27295                 esac
27296                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27297                 ;;
27298         esac
27299         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27300         then
27301                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27302                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27303         fi
27304
27305 fi
27306 echo "$as_me:27306: result: $CXX_LIB_SUFFIX" >&5
27307 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27308
27309 fi
27310
27311 # do not want -ldl in build except as needed for -lncurses dependency
27312 if test "x$with_dlsym" = xyes ; then
27313 if test $DFT_LWR_MODEL = shared || \
27314    test $DFT_LWR_MODEL = libtool ; then
27315
27316 # remove dl library from $LIBS
27317 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27318
27319 fi
27320 fi
27321 ### Set up low-level terminfo dependencies for makefiles.
27322
27323 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27324 # do not need libdl
27325 TICS_LIST=
27326 if test "x$with_dlsym" = xyes ; then
27327
27328 # remove dl library from $SHLIB_LIST
27329 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27330
27331 fi
27332
27333 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27334 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27335 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27336 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27337 then
27338         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27339 fi
27340
27341 if test "$with_ticlib" != no ; then
27342
27343         if test "x$with_ticlib" != xyes ; then
27344                 TICS_NAME=$with_ticlib
27345                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
27346                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27347                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27348                 TICS_LIB_SUFFIX="${with_ticlib}"
27349         else
27350                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27351                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27352                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27353                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27354         fi
27355         TICS_LDFLAGS="-L${LIB_DIR}"
27356         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27357 else
27358         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27359         TICS_LDFLAGS="-L${LIB_DIR}"
27360         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27361 fi
27362
27363 if test "$with_termlib" != no ; then
27364
27365         if test "x$with_termlib" != xyes ; then
27366                 TINFO_NAME=$with_termlib
27367                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
27368                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27369                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27370                 TINFO_LIB_SUFFIX="${with_termlib}"
27371         else
27372                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27373                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27374                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27375                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27376         fi
27377
27378         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27379         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27380         if test "$DFT_LWR_MODEL" = "libtool"; then
27381                 TEST_ARGS="${TEST_DEPS}"
27382                 TEST_ARG2="${TEST_DEP2}"
27383                 TINFO_LDFLAGS="-L${LIB_DIR}"
27384                 TINFO_LIBS="$TEST_ARGS"
27385                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27386                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27387         else
27388                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27389                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27390                 if test "x$with_term_driver" != xno ; then
27391                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27392                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27393                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27394                 else
27395                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27396                         TINFO_LIBS="$TEST_ARGS"
27397                 fi
27398                 TINFO_LDFLAGS="-L${LIB_DIR}"
27399                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27400         fi
27401 else
27402         # the next lines are needed for linking libtic over libncurses
27403         TINFO_NAME=${LIB_NAME}
27404         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27405         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27406         if test "x$with_tic_depends" = xyes ; then
27407                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27408         else
27409                 TICS_LIST="$SHLIB_LIST"
27410         fi
27411
27412         TINFO_LDFLAGS="-L${LIB_DIR}"
27413         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27414 fi
27415
27416 if test "$DFT_LWR_MODEL" = shared ; then
27417         case $cf_cv_system_name in
27418         (cygwin*|msys*)
27419                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27420                 TINFO_SUFFIX=.dll
27421                 ;;
27422         esac
27423 fi
27424
27425 if test "x$with_dlsym" = xyes ; then
27426
27427 # remove dl library from $TICS_LIST
27428 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27429
27430 fi
27431
27432 if test "$DFT_LWR_MODEL" = "libtool"; then
27433         OBJEXT=lo
27434 fi
27435
27436 # needed for Ada95
27437 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27438
27439 case $DFT_LWR_MODEL in
27440 (normal|debug|profile)
27441
27442 if test "$GCC" = yes ; then
27443         case $cf_cv_system_name in
27444         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27445                 LDFLAGS_STATIC=
27446                 LDFLAGS_SHARED=
27447                 ;;
27448         (*)     # normally, except when broken
27449                 LDFLAGS_STATIC=-static
27450                 LDFLAGS_SHARED=-dynamic
27451                 ;;
27452         esac
27453 else
27454         case $cf_cv_system_name in
27455         (aix[4-7]*)     # from ld manpage
27456                 LDFLAGS_STATIC=-bstatic
27457                 LDFLAGS_SHARED=-bdynamic
27458                 ;;
27459         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27460                 # We could also use just "archive" and "shared".
27461                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27462                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27463                 ;;
27464         (irix*)         # from ld manpage IRIX64
27465                 LDFLAGS_STATIC=-Bstatic
27466                 LDFLAGS_SHARED=-Bdynamic
27467                 ;;
27468         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27469                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27470                 LDFLAGS_STATIC=-noso
27471                 LDFLAGS_SHARED=-so_archive
27472                 ;;
27473         (solaris2*)
27474                 LDFLAGS_STATIC=-Bstatic
27475                 LDFLAGS_SHARED=-Bdynamic
27476                 ;;
27477         esac
27478 fi
27479
27480 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27481 then
27482         echo "$as_me:27482: checking if linker supports switching between static/dynamic" >&5
27483 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27484
27485         rm -f libconftest.a
27486         cat >conftest.$ac_ext <<EOF
27487 #line 27487 "configure"
27488 #include <stdio.h>
27489 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27490 EOF
27491         if { (eval echo "$as_me:27491: \"$ac_compile\"") >&5
27492   (eval $ac_compile) 2>&5
27493   ac_status=$?
27494   echo "$as_me:27494: \$? = $ac_status" >&5
27495   (exit $ac_status); } ; then
27496                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27497                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27498         fi
27499         rm -f conftest.*
27500
27501         cf_save_LIBS="$LIBS"
27502
27503         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27504         cat >conftest.$ac_ext <<_ACEOF
27505 #line 27505 "configure"
27506 #include "confdefs.h"
27507
27508 #line 27508 "configure"
27509 #include <stdio.h>
27510 int cf_ldflags_static(FILE *fp);
27511
27512 int
27513 main (void)
27514 {
27515
27516         return cf_ldflags_static(stdin);
27517
27518   ;
27519   return 0;
27520 }
27521 _ACEOF
27522 rm -f conftest.$ac_objext conftest$ac_exeext
27523 if { (eval echo "$as_me:27523: \"$ac_link\"") >&5
27524   (eval $ac_link) 2>&5
27525   ac_status=$?
27526   echo "$as_me:27526: \$? = $ac_status" >&5
27527   (exit $ac_status); } &&
27528          { ac_try='test -s conftest$ac_exeext'
27529   { (eval echo "$as_me:27529: \"$ac_try\"") >&5
27530   (eval $ac_try) 2>&5
27531   ac_status=$?
27532   echo "$as_me:27532: \$? = $ac_status" >&5
27533   (exit $ac_status); }; }; then
27534
27535         # some linkers simply ignore the -dynamic
27536         case x`file conftest$ac_exeext 2>/dev/null` in
27537         (*static*)
27538                 cf_ldflags_static=no
27539                 ;;
27540         (*)
27541                 cf_ldflags_static=yes
27542                 ;;
27543         esac
27544
27545 else
27546   echo "$as_me: failed program was:" >&5
27547 cat conftest.$ac_ext >&5
27548 cf_ldflags_static=no
27549 fi
27550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27551
27552         rm -f libconftest.*
27553         LIBS="$cf_save_LIBS"
27554
27555         echo "$as_me:27555: result: $cf_ldflags_static" >&5
27556 echo "${ECHO_T}$cf_ldflags_static" >&6
27557
27558         if test $cf_ldflags_static != yes
27559         then
27560                 LDFLAGS_STATIC=
27561                 LDFLAGS_SHARED=
27562         fi
27563 else
27564         LDFLAGS_STATIC=
27565         LDFLAGS_SHARED=
27566 fi
27567
27568         ;;
27569 esac
27570
27571 echo "$as_me:27571: checking where we will install curses.h" >&5
27572 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27573
27574 includesubdir=
27575 if test "$with_overwrite" = no && \
27576  ( test "x$includedir" = 'x${prefix}/include' || \
27577    test "x$includedir" = "x${prefix}/include" )
27578 then
27579         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27580 fi
27581 echo "$as_me:27581: result: ${includedir}${includesubdir}" >&5
27582 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27583
27584 ### Resolve a conflict between normal and wide-curses by forcing applications
27585 ### that will need libutf8 to add it to their configure script.
27586 if test "$with_overwrite" != no ; then
27587 if test "$NCURSES_LIBUTF8" = 1 ; then
27588         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27589         { echo "$as_me:27589: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27590 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27591 fi
27592 fi
27593 WITH_OVERWRITE=$with_overwrite
27594
27595 ### At least on MinGW a shared library build without libtool
27596 ### requires adding the additional libs to the link list.
27597 case $cf_cv_system_name in
27598 (*mingw32*|*mingw64*)
27599         if test "$DFT_LWR_MODEL" != "libtool"; then
27600            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27601         fi
27602         ;;
27603 *)      ;;
27604 esac
27605
27606 # used to separate tack out of the tree
27607 NCURSES_TREE=
27608
27609 ### predefined stuff for the test programs
27610
27611 cat >>confdefs.h <<\EOF
27612 #define HAVE_SLK_COLOR 1
27613 EOF
27614
27615 # pkgsrc uses these
27616
27617 echo "$as_me:27617: checking for desired basename for form library" >&5
27618 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27619
27620 # Check whether --with-form-libname or --without-form-libname was given.
27621 if test "${with_form_libname+set}" = set; then
27622   withval="$with_form_libname"
27623   with_lib_basename=$withval
27624 else
27625   with_lib_basename=form
27626 fi;
27627 FORM_NAME="$with_lib_basename"
27628
27629 case "x$FORM_NAME" in
27630 (x|xno|xnone|xyes)
27631         FORM_NAME=form
27632         ;;
27633 (*)
27634         ;;
27635 esac
27636
27637 echo "$as_me:27637: result: $FORM_NAME" >&5
27638 echo "${ECHO_T}$FORM_NAME" >&6
27639
27640 echo "$as_me:27640: checking for desired basename for menu library" >&5
27641 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27642
27643 # Check whether --with-menu-libname or --without-menu-libname was given.
27644 if test "${with_menu_libname+set}" = set; then
27645   withval="$with_menu_libname"
27646   with_lib_basename=$withval
27647 else
27648   with_lib_basename=menu
27649 fi;
27650 MENU_NAME="$with_lib_basename"
27651
27652 case "x$MENU_NAME" in
27653 (x|xno|xnone|xyes)
27654         MENU_NAME=menu
27655         ;;
27656 (*)
27657         ;;
27658 esac
27659
27660 echo "$as_me:27660: result: $MENU_NAME" >&5
27661 echo "${ECHO_T}$MENU_NAME" >&6
27662
27663 echo "$as_me:27663: checking for desired basename for panel library" >&5
27664 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27665
27666 # Check whether --with-panel-libname or --without-panel-libname was given.
27667 if test "${with_panel_libname+set}" = set; then
27668   withval="$with_panel_libname"
27669   with_lib_basename=$withval
27670 else
27671   with_lib_basename=panel
27672 fi;
27673 PANEL_NAME="$with_lib_basename"
27674
27675 case "x$PANEL_NAME" in
27676 (x|xno|xnone|xyes)
27677         PANEL_NAME=panel
27678         ;;
27679 (*)
27680         ;;
27681 esac
27682
27683 echo "$as_me:27683: result: $PANEL_NAME" >&5
27684 echo "${ECHO_T}$PANEL_NAME" >&6
27685
27686 echo "$as_me:27686: checking for desired basename for cxx library" >&5
27687 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27688
27689 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27690 if test "${with_cxx_libname+set}" = set; then
27691   withval="$with_cxx_libname"
27692   with_lib_basename=$withval
27693 else
27694   with_lib_basename=ncurses++
27695 fi;
27696 CXX_NAME="$with_lib_basename"
27697
27698 case "x$CXX_NAME" in
27699 (x|xno|xnone|xyes)
27700         CXX_NAME=ncurses++
27701         ;;
27702 (*)
27703         ;;
27704 esac
27705
27706 echo "$as_me:27706: result: $CXX_NAME" >&5
27707 echo "${ECHO_T}$CXX_NAME" >&6
27708
27709 ### Construct the list of subdirectories for which we'll customize makefiles
27710 ### with the appropriate compile-rules.
27711
27712 echo "$as_me:27712: checking for src modules" >&5
27713 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27714
27715 # dependencies and linker-arguments for test-programs
27716 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27717 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27718 if test "$DFT_LWR_MODEL" = "libtool"; then
27719         TEST_ARGS="${TEST_DEPS}"
27720         TEST_ARG2="${TEST_DEP2}"
27721 else
27722         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27723         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27724 fi
27725
27726 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27727 cf_cv_src_modules=
27728 for cf_dir in $modules_to_build
27729 do
27730         if test -f $srcdir/$cf_dir/modules; then
27731
27732                 # We may/may not have tack in the distribution, though the
27733                 # makefile is.
27734                 if test $cf_dir = tack ; then
27735                         if test "x$cf_with_tack" != "xyes"; then
27736                                 continue
27737                         fi
27738                 fi
27739
27740                 if test -z "$cf_cv_src_modules"; then
27741                         cf_cv_src_modules=$cf_dir
27742                 else
27743                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27744                 fi
27745
27746                 # Make the ncurses_cfg.h file record the library interface files as
27747                 # well.  These are header files that are the same name as their
27748                 # directory.  Ncurses is the only library that does not follow
27749                 # that pattern.
27750                 if test $cf_dir = tack ; then
27751                         continue
27752                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
27753
27754 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27755
27756                         cat >>confdefs.h <<EOF
27757 #define HAVE_${cf_have_include}_H 1
27758 EOF
27759
27760                         cat >>confdefs.h <<EOF
27761 #define HAVE_LIB${cf_have_include} 1
27762 EOF
27763
27764 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27765
27766 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
27767
27768                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27769                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27770                         if test "$DFT_LWR_MODEL" = "libtool"; then
27771                                 TEST_ARGS="${TEST_DEPS}"
27772                                 TEST_ARG2="${TEST_DEP2}"
27773                         else
27774                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27775                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27776                         fi
27777                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27778                 fi
27779         fi
27780 done
27781 echo "$as_me:27781: result: $cf_cv_src_modules" >&5
27782 echo "${ECHO_T}$cf_cv_src_modules" >&6
27783
27784 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27785 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27786
27787 SRC_SUBDIRS=
27788 if test "x$cf_with_manpages" != xno ; then
27789         SRC_SUBDIRS="$SRC_SUBDIRS man"
27790 fi
27791 SRC_SUBDIRS="$SRC_SUBDIRS include"
27792 for cf_dir in $cf_cv_src_modules
27793 do
27794         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27795 done
27796 if test "x$cf_with_tests" != "xno" ; then
27797         SRC_SUBDIRS="$SRC_SUBDIRS test"
27798 fi
27799 # always make this, to install the ncurses-config script
27800 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27801 if test "$cf_with_cxx_binding" != no; then
27802         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27803         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27804 fi
27805
27806 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27807 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27808
27809 ADA_SUBDIRS=
27810 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
27811         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
27812         ADA_SUBDIRS="gen src"
27813         if test "x$cf_with_tests" != "xno" ; then
27814                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
27815         fi
27816 fi
27817
27818 SUB_MAKEFILES=
27819 for cf_dir in $SRC_SUBDIRS
27820 do
27821         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
27822 done
27823
27824 if test -n "$ADA_SUBDIRS"; then
27825         for cf_dir in $ADA_SUBDIRS
27826         do
27827                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
27828         done
27829
27830 fi
27831
27832 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27833    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
27834    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
27835    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
27836 fi
27837
27838 DIRS_TO_MAKE="lib"
27839 for cf_item in $cf_list_models
27840 do
27841
27842         case $cf_item in
27843         (libtool) cf_subdir='obj_lo'  ;;
27844         (normal)  cf_subdir='objects' ;;
27845         (debug)   cf_subdir='obj_g' ;;
27846         (profile) cf_subdir='obj_p' ;;
27847         (shared)
27848                 case $cf_cv_system_name in
27849                 (cygwin|msys)
27850                         cf_subdir='objects' ;;
27851                 (*)
27852                         cf_subdir='obj_s' ;;
27853                 esac
27854         esac
27855
27856         for cf_item2 in $DIRS_TO_MAKE
27857         do
27858                 test $cf_item2 = $cf_subdir && break
27859         done
27860         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
27861 done
27862 for cf_dir in $DIRS_TO_MAKE
27863 do
27864         test ! -d $cf_dir && mkdir $cf_dir
27865 done
27866
27867 # symbols that differ when compiling Ada95 by itself.
27868 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
27869
27870 # values to use as strings
27871
27872 cat >>confdefs.h <<EOF
27873 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
27874 EOF
27875
27876 cat >>confdefs.h <<EOF
27877 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
27878 EOF
27879
27880 ### Define substitutions for header files to avoid name-pollution
27881
27882 if test "x$cf_cv_have_tcgetattr" = xyes ; then
27883         HAVE_TCGETATTR=1
27884 else
27885         HAVE_TCGETATTR=0
27886 fi
27887
27888 if test "x$ac_cv_header_stdint_h" = xyes ; then
27889         HAVE_STDINT_H=1
27890 else
27891         HAVE_STDINT_H=0
27892 fi
27893
27894 if test "x$ac_cv_header_termio_h" = xyes ; then
27895         HAVE_TERMIO_H=1
27896 else
27897         HAVE_TERMIO_H=0
27898 fi
27899
27900 if test "x$ac_cv_header_termios_h" = xyes ; then
27901         HAVE_TERMIOS_H=1
27902 else
27903         HAVE_TERMIOS_H=0
27904 fi
27905
27906 ################################################################################
27907 test "x$use_database" = xyes && \
27908 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
27909
27910 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
27911 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
27912
27913 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
27914 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
27915 fi
27916
27917 if test "x$cf_with_tests" != xno ; then
27918         MAKE_TESTS=
27919 else
27920         MAKE_TESTS="#"
27921 fi
27922
27923 ADAHTML_DIR=../../doc/html/ada
27924
27925 # workaround for OS/2 (20151017)
27926 case $cf_cv_system_name in
27927 (os2*)
27928         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
27929         ;;
27930 (*)
27931         LIBTOOL_OPTS_CXX=
27932         ;;
27933 esac
27934
27935 # workaround for g++ versus Solaris (20131116)
27936 case $cf_cv_system_name in
27937 (solaris2*)
27938         case "x$CPPFLAGS" in
27939         (*-D_XOPEN_SOURCE_EXTENDED*)
27940                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
27941
27942 echo "${as_me:-configure}:27942: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
27943
27944                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
27945                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
27946                 ;;
27947         esac
27948         ;;
27949 esac
27950
27951 # Help to automatically enable the extended curses features when using either
27952 # the *-config or the ".pc" files by adding defines.
27953 echo "$as_me:27953: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
27954 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
27955 PKG_CFLAGS=
27956 for cf_loop1 in $CPPFLAGS_after_XOPEN
27957 do
27958         cf_found=no
27959         for cf_loop2 in $CPPFLAGS_before_XOPEN
27960         do
27961                 if test "x$cf_loop1" = "x$cf_loop2"
27962                 then
27963                         cf_found=yes
27964                         break
27965                 fi
27966         done
27967         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
27968 done
27969 echo "$as_me:27969: result: $PKG_CFLAGS" >&5
27970 echo "${ECHO_T}$PKG_CFLAGS" >&6
27971
27972 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
27973 case "x$NCURSES_OSPEED" in
27974 (*short*)
27975         cf_compatible=1
27976         ;;
27977 (*)
27978         cf_compatible=0
27979         ;;
27980 esac
27981
27982 cat >>confdefs.h <<EOF
27983 #define NCURSES_OSPEED_COMPAT $cf_compatible
27984 EOF
27985
27986 case "x$cf_cv_typeof_chtype" in
27987 (xshort|xint|xlong)
27988         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
27989         ;;
27990 esac
27991
27992 case "x$cf_cv_typeof_mmask_t" in
27993 (xshort|xint|xlong)
27994         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
27995         ;;
27996 esac
27997
27998 # substitute into misc/Makefile to suppress
27999 # (un)install.data from the
28000 # (un)install rules.
28001 if test "x$cf_with_db_install" = "xno"; then
28002         MISC_INSTALL_DATA=
28003         MISC_UNINSTALL_DATA=
28004 else
28005         MISC_INSTALL_DATA=install.data
28006         MISC_UNINSTALL_DATA=uninstall.data
28007 fi
28008
28009 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28010         MAKE_DATABASE="#"
28011 else
28012         MAKE_DATABASE="$MAKE_TERMINFO"
28013 fi
28014
28015 if test -n "$PACKAGE"
28016 then
28017         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28018         export PACKAGE
28019         echo "package: $PACKAGE"
28020 fi
28021
28022 UNALTERED_SYMS=
28023 cf_filter_syms=no
28024
28025 if test -n "$RESULTING_SYMS"
28026 then
28027         cf_filter_syms=$cf_dft_filter_syms
28028         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28029
28030 echo "${as_me:-configure}:28030: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28031
28032 fi
28033
28034 if test "x$WILDCARD_SYMS" = xno
28035 then
28036         cf_filter_syms=yes
28037 fi
28038
28039 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28040
28041 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28042 if test $cf_filter_syms = yes
28043 then
28044         RESULTING_SYMS=resulting.map
28045 fi
28046
28047 if test "x$cross_compiling" = xyes ; then
28048         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28049         CHECK_BUILD="#"
28050 else
28051         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28052         CHECK_BUILD=
28053 fi
28054
28055 # This is used for the *-config script and *.pc data files.
28056
28057 echo "$as_me:28057: checking for linker search path" >&5
28058 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28059 if test "${cf_cv_ld_searchpath+set}" = set; then
28060   echo $ECHO_N "(cached) $ECHO_C" >&6
28061 else
28062
28063 if test "$cross_compiling" != yes ; then
28064
28065 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28066 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28067
28068 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28069 # update the cache, which makes it run faster.
28070 test -z "$cf_pathlist" && \
28071         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
28072
28073 test -z "$cf_pathlist" &&
28074         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
28075
28076 # This works with OpenBSD 6.5, which lists only filenames
28077 test -z "$cf_pathlist" &&
28078         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28079
28080 if test -z "$cf_pathlist"
28081 then
28082         # dyld default path with MacOS
28083         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28084         then
28085                 # do this to bypass check
28086                 cf_cv_ld_searchpath='$HOME/lib'
28087                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28088         fi
28089 fi
28090
28091 if test -z "$cf_pathlist"
28092 then
28093         # Solaris is hardcoded
28094         if test -d /opt/SUNWspro/lib
28095         then
28096                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
28097         elif test -d /usr/ccs/lib
28098         then
28099                 cf_pathlist="/usr/ccs/lib /usr/lib"
28100         fi
28101 fi
28102
28103 fi
28104
28105 # If nothing else, assume it is conventional
28106 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28107
28108 # Finally, check that this is only directories
28109 for cf_path in $0 $cf_pathlist
28110 do
28111         if test -d "$cf_path"; then
28112                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28113                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28114         fi
28115 done
28116
28117 # Ensure that it is nonempty
28118 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28119
28120 fi
28121 echo "$as_me:28121: result: $cf_cv_ld_searchpath" >&5
28122 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28123
28124 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28125
28126 cat >>confdefs.h <<\EOF
28127 #define HAVE_CURSES_DATA_BOOLNAMES 1
28128 EOF
28129
28130 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"
28131 ac_config_commands="$ac_config_commands default"
28132 cat >confcache <<\_ACEOF
28133 # This file is a shell script that caches the results of configure
28134 # tests run on this system so they can be shared between configure
28135 # scripts and configure runs, see configure's option --config-cache.
28136 # It is not useful on other systems.  If it contains results you don't
28137 # want to keep, you may remove or edit it.
28138 #
28139 # config.status only pays attention to the cache file if you give it
28140 # the --recheck option to rerun configure.
28141 #
28142 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28143 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28144 # following values.
28145
28146 _ACEOF
28147
28148 # The following way of writing the cache mishandles newlines in values,
28149 # but we know of no workaround that is simple, portable, and efficient.
28150 # So, don't put newlines in cache variables' values.
28151 # Ultrix sh set writes to stderr and can't be redirected directly,
28152 # and sets the high bit in the cache file unless we assign to the vars.
28153 {
28154   (set) 2>&1 |
28155     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28156     *ac_space=\ *)
28157       # `set' does not quote correctly, so add quotes (double-quote
28158       # substitution turns \\\\ into \\, and sed turns \\ into \).
28159       sed -n \
28160         "s/'/'\\\\''/g;
28161           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28162       ;;
28163     *)
28164       # `set' quotes correctly as required by POSIX, so do not add quotes.
28165       sed -n \
28166         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28167       ;;
28168     esac;
28169 } |
28170   sed '
28171      t clear
28172      : clear
28173      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28174      t end
28175      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28176      : end' >>confcache
28177 if cmp -s $cache_file confcache; then :; else
28178   if test -w $cache_file; then
28179     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28180     cat confcache >$cache_file
28181   else
28182     echo "not updating unwritable cache $cache_file"
28183   fi
28184 fi
28185 rm -f confcache
28186
28187 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28188 # Let make expand exec_prefix.
28189 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28190
28191 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28192 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28193 # trailing colons and then remove the whole line if VPATH becomes empty
28194 # (actually we leave an empty line to preserve line numbers).
28195 if test "x$srcdir" = x.; then
28196   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28197 s/:*\$(srcdir):*/:/;
28198 s/:*\${srcdir}:*/:/;
28199 s/:*@srcdir@:*/:/;
28200 s/^\([^=]*=[    ]*\):*/\1/;
28201 s/:*$//;
28202 s/^[^=]*=[      ]*$//;
28203 }'
28204 fi
28205
28206 DEFS=-DHAVE_CONFIG_H
28207
28208 : ${CONFIG_STATUS=./config.status}
28209 ac_clean_files_save=$ac_clean_files
28210 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28211 { echo "$as_me:28211: creating $CONFIG_STATUS" >&5
28212 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28213 cat >$CONFIG_STATUS <<_ACEOF
28214 #! $SHELL
28215 # Generated automatically by configure.
28216 # Run this file to recreate the current configuration.
28217 # Compiler output produced by configure, useful for debugging
28218 # configure, is in config.log if it exists.
28219
28220 debug=false
28221 SHELL=\${CONFIG_SHELL-$SHELL}
28222 ac_cs_invocation="\$0 \$@"
28223
28224 CLICOLOR_FORCE= GREP_OPTIONS=
28225 unset CLICOLOR_FORCE GREP_OPTIONS
28226 _ACEOF
28227
28228 cat >>$CONFIG_STATUS <<\_ACEOF
28229 # Be Bourne compatible
28230 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28231   emulate sh
28232   NULLCMD=:
28233 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28234   set -o posix
28235 fi
28236
28237 # Name of the executable.
28238 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28239
28240 if expr a : '\(a\)' >/dev/null 2>&1; then
28241   as_expr=expr
28242 else
28243   as_expr=false
28244 fi
28245
28246 rm -f conf$$ conf$$.exe conf$$.file
28247 echo >conf$$.file
28248 if ln -s conf$$.file conf$$ 2>/dev/null; then
28249   # We could just check for DJGPP; but this test a) works b) is more generic
28250   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28251   if test -f conf$$.exe; then
28252     # Don't use ln at all; we don't have any links
28253     as_ln_s='cp -p'
28254   else
28255     as_ln_s='ln -s'
28256   fi
28257 elif ln conf$$.file conf$$ 2>/dev/null; then
28258   as_ln_s=ln
28259 else
28260   as_ln_s='cp -p'
28261 fi
28262 rm -f conf$$ conf$$.exe conf$$.file
28263
28264 as_executable_p="test -f"
28265
28266 # Support unset when possible.
28267 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28268   as_unset=unset
28269 else
28270   as_unset=false
28271 fi
28272
28273 # NLS nuisances.
28274 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28275 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28276 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28277 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28278 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28279 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28280 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28281 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28282
28283 # IFS
28284 # We need space, tab and new line, in precisely that order.
28285 as_nl='
28286 '
28287 IFS="   $as_nl"
28288
28289 # CDPATH.
28290 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28291
28292 exec 6>&1
28293
28294 _ACEOF
28295
28296 # Files that config.status was made for.
28297 if test -n "$ac_config_files"; then
28298   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
28299 fi
28300
28301 if test -n "$ac_config_headers"; then
28302   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
28303 fi
28304
28305 if test -n "$ac_config_links"; then
28306   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
28307 fi
28308
28309 if test -n "$ac_config_commands"; then
28310   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
28311 fi
28312
28313 cat >>$CONFIG_STATUS <<\EOF
28314
28315 ac_cs_usage="\
28316 \`$as_me' instantiates files from templates according to the
28317 current configuration.
28318
28319 Usage: $0 [OPTIONS] [FILE]...
28320
28321   -h, --help       print this help, then exit
28322   -V, --version    print version number, then exit
28323   -d, --debug      don't remove temporary files
28324       --recheck    update $as_me by reconfiguring in the same conditions
28325   --file=FILE[:TEMPLATE]
28326                    instantiate the configuration file FILE
28327   --header=FILE[:TEMPLATE]
28328                    instantiate the configuration header FILE
28329
28330 Configuration files:
28331 $config_files
28332
28333 Configuration headers:
28334 $config_headers
28335
28336 Configuration commands:
28337 $config_commands
28338
28339 Report bugs to <dickey@invisible-island.net>."
28340 EOF
28341
28342 cat >>$CONFIG_STATUS <<EOF
28343 ac_cs_version="\\
28344 config.status
28345 configured by $0, generated by GNU Autoconf 2.52.20200802,
28346   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28347
28348 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28349 Free Software Foundation, Inc.
28350 This config.status script is free software; the Free Software Foundation
28351 gives unlimited permission to copy, distribute and modify it."
28352 srcdir=$srcdir
28353 INSTALL="$INSTALL"
28354 EOF
28355
28356 cat >>$CONFIG_STATUS <<\EOF
28357 # If no file are specified by the user, then we need to provide default
28358 # value.  By we need to know if files were specified by the user.
28359 ac_need_defaults=:
28360 while test $# != 0
28361 do
28362   case $1 in
28363   --*=*)
28364     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28365     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28366     shift
28367     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28368     shift
28369     ;;
28370   -*);;
28371   *) # This is not an option, so the user has probably given explicit
28372      # arguments.
28373      ac_need_defaults=false;;
28374   esac
28375
28376   case $1 in
28377   # Handling of the options.
28378 EOF
28379 cat >>$CONFIG_STATUS <<EOF
28380   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28381     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28382     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28383 EOF
28384 cat >>$CONFIG_STATUS <<\EOF
28385   --version | --vers* | -V )
28386     echo "$ac_cs_version"; exit 0 ;;
28387   --he | --h)
28388     # Conflict between --help and --header
28389     { { echo "$as_me:28389: error: ambiguous option: $1
28390 Try \`$0 --help' for more information." >&5
28391 echo "$as_me: error: ambiguous option: $1
28392 Try \`$0 --help' for more information." >&2;}
28393    { (exit 1); exit 1; }; };;
28394   --help | --hel | -h )
28395     echo "$ac_cs_usage"; exit 0 ;;
28396   --debug | --d* | -d )
28397     debug=: ;;
28398   --file | --fil | --fi | --f )
28399     shift
28400     CONFIG_FILES="$CONFIG_FILES $1"
28401     ac_need_defaults=false;;
28402   --header | --heade | --head | --hea )
28403     shift
28404     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28405     ac_need_defaults=false;;
28406
28407   # This is an error.
28408   -*) { { echo "$as_me:28408: error: unrecognized option: $1
28409 Try \`$0 --help' for more information." >&5
28410 echo "$as_me: error: unrecognized option: $1
28411 Try \`$0 --help' for more information." >&2;}
28412    { (exit 1); exit 1; }; } ;;
28413
28414   *) ac_config_targets="$ac_config_targets $1" ;;
28415
28416   esac
28417   shift
28418 done
28419
28420 exec 5>>config.log
28421 cat >&5 << _ACEOF
28422
28423 ## ----------------------- ##
28424 ## Running config.status.  ##
28425 ## ----------------------- ##
28426
28427 This file was extended by $as_me 2.52.20200802, executed with
28428   CONFIG_FILES    = $CONFIG_FILES
28429   CONFIG_HEADERS  = $CONFIG_HEADERS
28430   CONFIG_LINKS    = $CONFIG_LINKS
28431   CONFIG_COMMANDS = $CONFIG_COMMANDS
28432   > $ac_cs_invocation
28433 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28434
28435 _ACEOF
28436 EOF
28437
28438 cat >>$CONFIG_STATUS <<EOF
28439 #
28440 # INIT-COMMANDS section.
28441 #
28442
28443 ### Special initialization commands, used to pass information from the
28444 ### configuration-run into config.status
28445
28446 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28447 AWK="$AWK"
28448 CXX_NAME="$CXX_NAME"
28449 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28450 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28451 ECHO_LD="$ECHO_LD"
28452 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28453 FORM_NAME="$FORM_NAME"
28454 LDCONFIG="$LDCONFIG"
28455 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28456 LIB_NAME="$LIB_NAME"
28457 LIB_PREFIX="$LIB_PREFIX"
28458 LIB_SUBSETS="$LIB_SUBSETS"
28459 LIB_SUFFIX="$LIB_SUFFIX"
28460 LIB_TRACING="$LIB_TRACING"
28461 LN_S="$LN_S"
28462 MAKE_TERMINFO="$MAKE_TERMINFO"
28463 MENU_NAME="$MENU_NAME"
28464 NCURSES_MAJOR="$NCURSES_MAJOR"
28465 NCURSES_MINOR="$NCURSES_MINOR"
28466 NCURSES_OSPEED="$NCURSES_OSPEED"
28467 NCURSES_PATCH="$NCURSES_PATCH"
28468 PANEL_NAME="$PANEL_NAME"
28469 SRC_SUBDIRS="$SRC_SUBDIRS"
28470 TERMINFO="$TERMINFO"
28471 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28472 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28473 TICS_NAME="$TICS_NAME"
28474 TICS_SUFFIX="$TICS_SUFFIX"
28475 TIC_PATH="$TIC_PATH"
28476 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28477 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28478 TINFO_NAME="$TINFO_NAME"
28479 TINFO_SUFFIX="$TINFO_SUFFIX"
28480 UNALTERED_SYMS="$UNALTERED_SYMS"
28481 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28482 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28483 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28484 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28485 WILDCARD_SYMS="$WILDCARD_SYMS"
28486 WITH_CURSES_H="$with_curses_h"
28487 WITH_ECHO="${enable_echo:=yes}"
28488 WITH_OVERWRITE="$with_overwrite"
28489 cf_LIST_MODELS="$cf_list_models"
28490 cf_cv_abi_version="$cf_cv_abi_version"
28491 cf_cv_do_relink="$cf_cv_do_relink"
28492 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28493 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28494 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28495 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28496 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28497 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28498 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28499 cf_cv_rel_version="$cf_cv_rel_version"
28500 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28501 cf_cv_shared_soname='$cf_cv_shared_soname'
28502 cf_cv_shlib_version="$cf_cv_shlib_version"
28503 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28504 cf_cv_system_name="$cf_cv_system_name"
28505 cf_cv_term_driver="$with_term_driver"
28506 cf_with_ada="$cf_with_ada"
28507 cf_with_cxx_binding="$cf_with_cxx_binding"
28508 cf_with_db_install="$cf_with_db_install"
28509 cf_with_manpages="$cf_with_manpages"
28510 cf_with_tests="$cf_with_tests"
28511 host="$host"
28512 target="$target"
28513 with_shared_cxx="$with_shared_cxx"
28514
28515 EOF
28516
28517 cat >>$CONFIG_STATUS <<\EOF
28518 for ac_config_target in $ac_config_targets
28519 do
28520   case "$ac_config_target" in
28521   # Handling of arguments.
28522   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28523   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28524   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28525   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28526   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28527   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28528   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28529   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28530   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28531   *) { { echo "$as_me:28531: error: invalid argument: $ac_config_target" >&5
28532 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28533    { (exit 1); exit 1; }; };;
28534   esac
28535 done
28536
28537 # If the user did not use the arguments to specify the items to instantiate,
28538 # then the envvar interface is used.  Set only those that are not.
28539 # We use the long form for the default assignment because of an extremely
28540 # bizarre bug on SunOS 4.1.3.
28541 if $ac_need_defaults; then
28542   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28543   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28544   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28545 fi
28546
28547 # Create a temporary directory, and hook for its removal unless debugging.
28548 $debug ||
28549 {
28550   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28551   trap '{ (exit 1); exit 1; }' 1 2 13 15
28552 }
28553
28554 # Create a (secure) tmp directory for tmp files.
28555 : ${TMPDIR=/tmp}
28556 {
28557   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28558   test -n "$tmp" && test -d "$tmp"
28559 }  ||
28560 {
28561   tmp=$TMPDIR/cs$$-$RANDOM
28562   (umask 077 && mkdir $tmp)
28563 } ||
28564 {
28565    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28566    { (exit 1); exit 1; }
28567 }
28568
28569 EOF
28570
28571 cat >>$CONFIG_STATUS <<EOF
28572
28573 #
28574 # CONFIG_FILES section.
28575 #
28576
28577 # No need to generate the scripts if there are no CONFIG_FILES.
28578 # This happens for instance when ./config.status config.h
28579 if test -n "\$CONFIG_FILES"; then
28580   # Protect against being on the right side of a sed subst in config.status.
28581   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28582    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28583 s,@SHELL@,$SHELL,;t t
28584 s,@exec_prefix@,$exec_prefix,;t t
28585 s,@prefix@,$prefix,;t t
28586 s,@program_transform_name@,$program_transform_name,;t t
28587 s,@bindir@,$bindir,;t t
28588 s,@sbindir@,$sbindir,;t t
28589 s,@libexecdir@,$libexecdir,;t t
28590 s,@datarootdir@,$datarootdir,;t t
28591 s,@datadir@,$datadir,;t t
28592 s,@sysconfdir@,$sysconfdir,;t t
28593 s,@sharedstatedir@,$sharedstatedir,;t t
28594 s,@localstatedir@,$localstatedir,;t t
28595 s,@runstatedir@,$runstatedir,;t t
28596 s,@libdir@,$libdir,;t t
28597 s,@includedir@,$includedir,;t t
28598 s,@oldincludedir@,$oldincludedir,;t t
28599 s,@infodir@,$infodir,;t t
28600 s,@mandir@,$mandir,;t t
28601 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28602 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28603 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28604 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28605 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28606 s,@build_alias@,$build_alias,;t t
28607 s,@host_alias@,$host_alias,;t t
28608 s,@target_alias@,$target_alias,;t t
28609 s,@ECHO_C@,$ECHO_C,;t t
28610 s,@ECHO_N@,$ECHO_N,;t t
28611 s,@ECHO_T@,$ECHO_T,;t t
28612 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28613 s,@DEFS@,$DEFS,;t t
28614 s,@LIBS@,$LIBS,;t t
28615 s,@top_builddir@,$top_builddir,;t t
28616 s,@EGREP@,$EGREP,;t t
28617 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28618 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28619 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28620 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28621 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28622 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28623 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28624 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28625 s,@VERSION@,$VERSION,;t t
28626 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28627 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28628 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28629 s,@PACKAGE@,$PACKAGE,;t t
28630 s,@build@,$build,;t t
28631 s,@build_cpu@,$build_cpu,;t t
28632 s,@build_vendor@,$build_vendor,;t t
28633 s,@build_os@,$build_os,;t t
28634 s,@host@,$host,;t t
28635 s,@host_cpu@,$host_cpu,;t t
28636 s,@host_vendor@,$host_vendor,;t t
28637 s,@host_os@,$host_os,;t t
28638 s,@target@,$target,;t t
28639 s,@target_cpu@,$target_cpu,;t t
28640 s,@target_vendor@,$target_vendor,;t t
28641 s,@target_os@,$target_os,;t t
28642 s,@CC@,$CC,;t t
28643 s,@CFLAGS@,$CFLAGS,;t t
28644 s,@LDFLAGS@,$LDFLAGS,;t t
28645 s,@CPPFLAGS@,$CPPFLAGS,;t t
28646 s,@ac_ct_CC@,$ac_ct_CC,;t t
28647 s,@EXEEXT@,$EXEEXT,;t t
28648 s,@OBJEXT@,$OBJEXT,;t t
28649 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28650 s,@CPP@,$CPP,;t t
28651 s,@LDCONFIG@,$LDCONFIG,;t t
28652 s,@CXX@,$CXX,;t t
28653 s,@CXXFLAGS@,$CXXFLAGS,;t t
28654 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28655 s,@AWK@,$AWK,;t t
28656 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28657 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28658 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28659 s,@LINT@,$LINT,;t t
28660 s,@LINT_OPTS@,$LINT_OPTS,;t t
28661 s,@LN_S@,$LN_S,;t t
28662 s,@cf_config_suffix@,$cf_config_suffix,;t t
28663 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28664 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28665 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28666 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28667 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28668 s,@SET_MAKE@,$SET_MAKE,;t t
28669 s,@CTAGS@,$CTAGS,;t t
28670 s,@ETAGS@,$ETAGS,;t t
28671 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28672 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28673 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28674 s,@RANLIB@,$RANLIB,;t t
28675 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28676 s,@LD@,$LD,;t t
28677 s,@ac_ct_LD@,$ac_ct_LD,;t t
28678 s,@AR@,$AR,;t t
28679 s,@ac_ct_AR@,$ac_ct_AR,;t t
28680 s,@NM@,$NM,;t t
28681 s,@ac_ct_NM@,$ac_ct_NM,;t t
28682 s,@ARFLAGS@,$ARFLAGS,;t t
28683 s,@DESTDIR@,$DESTDIR,;t t
28684 s,@BUILD_CC@,$BUILD_CC,;t t
28685 s,@BUILD_CPP@,$BUILD_CPP,;t t
28686 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28687 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28688 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28689 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28690 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28691 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28692 s,@cf_list_models@,$cf_list_models,;t t
28693 s,@ABI_VERSION@,$ABI_VERSION,;t t
28694 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28695 s,@LIBTOOL@,$LIBTOOL,;t t
28696 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28697 s,@LT_UNDEF@,$LT_UNDEF,;t t
28698 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28699 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28700 s,@LIB_CREATE@,$LIB_CREATE,;t t
28701 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28702 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28703 s,@LIB_PREP@,$LIB_PREP,;t t
28704 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28705 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28706 s,@LIB_LINK@,$LIB_LINK,;t t
28707 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28708 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28709 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28710 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28711 s,@TICS_NAME@,$TICS_NAME,;t t
28712 s,@TINFO_NAME@,$TINFO_NAME,;t t
28713 s,@LIB_NAME@,$LIB_NAME,;t t
28714 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28715 s,@CC_G_OPT@,$CC_G_OPT,;t t
28716 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28717 s,@LD_MODEL@,$LD_MODEL,;t t
28718 s,@shlibdir@,$shlibdir,;t t
28719 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28720 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28721 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28722 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28723 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28724 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28725 s,@LINK_PROGS@,$LINK_PROGS,;t t
28726 s,@LINK_TESTS@,$LINK_TESTS,;t t
28727 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28728 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28729 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28730 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28731 s,@RPATH_LIST@,$RPATH_LIST,;t t
28732 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28733 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28734 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28735 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28736 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28737 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28738 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28739 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28740 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28741 s,@TIC@,$TIC,;t t
28742 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28743 s,@INFOCMP@,$INFOCMP,;t t
28744 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28745 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28746 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28747 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28748 s,@XTERM_KBS@,$XTERM_KBS,;t t
28749 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28750 s,@TERMINFO@,$TERMINFO,;t t
28751 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28752 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28753 s,@TERMPATH@,$TERMPATH,;t t
28754 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28755 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28756 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28757 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28758 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28759 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28760 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28761 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28762 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28763 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28764 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28765 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28766 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28767 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28768 s,@RGB_PATH@,$RGB_PATH,;t t
28769 s,@no_x11_rgb@,$no_x11_rgb,;t t
28770 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28771 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28772 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28773 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28774 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28775 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28776 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28777 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28778 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28779 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28780 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28781 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28782 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28783 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28784 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28785 s,@PTHREAD@,$PTHREAD,;t t
28786 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28787 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28788 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28789 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28790 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28791 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28792 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28793 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28794 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28795 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28796 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
28797 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
28798 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
28799 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
28800 s,@ECHO_LT@,$ECHO_LT,;t t
28801 s,@ECHO_LD@,$ECHO_LD,;t t
28802 s,@RULE_CC@,$RULE_CC,;t t
28803 s,@SHOW_CC@,$SHOW_CC,;t t
28804 s,@ECHO_CC@,$ECHO_CC,;t t
28805 s,@ECHO_LINK@,$ECHO_LINK,;t t
28806 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
28807 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
28808 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
28809 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
28810 s,@ADAFLAGS@,$ADAFLAGS,;t t
28811 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
28812 s,@ADA_TRACE@,$ADA_TRACE,;t t
28813 s,@MATH_LIB@,$MATH_LIB,;t t
28814 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
28815 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
28816 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
28817 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
28818 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
28819 s,@TEST_LIBS@,$TEST_LIBS,;t t
28820 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
28821 s,@CXXCPP@,$CXXCPP,;t t
28822 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
28823 s,@CXX_AR@,$CXX_AR,;t t
28824 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
28825 s,@CXXLIBS@,$CXXLIBS,;t t
28826 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
28827 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
28828 s,@M4_exists@,$M4_exists,;t t
28829 s,@cf_ada_make@,$cf_ada_make,;t t
28830 s,@cf_ada_config@,$cf_ada_config,;t t
28831 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
28832 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
28833 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
28834 s,@cf_compile_generics@,$cf_compile_generics,;t t
28835 s,@cf_generic_objects@,$cf_generic_objects,;t t
28836 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
28837 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
28838 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
28839 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
28840 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
28841 s,@cf_ada_package@,$cf_ada_package,;t t
28842 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
28843 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
28844 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
28845 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
28846 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
28847 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
28848 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
28849 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
28850 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
28851 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
28852 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
28853 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
28854 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
28855 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
28856 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
28857 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
28858 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
28859 s,@TICS_LIBS@,$TICS_LIBS,;t t
28860 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
28861 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
28862 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
28863 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
28864 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
28865 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
28866 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
28867 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
28868 s,@includesubdir@,$includesubdir,;t t
28869 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
28870 s,@TICS_LIST@,$TICS_LIST,;t t
28871 s,@TINFO_LIST@,$TINFO_LIST,;t t
28872 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
28873 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
28874 s,@FORM_NAME@,$FORM_NAME,;t t
28875 s,@MENU_NAME@,$MENU_NAME,;t t
28876 s,@PANEL_NAME@,$PANEL_NAME,;t t
28877 s,@CXX_NAME@,$CXX_NAME,;t t
28878 s,@TEST_ARGS@,$TEST_ARGS,;t t
28879 s,@TEST_DEPS@,$TEST_DEPS,;t t
28880 s,@TEST_ARG2@,$TEST_ARG2,;t t
28881 s,@TEST_DEP2@,$TEST_DEP2,;t t
28882 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
28883 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
28884 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
28885 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
28886 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
28887 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
28888 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
28889 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
28890 s,@cross_compiling@,$cross_compiling,;t t
28891 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
28892 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
28893 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
28894 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
28895 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
28896 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
28897 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
28898 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
28899 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
28900 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
28901 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
28902 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
28903 CEOF
28904
28905 EOF
28906
28907   cat >>$CONFIG_STATUS <<\EOF
28908   # Split the substitutions into bite-sized pieces for seds with
28909   # small command number limits, like on Digital OSF/1 and HP-UX.
28910   ac_max_sed_lines=48
28911   ac_sed_frag=1 # Number of current file.
28912   ac_beg=1 # First line for current file.
28913   ac_end=$ac_max_sed_lines # Line after last line for current file.
28914   ac_more_lines=:
28915   ac_sed_cmds=
28916   while $ac_more_lines; do
28917     if test $ac_beg -gt 1; then
28918       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
28919     else
28920       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
28921     fi
28922     if test ! -s $tmp/subs.frag; then
28923       ac_more_lines=false
28924     else
28925       # The purpose of the label and of the branching condition is to
28926       # speed up the sed processing (if there are no `@' at all, there
28927       # is no need to browse any of the substitutions).
28928       # These are the two extra sed commands mentioned above.
28929       (echo ':t
28930   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
28931       # It is possible to make a multiline substitution using escaped newlines.
28932       # Ensure that we do not split the substitution between script fragments.
28933       ac_BEG=$ac_end
28934       ac_END=`expr $ac_end + $ac_max_sed_lines`
28935       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
28936       if test -s $tmp/subs.next; then
28937         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
28938         if test ! -s $tmp/subs.edit; then
28939           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
28940           if test ! -s $tmp/subs.edit; then
28941             if test $ac_beg -gt 1; then
28942               ac_end=`expr $ac_end - 1`
28943               continue
28944             fi
28945           fi
28946         fi
28947       fi
28948
28949       if test -z "$ac_sed_cmds"; then
28950         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
28951       else
28952         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
28953       fi
28954       ac_sed_frag=`expr $ac_sed_frag + 1`
28955       ac_beg=$ac_end
28956       ac_end=`expr $ac_end + $ac_max_sed_lines`
28957     fi
28958   done
28959   if test -z "$ac_sed_cmds"; then
28960     ac_sed_cmds=cat
28961   fi
28962 fi # test -n "$CONFIG_FILES"
28963
28964 EOF
28965 cat >>$CONFIG_STATUS <<\EOF
28966 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
28967   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
28968   case $ac_file in
28969   - | *:- | *:-:* ) # input from stdin
28970         cat >$tmp/stdin
28971         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
28972         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
28973   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
28974         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
28975   * )   ac_file_in=$ac_file.in ;;
28976   esac
28977
28978   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
28979   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28980          X"$ac_file" : 'X\(//\)[^/]' \| \
28981          X"$ac_file" : 'X\(//\)$' \| \
28982          X"$ac_file" : 'X\(/\)' \| \
28983          .     : '\(.\)' 2>/dev/null ||
28984 echo X"$ac_file" |
28985     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
28986           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
28987           /^X\(\/\/\)$/{ s//\1/; q; }
28988           /^X\(\/\).*/{ s//\1/; q; }
28989           s/.*/./; q'`
28990   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
28991     { case "$ac_dir" in
28992   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
28993   *)                      as_incr_dir=.;;
28994 esac
28995 as_dummy="$ac_dir"
28996 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
28997   case $as_mkdir_dir in
28998     # Skip DOS drivespec
28999     ?:) as_incr_dir=$as_mkdir_dir ;;
29000     *)
29001       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29002       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29003     ;;
29004   esac
29005 done; }
29006
29007     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29008     # A "../" for each directory in $ac_dir_suffix.
29009     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29010   else
29011     ac_dir_suffix= ac_dots=
29012   fi
29013
29014   case $srcdir in
29015   .)  ac_srcdir=.
29016       if test -z "$ac_dots"; then
29017          ac_top_srcdir=.
29018       else
29019          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
29020       fi ;;
29021   [\\/]* | ?:[\\/]* )
29022       ac_srcdir=$srcdir$ac_dir_suffix;
29023       ac_top_srcdir=$srcdir ;;
29024   *) # Relative path.
29025     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
29026     ac_top_srcdir=$ac_dots$srcdir ;;
29027   esac
29028
29029   case $INSTALL in
29030   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29031   *) ac_INSTALL=$ac_dots$INSTALL ;;
29032   esac
29033
29034   if test x"$ac_file" != x-; then
29035     { echo "$as_me:29035: creating $ac_file" >&5
29036 echo "$as_me: creating $ac_file" >&6;}
29037     rm -f "$ac_file"
29038   fi
29039   # Let's still pretend it is `configure' which instantiates (i.e., don't
29040   # use $as_me), people would be surprised to read:
29041   #    /* config.h.  Generated automatically by config.status.  */
29042   configure_input="Generated automatically from `echo $ac_file_in |
29043                                                  sed 's,.*/,,'` by configure."
29044
29045   # First look for the input files in the build tree, otherwise in the
29046   # src tree.
29047   ac_file_inputs=`IFS=:
29048     for f in $ac_file_in; do
29049       case $f in
29050       -) echo $tmp/stdin ;;
29051       [\\/$]*)
29052          # Absolute (can't be DOS-style, as IFS=:)
29053          test -f "$f" || { { echo "$as_me:29053: error: cannot find input file: $f" >&5
29054 echo "$as_me: error: cannot find input file: $f" >&2;}
29055    { (exit 1); exit 1; }; }
29056          echo $f;;
29057       *) # Relative
29058          if test -f "$f"; then
29059            # Build tree
29060            echo $f
29061          elif test -f "$srcdir/$f"; then
29062            # Source tree
29063            echo $srcdir/$f
29064          else
29065            # /dev/null tree
29066            { { echo "$as_me:29066: error: cannot find input file: $f" >&5
29067 echo "$as_me: error: cannot find input file: $f" >&2;}
29068    { (exit 1); exit 1; }; }
29069          fi;;
29070       esac
29071     done` || { (exit 1); exit 1; }
29072 EOF
29073 cat >>$CONFIG_STATUS <<\EOF
29074   ac_warn_datarootdir=no
29075   if test x"$ac_file" != x-; then
29076     for ac_item in $ac_file_inputs
29077     do
29078       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
29079       if test -n "$ac_seen"; then
29080         ac_used=`grep '@datarootdir@' $ac_item`
29081         if test -z "$ac_used"; then
29082           { echo "$as_me:29082: WARNING: datarootdir was used implicitly but not set:
29083 $ac_seen" >&5
29084 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29085 $ac_seen" >&2;}
29086           ac_warn_datarootdir=yes
29087         fi
29088       fi
29089       ac_seen=`grep '${datarootdir}' $ac_item`
29090       if test -n "$ac_seen"; then
29091         { echo "$as_me:29091: WARNING: datarootdir was used explicitly but not set:
29092 $ac_seen" >&5
29093 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29094 $ac_seen" >&2;}
29095         ac_warn_datarootdir=yes
29096       fi
29097     done
29098   fi
29099
29100 if test "x$ac_warn_datarootdir" = xyes; then
29101   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29102 fi
29103
29104 EOF
29105 cat >>$CONFIG_STATUS <<EOF
29106   sed "$ac_vpsub
29107 $extrasub
29108 EOF
29109 cat >>$CONFIG_STATUS <<\EOF
29110 :t
29111 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29112 s,@configure_input@,$configure_input,;t t
29113 s,@srcdir@,$ac_srcdir,;t t
29114 s,@top_srcdir@,$ac_top_srcdir,;t t
29115 s,@INSTALL@,$ac_INSTALL,;t t
29116 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29117   rm -f $tmp/stdin
29118   if test x"$ac_file" != x-; then
29119     cp $tmp/out $ac_file
29120
29121     for ac_name in prefix exec_prefix datarootdir
29122     do
29123         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
29124         if test -n "$ac_seen"; then
29125             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
29126             if test -z "$ac_init"; then
29127               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29128               { echo "$as_me:29128: WARNING: Variable $ac_name is used but was not set:
29129 $ac_seen" >&5
29130 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29131 $ac_seen" >&2;}
29132             fi
29133         fi
29134     done
29135     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
29136     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
29137     if test -s $tmp/out; then
29138       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29139       { echo "$as_me:29139: WARNING: Some variables may not be substituted:
29140 $ac_seen" >&5
29141 echo "$as_me: WARNING: Some variables may not be substituted:
29142 $ac_seen" >&2;}
29143     fi
29144   else
29145     cat $tmp/out
29146   fi
29147   rm -f $tmp/out
29148
29149 done
29150 EOF
29151 cat >>$CONFIG_STATUS <<\EOF
29152
29153 #
29154 # CONFIG_HEADER section.
29155 #
29156
29157 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29158 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29159 #
29160 # ac_d sets the value in "#define NAME VALUE" lines.
29161 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29162 ac_dB='[        ].*$,\1#\2'
29163 ac_dC=' '
29164 ac_dD=',;t'
29165 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29166 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29167 ac_iB='\([      ]\),\1#\2define\3'
29168 ac_iC=' '
29169 ac_iD='\4,;t'
29170 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29171 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29172 ac_uB='$,\1#\2define\3'
29173 ac_uC=' '
29174 ac_uD=',;t'
29175
29176 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29177   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29178   case $ac_file in
29179   - | *:- | *:-:* ) # input from stdin
29180         cat >$tmp/stdin
29181         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29182         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29183   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29184         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29185   * )   ac_file_in=$ac_file.in ;;
29186   esac
29187
29188   test x"$ac_file" != x- && { echo "$as_me:29188: creating $ac_file" >&5
29189 echo "$as_me: creating $ac_file" >&6;}
29190
29191   # First look for the input files in the build tree, otherwise in the
29192   # src tree.
29193   ac_file_inputs=`IFS=:
29194     for f in $ac_file_in; do
29195       case $f in
29196       -) echo $tmp/stdin ;;
29197       [\\/$]*)
29198          # Absolute (can't be DOS-style, as IFS=:)
29199          test -f "$f" || { { echo "$as_me:29199: error: cannot find input file: $f" >&5
29200 echo "$as_me: error: cannot find input file: $f" >&2;}
29201    { (exit 1); exit 1; }; }
29202          echo $f;;
29203       *) # Relative
29204          if test -f "$f"; then
29205            # Build tree
29206            echo $f
29207          elif test -f "$srcdir/$f"; then
29208            # Source tree
29209            echo $srcdir/$f
29210          else
29211            # /dev/null tree
29212            { { echo "$as_me:29212: error: cannot find input file: $f" >&5
29213 echo "$as_me: error: cannot find input file: $f" >&2;}
29214    { (exit 1); exit 1; }; }
29215          fi;;
29216       esac
29217     done` || { (exit 1); exit 1; }
29218   # Remove the trailing spaces.
29219   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29220
29221 EOF
29222
29223 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29224 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29225 # be either 'cat' or 'sort'.
29226 cat confdefs.h | uniq >conftest.vals
29227
29228 # Break up conftest.vals because some shells have a limit on
29229 # the size of here documents, and old seds have small limits too.
29230
29231 rm -f conftest.tail
29232 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
29233 while grep . conftest.vals >/dev/null
29234 do
29235   # Write chunks of a limited-size here document to conftest.frag.
29236   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
29237   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
29238   echo 'CEOF' >> $CONFIG_STATUS
29239   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
29240   rm -f conftest.vals
29241   mv conftest.tail conftest.vals
29242 done
29243 rm -f conftest.vals
29244
29245 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29246 # marker @DEFS@.
29247 echo '  cat >> conftest.edit <<CEOF
29248 /@DEFS@/r conftest.frag
29249 /@DEFS@/d
29250 CEOF
29251 sed -f conftest.edit $tmp/in > $tmp/out
29252 rm -f $tmp/in
29253 mv $tmp/out $tmp/in
29254 rm -f conftest.edit conftest.frag
29255 ' >> $CONFIG_STATUS
29256
29257 cat >>$CONFIG_STATUS <<\EOF
29258   # Let's still pretend it is `configure' which instantiates (i.e., don't
29259   # use $as_me), people would be surprised to read:
29260   #    /* config.h.  Generated automatically by config.status.  */
29261   if test x"$ac_file" = x-; then
29262     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29263   else
29264     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29265   fi
29266   cat $tmp/in >>$tmp/config.h
29267   rm -f $tmp/in
29268   if test x"$ac_file" != x-; then
29269     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
29270       { echo "$as_me:29270: $ac_file is unchanged" >&5
29271 echo "$as_me: $ac_file is unchanged" >&6;}
29272     else
29273       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29274          X"$ac_file" : 'X\(//\)[^/]' \| \
29275          X"$ac_file" : 'X\(//\)$' \| \
29276          X"$ac_file" : 'X\(/\)' \| \
29277          .     : '\(.\)' 2>/dev/null ||
29278 echo X"$ac_file" |
29279     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29280           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29281           /^X\(\/\/\)$/{ s//\1/; q; }
29282           /^X\(\/\).*/{ s//\1/; q; }
29283           s/.*/./; q'`
29284       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29285         { case "$ac_dir" in
29286   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29287   *)                      as_incr_dir=.;;
29288 esac
29289 as_dummy="$ac_dir"
29290 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29291   case $as_mkdir_dir in
29292     # Skip DOS drivespec
29293     ?:) as_incr_dir=$as_mkdir_dir ;;
29294     *)
29295       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29296       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29297     ;;
29298   esac
29299 done; }
29300
29301       fi
29302       rm -f $ac_file
29303       mv $tmp/config.h $ac_file
29304     fi
29305   else
29306     cat $tmp/config.h
29307     rm -f $tmp/config.h
29308   fi
29309 done
29310 EOF
29311 cat >>$CONFIG_STATUS <<\EOF
29312 #
29313 # CONFIG_COMMANDS section.
29314 #
29315 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29316   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29317   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29318
29319   case $ac_dest in
29320     default )
29321 if test "x$cf_with_tests" != xno ; then
29322
29323 for cf_dir in test
29324 do
29325         if test ! -d $srcdir/$cf_dir; then
29326                 continue
29327         elif test -f $srcdir/$cf_dir/programs; then
29328                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
29329         fi
29330 done
29331
29332 fi
29333
29334 cf_prefix=$LIB_PREFIX
29335
29336 case $cf_cv_shlib_version in
29337 (cygdll|msysdll|mingw|msvcdll)
29338         TINFO_NAME=$TINFO_ARG_SUFFIX
29339         TINFO_SUFFIX=.dll
29340         ;;
29341 esac
29342
29343 if test -n "$TINFO_SUFFIX" ; then
29344         case $TINFO_SUFFIX in
29345         (tw*)
29346                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29347                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
29348                 ;;
29349         (t*)
29350                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29351                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
29352                 ;;
29353         (w*)
29354                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29355                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
29356                 ;;
29357         esac
29358 fi
29359
29360 for cf_dir in $SRC_SUBDIRS
29361 do
29362         if test ! -d $srcdir/$cf_dir ; then
29363                 continue
29364         elif test -f $srcdir/$cf_dir/modules; then
29365
29366                 SHARED_LIB=
29367                 Libs_To_Make=
29368                 cf_awk_program=
29369                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29370                 then
29371                         cf_awk_program="$cf_awk_program\
29372 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29373 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29374 "
29375                 fi
29376
29377                 if test "x$WILDCARD_SYMS" = xno
29378                 then
29379                         cf_awk_program="$cf_awk_program\
29380 /[      ]_\\*;/ { skip=1; next; }\
29381 "
29382                 fi
29383
29384                 if test "x$cf_awk_program" != "x"
29385                 then
29386                         cat >>$cf_dir/Makefile <<CF_EOF
29387
29388 # Generated by CF_LIB_RULES
29389 resulting.map: $UNALTERED_SYMS
29390         $AWK 'BEGIN { skip = 1; last=""; } \
29391 $cf_awk_program \
29392 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29393  skip = 0; last = \$\$0; } \
29394 END { print last; }' < $UNALTERED_SYMS >\$@
29395
29396 distclean::
29397         rm -f resulting.map
29398 CF_EOF
29399                 fi
29400
29401                 for cf_item in $cf_LIST_MODELS
29402                 do
29403
29404         case X$cf_item in
29405         (Xlibtool)
29406                 cf_suffix='.la'
29407                 cf_depsuf=$cf_suffix
29408                 ;;
29409         (Xdebug)
29410                 case $cf_cv_system_name in
29411                 (*-msvc*)
29412                         cf_suffix='_g.lib'
29413                         ;;
29414                 (*)
29415                         cf_suffix='_g.a'
29416                         ;;
29417                 esac
29418                 cf_depsuf=$cf_suffix
29419                 ;;
29420         (Xprofile)
29421                 case $cf_cv_system_name in
29422                 (*-msvc*)
29423                         cf_suffix='_p.lib'
29424                         ;;
29425                 (*)
29426                         cf_suffix='_p.a'
29427                         ;;
29428                 esac
29429                 cf_depsuf=$cf_suffix
29430                 ;;
29431         (Xshared)
29432                 case $cf_cv_system_name in
29433                 (aix[5-7]*)
29434                         cf_suffix='.so'
29435                         cf_depsuf=$cf_suffix
29436                         ;;
29437                 (*-msvc*)
29438                         cf_suffix='.dll'
29439                         cf_depsuf='.dll.lib'
29440                         ;;
29441                 (cygwin*|msys*|mingw*)
29442                         cf_suffix='.dll'
29443                         cf_depsuf='.dll.a'
29444                         ;;
29445                 (darwin*)
29446                         cf_suffix='.dylib'
29447                         cf_depsuf=$cf_suffix
29448                         ;;
29449                 (hpux*)
29450                         case $target in
29451                         (ia64*)
29452                                 cf_suffix='.so'
29453                                 cf_depsuf=$cf_suffix
29454                                 ;;
29455                         (*)
29456                                 cf_suffix='.sl'
29457                                 cf_depsuf=$cf_suffix
29458                                 ;;
29459                         esac
29460                         ;;
29461                 (*)
29462                         cf_suffix='.so'
29463                         cf_depsuf=$cf_suffix
29464                         ;;
29465                 esac
29466                 ;;
29467         (*)
29468                 case $target in
29469                 (*-msvc*)
29470                         cf_suffix='.lib'
29471                         ;;
29472                 (*)
29473                         cf_suffix='.a'
29474                         ;;
29475                 esac
29476                 cf_depsuf=$cf_suffix
29477                 ;;
29478         esac
29479         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29480         then
29481                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29482                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29483         fi
29484
29485                         if test "$cf_dir" = "c++"
29486                         then
29487
29488 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29489
29490 eval cf_libname=\$${cf_map_lib_basename}_NAME
29491
29492                         else
29493
29494 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29495
29496 eval cf_libname=\$${cf_map_lib_basename}_NAME
29497
29498                         fi
29499                         test -z "$cf_libname" && cf_libname="$cf_dir"
29500                         if test $cf_item = shared ; then
29501                                 if test -n "${LIB_SUFFIX}"
29502                                 then
29503                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29504                                 else
29505                                         cf_shared_suffix="$cf_suffix"
29506                                 fi
29507                                 if test "$cf_cv_do_symlinks" = yes ; then
29508                                         cf_version_name=
29509
29510                                         case "$cf_cv_shlib_version" in
29511                                         (rel)
29512                                                 cf_version_name=REL_VERSION
29513                                                 ;;
29514                                         (abi)
29515                                                 cf_version_name=ABI_VERSION
29516                                                 ;;
29517                                         esac
29518
29519                                         if test -n "$cf_version_name"
29520                                         then
29521                                                 case "$cf_cv_system_name" in
29522                                                 (darwin*)
29523                                                         # "w", etc?
29524                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29525                                                         ;;
29526                                                 (*)
29527                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29528                                                         ;;
29529                                                 esac
29530                                         fi
29531                                         if test -n "${USE_LIB_SUFFIX}"
29532                                         then
29533                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29534                                         else
29535                                                 cf_shared_suffix="$cf_suffix"
29536                                         fi
29537                                 fi
29538                                 # cygwin needs import library, and has unique naming convention
29539                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29540                                 # use 'cyg' prefix for shared lib.
29541                                 case $cf_cv_shlib_version in
29542                                 (cygdll)
29543                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29544                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29545                                         ;;
29546                                 (msysdll)
29547                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29548                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29549                                         ;;
29550                                 (mingw)
29551                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29552                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29553                                         ;;
29554                                 (msvcdll)
29555                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29556                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29557                                         ;;
29558                                 (*)
29559                                         cf_add_lib=
29560                                         ;;
29561                                 esac
29562                                 if test -n "$cf_add_lib"
29563                                 then
29564                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29565                                         continue
29566                                 fi
29567                         fi
29568                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29569                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29570                 done
29571
29572                 if test $cf_dir = ncurses ; then
29573                         cf_subsets="$LIB_SUBSETS"
29574                         cf_r_parts="$cf_subsets"
29575                         cf_liblist="$Libs_To_Make"
29576
29577                         while test -n "$cf_r_parts"
29578                         do
29579                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29580                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29581                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29582                                         cf_add_lib=
29583                                         case $cf_l_parts in
29584                                         (*termlib*)
29585                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29586                                                 ;;
29587                                         (*ticlib*)
29588                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29589                                                 ;;
29590                                         (*)
29591                                                 break
29592                                                 ;;
29593                                         esac
29594                                         if test -n "$cf_add_lib"; then
29595                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29596                                         fi
29597                                 else
29598                                         break
29599                                 fi
29600                         done
29601                 else
29602                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29603                 fi
29604
29605                 if test $cf_dir = c++; then
29606                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29607                                 cf_list=
29608                                 for cf_item in $Libs_To_Make
29609                                 do
29610                                         case $cf_item in
29611                                         (*.a)
29612                                                 ;;
29613                                         (*)
29614                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29615                                                 ;;
29616                                         esac
29617                                         for cf_test in $cf_list
29618                                         do
29619                                                 if test "$cf_test" = "$cf_item"
29620                                                 then
29621                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29622                                                         cf_item=
29623                                                         break
29624                                                 fi
29625                                         done
29626                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29627                                 done
29628                                 Libs_To_Make="$cf_list"
29629                         fi
29630                 fi
29631
29632                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29633                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29634                         $cf_dir/Makefile >$cf_dir/Makefile.out
29635                 mv $cf_dir/Makefile.out $cf_dir/Makefile
29636
29637                 $AWK -f $srcdir/mk-0th.awk \
29638                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29639                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29640
29641                 for cf_subset in $cf_subsets
29642                 do
29643                         cf_subdirs=
29644                         for cf_item in $cf_LIST_MODELS
29645                         do
29646
29647                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29648
29649 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29650
29651                         CXX_MODEL=$cf_ITEM
29652                         if test "$CXX_MODEL" = SHARED; then
29653                                 case $cf_cv_shlib_version in
29654                                 (cygdll|msysdll|mingw|msvcdll)
29655                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29656
29657 echo "${as_me:-configure}:29657: testing overriding CXX_MODEL to SHARED ..." 1>&5
29658
29659                                         with_shared_cxx=yes
29660                                         ;;
29661                                 (*)
29662                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29663                                         ;;
29664                                 esac
29665                         fi
29666
29667         case X$cf_item in
29668         (Xlibtool)
29669                 cf_suffix='.la'
29670                 cf_depsuf=$cf_suffix
29671                 ;;
29672         (Xdebug)
29673                 case $cf_cv_system_name in
29674                 (*-msvc*)
29675                         cf_suffix='_g.lib'
29676                         ;;
29677                 (*)
29678                         cf_suffix='_g.a'
29679                         ;;
29680                 esac
29681                 cf_depsuf=$cf_suffix
29682                 ;;
29683         (Xprofile)
29684                 case $cf_cv_system_name in
29685                 (*-msvc*)
29686                         cf_suffix='_p.lib'
29687                         ;;
29688                 (*)
29689                         cf_suffix='_p.a'
29690                         ;;
29691                 esac
29692                 cf_depsuf=$cf_suffix
29693                 ;;
29694         (Xshared)
29695                 case $cf_cv_system_name in
29696                 (aix[5-7]*)
29697                         cf_suffix='.so'
29698                         cf_depsuf=$cf_suffix
29699                         ;;
29700                 (*-msvc*)
29701                         cf_suffix='.dll'
29702                         cf_depsuf='.dll.lib'
29703                         ;;
29704                 (cygwin*|msys*|mingw*)
29705                         cf_suffix='.dll'
29706                         cf_depsuf='.dll.a'
29707                         ;;
29708                 (darwin*)
29709                         cf_suffix='.dylib'
29710                         cf_depsuf=$cf_suffix
29711                         ;;
29712                 (hpux*)
29713                         case $target in
29714                         (ia64*)
29715                                 cf_suffix='.so'
29716                                 cf_depsuf=$cf_suffix
29717                                 ;;
29718                         (*)
29719                                 cf_suffix='.sl'
29720                                 cf_depsuf=$cf_suffix
29721                                 ;;
29722                         esac
29723                         ;;
29724                 (*)
29725                         cf_suffix='.so'
29726                         cf_depsuf=$cf_suffix
29727                         ;;
29728                 esac
29729                 ;;
29730         (*)
29731                 case $target in
29732                 (*-msvc*)
29733                         cf_suffix='.lib'
29734                         ;;
29735                 (*)
29736                         cf_suffix='.a'
29737                         ;;
29738                 esac
29739                 cf_depsuf=$cf_suffix
29740                 ;;
29741         esac
29742         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29743         then
29744                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29745                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29746         fi
29747
29748         case $cf_item in
29749         (libtool) cf_subdir='obj_lo'  ;;
29750         (normal)  cf_subdir='objects' ;;
29751         (debug)   cf_subdir='obj_g' ;;
29752         (profile) cf_subdir='obj_p' ;;
29753         (shared)
29754                 case $cf_cv_system_name in
29755                 (cygwin|msys)
29756                         cf_subdir='objects' ;;
29757                 (*)
29758                         cf_subdir='obj_s' ;;
29759                 esac
29760         esac
29761
29762                         # Test for case where we build libtinfo with a different name.
29763                         cf_libname=$cf_dir
29764                         if test $cf_dir = ncurses ; then
29765                                 case $cf_subset in
29766                                 (*base*)
29767                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29768                                         ;;
29769                                 (*termlib*)
29770                                         cf_libname=$TINFO_LIB_SUFFIX
29771                                         ;;
29772                                 (ticlib*)
29773                                         cf_libname=$TICS_LIB_SUFFIX
29774                                         ;;
29775                                 esac
29776                         elif test $cf_dir = c++ ; then
29777
29778 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29779
29780 eval cf_libname=\$${cf_map_lib_basename}_NAME
29781
29782                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29783                         else
29784
29785 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29786
29787 eval cf_libname=\$${cf_map_lib_basename}_NAME
29788
29789                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29790                         fi
29791                         if test -n "${USE_ARG_SUFFIX}" ; then
29792                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
29793                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
29794                         fi
29795
29796                         # These dependencies really are for development, not
29797                         # builds, but they are useful in porting, too.
29798                         cf_depend="../include/ncurses_cfg.h"
29799                         if test "$srcdir" = "."; then
29800                                 cf_reldir="."
29801                         else
29802                                 cf_reldir="\${srcdir}"
29803                         fi
29804
29805                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
29806                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
29807                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
29808                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
29809                         fi
29810
29811                         cf_dir_suffix=
29812                         old_cf_suffix="$cf_suffix"
29813                         if test "$cf_cv_shlib_version_infix" = yes ; then
29814                         if test -n "$USE_LIB_SUFFIX" ; then
29815                                 case $USE_LIB_SUFFIX in
29816                                 (tw*)
29817                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
29818                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
29819                                         cf_dir_suffix=tw$EXTRA_SUFFIX
29820                                         ;;
29821                                 (t*)
29822                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
29823                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
29824                                         cf_dir_suffix=t$EXTRA_SUFFIX
29825                                         ;;
29826                                 (w*)
29827                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
29828                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
29829                                         cf_dir_suffix=w$EXTRA_SUFFIX
29830                                         ;;
29831                                 (*)
29832                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
29833                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
29834                                         cf_dir_suffix=$EXTRA_SUFFIX
29835                                         ;;
29836                                 esac
29837                         fi
29838                         fi
29839
29840                         $AWK -f $srcdir/mk-1st.awk \
29841                                 name=${cf_libname}${cf_dir_suffix} \
29842                                 traces=$LIB_TRACING \
29843                                 MODEL=$cf_ITEM \
29844                                 CXX_MODEL=$CXX_MODEL \
29845                                 model=$cf_subdir \
29846                                 prefix=$cf_prefix \
29847                                 suffix=$cf_suffix \
29848                                 subset=$cf_subset \
29849                                 driver=$cf_cv_term_driver \
29850                                 SymLink="$LN_S" \
29851                                 TermlibRoot=$TINFO_NAME \
29852                                 TermlibSuffix=$TINFO_SUFFIX \
29853                                 ShlibVer=$cf_cv_shlib_version \
29854                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
29855                                 ReLink=${cf_cv_do_relink:-no} \
29856                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
29857                                 DoLinks=$cf_cv_do_symlinks \
29858                                 rmSoLocs=$cf_cv_rm_so_locs \
29859                                 ldconfig="$LDCONFIG" \
29860                                 overwrite=$WITH_OVERWRITE \
29861                                 depend="$cf_depend" \
29862                                 host="$host" \
29863                                 libtool_version="$LIBTOOL_VERSION" \
29864                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29865
29866                         cf_suffix="$old_cf_suffix"
29867
29868                         for cf_subdir2 in $cf_subdirs lib
29869                         do
29870                                 test $cf_subdir = $cf_subdir2 && break
29871                         done
29872                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
29873                         $AWK -f $srcdir/mk-2nd.awk \
29874                                 name=$cf_dir \
29875                                 traces=$LIB_TRACING \
29876                                 MODEL=$cf_ITEM \
29877                                 model=$cf_subdir \
29878                                 subset=$cf_subset \
29879                                 srcdir=$srcdir \
29880                                 echo=$WITH_ECHO \
29881                                 crenames=$cf_cv_prog_CC_c_o \
29882                                 cxxrenames=$cf_cv_prog_CXX_c_o \
29883                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29884                         cf_subdirs="$cf_subdirs $cf_subdir"
29885                         done
29886                 done
29887         fi
29888
29889         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
29890 done
29891
29892 for cf_dir in $SRC_SUBDIRS
29893 do
29894         if test ! -d $srcdir/$cf_dir ; then
29895                 continue
29896         fi
29897
29898         if test -f $cf_dir/Makefile ; then
29899                 case "$cf_dir" in
29900                 (Ada95)
29901                         echo 'libs \' >> Makefile
29902                         echo 'install.libs \' >> Makefile
29903                         echo 'uninstall.libs ::' >> Makefile
29904                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
29905                         ;;
29906                 esac
29907         fi
29908
29909         if test -f $srcdir/$cf_dir/modules; then
29910                 echo >> Makefile
29911                 if test -f $srcdir/$cf_dir/headers; then
29912 cat >> Makefile <<CF_EOF
29913 install.includes \\
29914 uninstall.includes \\
29915 CF_EOF
29916                 fi
29917 if test "$cf_dir" != "c++" ; then
29918 echo 'lint \' >> Makefile
29919 fi
29920 cat >> Makefile <<CF_EOF
29921 libs \\
29922 lintlib \\
29923 install.libs \\
29924 uninstall.libs \\
29925 install.$cf_dir \\
29926 uninstall.$cf_dir ::
29927         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
29928 CF_EOF
29929         elif test -f $srcdir/$cf_dir/headers; then
29930 cat >> Makefile <<CF_EOF
29931
29932 libs \\
29933 install.libs \\
29934 uninstall.libs \\
29935 install.includes \\
29936 uninstall.includes ::
29937         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
29938 CF_EOF
29939 fi
29940 done
29941
29942 if test "x$cf_with_db_install" = xyes; then
29943 cat >> Makefile <<CF_EOF
29944
29945 install.libs uninstall.libs \\
29946 install.data uninstall.data ::
29947 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
29948 CF_EOF
29949 else
29950 cat >> Makefile <<CF_EOF
29951
29952 install.libs uninstall.libs ::
29953         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
29954 CF_EOF
29955 fi
29956
29957 if test "x$cf_with_manpages" = xyes; then
29958 cat >> Makefile <<CF_EOF
29959
29960 install.man \\
29961 uninstall.man ::
29962         cd man && \${MAKE} \${TOP_MFLAGS} \$@
29963 CF_EOF
29964 fi
29965
29966 cat >> Makefile <<CF_EOF
29967
29968 distclean ::
29969         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
29970         rm -f headers.sh headers.sed mk_shared_lib.sh
29971         rm -f edit_man.* man_alias.*
29972         rm -rf \${DIRS_TO_MAKE}
29973 CF_EOF
29974
29975 # Special case: tack's manpage lives in its own directory.
29976 if test "x$cf_with_manpages" = xyes; then
29977 if test "x$cf_with_tack" = "xyes"; then
29978 cat >> Makefile <<CF_EOF
29979
29980 install.man \\
29981 uninstall.man ::
29982         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
29983 CF_EOF
29984 fi
29985 fi
29986
29987 rm -f headers.sed headers.sh
29988
29989 echo creating headers.sh
29990 cat >headers.sh <<CF_EOF
29991 #! $SHELL
29992 # This shell script is generated by the 'configure' script.  It is invoked in a
29993 # subdirectory of the build tree.  It generates a sed-script in the parent
29994 # directory that is used to adjust includes for header files that reside in a
29995 # subdirectory of /usr/include, etc.
29996 PRG=""
29997 while test \$# != 3
29998 do
29999 PRG="\$PRG \$1"; shift
30000 done
30001 DST=\$1
30002 REF=\$2
30003 SRC=\$3
30004 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30005 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30006 echo installing \$SRC in \$DST
30007 CF_EOF
30008
30009 if test $WITH_CURSES_H = yes; then
30010         cat >>headers.sh <<CF_EOF
30011 case \$DST in
30012 (/*/include/*)
30013         END=\`basename \$DST\`
30014         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
30015         do
30016                 NAME=\`basename \$i\`
30017                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30018         done
30019         ;;
30020 (*)
30021         echo "" >> \$TMPSED
30022         ;;
30023 esac
30024 CF_EOF
30025
30026 else
30027         cat >>headers.sh <<CF_EOF
30028 case \$DST in
30029 (/*/include/*)
30030         END=\`basename \$DST\`
30031         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
30032         do
30033                 NAME=\`basename \$i\`
30034                 if test "\$NAME" = "curses.h"
30035                 then
30036                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30037                         NAME=ncurses.h
30038                 fi
30039                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30040         done
30041         ;;
30042 (*)
30043         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30044         ;;
30045 esac
30046 CF_EOF
30047 fi
30048 cat >>headers.sh <<CF_EOF
30049 rm -f \$TMPSRC
30050 sed -f \$TMPSED \$SRC > \$TMPSRC
30051 NAME=\`basename \$SRC\`
30052 CF_EOF
30053 if test $WITH_CURSES_H != yes; then
30054         cat >>headers.sh <<CF_EOF
30055 test "\$NAME" = "curses.h" && NAME=ncurses.h
30056 CF_EOF
30057 fi
30058 cat >>headers.sh <<CF_EOF
30059 # Just in case someone gzip'd manpages, remove the conflicting copy.
30060 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30061
30062 eval \$PRG \$TMPSRC \$DST/\$NAME
30063 rm -f \$TMPSRC \$TMPSED
30064 CF_EOF
30065
30066 chmod 0755 headers.sh
30067
30068 for cf_dir in $SRC_SUBDIRS
30069 do
30070         if test ! -d $srcdir/$cf_dir ; then
30071                 continue
30072         fi
30073
30074         if test -f $srcdir/$cf_dir/headers; then
30075                 $AWK -f $srcdir/mk-hdr.awk \
30076                         subset="$LIB_SUBSETS" \
30077                         compat="$WITH_CURSES_H" \
30078                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
30079         fi
30080
30081         if test -f $srcdir/$cf_dir/modules; then
30082                 if test "$cf_dir" != "c++" ; then
30083                         cat >>$cf_dir/Makefile <<"CF_EOF"
30084 depend : ${AUTO_SRC}
30085         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30086
30087 # DO NOT DELETE THIS LINE -- make depend depends on it.
30088 CF_EOF
30089                 fi
30090         fi
30091 done
30092
30093 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30094 if test -z "$USE_OLD_MAKERULES" ; then
30095         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
30096 fi
30097 fi
30098  ;;
30099   esac
30100 done
30101 EOF
30102
30103 cat >>$CONFIG_STATUS <<\EOF
30104
30105 { (exit 0); exit 0; }
30106 EOF
30107 chmod +x $CONFIG_STATUS
30108 ac_clean_files=$ac_clean_files_save
30109
30110 # configure is writing to config.log, and then calls config.status.
30111 # config.status does its own redirection, appending to config.log.
30112 # Unfortunately, on DOS this fails, as config.log is still kept open
30113 # by configure, so config.status won't be able to write to it; its
30114 # output is simply discarded.  So we exec the FD to /dev/null,
30115 # effectively closing config.log, so it can be properly (re)opened and
30116 # appended to by config.status.  When coming back to configure, we
30117 # need to make the FD available again.
30118 if test "$no_create" != yes; then
30119   ac_cs_success=:
30120   exec 5>/dev/null
30121   $SHELL $CONFIG_STATUS || ac_cs_success=false
30122   exec 5>>config.log
30123   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30124   # would make configure fail if this is the last instruction.
30125   $ac_cs_success || { (exit 1); exit 1; }
30126 fi
30127 ${MAKE:-make} preinstall